@idl3/claude-control 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,7 @@ npm install -g @idl3/claude-control # or run once: npx @idl3/claude-control
22
22
 
23
23
  **Optional local AI (no API key):**
24
24
 
25
- - **Voice → text** — `brew install ffmpeg whisper-cpp` and drop a model at `~/.claude-control/models/ggml-base.en.bin`. The mic in the composer records audio and transcribes it locally.
25
+ - **Voice → text** — run `claude-control setup` once: it installs `ffmpeg` + `whisper.cpp` (Homebrew) and downloads a ggml model to `~/.claude-control/models/`. The mic in the composer then records audio and transcribes it locally (no API key). *(Manual equivalent: `brew install ffmpeg whisper-cpp` and drop a model at `~/.claude-control/models/ggml-base.en.bin`.)*
26
26
  - **Prompt enhancer (✨)** — defaults to a **local MLX model** on Apple Silicon. One-time setup:
27
27
  ```bash
28
28
  python3 -m venv ~/.claude-control/mlx-venv
@@ -96,16 +96,59 @@ matching transcript under `~/.claude/projects/`.
96
96
 
97
97
  ---
98
98
 
99
- ## Updating
99
+ ## Updating & restarting
100
100
 
101
- claude-control compares your checkout against its git upstream (`origin`) and
102
- shows an **update banner** when new commits are available. Click **Update now**
103
- — the server pulls, reinstalls, rebuilds the web bundle, and restarts itself in
104
- place; the page reconnects automatically. (Equivalent manual update: `git pull
105
- && npm install && npm run build`, then restart.)
101
+ How you update depends on **how you installed** pick your row. Check your
102
+ current version any time with `claude-control --version`.
106
103
 
107
- Version numbers follow npm semver (bump `package.json` per release); this is
108
- **v0.1.0**.
104
+ > **`npm install` does NOT pull the git repo.** The npm package ships the app
105
+ > *prebuilt* (the `web/dist` bundle is included), so there's no source tree to
106
+ > `git pull` and nothing to build. Update by reinstalling the package.
107
+
108
+ ### Installed globally (`npm install -g`)
109
+
110
+ ```bash
111
+ npm install -g @idl3/claude-control@latest # fetch the new version
112
+ # then restart the server (see "Restarting" below)
113
+ ```
114
+
115
+ The in-app **update banner / “Update now”** button is for **source checkouts
116
+ only** (it runs `git pull`); on an npm install it has no repo to update, so use
117
+ the command above instead.
118
+
119
+ ### Run via `npx` (no install)
120
+
121
+ ```bash
122
+ npx @idl3/claude-control@latest # always fetches the latest
123
+ ```
124
+
125
+ `npx` re-resolves the package each run, so you're already on the newest version
126
+ every time you start it — just restart the process.
127
+
128
+ ### From source (git checkout)
129
+
130
+ ```bash
131
+ git pull && npm install && npm run build # then restart
132
+ ```
133
+
134
+ …or click **Update now** in the app: the server pulls from `origin`, reinstalls,
135
+ rebuilds `web/dist`, and restarts itself in place; the page reconnects
136
+ automatically.
137
+
138
+ ### Restarting the server
139
+
140
+ - **Foreground** (you ran `claude-control` / `npm start` in a terminal): press
141
+ `Ctrl-C`, then run it again. The web UI reconnects on its own.
142
+ - **launchd service** (you ran `claude-control install-service`):
143
+ ```bash
144
+ launchctl kickstart -k gui/$(id -u)/com.ernest.claude-control
145
+ ```
146
+ or `claude-control uninstall-service && claude-control install-service`.
147
+
148
+ Restarting is safe — sessions live in tmux, so nothing is lost; each browser
149
+ re-prompts for the token once (if one is set).
150
+
151
+ Version numbers follow npm semver (`claude-control --version`).
109
152
 
110
153
  ---
111
154
 
package/lib/match.js CHANGED
@@ -15,6 +15,10 @@
15
15
  import { isCwdConsistent } from './sessions.js';
16
16
 
17
17
  const DEFAULT_START_SLACK_MS = 5 * 60_000; // proc-start vs transcript-birth tolerance
18
+ // Two candidates active within this window count as a recency "tie", so the
19
+ // start-time ↔ birthtime signal breaks it (concurrent sessions in one cwd).
20
+ // Beyond it, the more-recently-active transcript always wins (resume-safe).
21
+ const RECENCY_TIE_MS = 2 * 60_000;
18
22
 
19
23
  /**
20
24
  * @param {string|null} etime macOS `ps -o etime` value: "[[dd-]hh:]mm:ss"
@@ -115,45 +119,33 @@ export function assignTranscripts(panes, candidates, opts = {}) {
115
119
  // sessions.js BEFORE this matcher runs; assignTranscripts is the fallback for
116
120
  // panes with no hook record, using only deterministic timing signals below.
117
121
 
118
- // Pass 1 nearest start-time birthtime.
119
- for (const pane of ordered) {
120
- if (result.has(pane.target)) continue;
121
- if (pane.procStartMs == null) continue;
122
- let best = null;
123
- let bestDelta = Infinity;
124
- for (const c of available(pane)) {
125
- if (c.birthtimeMs == null) continue;
126
- const delta = Math.abs(c.birthtimeMs - pane.procStartMs);
127
- // Prefer transcripts born around/after the proc started; reject ones born
128
- // long before the proc (those belong to an earlier session in this dir).
129
- if (c.birthtimeMs < pane.procStartMs - startSlackMs) continue;
130
- if (
131
- delta < bestDelta ||
132
- (delta === bestDelta &&
133
- (c.lastActivityMs ?? 0) > (best?.lastActivityMs ?? 0))
134
- ) {
135
- best = c;
136
- bestDelta = delta;
137
- }
122
+ const activity = (c) => c.lastActivityMs ?? c.mtime ?? c.birthtimeMs ?? 0;
123
+
124
+ // Choose between two candidates for a pane: RECENCY is primary (the actively-
125
+ // written transcript wins), and start-time ↔ birthtime only breaks ties when
126
+ // two candidates were active at nearly the same time (genuinely concurrent
127
+ // sessions in one cwd). This is what fixes resumed sessions: a resumed
128
+ // transcript is born long ago but is the most-recently-active, so it must beat
129
+ // a freshly-BORN but stale sibling whose birth merely coincides with the
130
+ // resume time (the old "start-time grabs the wrong transcript" bug).
131
+ const prefer = (pane, c, best) => {
132
+ const ca = activity(c);
133
+ const ba = activity(best);
134
+ if (Math.abs(ca - ba) > RECENCY_TIE_MS) return ca > ba;
135
+ if (pane.procStartMs != null && c.birthtimeMs != null && best.birthtimeMs != null) {
136
+ const cd = Math.abs(c.birthtimeMs - pane.procStartMs);
137
+ const bd = Math.abs(best.birthtimeMs - pane.procStartMs);
138
+ if (cd !== bd) return cd < bd;
138
139
  }
139
- if (best) claim(pane, best);
140
- }
140
+ return ca > ba;
141
+ };
141
142
 
142
- // Pass 2 — most-recently-active remaining candidate.
143
- // Gate: when the pane's process start time is known, only consider candidates
144
- // whose last known activity (lastActivityMs, falling back to file mtime or
145
- // birthtime) is at or after the pane started (minus startSlackMs). A transcript
146
- // that was never touched after the pane launched cannot belong to it — that is
147
- // the "fresh pane inherits old transcript" bug. When procStartMs is unknown,
148
- // skip the gate so we don't regress panes with missing timing data.
149
- // NOTE: --resume is safe: Claude appends a record to the old transcript on
150
- // resume, bumping its mtime/lastActivityMs above the pane's start time.
151
143
  for (const pane of ordered) {
152
144
  if (result.has(pane.target)) continue;
153
145
  let best = null;
154
146
  for (const c of available(pane)) {
155
147
  if (!temporallyPlausible(pane, c)) continue;
156
- if (!best || (c.lastActivityMs ?? 0) > (best.lastActivityMs ?? 0)) best = c;
148
+ if (!best || prefer(pane, c, best)) best = c;
157
149
  }
158
150
  if (best) claim(pane, best);
159
151
  }
package/lib/optimize.js CHANGED
@@ -176,6 +176,9 @@ function wordCount(s) {
176
176
  }
177
177
 
178
178
  const QUESTION_BOILERPLATE = /\b(specify|please provide|could you clarify|clarif(y|ication)|let me know)\b/i;
179
+ // The model sometimes echoes/optimises buildLlmPrompt itself — these phrases are
180
+ // the optimiser's own meta-instructions and must never appear in a rewrite.
181
+ const PROMPT_LEAK = /(treat the draft|content to rewrite|not as instructions to follow|return strict json|rewritten prompt|prompt optimiser|examples of the bar|```draft|"optimized"|"rationale")/i;
179
182
  const LIST_LINE = /^\s*(\d+[).]|[-*])\s+/gm;
180
183
  const STOPWORDS = new Set([
181
184
  'the', 'a', 'an', 'to', 'of', 'and', 'or', 'for', 'in', 'on', 'with', 'is',
@@ -221,6 +224,7 @@ function isInterrogative(s) {
221
224
  * - instruction-to-question: an imperative draft turned interrogative
222
225
  * - added-list: ≥2 list lines the draft didn't have
223
226
  * - intent-drift: <50% of the draft's content tokens survive
227
+ * - prompt-leak: the model echoed buildLlmPrompt's own instructions
224
228
  * - empty: blank result
225
229
  *
226
230
  * @param {string} draft
@@ -260,6 +264,7 @@ export function evaluateRewrite(draft, optimized) {
260
264
  if (isImperative(draft) && isInterrogative(opt)) violations.push('instruction-to-question');
261
265
  if (!draftHasList && optListLines >= 2) violations.push('added-list');
262
266
  if (dTokens.length >= 4 && survived < 0.5) violations.push('intent-drift');
267
+ if (PROMPT_LEAK.test(opt) && !PROMPT_LEAK.test(draft)) violations.push('prompt-leak');
263
268
 
264
269
  return { ok: violations.length === 0, violations, metrics };
265
270
  }
package/lib/shell.js CHANGED
@@ -30,8 +30,16 @@ const NAMED_KEYS = [
30
30
  'Up', 'Down', 'Left', 'Right', 'Home', 'End', 'PPage', 'NPage',
31
31
  'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12',
32
32
  ];
33
+ // Navigation keys with every Ctrl/Meta/Shift modifier combination, so a hardware
34
+ // keyboard (e.g. iPad Magic Keyboard) can send Opt+Arrow word-jumps, Shift+Arrow
35
+ // selection, etc. Prefix order is C-,M-,S- (matches the frontend navToken).
36
+ const NAV_KEYS = ['Up', 'Down', 'Left', 'Right', 'Home', 'End', 'PPage', 'NPage'];
37
+ const NAV_PREFIXES = ['', 'C-', 'M-', 'S-', 'C-M-', 'C-S-', 'M-S-', 'C-M-S-'];
38
+ const NAV_COMBOS = NAV_KEYS.flatMap((k) => NAV_PREFIXES.map((p) => p + k));
39
+
33
40
  export const SHELL_KEYS = new Set([
34
41
  ...NAMED_KEYS,
42
+ ...NAV_COMBOS, // Up/Down/.../NPage with C-/M-/S- combinations
35
43
  ...ALPHA.map((c) => `C-${c}`), // C-a .. C-z
36
44
  ...ALPHA.map((c) => `M-${c}`), // M-a .. M-z (Option/Meta)
37
45
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idl3/claude-control",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Local web UI to watch and drive your Claude Code sessions running in tmux — live transcripts, reply, answer AskUserQuestion, attach files, from a browser or phone.",
6
6
  "keywords": [
@@ -1,3 +1,3 @@
1
- import{g as Ve}from"./index-DwmU8Yna.js";function xe(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const i=e[t],u=typeof i;(u==="object"||u==="function")&&!Object.isFrozen(i)&&xe(i)}),e}class he{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function we(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function B(e,...t){const i=Object.create(null);for(const u in e)i[u]=e[u];return t.forEach(function(u){for(const b in u)i[b]=u[b]}),i}const qe="</span>",pe=e=>!!e.scope,Qe=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map((u,b)=>`${u}${"_".repeat(b+1)}`)].join(" ")}return`${t}${e}`};class me{constructor(t,i){this.buffer="",this.classPrefix=i.classPrefix,t.walk(this)}addText(t){this.buffer+=we(t)}openNode(t){if(!pe(t))return;const i=Qe(t.scope,{prefix:this.classPrefix});this.span(i)}closeNode(t){pe(t)&&(this.buffer+=qe)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const de=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class te{constructor(){this.rootNode=de(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const i=de({scope:t});this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,i){return typeof i=="string"?t.addText(i):i.children&&(t.openNode(i),i.children.forEach(u=>this._walk(t,u)),t.closeNode(i)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(i=>typeof i=="string")?t.children=[t.children.join("")]:t.children.forEach(i=>{te._collapse(i)}))}}class et extends te{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,i){const u=t.root;i&&(u.scope=`language:${i}`),this.add(u)}toHTML(){return new me(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function P(e){return e?typeof e=="string"?e:e.source:null}function Oe(e){return C("(?=",e,")")}function tt(e){return C("(?:",e,")*")}function nt(e){return C("(?:",e,")?")}function C(...e){return e.map(i=>P(i)).join("")}function it(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ne(...e){return"("+(it(e).capture?"":"?:")+e.map(u=>P(u)).join("|")+")"}function Re(e){return new RegExp(e.toString()+"|").exec("").length-1}function st(e,t){const i=e&&e.exec(t);return i&&i.index===0}const rt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ie(e,{joinWith:t}){let i=0;return e.map(u=>{i+=1;const b=i;let _=P(u),c="";for(;_.length>0;){const r=rt.exec(_);if(!r){c+=_;break}c+=_.substring(0,r.index),_=_.substring(r.index+r[0].length),r[0][0]==="\\"&&r[1]?c+="\\"+String(Number(r[1])+b):(c+=r[0],r[0]==="("&&i++)}return c}).map(u=>`(${u})`).join(t)}const ct=/\b\B/,ye="[a-zA-Z]\\w*",se="[a-zA-Z_]\\w*",Se="\\b\\d+(\\.\\d+)?",Ne="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ae="\\b(0b[01]+)",ot="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",at=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=C(t,/.*\b/,e.binary,/\b.*/)),B({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(i,u)=>{i.index!==0&&u.ignoreMatch()}},e)},U={begin:"\\\\[\\s\\S]",relevance:0},lt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[U]},ut={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[U]},ft={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Y=function(e,t,i={}){const u=B({scope:"comment",begin:e,end:t,contains:[]},i);u.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const b=ne("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return u.contains.push({begin:C(/[ ]+/,"(",b,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),u},gt=Y("//","$"),ht=Y("/\\*","\\*/"),pt=Y("#","$"),dt={scope:"number",begin:Se,relevance:0},Et={scope:"number",begin:Ne,relevance:0},bt={scope:"number",begin:Ae,relevance:0},_t={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[U,{begin:/\[/,end:/\]/,relevance:0,contains:[U]}]},Mt={scope:"title",begin:ye,relevance:0},xt={scope:"title",begin:se,relevance:0},wt={begin:"\\.\\s*"+se,relevance:0},Ot=function(e){return Object.assign(e,{"on:begin":(t,i)=>{i.data._beginMatch=t[1]},"on:end":(t,i)=>{i.data._beginMatch!==t[1]&&i.ignoreMatch()}})};var z=Object.freeze({__proto__:null,APOS_STRING_MODE:lt,BACKSLASH_ESCAPE:U,BINARY_NUMBER_MODE:bt,BINARY_NUMBER_RE:Ae,COMMENT:Y,C_BLOCK_COMMENT_MODE:ht,C_LINE_COMMENT_MODE:gt,C_NUMBER_MODE:Et,C_NUMBER_RE:Ne,END_SAME_AS_BEGIN:Ot,HASH_COMMENT_MODE:pt,IDENT_RE:ye,MATCH_NOTHING_RE:ct,METHOD_GUARD:wt,NUMBER_MODE:dt,NUMBER_RE:Se,PHRASAL_WORDS_MODE:ft,QUOTE_STRING_MODE:ut,REGEXP_MODE:_t,RE_STARTERS_RE:ot,SHEBANG:at,TITLE_MODE:Mt,UNDERSCORE_IDENT_RE:se,UNDERSCORE_TITLE_MODE:xt});function Rt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function yt(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function St(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Rt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Nt(e,t){Array.isArray(e.illegal)&&(e.illegal=ne(...e.illegal))}function At(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function kt(e,t){e.relevance===void 0&&(e.relevance=1)}const Tt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach(u=>{delete e[u]}),e.keywords=i.keywords,e.begin=C(i.beforeMatch,Oe(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},It=["of","and","for","in","not","or","if","then","parent","list","value"],Bt="keyword";function ke(e,t,i=Bt){const u=Object.create(null);return typeof e=="string"?b(i,e.split(" ")):Array.isArray(e)?b(i,e):Object.keys(e).forEach(function(_){Object.assign(u,ke(e[_],t,_))}),u;function b(_,c){t&&(c=c.map(r=>r.toLowerCase())),c.forEach(function(r){const l=r.split("|");u[l[0]]=[_,Dt(l[0],l[1])]})}}function Dt(e,t){return t?Number(t):vt(e)?0:1}function vt(e){return It.includes(e.toLowerCase())}const Ee={},v=e=>{console.error(e)},be=(e,...t)=>{console.log(`WARN: ${e}`,...t)},L=(e,t)=>{Ee[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ee[`${e}/${t}`]=!0)},X=new Error;function Te(e,t,{key:i}){let u=0;const b=e[i],_={},c={};for(let r=1;r<=t.length;r++)c[r+u]=b[r],_[r+u]=!0,u+=Re(t[r-1]);e[i]=c,e[i]._emit=_,e[i]._multi=!0}function Ct(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw v("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),X;if(typeof e.beginScope!="object"||e.beginScope===null)throw v("beginScope must be object"),X;Te(e,e.begin,{key:"beginScope"}),e.begin=ie(e.begin,{joinWith:""})}}function Lt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw v("skip, excludeEnd, returnEnd not compatible with endScope: {}"),X;if(typeof e.endScope!="object"||e.endScope===null)throw v("endScope must be object"),X;Te(e,e.end,{key:"endScope"}),e.end=ie(e.end,{joinWith:""})}}function Ht(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function jt(e){Ht(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ct(e),Lt(e)}function Pt(e){function t(c,r){return new RegExp(P(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(r?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(r,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,r]),this.matchAt+=Re(r)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const r=this.regexes.map(l=>l[1]);this.matcherRe=t(ie(r,{joinWith:"|"}),!0),this.lastIndex=0}exec(r){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(r);if(!l)return null;const w=l.findIndex((j,Z)=>Z>0&&j!==void 0),M=this.matchIndexes[w];return l.splice(0,w),Object.assign(l,M)}}class u{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(r){if(this.multiRegexes[r])return this.multiRegexes[r];const l=new i;return this.rules.slice(r).forEach(([w,M])=>l.addRule(w,M)),l.compile(),this.multiRegexes[r]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(r,l){this.rules.push([r,l]),l.type==="begin"&&this.count++}exec(r){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let w=l.exec(r);if(this.resumingScanAtSamePosition()&&!(w&&w.index===this.lastIndex)){const M=this.getMatcher(0);M.lastIndex=this.lastIndex+1,w=M.exec(r)}return w&&(this.regexIndex+=w.position+1,this.regexIndex===this.count&&this.considerAll()),w}}function b(c){const r=new u;return c.contains.forEach(l=>r.addRule(l.begin,{rule:l,type:"begin"})),c.terminatorEnd&&r.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&r.addRule(c.illegal,{type:"illegal"}),r}function _(c,r){const l=c;if(c.isCompiled)return l;[yt,At,jt,Tt].forEach(M=>M(c,r)),e.compilerExtensions.forEach(M=>M(c,r)),c.__beforeBegin=null,[St,Nt,kt].forEach(M=>M(c,r)),c.isCompiled=!0;let w=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),w=c.keywords.$pattern,delete c.keywords.$pattern),w=w||/\w+/,c.keywords&&(c.keywords=ke(c.keywords,e.case_insensitive)),l.keywordPatternRe=t(w,!0),r&&(c.begin||(c.begin=/\B|\b/),l.beginRe=t(l.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(l.endRe=t(l.end)),l.terminatorEnd=P(l.end)||"",c.endsWithParent&&r.terminatorEnd&&(l.terminatorEnd+=(c.end?"|":"")+r.terminatorEnd)),c.illegal&&(l.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(M){return Ut(M==="self"?c:M)})),c.contains.forEach(function(M){_(M,l)}),c.starts&&_(c.starts,r),l.matcher=b(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=B(e.classNameAliases||{}),_(e)}function Ie(e){return e?e.endsWithParent||Ie(e.starts):!1}function Ut(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return B(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Ie(e)?B(e,{starts:e.starts?B(e.starts):null}):Object.isFrozen(e)?B(e):e}var $t="11.11.1";class Gt extends Error{constructor(t,i){super(t),this.name="HTMLInjectionError",this.html=i}}const ee=we,_e=B,Me=Symbol("nomatch"),Wt=7,Be=function(e){const t=Object.create(null),i=Object.create(null),u=[];let b=!0;const _="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let r={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:et};function l(n){return r.noHighlightRe.test(n)}function w(n){let a=n.className+" ";a+=n.parentNode?n.parentNode.className:"";const h=r.languageDetectRe.exec(a);if(h){const d=T(h[1]);return d||(be(_.replace("{}",h[1])),be("Falling back to no-highlight mode for this block.",n)),d?h[1]:"no-highlight"}return a.split(/\s+/).find(d=>l(d)||T(d))}function M(n,a,h){let d="",x="";typeof a=="object"?(d=n,h=a.ignoreIllegals,x=a.language):(L("10.7.0","highlight(lang, code, ...args) has been deprecated."),L("10.7.0",`Please use highlight(code, options) instead.
1
+ import{g as Ve}from"./index-Dar5Ut3m.js";function xe(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const i=e[t],u=typeof i;(u==="object"||u==="function")&&!Object.isFrozen(i)&&xe(i)}),e}class he{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function we(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function B(e,...t){const i=Object.create(null);for(const u in e)i[u]=e[u];return t.forEach(function(u){for(const b in u)i[b]=u[b]}),i}const qe="</span>",pe=e=>!!e.scope,Qe=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map((u,b)=>`${u}${"_".repeat(b+1)}`)].join(" ")}return`${t}${e}`};class me{constructor(t,i){this.buffer="",this.classPrefix=i.classPrefix,t.walk(this)}addText(t){this.buffer+=we(t)}openNode(t){if(!pe(t))return;const i=Qe(t.scope,{prefix:this.classPrefix});this.span(i)}closeNode(t){pe(t)&&(this.buffer+=qe)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const de=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class te{constructor(){this.rootNode=de(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const i=de({scope:t});this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,i){return typeof i=="string"?t.addText(i):i.children&&(t.openNode(i),i.children.forEach(u=>this._walk(t,u)),t.closeNode(i)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(i=>typeof i=="string")?t.children=[t.children.join("")]:t.children.forEach(i=>{te._collapse(i)}))}}class et extends te{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,i){const u=t.root;i&&(u.scope=`language:${i}`),this.add(u)}toHTML(){return new me(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function P(e){return e?typeof e=="string"?e:e.source:null}function Oe(e){return C("(?=",e,")")}function tt(e){return C("(?:",e,")*")}function nt(e){return C("(?:",e,")?")}function C(...e){return e.map(i=>P(i)).join("")}function it(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ne(...e){return"("+(it(e).capture?"":"?:")+e.map(u=>P(u)).join("|")+")"}function Re(e){return new RegExp(e.toString()+"|").exec("").length-1}function st(e,t){const i=e&&e.exec(t);return i&&i.index===0}const rt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ie(e,{joinWith:t}){let i=0;return e.map(u=>{i+=1;const b=i;let _=P(u),c="";for(;_.length>0;){const r=rt.exec(_);if(!r){c+=_;break}c+=_.substring(0,r.index),_=_.substring(r.index+r[0].length),r[0][0]==="\\"&&r[1]?c+="\\"+String(Number(r[1])+b):(c+=r[0],r[0]==="("&&i++)}return c}).map(u=>`(${u})`).join(t)}const ct=/\b\B/,ye="[a-zA-Z]\\w*",se="[a-zA-Z_]\\w*",Se="\\b\\d+(\\.\\d+)?",Ne="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ae="\\b(0b[01]+)",ot="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",at=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=C(t,/.*\b/,e.binary,/\b.*/)),B({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(i,u)=>{i.index!==0&&u.ignoreMatch()}},e)},U={begin:"\\\\[\\s\\S]",relevance:0},lt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[U]},ut={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[U]},ft={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Y=function(e,t,i={}){const u=B({scope:"comment",begin:e,end:t,contains:[]},i);u.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const b=ne("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return u.contains.push({begin:C(/[ ]+/,"(",b,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),u},gt=Y("//","$"),ht=Y("/\\*","\\*/"),pt=Y("#","$"),dt={scope:"number",begin:Se,relevance:0},Et={scope:"number",begin:Ne,relevance:0},bt={scope:"number",begin:Ae,relevance:0},_t={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[U,{begin:/\[/,end:/\]/,relevance:0,contains:[U]}]},Mt={scope:"title",begin:ye,relevance:0},xt={scope:"title",begin:se,relevance:0},wt={begin:"\\.\\s*"+se,relevance:0},Ot=function(e){return Object.assign(e,{"on:begin":(t,i)=>{i.data._beginMatch=t[1]},"on:end":(t,i)=>{i.data._beginMatch!==t[1]&&i.ignoreMatch()}})};var z=Object.freeze({__proto__:null,APOS_STRING_MODE:lt,BACKSLASH_ESCAPE:U,BINARY_NUMBER_MODE:bt,BINARY_NUMBER_RE:Ae,COMMENT:Y,C_BLOCK_COMMENT_MODE:ht,C_LINE_COMMENT_MODE:gt,C_NUMBER_MODE:Et,C_NUMBER_RE:Ne,END_SAME_AS_BEGIN:Ot,HASH_COMMENT_MODE:pt,IDENT_RE:ye,MATCH_NOTHING_RE:ct,METHOD_GUARD:wt,NUMBER_MODE:dt,NUMBER_RE:Se,PHRASAL_WORDS_MODE:ft,QUOTE_STRING_MODE:ut,REGEXP_MODE:_t,RE_STARTERS_RE:ot,SHEBANG:at,TITLE_MODE:Mt,UNDERSCORE_IDENT_RE:se,UNDERSCORE_TITLE_MODE:xt});function Rt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function yt(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function St(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Rt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Nt(e,t){Array.isArray(e.illegal)&&(e.illegal=ne(...e.illegal))}function At(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function kt(e,t){e.relevance===void 0&&(e.relevance=1)}const Tt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach(u=>{delete e[u]}),e.keywords=i.keywords,e.begin=C(i.beforeMatch,Oe(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},It=["of","and","for","in","not","or","if","then","parent","list","value"],Bt="keyword";function ke(e,t,i=Bt){const u=Object.create(null);return typeof e=="string"?b(i,e.split(" ")):Array.isArray(e)?b(i,e):Object.keys(e).forEach(function(_){Object.assign(u,ke(e[_],t,_))}),u;function b(_,c){t&&(c=c.map(r=>r.toLowerCase())),c.forEach(function(r){const l=r.split("|");u[l[0]]=[_,Dt(l[0],l[1])]})}}function Dt(e,t){return t?Number(t):vt(e)?0:1}function vt(e){return It.includes(e.toLowerCase())}const Ee={},v=e=>{console.error(e)},be=(e,...t)=>{console.log(`WARN: ${e}`,...t)},L=(e,t)=>{Ee[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ee[`${e}/${t}`]=!0)},X=new Error;function Te(e,t,{key:i}){let u=0;const b=e[i],_={},c={};for(let r=1;r<=t.length;r++)c[r+u]=b[r],_[r+u]=!0,u+=Re(t[r-1]);e[i]=c,e[i]._emit=_,e[i]._multi=!0}function Ct(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw v("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),X;if(typeof e.beginScope!="object"||e.beginScope===null)throw v("beginScope must be object"),X;Te(e,e.begin,{key:"beginScope"}),e.begin=ie(e.begin,{joinWith:""})}}function Lt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw v("skip, excludeEnd, returnEnd not compatible with endScope: {}"),X;if(typeof e.endScope!="object"||e.endScope===null)throw v("endScope must be object"),X;Te(e,e.end,{key:"endScope"}),e.end=ie(e.end,{joinWith:""})}}function Ht(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function jt(e){Ht(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ct(e),Lt(e)}function Pt(e){function t(c,r){return new RegExp(P(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(r?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(r,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,r]),this.matchAt+=Re(r)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const r=this.regexes.map(l=>l[1]);this.matcherRe=t(ie(r,{joinWith:"|"}),!0),this.lastIndex=0}exec(r){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(r);if(!l)return null;const w=l.findIndex((j,Z)=>Z>0&&j!==void 0),M=this.matchIndexes[w];return l.splice(0,w),Object.assign(l,M)}}class u{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(r){if(this.multiRegexes[r])return this.multiRegexes[r];const l=new i;return this.rules.slice(r).forEach(([w,M])=>l.addRule(w,M)),l.compile(),this.multiRegexes[r]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(r,l){this.rules.push([r,l]),l.type==="begin"&&this.count++}exec(r){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let w=l.exec(r);if(this.resumingScanAtSamePosition()&&!(w&&w.index===this.lastIndex)){const M=this.getMatcher(0);M.lastIndex=this.lastIndex+1,w=M.exec(r)}return w&&(this.regexIndex+=w.position+1,this.regexIndex===this.count&&this.considerAll()),w}}function b(c){const r=new u;return c.contains.forEach(l=>r.addRule(l.begin,{rule:l,type:"begin"})),c.terminatorEnd&&r.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&r.addRule(c.illegal,{type:"illegal"}),r}function _(c,r){const l=c;if(c.isCompiled)return l;[yt,At,jt,Tt].forEach(M=>M(c,r)),e.compilerExtensions.forEach(M=>M(c,r)),c.__beforeBegin=null,[St,Nt,kt].forEach(M=>M(c,r)),c.isCompiled=!0;let w=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),w=c.keywords.$pattern,delete c.keywords.$pattern),w=w||/\w+/,c.keywords&&(c.keywords=ke(c.keywords,e.case_insensitive)),l.keywordPatternRe=t(w,!0),r&&(c.begin||(c.begin=/\B|\b/),l.beginRe=t(l.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(l.endRe=t(l.end)),l.terminatorEnd=P(l.end)||"",c.endsWithParent&&r.terminatorEnd&&(l.terminatorEnd+=(c.end?"|":"")+r.terminatorEnd)),c.illegal&&(l.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(M){return Ut(M==="self"?c:M)})),c.contains.forEach(function(M){_(M,l)}),c.starts&&_(c.starts,r),l.matcher=b(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=B(e.classNameAliases||{}),_(e)}function Ie(e){return e?e.endsWithParent||Ie(e.starts):!1}function Ut(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return B(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Ie(e)?B(e,{starts:e.starts?B(e.starts):null}):Object.isFrozen(e)?B(e):e}var $t="11.11.1";class Gt extends Error{constructor(t,i){super(t),this.name="HTMLInjectionError",this.html=i}}const ee=we,_e=B,Me=Symbol("nomatch"),Wt=7,Be=function(e){const t=Object.create(null),i=Object.create(null),u=[];let b=!0;const _="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let r={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:et};function l(n){return r.noHighlightRe.test(n)}function w(n){let a=n.className+" ";a+=n.parentNode?n.parentNode.className:"";const h=r.languageDetectRe.exec(a);if(h){const d=T(h[1]);return d||(be(_.replace("{}",h[1])),be("Falling back to no-highlight mode for this block.",n)),d?h[1]:"no-highlight"}return a.split(/\s+/).find(d=>l(d)||T(d))}function M(n,a,h){let d="",x="";typeof a=="object"?(d=n,h=a.ignoreIllegals,x=a.language):(L("10.7.0","highlight(lang, code, ...args) has been deprecated."),L("10.7.0",`Please use highlight(code, options) instead.
2
2
  https://github.com/highlightjs/highlight.js/issues/2277`),x=n,d=a),h===void 0&&(h=!0);const S={code:d,language:x};G("before:highlight",S);const I=S.result?S.result:j(S.language,S.code,h);return I.code=S.code,G("after:highlight",I),I}function j(n,a,h,d){const x=Object.create(null);function S(s,o){return s.keywords[o]}function I(){if(!f.keywords){O.addText(E);return}let s=0;f.keywordPatternRe.lastIndex=0;let o=f.keywordPatternRe.exec(E),g="";for(;o;){g+=E.substring(s,o.index);const p=A.case_insensitive?o[0].toLowerCase():o[0],R=S(f,p);if(R){const[k,Ze]=R;if(O.addText(g),g="",x[p]=(x[p]||0)+1,x[p]<=Wt&&(F+=Ze),k.startsWith("_"))g+=o[0];else{const Je=A.classNameAliases[k]||k;N(o[0],Je)}}else g+=o[0];s=f.keywordPatternRe.lastIndex,o=f.keywordPatternRe.exec(E)}g+=E.substring(s),O.addText(g)}function W(){if(E==="")return;let s=null;if(typeof f.subLanguage=="string"){if(!t[f.subLanguage]){O.addText(E);return}s=j(f.subLanguage,E,!0,ge[f.subLanguage]),ge[f.subLanguage]=s._top}else s=J(E,f.subLanguage.length?f.subLanguage:null);f.relevance>0&&(F+=s.relevance),O.__addSublanguage(s._emitter,s.language)}function y(){f.subLanguage!=null?W():I(),E=""}function N(s,o){s!==""&&(O.startScope(o),O.addText(s),O.endScope())}function ae(s,o){let g=1;const p=o.length-1;for(;g<=p;){if(!s._emit[g]){g++;continue}const R=A.classNameAliases[s[g]]||s[g],k=o[g];R?N(k,R):(E=k,I(),E=""),g++}}function le(s,o){return s.scope&&typeof s.scope=="string"&&O.openNode(A.classNameAliases[s.scope]||s.scope),s.beginScope&&(s.beginScope._wrap?(N(E,A.classNameAliases[s.beginScope._wrap]||s.beginScope._wrap),E=""):s.beginScope._multi&&(ae(s.beginScope,o),E="")),f=Object.create(s,{parent:{value:f}}),f}function ue(s,o,g){let p=st(s.endRe,g);if(p){if(s["on:end"]){const R=new he(s);s["on:end"](o,R),R.isMatchIgnored&&(p=!1)}if(p){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return ue(s.parent,o,g)}function Ke(s){return f.matcher.regexIndex===0?(E+=s[0],1):(m=!0,0)}function Fe(s){const o=s[0],g=s.rule,p=new he(g),R=[g.__beforeBegin,g["on:begin"]];for(const k of R)if(k&&(k(s,p),p.isMatchIgnored))return Ke(o);return g.skip?E+=o:(g.excludeBegin&&(E+=o),y(),!g.returnBegin&&!g.excludeBegin&&(E=o)),le(g,s),g.returnBegin?0:o.length}function ze(s){const o=s[0],g=a.substring(s.index),p=ue(f,s,g);if(!p)return Me;const R=f;f.endScope&&f.endScope._wrap?(y(),N(o,f.endScope._wrap)):f.endScope&&f.endScope._multi?(y(),ae(f.endScope,s)):R.skip?E+=o:(R.returnEnd||R.excludeEnd||(E+=o),y(),R.excludeEnd&&(E=o));do f.scope&&O.closeNode(),!f.skip&&!f.subLanguage&&(F+=f.relevance),f=f.parent;while(f!==p.parent);return p.starts&&le(p.starts,s),R.returnEnd?0:o.length}function Xe(){const s=[];for(let o=f;o!==A;o=o.parent)o.scope&&s.unshift(o.scope);s.forEach(o=>O.openNode(o))}let K={};function fe(s,o){const g=o&&o[0];if(E+=s,g==null)return y(),0;if(K.type==="begin"&&o.type==="end"&&K.index===o.index&&g===""){if(E+=a.slice(o.index,o.index+1),!b){const p=new Error(`0 width match regex (${n})`);throw p.languageName=n,p.badRule=K.rule,p}return 1}if(K=o,o.type==="begin")return Fe(o);if(o.type==="illegal"&&!h){const p=new Error('Illegal lexeme "'+g+'" for mode "'+(f.scope||"<unnamed>")+'"');throw p.mode=f,p}else if(o.type==="end"){const p=ze(o);if(p!==Me)return p}if(o.type==="illegal"&&g==="")return E+=`
3
3
  `,1;if(Q>1e5&&Q>o.index*3)throw new Error("potential infinite loop, way more iterations than matches");return E+=g,g.length}const A=T(n);if(!A)throw v(_.replace("{}",n)),new Error('Unknown language: "'+n+'"');const Ye=Pt(A);let q="",f=d||Ye;const ge={},O=new r.__emitter(r);Xe();let E="",F=0,D=0,Q=0,m=!1;try{if(A.__emitTokens)A.__emitTokens(a,O);else{for(f.matcher.considerAll();;){Q++,m?m=!1:f.matcher.considerAll(),f.matcher.lastIndex=D;const s=f.matcher.exec(a);if(!s)break;const o=a.substring(D,s.index),g=fe(o,s);D=s.index+g}fe(a.substring(D))}return O.finalize(),q=O.toHTML(),{language:n,value:q,relevance:F,illegal:!1,_emitter:O,_top:f}}catch(s){if(s.message&&s.message.includes("Illegal"))return{language:n,value:ee(a),illegal:!0,relevance:0,_illegalBy:{message:s.message,index:D,context:a.slice(D-100,D+100),mode:s.mode,resultSoFar:q},_emitter:O};if(b)return{language:n,value:ee(a),illegal:!1,relevance:0,errorRaised:s,_emitter:O,_top:f};throw s}}function Z(n){const a={value:ee(n),illegal:!1,relevance:0,_top:c,_emitter:new r.__emitter(r)};return a._emitter.addText(n),a}function J(n,a){a=a||r.languages||Object.keys(t);const h=Z(n),d=a.filter(T).filter(oe).map(y=>j(y,n,!1));d.unshift(h);const x=d.sort((y,N)=>{if(y.relevance!==N.relevance)return N.relevance-y.relevance;if(y.language&&N.language){if(T(y.language).supersetOf===N.language)return 1;if(T(N.language).supersetOf===y.language)return-1}return 0}),[S,I]=x,W=S;return W.secondBest=I,W}function De(n,a,h){const d=a&&i[a]||h;n.classList.add("hljs"),n.classList.add(`language-${d}`)}function V(n){let a=null;const h=w(n);if(l(h))return;if(G("before:highlightElement",{el:n,language:h}),n.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",n);return}if(n.children.length>0&&(r.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(n)),r.throwUnescapedHTML))throw new Gt("One of your code blocks includes unescaped HTML.",n.innerHTML);a=n;const d=a.textContent,x=h?M(d,{language:h,ignoreIllegals:!0}):J(d);n.innerHTML=x.value,n.dataset.highlighted="yes",De(n,h,x.language),n.result={language:x.language,re:x.relevance,relevance:x.relevance},x.secondBest&&(n.secondBest={language:x.secondBest.language,relevance:x.secondBest.relevance}),G("after:highlightElement",{el:n,result:x,text:d})}function ve(n){r=_e(r,n)}const Ce=()=>{$(),L("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Le(){$(),L("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let re=!1;function $(){function n(){$()}if(document.readyState==="loading"){re||window.addEventListener("DOMContentLoaded",n,!1),re=!0;return}document.querySelectorAll(r.cssSelector).forEach(V)}function He(n,a){let h=null;try{h=a(e)}catch(d){if(v("Language definition for '{}' could not be registered.".replace("{}",n)),b)v(d);else throw d;h=c}h.name||(h.name=n),t[n]=h,h.rawDefinition=a.bind(null,e),h.aliases&&ce(h.aliases,{languageName:n})}function je(n){delete t[n];for(const a of Object.keys(i))i[a]===n&&delete i[a]}function Pe(){return Object.keys(t)}function T(n){return n=(n||"").toLowerCase(),t[n]||t[i[n]]}function ce(n,{languageName:a}){typeof n=="string"&&(n=[n]),n.forEach(h=>{i[h.toLowerCase()]=a})}function oe(n){const a=T(n);return a&&!a.disableAutodetect}function Ue(n){n["before:highlightBlock"]&&!n["before:highlightElement"]&&(n["before:highlightElement"]=a=>{n["before:highlightBlock"](Object.assign({block:a.el},a))}),n["after:highlightBlock"]&&!n["after:highlightElement"]&&(n["after:highlightElement"]=a=>{n["after:highlightBlock"](Object.assign({block:a.el},a))})}function $e(n){Ue(n),u.push(n)}function Ge(n){const a=u.indexOf(n);a!==-1&&u.splice(a,1)}function G(n,a){const h=n;u.forEach(function(d){d[h]&&d[h](a)})}function We(n){return L("10.7.0","highlightBlock will be removed entirely in v12.0"),L("10.7.0","Please use highlightElement now."),V(n)}Object.assign(e,{highlight:M,highlightAuto:J,highlightAll:$,highlightElement:V,highlightBlock:We,configure:ve,initHighlighting:Ce,initHighlightingOnLoad:Le,registerLanguage:He,unregisterLanguage:je,listLanguages:Pe,getLanguage:T,registerAliases:ce,autoDetection:oe,inherit:_e,addPlugin:$e,removePlugin:Ge}),e.debugMode=function(){b=!1},e.safeMode=function(){b=!0},e.versionString=$t,e.regex={concat:C,lookahead:Oe,either:ne,optional:nt,anyNumberOfTimes:tt};for(const n in z)typeof z[n]=="object"&&xe(z[n]);return Object.assign(e,z),e},H=Be({});H.newInstance=()=>Be({});var Kt=H;H.HighlightJS=H;H.default=H;const zt=Ve(Kt);export{zt as HighlightJS,zt as default};
@@ -1 +1 @@
1
- .slot-text{display:inline-flex;white-space:pre}.char-slot{position:relative;display:inline-flex;flex:none;justify-content:center;overflow:hidden;overflow-x:visible;overflow-y:clip;line-height:1.3;vertical-align:bottom}.char-slot.is-resizing{overflow-x:clip}.char-sizer{visibility:hidden;white-space:pre}.char-face{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;white-space:pre;will-change:transform}:root{--bg: oklch(16% .012 260);--bg-1: oklch(20% .014 260);--bg-2: oklch(24% .016 260);--bg-hover: oklch(27% .02 260);--line: oklch(32% .015 260);--text: oklch(92% .01 250);--text-dim: oklch(66% .012 250);--text-faint: oklch(52% .012 250);--accent: oklch(70% .15 250);--accent-2: oklch(74% .13 200);--amber: oklch(80% .16 80);--amber-bg: oklch(40% .1 80);--red: oklch(64% .2 25);--red-bg: oklch(30% .09 25);--green: oklch(72% .16 150);--user: oklch(.24 .03 249.98);--txt-transcript: 13.5px;--txt-meta: 11px;--txt-composer: 16px;--hud-h: 34px;--radius: 10px;--ease: cubic-bezier(.16, 1, .3, 1);color-scheme:dark}@media (min-width: 760px){:root{--txt-transcript: 14.5px;--txt-meta: 12px;--txt-composer: 16px}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:var(--txt-transcript);line-height:1.45;-webkit-font-smoothing:antialiased;overscroll-behavior:none}.app{display:flex;flex-direction:column;height:100dvh}.hud{display:flex;align-items:center;gap:12px;height:var(--hud-h);padding:0 12px;padding-top:env(safe-area-inset-top);background:var(--bg-1);border-bottom:1px solid var(--line);font-size:var(--txt-meta);color:var(--text-dim);white-space:nowrap;overflow-x:auto;flex:0 0 auto;box-sizing:content-box}.hud[data-warn=true]{background:var(--amber-bg);color:var(--text)}.hud-brand{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--text);letter-spacing:.02em;flex:0 0 auto}.hud-group{display:inline-flex;gap:4px;align-items:baseline}.hud-k{color:var(--text-faint)}.hud-v{color:var(--text);font-variant-numeric:tabular-nums}.hud-warn-text{color:var(--amber);font-weight:600}.conn-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;background:var(--text-faint)}.conn-connected{background:var(--green)}.conn-connecting{background:var(--amber)}.conn-disconnected{background:var(--red)}.app-body{flex:1 1 auto;display:flex;min-height:0}.rail{width:100%;overflow-y:auto;background:var(--bg);-webkit-overflow-scrolling:touch}.detail{display:none;flex-direction:column;min-width:0;width:100%}.app[data-detail=open] .rail{display:none}.app[data-detail=open] .detail{display:flex}@media (min-width: 760px){.rail{width:300px;flex:0 0 300px;border-right:1px solid var(--line)}.detail,.app[data-detail=open] .detail{display:flex}.app[data-detail=open] .rail,.app[data-detail=closed] .rail{display:block}.back-btn{display:none!important}}.session-list{list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:4px}.session-group{display:flex;flex-direction:column;margin-bottom:10px}.session-group-head{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted, #8a8f98);padding:4px 6px 2px}.session-window{display:flex;flex-direction:column;margin-left:4px;padding-left:6px;border-left:1px solid var(--line)}.session-window-head{display:flex;align-items:baseline;gap:6px;padding:4px 6px 2px;font-size:12px}.session-window-head .window-idx{font-family:ui-monospace,SF Mono,Menlo,monospace;font-weight:700;color:var(--accent);opacity:.85}.session-window-head .window-name{color:var(--text-1, inherit);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-pane-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.pane-glyph{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;opacity:.7;margin-right:2px}.session-item[data-kind=terminal]{background:transparent;border-style:dashed;border-color:var(--line)}.session-item[data-kind=terminal] .pane-glyph{color:var(--red, #e5534b)}.meta-cwd{font-family:ui-monospace,SF Mono,Menlo,monospace;opacity:.7}.terminal-pane-root{min-height:0;padding:8px 8px 10px;gap:8px}.terminal-pane-root .terminal-view{flex:1 1 auto;max-height:none;min-height:0;margin-bottom:0}.terminal-pane-root .terminal-pane-input{flex:0 0 auto}.terminal-pane-input{width:100%;max-width:880px;margin-inline:auto;padding:8px;border:1px solid var(--red);border-radius:12px;background:var(--bg)}.terminal-pane-input .composer-input{width:100%;background:transparent;border:none;outline:none;resize:none;color:var(--text);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript)}.session-item{padding:9px 11px;border-radius:var(--radius);border:1px solid transparent;cursor:pointer;background:var(--bg-1);transition:background var(--ease) .15s,border-color var(--ease) .15s}.session-item:hover{background:var(--bg-hover)}.session-item:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.session-item[data-selected=true]{border-color:var(--accent);background:var(--bg-2)}.session-top{display:flex;align-items:center;gap:7px}.active-dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--text-faint)}.active-dot[data-on=true]{background:var(--green);box-shadow:0 0 6px var(--green)}.session-name{font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.ask-badge{flex:0 0 auto;font-size:9.5px;font-weight:800;letter-spacing:.06em;padding:2px 6px;border-radius:6px;background:var(--amber-bg);color:var(--amber);animation:pulse 1.6s var(--ease) infinite}@keyframes pulse{50%{opacity:.55}}.session-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;font-size:var(--txt-meta);color:var(--text-dim);align-items:center}.meta-prov{font-variant-numeric:tabular-nums;color:var(--text-faint)}.meta-model{color:var(--accent-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}.meta-ctx{font-variant-numeric:tabular-nums;padding:1px 5px;border-radius:5px;background:var(--bg-2);color:var(--text-dim)}.session-empty{list-style:none;padding:16px;color:var(--text-faint);text-align:center}.detail-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--bg-1);flex:0 0 auto}.back-btn{font-size:22px;line-height:1;background:none;border:none;color:var(--accent);padding:2px 8px;cursor:pointer;flex:0 0 auto}.detail-title{display:flex;flex-direction:column;min-width:0}.detail-name{font-weight:700;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-cwd{font-size:var(--txt-meta);color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-name-row{display:flex;align-items:center;gap:6px;min-width:0}.rename-btn{flex:0 0 auto;background:none;border:none;color:var(--text-faint);cursor:pointer;font-size:12px;line-height:1;padding:2px 4px;border-radius:4px}.rename-btn:hover{color:var(--text);background:var(--bg-hover)}.detail-rename-input{width:100%;font-weight:700;font-size:13px;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:3px 7px;outline:none}.detail-rename-input:focus{border-color:var(--accent)}.live-pane{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;padding:12px 12px 6px}.live-pane-head{flex:0 0 auto;font-size:var(--txt-meta);color:var(--text-faint);margin-bottom:6px}.live-pane-body{flex:1 1 auto;margin:0;padding:10px;border-radius:8px;background:var(--bg);border:1px solid var(--line);color:var(--text);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript);white-space:pre;overflow:auto;-webkit-overflow-scrolling:touch}.terminal-view{display:flex;flex-direction:column;width:100%;max-width:880px;margin-inline:auto;margin-bottom:8px;max-height:48dvh;border:1px solid var(--red);border-radius:12px;background:var(--bg);overflow:hidden}.terminal-view-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-bottom:1px solid var(--line);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-meta);color:var(--red);background:var(--red-bg)}.terminal-view-btn{border:1px solid var(--red);background:transparent;color:var(--red);border-radius:6px;padding:2px 10px;font-size:12px;cursor:pointer}.terminal-view-btn:hover{background:var(--red-bg)}.terminal-view-body{flex:1 1 auto;min-height:0;margin:0;padding:10px 12px;background:#0b0d10;color:#c0caf5;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript);line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;-webkit-overflow-scrolling:touch}.terminal-view-body a{color:#7dcfff;text-decoration:underline;text-underline-offset:2px}.terminal-view-body a:hover{color:#a4daff}.terminal-key-bar{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:6px 8px;border-top:1px solid var(--line);background:#0b0d10;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.terminal-key-bar::-webkit-scrollbar{display:none}.terminal-key{flex:0 0 auto;min-width:34px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:#161a22;color:#c0caf5;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px;line-height:1;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation}.terminal-key:hover{background:#232838}.terminal-key:active{background:var(--red-bg);border-color:var(--red);color:var(--red)}.terminal-key-mod{font-size:12px;letter-spacing:.02em}.terminal-key-mod[data-on=true]{background:var(--red);border-color:var(--red);color:#fff}.terminal-key-gap{flex:0 0 auto;width:1px;height:18px;background:var(--line);margin-inline:4px}.thread-root{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;position:relative}.thread-fade{position:absolute;top:0;left:0;right:0;height:64px;background:linear-gradient(to bottom,var(--bg) 38%,transparent);pointer-events:none;opacity:0;transition:opacity .28s var(--ease, ease);z-index:5}.thread-root:focus-within .thread-fade{opacity:1}.app-top-fade{position:fixed;top:0;left:0;right:0;height:calc(env(safe-area-inset-top) + 52px);background:linear-gradient(to bottom,var(--bg) 55%,transparent);pointer-events:none;opacity:0;transition:opacity .28s var(--ease, ease);z-index:40}@media (max-width: 760px){.app:focus-within .app-top-fade{opacity:1}}@media (prefers-reduced-motion: reduce){.app-top-fade{transition:none}}@media (prefers-reduced-motion: reduce){.thread-fade{transition:none}}.thread-viewport{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:12px max(12px,calc((100% - 800px)/2)) 20px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch}.thread-empty{margin:auto;color:var(--text-faint);text-align:center}.load-earlier{align-self:center;flex:0 0 auto;margin:2px 0 4px;padding:5px 12px;font:inherit;font-size:11.5px;color:var(--text-dim);background:var(--bg-2);border:1px solid var(--line);border-radius:999px;cursor:pointer;transition:background .12s ease,color .12s ease}.load-earlier:hover{background:var(--bg-hover);color:var(--text)}.load-earlier:active{background:var(--line)}.msg-row{display:flex;flex-direction:column;gap:3px;max-width:92%;min-width:0}.msg-row[data-role=user]{align-self:flex-end;align-items:flex-end}.msg-body{display:flex;flex-direction:column;gap:6px;background:transparent;border:1px solid transparent;border-radius:var(--radius);font-size:var(--txt-transcript);min-width:0;max-width:100%}.msg-row[data-role=assistant] .msg-body{padding:0}.msg-row[data-role=user] .msg-body{background:var(--user);border:1px solid transparent;border-left:2px solid var(--accent);padding:8px 10px}.msg-row[data-role=system] .msg-body{background:transparent;border:1px dashed var(--line);color:var(--text-dim);padding:8px 10px}.msg-row[data-queued=true]{opacity:.62}.msg-row[data-queued=true] .msg-body{border:1px dashed var(--line);background:transparent}.msg-actions{display:flex;gap:4px;margin-top:2px;padding:0 2px}.msg-row[data-role=user] .msg-actions{justify-content:flex-end}.act-btn{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--text-faint);font-size:11px;cursor:pointer;transition:background var(--ease) .15s,color var(--ease) .15s}.act-btn:hover{background:var(--bg-1);color:var(--text)}.act-copy-done{display:none;align-items:center;gap:4px;color:var(--green)}.act-btn[data-copied] .act-copy-idle{display:none}.act-btn[data-copied] .act-copy-done{display:inline-flex}.act-btn[data-copied]{color:var(--green)}.transcript-img{max-width:min(320px,100%);max-height:240px;border-radius:var(--radius);border:1px solid var(--line);cursor:zoom-in;display:block;object-fit:contain}.lightbox{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:#000000d1;padding:24px;cursor:zoom-out}.lightbox-img{max-width:100%;max-height:100%;border-radius:var(--radius);box-shadow:0 10px 40px #00000080;cursor:default}.lightbox-close{position:absolute;top:16px;right:20px;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:22px;line-height:1;cursor:pointer}.login{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg, #0b0d10);padding:24px}.login-card{display:flex;flex-direction:column;gap:10px;width:min(340px,88vw)}.login-title{margin:0;font-size:18px;font-weight:700;letter-spacing:.02em}.login-sub{margin:0;font-size:13px;color:var(--text-dim)}.login-input{padding:12px 14px;border-radius:10px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:16px}.login-err{min-height:16px;font-size:12px;color:#f87171}.login-btn{padding:12px 14px;border-radius:10px;border:0;background:var(--accent, #3b82f6);color:#fff;font-size:15px;font-weight:600;cursor:pointer}.login-btn:disabled{opacity:.55}.hud-logout{margin-left:8px;border:1px solid var(--line);background:transparent;color:var(--text-dim);border-radius:6px;padding:2px 7px;font-size:13px;cursor:pointer}.pin-modal{display:flex;flex-direction:column;gap:10px;max-height:80vh}.pin-search{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:14px}.pin-unpin{padding:8px 10px;border-radius:8px;cursor:pointer;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px}.pin-list{overflow-y:auto;display:flex;flex-direction:column;gap:4px}.pin-empty{color:var(--text-faint);font-size:12px;padding:16px;text-align:center}.pin-row{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer;border:1px solid var(--line);background:var(--bg-1);color:var(--text)}.pin-row:hover,.pin-row[data-current=true]{border-color:var(--accent, #3b82f6)}.pin-row-title{font-size:13px;font-weight:600}.pin-row-cur{color:var(--accent, #3b82f6);font-weight:400}.pin-row-meta{display:flex;gap:8px;font-size:11px;color:var(--text-faint)}.pin-row-cwd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pin-row-when{margin-left:auto;white-space:nowrap}.pin-toggle{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:28px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);font-size:14px;cursor:pointer}.pin-toggle[aria-pressed=true]{border-color:var(--accent, #3b82f6)}.pin-toggle+.subagents-toggle{margin-left:6px}.subagents-toggle{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px;cursor:pointer}.subagents-toggle[aria-pressed=true]{color:var(--text);border-color:var(--accent, #3b82f6)}.subagents-badge{min-width:16px;padding:0 5px;border-radius:8px;background:var(--accent, #3b82f6);color:#fff;font-size:11px;text-align:center}.sa-panel{position:fixed;top:0;right:0;bottom:0;z-index:900;width:min(560px,100vw);display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--line);box-shadow:-12px 0 40px #0006}@media (min-width: 760px){.sa-panel{width:50vw;max-width:none}}.sa-panel-head{display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;border-bottom:1px solid var(--line)}.sa-panel-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600}.sa-count{padding:0 6px;border-radius:8px;background:var(--bg-1);color:var(--text-dim);font-size:11px}.sa-count-running{color:var(--accent, #3b82f6);font-size:11px}.sa-panel-close{margin-left:auto;width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:18px;cursor:pointer}.sa-panel-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.sa-empty{color:var(--text-faint);font-size:12px;padding:16px}.sa-tabs{display:flex;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line)}.sa-tab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px;cursor:pointer}.sa-tab[data-on=true]{color:var(--text);border-color:var(--accent, #3b82f6)}.sa-tab-count{font-size:10px;color:var(--text-faint)}.sa-item-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:12px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);font-size:12px;line-height:1.4;cursor:pointer}.sa-item-row:hover{background:var(--bg-1)}.sa-chevron{margin-left:4px;color:var(--text-faint);flex:0 0 auto}.sa-back{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:18px;cursor:pointer;flex:0 0 auto}.sa-detail-title{min-width:0;flex:1 1 auto;font-weight:400}.sa-thread-root{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.sa-thread-viewport{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:12px;padding:12px}.sa-item{border:1px solid var(--line);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-1)}.sa-summary{display:flex;align-items:center;gap:8px;padding:11px 12px;cursor:pointer;font-size:12px;line-height:1.4}.sa-dot{width:7px;height:7px;border-radius:50%;background:var(--text-faint);flex:0 0 auto}.sa-dot[data-status=running]{background:var(--accent, #3b82f6)}.sa-type{font-weight:600;white-space:nowrap;flex:0 0 auto}.sa-desc{color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}.sa-status{margin-left:auto;color:var(--text-faint);white-space:nowrap;flex:0 0 auto}@media (max-width: 760px){.sa-summary{flex-wrap:wrap}.sa-desc{white-space:normal;overflow:visible;text-overflow:clip;flex-basis:100%}.sa-status{margin-left:auto}}.sa-transcript{padding:6px 10px 10px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}.sa-msg{display:flex;flex-direction:column;gap:3px}.sa-msg-role{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint)}.sa-text{font-size:12.5px;white-space:pre-wrap;word-break:break-word}.sa-think{font-size:11.5px;color:var(--text-dim)}.sa-think-body{white-space:pre-wrap;color:var(--text-faint)}.sa-tool{font-size:11.5px;font-family:ui-monospace,monospace;color:var(--text-dim)}.sa-tool-arg{color:var(--text-faint)}.sa-result{font-size:11px;font-family:ui-monospace,monospace;white-space:pre-wrap;word-break:break-word;color:var(--text-faint);border-left:2px solid var(--line);padding-left:8px}.sa-result[data-error=true]{color:#f87171;border-left-color:#f87171}.aui-md{font-size:var(--txt-transcript);line-height:1.5;overflow-wrap:anywhere;min-width:0;max-width:100%}.aui-md>:first-child{margin-top:0}.aui-md>:last-child{margin-bottom:0}.aui-md p{margin:0 0 8px}.aui-md h1,.aui-md h2,.aui-md h3,.aui-md h4,.aui-md h5,.aui-md h6{margin:14px 0 6px;line-height:1.3;font-weight:700}.aui-md h1{font-size:17px}.aui-md h2{font-size:15.5px}.aui-md h3{font-size:14px}.aui-md h4,.aui-md h5,.aui-md h6{font-size:13px;color:var(--text-dim)}.aui-md a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.aui-md strong{font-weight:700}.aui-md em{font-style:italic}.aui-md del{opacity:.7}.aui-md ul,.aui-md ol{margin:0 0 8px;padding-left:1.4em}.aui-md li{margin:2px 0}.aui-md li>ul,.aui-md li>ol{margin:2px 0}.aui-md li input[type=checkbox]{margin-right:6px;vertical-align:middle}.aui-md blockquote{margin:0 0 8px;padding:2px 10px;border-left:3px solid var(--line);color:var(--text-dim)}.aui-md hr{border:none;border-top:1px solid var(--line);margin:12px 0}.aui-md :not(pre)>code{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:.88em;background:var(--bg-2);border:1px solid var(--line);border-radius:5px;padding:1px 5px;overflow-wrap:anywhere}.aui-md pre{margin:0 0 8px;background:var(--bg);border:1px solid var(--line);border-radius:8px;overflow:hidden}.aui-md pre code{display:block;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;line-height:1.5;color:var(--text);padding:8px 10px;overflow-x:auto;white-space:pre;-webkit-overflow-scrolling:touch}.aui-md-code-lang{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:9.5px;text-transform:lowercase;letter-spacing:.04em;color:var(--text-faint);background:var(--bg-2);border-bottom:1px solid var(--line);padding:3px 10px}.md-table-wrap{max-width:100%;overflow-x:auto;margin:0 0 8px;-webkit-overflow-scrolling:touch}.aui-md table{width:max-content;max-width:none;border-collapse:collapse;font-size:11.5px}.aui-md th,.aui-md td{border:1px solid var(--line);padding:4px 8px;text-align:left;vertical-align:top;min-width:4.5em;max-width:32em;overflow-wrap:anywhere}.aui-md th{background:var(--bg-2);font-weight:700;white-space:nowrap}.aui-md img{max-width:100%;height:auto;border-radius:6px}.block-cot{font-size:11.5px;color:var(--text-dim);border:1px solid var(--line);border-radius:9px;background:#0e1217;padding:5px 9px;margin:2px 0}.block-cot>summary{cursor:pointer;color:var(--text-faint);font-style:italic;list-style:none;display:flex;align-items:baseline;gap:6px;min-width:0}.block-cot>summary::-webkit-details-marker{display:none}.block-cot>summary:before{content:"▸";font-style:normal;flex:0 0 auto}.block-cot[open]>summary:before{content:"▾"}.cot-label{flex:0 0 auto;font-weight:600;font-style:normal}.cot-steps{flex:0 0 auto;opacity:.7;font-style:normal}.cot-last{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-style:normal;opacity:.6}.cot-body{margin-top:6px;display:flex;flex-direction:column;gap:8px}.cot-reasoning,.thinking-text{padding-left:8px;border-left:2px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;opacity:.8}@keyframes thinking-flash{to{background-position:200% center}}.block-cot[data-thinking=true] .cot-label,.block-cot[data-thinking=true] .cot-last,.block-cot[data-thinking=true] .cot-reasoning{background-image:linear-gradient(90deg,oklch(72% .2 20),#f3b01d,#47c86e,#52a9fe,#d56aee,oklch(72% .2 20));background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:thinking-flash 2.4s linear infinite;opacity:1}.block-cot[data-thinking=true]{border-color:#414468}@keyframes shimmer-sweep{to{background-position:200% center}}.shimmer-text{background-image:linear-gradient(90deg,var(--text-faint) 0%,var(--text) 50%,var(--text-faint) 100%);background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:shimmer-sweep 1.6s linear infinite}.block-tool{display:flex;flex-direction:column;gap:4px}.block-tool-use{display:flex;align-items:center;gap:6px;min-width:0;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;color:var(--text-dim);background:var(--bg-2);border-radius:6px;padding:4px 8px;list-style:none;cursor:default}details.block-tool>summary.block-tool-use{cursor:pointer}.block-tool-use::-webkit-details-marker{display:none}.tool-head{display:flex;align-items:center;gap:5px;min-width:0;flex:1 1 auto;overflow:hidden}.tool-arrow{color:var(--accent-2);flex:0 0 auto;transition:transform var(--ease) .15s}details.block-tool[open]>summary .tool-arrow,.tool-arrow[data-peek=true]{transform:rotate(90deg)}.tool-name{color:var(--accent-2);font-weight:600;white-space:nowrap;flex:0 0 auto}.tool-sep{color:var(--text-faint);flex:0 0 auto}.tool-input{color:var(--text-dim);min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-tool-body{display:flex;flex-direction:column;gap:4px}.block-tool-args{margin:0;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:6px 8px;white-space:pre;overflow-x:auto;max-height:220px;overflow-y:auto;-webkit-overflow-scrolling:touch}.block-tool-result{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);border-left:2px solid var(--line);padding:4px 8px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow-y:auto;-webkit-overflow-scrolling:touch}.block-tool-result[data-error=true]{border-left-color:var(--red);background:var(--red-bg);color:var(--text)}.composer{display:flex;flex-direction:column;padding:0 12px 8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));background:transparent;flex:0 0 auto;position:relative}.skill-ac{position:absolute;bottom:100%;left:12px;right:12px;margin-inline:auto;max-width:880px;margin-bottom:6px;display:flex;flex-direction:column;gap:2px;padding:4px;background:var(--bg-1);border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px #00000059;z-index:30;max-height:50dvh;overflow-y:auto}.skill-ac-item{display:block;width:100%;text-align:left;background:transparent;border:none;border-radius:8px;padding:8px 10px;cursor:pointer;font:inherit;color:var(--text)}.skill-ac-item[data-on=true]{background:var(--bg-hover)}.skill-ac-item .tool-head{cursor:pointer}.composer-skill-chip-row{display:flex;margin-bottom:6px}.composer-skill-chip{cursor:default}.ptr-indicator{position:fixed;top:calc(env(safe-area-inset-top) + var(--hud-h) - 30px);left:50%;z-index:45;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--bg-2);border:1px solid var(--line);box-shadow:0 2px 10px #0000004d;pointer-events:none}.ptr-spinner{width:16px;height:16px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent)}.ptr-indicator[data-ready=true] .ptr-spinner{border-top-color:var(--green)}.ptr-indicator[data-refreshing=true] .ptr-spinner{animation:ptr-spin .7s linear infinite}@keyframes ptr-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.ptr-indicator[data-refreshing=true] .ptr-spinner{animation-duration:1.4s}}.composer-card{width:100%;max-width:880px;margin-inline:auto;display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:var(--bg-1);box-shadow:0 2px 10px #00000040}.composer-card:focus-within{border-color:var(--accent)}.composer-toolbar{display:flex;align-items:center;gap:8px}.composer-toolbar-spacer{flex:1 1 auto}.composer-attachments{display:flex;flex-wrap:wrap;gap:6px}.composer-attachments:empty{display:none}.attach-chip{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 4px 4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);font-size:11.5px;color:var(--text)}.attach-chip[data-pending=true]{opacity:.85;border-style:dashed}.chip-thumb{width:26px;height:26px;border-radius:5px;object-fit:cover;flex:0 0 auto;background:var(--bg)}.chip-thumb-empty{border:1px solid var(--line)}.chip-icon{font-size:14px;flex:0 0 auto}.chip-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-spinner{width:11px;height:11px;flex:0 0 auto;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:chip-spin .7s linear infinite}@keyframes chip-spin{to{transform:rotate(360deg)}}.chip-remove{flex:0 0 auto;width:20px;height:20px;border:none;border-radius:6px;background:transparent;color:var(--text-dim);font-size:15px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.chip-remove:hover{background:var(--bg-hover);color:var(--text)}.composer-attach,.composer-send{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s}.composer-attach:hover{background:var(--bg-hover);color:var(--text)}.composer-send{background:var(--accent);color:#0c121a;border-color:transparent}.composer-send:hover{filter:brightness(1.08)}.composer-attach:disabled,.composer-send:disabled{opacity:.4;cursor:not-allowed}.composer-card[data-terminal]{border-color:var(--red)}.composer-card[data-terminal]:focus-within{border-color:var(--red);box-shadow:0 0 0 1px var(--red)}.composer-term-toggle[data-on]{color:var(--red);border-color:var(--red);background:var(--red-bg)}.composer-send[data-terminal]{background:var(--red);color:#fff6f5;border-color:transparent}.composer-send[data-terminal]:hover{filter:brightness(1.08)}.composer-input{width:100%;resize:none;max-height:40dvh;min-height:24px;padding:2px;border:none;background:transparent;color:var(--text);font:inherit;font-size:var(--txt-composer);line-height:1.45}.composer-input:focus{outline:none}.composer-input::placeholder{color:var(--text-faint)}.composer-input-wrap{position:relative;display:flex}.composer-input-wrap .composer-input{flex:1 1 auto}.composer-hint{position:absolute;inset:0;padding:2px;display:none;align-items:center;gap:8px;font-size:var(--txt-meta);line-height:1.45;color:var(--text-faint);pointer-events:none;overflow:hidden;white-space:nowrap}.composer-input:placeholder-shown+.composer-hint{display:flex}.composer-hint-keys{display:inline-flex;align-items:center;gap:6px}.composer-hint .kbd{height:calc(var(--txt-meta) + 5px);min-width:calc(var(--txt-meta) + 5px);font-size:calc(var(--txt-meta) - 1px)}.composer-hint-dot{opacity:.6}@media (max-width: 760px){.composer-hint-keys{display:none}}.modal-backdrop{position:fixed;inset:0;background:#01020399;backdrop-filter:blur(2px);display:flex;align-items:flex-end;justify-content:center;z-index:50;padding:0}@media (min-width: 760px){.modal-backdrop{align-items:center;padding:20px}}.modal{width:100%;max-width:560px;max-height:90dvh;display:flex;flex-direction:column;background:var(--bg-1);border:1px solid var(--line);border-radius:16px 16px 0 0;overflow:hidden}@media (min-width: 760px){.modal{border-radius:16px}}.modal:focus{outline:none}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}.modal-title{font-weight:700;color:var(--amber)}.modal-close{background:none;border:none;color:var(--text-dim);font-size:16px;cursor:pointer;padding:4px 8px}.modal-body{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:18px}.modal-plan{max-width:760px}.plan-review{width:100%}.plan-review-viewport{display:flex;flex-direction:column}.plan-review .msg-row{max-width:100%;align-self:stretch;align-items:stretch}.question{display:flex;flex-direction:column;gap:6px}.q-header{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.06em;color:var(--accent-2)}.q-text{font-size:14px;font-weight:600}.q-hint{font-size:var(--txt-meta);color:var(--text-faint)}.q-options{display:flex;flex-direction:column;gap:7px;margin-top:2px}.option-btn{display:flex;flex-direction:column;gap:2px;text-align:left;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg-2);color:var(--text);cursor:pointer;font:inherit;transition:border-color var(--ease) .15s,background var(--ease) .15s}.option-btn:hover{background:var(--bg-hover)}.option-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.option-btn[data-on=true]{border-color:var(--accent);background:var(--bg);box-shadow:inset 0 0 0 1px var(--accent)}.option-btn:disabled{opacity:.5;cursor:default}.option-btn[data-sending=true]{opacity:1;border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.option-sending{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-size:var(--txt-meta);font-weight:400;color:var(--accent)}.prompt-status{font-size:var(--txt-meta);color:var(--accent)}.option-label{font-size:13px;font-weight:600}.option-desc{font-size:var(--txt-meta);color:var(--text-dim)}.capture-output{margin:0;padding:10px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);white-space:pre-wrap;overflow-wrap:anywhere;max-height:40dvh;overflow:auto}.modal-foot{display:flex;align-items:center;gap:8px;padding:12px 14px;padding-bottom:calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}.modal-foot-spacer{flex:1 1 auto}.btn-secondary,.btn-primary{display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:9px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--line)}.btn-secondary{background:var(--bg-2);color:var(--text)}.btn-secondary:hover{background:var(--bg-hover)}.btn-primary{background:var(--accent);color:#0c121a;border-color:transparent}.btn-primary:disabled{opacity:.4;cursor:not-allowed}.kbd{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:18px;padding:0 5px;border-radius:5px;border:1px solid var(--line);background:var(--bg-1);box-shadow:inset 0 -1px #0000004d;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;font-weight:600;line-height:1;color:var(--text-dim);pointer-events:none}.btn-primary .kbd{border-color:#41485366;background:#ffffff2e;box-shadow:none;color:#11161f}.toast{position:fixed;left:50%;top:calc(env(safe-area-inset-top) + var(--hud-h) + 14px);transform:translate(-50%,-12px);background:var(--bg-2);border:1px solid var(--line);color:var(--text);padding:8px 14px;border-radius:10px;font-size:12px;opacity:0;pointer-events:none;transition:opacity var(--ease) .2s,transform var(--ease) .2s;z-index:60;max-width:90vw;text-align:center}@media (max-width: 760px){.toast{top:calc(env(safe-area-inset-top) + var(--hud-h) + 56px)}}.toast.show{opacity:1;transform:translate(-50%)}.toast-ok{border-color:var(--green)}.toast-error{border-color:var(--red);color:var(--text)}.working-indicator{display:inline-flex;align-items:center;gap:7px;color:var(--text-faint);font-size:13px}.working-spinner{width:12px;height:12px;border:2px solid var(--line);border-top-color:var(--accent-2, var(--text));border-radius:50%;animation:cockpit-spin .7s linear infinite;flex:none}@keyframes cockpit-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.working-spinner{animation-duration:1.6s}.block-cot[data-thinking=true] .cot-label,.block-cot[data-thinking=true] .cot-last,.block-cot[data-thinking=true] .cot-reasoning,.shimmer-text{animation:none;background-image:none;-webkit-text-fill-color:var(--accent);color:var(--accent)}}.update-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;background:var(--amber-bg);color:var(--amber);border-bottom:1px solid var(--line);font-size:13px}.update-banner code{background:var(--bg-hover);color:var(--text);padding:1px 6px;border-radius:4px;font-size:12px}.update-dismiss{flex:none;background:transparent;border:0;color:var(--amber);font-size:16px;line-height:1;cursor:pointer;padding:2px 6px}.update-dismiss:hover{color:var(--text)}.update-actions{display:inline-flex;align-items:center;gap:6px;flex:none}.update-now{background:var(--amber);color:var(--bg);border:0;border-radius:6px;font-size:12px;font-weight:700;padding:4px 10px;cursor:pointer}.update-now:hover{filter:brightness(1.08)}.chip-thumb{cursor:zoom-in}.hud-spacer{flex:1 1 auto}.notify-bell{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--text-dim);cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}.notify-bell:hover:not(:disabled){color:var(--text);border-color:var(--text-faint)}.notify-bell[data-state=on]{color:var(--amber);border-color:var(--amber)}.notify-bell:disabled{opacity:.4;cursor:default}.ios-push-hint{padding:8px 12px;font-size:var(--txt-meta);line-height:1.4;color:var(--text);background:var(--amber-bg);border-bottom:1px solid var(--line);flex:0 0 auto}.rail-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--bg);border-bottom:1px solid var(--line)}.rail-new{flex:1;height:var(--hud-h);display:inline-flex;align-items:center;justify-content:center;background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:600;padding:0 10px;cursor:pointer;transition:border-color var(--ease) .15s,background var(--ease) .15s}.rail-new:hover:not(:disabled){border-color:var(--accent);background:var(--bg-hover)}.rail-new:disabled{opacity:.6;cursor:default}.rail-gear{flex:none;width:var(--hud-h);height:var(--hud-h);display:inline-flex;align-items:center;justify-content:center;background:var(--bg-2);color:var(--text-dim);border:1px solid var(--line);border-radius:8px;font-size:15px;cursor:pointer;transition:color var(--ease) .15s,border-color var(--ease) .15s}.rail-gear:hover{color:var(--text);border-color:var(--accent)}.rail-new:focus-visible,.rail-gear:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.rail-new-form{position:sticky;top:0;z-index:2;display:flex;flex-direction:column;gap:8px;padding:8px;background:var(--bg);border-bottom:1px solid var(--line)}.rail-new-name{background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:7px 10px;font-size:var(--txt-composer);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.rail-new-name:focus{outline:none;border-color:var(--accent)}.rail-new-name:disabled{opacity:.6}.rail-new-actions{display:flex;justify-content:flex-end;gap:6px}.rail-new-cancel,.rail-new-create{border-radius:8px;font-size:12px;font-weight:600;padding:6px 12px;cursor:pointer}.rail-new-cancel{background:transparent;color:var(--text-dim);border:1px solid var(--line)}.rail-new-cancel:hover:not(:disabled){color:var(--text)}.rail-new-create{background:var(--accent);color:var(--bg);border:0}.rail-new-create:hover:not(:disabled){filter:brightness(1.08)}.rail-new-cancel:disabled,.rail-new-create:disabled{opacity:.6;cursor:default}.transcript-attachments{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.transcript-thumb-btn{background:none;border:1px solid var(--line);border-radius:8px;padding:0;cursor:zoom-in;overflow:hidden;flex:0 0 auto;display:block;transition:border-color var(--ease) .15s}.transcript-thumb-btn:hover{border-color:var(--accent)}.transcript-thumb-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.transcript-thumb{display:block;max-width:140px;max-height:100px;width:auto;height:auto;border-radius:7px;object-fit:cover}.transcript-file-chip{display:inline-flex;align-items:center;gap:5px;max-width:200px;padding:4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);font-size:11.5px;color:var(--text);text-decoration:none;transition:border-color var(--ease) .15s,background var(--ease) .15s}.transcript-file-chip:hover{border-color:var(--accent);background:var(--bg-hover)}.transcript-file-chip:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.lightbox-backdrop{position:fixed;inset:0;z-index:100;background:#010203d9;display:flex;align-items:center;justify-content:center;cursor:zoom-out;padding:16px}.lightbox-backdrop:focus{outline:none}.lightbox-img{max-width:100%;max-height:90dvh;width:auto;height:auto;border-radius:10px;cursor:default;box-shadow:0 8px 40px #0009}.config-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:#0000008c}.config-modal{width:100%;max-width:600px;max-height:90dvh;background:var(--bg-1);border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 12px 40px #0006}.config-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid var(--line);flex:0 0 auto}.config-body{flex:1 1 auto;overflow-y:auto;padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;align-content:start}.config-field--wide{grid-column:1 / -1}.config-title{font-size:15px;font-weight:700;color:var(--text)}.config-close{background:transparent;border:0;color:var(--text-dim);font-size:18px;line-height:1;cursor:pointer;padding:2px 6px}.config-close:hover{color:var(--text)}.config-field{display:flex;flex-direction:column;gap:4px;min-width:0}.config-label{font-size:12px;font-weight:600;color:var(--text-dim)}.config-input{width:100%;box-sizing:border-box;background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}select.config-input{appearance:none;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--text-dim) 50%),linear-gradient(135deg,var(--text-dim) 50%,transparent 50%);background-position:calc(100% - 16px) calc(50% - 2px),calc(100% - 11px) calc(50% - 2px);background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:28px}.config-input:focus{outline:none;border-color:var(--accent)}.config-input:disabled{opacity:.6}.config-hint{font-size:11px;line-height:1.35;color:var(--text-faint)}.config-hint code{background:var(--bg-hover);color:var(--text-dim);padding:0 4px;border-radius:4px}.config-icon-row{display:flex;align-items:center;gap:12px}.config-icon-preview{border-radius:10px;border:1px solid var(--line);background:var(--bg-2);flex-shrink:0}.config-icon-actions{display:flex;gap:8px}.config-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:11px 16px;border-top:1px solid var(--line)}.config-version{display:flex;flex-wrap:wrap;gap:6px;font-size:11px;color:var(--text-faint)}.config-version-update{color:var(--accent, #3b82f6)}.config-actions{display:flex;justify-content:flex-end;gap:8px;margin-left:auto}.config-cancel,.config-save{border-radius:8px;font-size:13px;font-weight:600;padding:7px 14px;cursor:pointer}.config-cancel{background:transparent;color:var(--text-dim);border:1px solid var(--line)}.config-cancel:hover:not(:disabled){color:var(--text)}.config-save{background:var(--accent);color:var(--bg);border:0}.config-save:hover:not(:disabled){filter:brightness(1.08)}.config-save:disabled,.config-cancel:disabled{opacity:.6;cursor:default}@media (max-width: 560px){.config-overlay{align-items:flex-end;padding:0}.config-modal{max-width:100%;max-height:92dvh;border-radius:var(--radius) var(--radius) 0 0}.config-body{grid-template-columns:1fr}}.term-btn{font-size:13px}.term-btn:hover{color:var(--amber);background:var(--bg-hover)}.term-overlay{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:var(--bg)}.term-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid var(--line);background:var(--bg-1);flex:0 0 auto}.term-title{font-weight:700;font-size:13px;color:var(--amber);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.term-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}.term-newtab{font-size:12px;color:var(--accent);text-decoration:none;padding:4px 8px;border:1px solid var(--line);border-radius:6px}.term-newtab:hover{background:var(--bg-hover)}.term-close{background:none;border:none;color:var(--text-dim);font-size:16px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:6px}.term-close:hover{color:var(--text);background:var(--bg-hover)}.term-frame{flex:1 1 auto;width:100%;border:none;background:var(--bg)}.gate-root{display:flex;align-items:center;justify-content:center;min-height:100dvh;padding:24px;padding-top:max(24px,env(safe-area-inset-top));background:radial-gradient(120% 80% at 50% -10%,var(--bg-1),var(--bg) 60%)}.gate-card{display:flex;flex-direction:column;gap:12px;width:100%;max-width:320px;padding:24px;background:var(--bg-1);border:1px solid var(--line);border-radius:calc(var(--radius) + 4px);box-shadow:0 1px #ffffff0a inset,0 20px 50px -20px #000000b3}.gate-card--probing{flex-direction:row;align-items:center;justify-content:center;gap:10px;color:var(--text-dim)}.gate-brand{display:flex;align-items:center;gap:10px;margin-bottom:6px}.gate-glyph{font-size:22px;line-height:1;color:var(--accent)}.gate-title{font-size:17px;font-weight:650;letter-spacing:.01em;color:var(--text)}.gate-label{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint)}.gate-input{width:100%;padding:11px 12px;font-size:var(--txt-composer);color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);outline:none;transition:border-color .15s var(--ease),background .15s var(--ease)}.gate-input:focus{border-color:var(--accent);background:var(--bg-2)}.gate-input[aria-invalid=true]{border-color:var(--red)}.gate-error{margin:0;font-size:var(--txt-meta);color:var(--red)}.gate-submit{margin-top:4px;padding:11px 12px;font-size:14px;font-weight:600;color:var(--bg);background:var(--accent);border:none;border-radius:var(--radius);cursor:pointer;transition:filter .15s var(--ease),opacity .15s var(--ease)}.gate-submit:hover:not(:disabled){filter:brightness(1.08)}.gate-submit:active:not(:disabled){filter:brightness(.95)}.gate-submit:disabled{opacity:.6;cursor:default}.gate-spinner{width:16px;height:16px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:gate-spin .7s linear infinite}@keyframes gate-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.gate-spinner{animation:none}}.transcript-thumb-loading{display:inline-block;background:var(--bg-2);border:1px solid var(--line)}.skill-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px 3px 7px;border-radius:7px;border:1px solid var(--line);background:var(--bg-2);color:var(--text-dim);font:inherit;font-size:12px;line-height:1.4;cursor:pointer;transition:background var(--ease) .15s,border-color var(--ease) .15s,color var(--ease) .15s;vertical-align:middle}.skill-chip:hover{background:var(--bg-hover);border-color:var(--accent);color:var(--text)}.skill-chip:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.skill-chip:active{background:var(--line)}.skill-chip-icon{font-size:13px;flex:0 0 auto}.skill-chip-name{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.skill-chip-tag{flex:0 0 auto;font-size:9.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--text-faint)}.modal-skill{max-width:min(900px,92vw);max-height:85dvh;width:100%}.modal-title-skill{color:var(--accent)}.skill-modal-body{display:flex;flex-direction:column;gap:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px}.skill-fm{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;margin:0;padding:10px 12px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-size:12px}.skill-fm-row{display:contents}.skill-fm-key{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;color:var(--text-faint);white-space:nowrap;align-self:start;padding:1px 0}.skill-fm-val{color:var(--text-dim);overflow-wrap:anywhere;word-break:break-word;align-self:start;padding:1px 0;margin:0}.skill-body-wrap{flex:1 1 auto;min-height:0;overflow:visible}.skill-body-thread{width:100%}.skill-body-viewport{display:flex;flex-direction:column}.skill-body-thread .msg-row{max-width:100%;align-self:stretch;align-items:stretch}.tool-arrow-btn{background:none;border:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;color:inherit;flex:0 0 auto;line-height:1}.tool-name-btn{background:none;border:none;padding:0;cursor:pointer;font:inherit;color:var(--accent-2);font-weight:600;white-space:nowrap;flex:0 0 auto;text-decoration:underline;text-underline-offset:2px;text-decoration-color:transparent;transition:text-decoration-color var(--ease) .15s}.tool-name-btn:hover{text-decoration-color:var(--accent-2)}.aui-md-code-lang{display:flex;align-items:center}.aui-md-code-lang-name{flex:1 1 auto}.aui-md-code-open-btn{flex:0 0 auto;background:none;border:none;padding:0 6px;cursor:pointer;font-family:inherit;font-size:10px;color:var(--text-faint);line-height:1;transition:color var(--ease) .15s;border-radius:4px}.aui-md-code-open-btn:hover{color:var(--accent);background:var(--bg-hover)}.aui-md-code-open-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.detail-split{flex:1 1 auto;display:flex;min-width:0;min-height:0;overflow:hidden}.detail-split>.thread-root{flex:1 1 auto;min-width:0}@media (min-width: 760px){.detail-split>.thread-root{flex:1 1 0;min-width:0}.detail-split>.artifact-panel{flex:1 1 0;min-width:0}}.artifact-panel{display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--line);min-height:0;overflow:hidden;outline:none}.artifact-panel[data-mode=sheet]{position:fixed;inset:auto 0 0;border-left:none;border-top:1px solid var(--line);box-shadow:0 -8px 32px #00000073;z-index:200;overscroll-behavior:contain;transition:height .28s var(--ease)}.artifact-panel[data-mode=sheet][data-dragging=true]{transition:none}@media (prefers-reduced-motion: reduce){.artifact-panel[data-mode=sheet]{transition:none}}.artifact-drag-handle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;height:22px;cursor:ns-resize;touch-action:none;background:var(--bg);border-bottom:1px solid var(--line)}.artifact-drag-pip{width:36px;height:4px;border-radius:2px;background:var(--line)}.artifact-panel-head{display:flex;align-items:stretch;gap:0;background:var(--bg-1);border-bottom:1px solid var(--line);flex:0 0 auto;overflow-x:auto;min-height:38px}.artifact-tablist{display:flex;flex:1 1 auto;overflow-x:auto;gap:0}.artifact-tab-wrap{display:inline-flex;align-items:stretch;border-right:1px solid var(--line);flex:0 0 auto;max-width:200px;min-width:0}.artifact-tab{flex:1 1 auto;min-width:0;background:none;border:none;color:var(--text-dim);font-size:11.5px;font-family:inherit;padding:6px 8px 6px 10px;cursor:pointer;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;transition:color var(--ease) .15s,background var(--ease) .15s}.artifact-tab:hover{color:var(--text);background:var(--bg-hover)}.artifact-tab[aria-selected=true]{color:var(--text);background:var(--bg);border-bottom:2px solid var(--accent)}.artifact-tab-close{flex:0 0 auto;background:none;border:none;color:var(--text-faint);cursor:pointer;padding:2px 6px;font-size:10px;line-height:1;border-radius:4px;margin:auto 4px auto 0;transition:color var(--ease) .15s,background var(--ease) .15s}.artifact-tab-close:hover{color:var(--text);background:var(--bg-hover)}.artifact-close-all{flex:0 0 auto;background:none;border:none;border-left:1px solid var(--line);color:var(--text-dim);cursor:pointer;padding:0 12px;font-size:18px;line-height:1;transition:color var(--ease) .15s}.artifact-close-all:hover{color:var(--text)}.artifact-panel-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.artifact-body-wrap{min-height:100%}.artifact-pre{margin:0;padding:12px 14px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.55;white-space:pre;overflow-x:auto;color:var(--text);background:var(--bg);min-height:100%;-webkit-overflow-scrolling:touch}.artifact-pre code{display:block}.artifact-large-note{margin:0;padding:6px 14px;font-size:var(--txt-meta);color:var(--text-faint);background:var(--bg-2);border-bottom:1px solid var(--line)}.agent-chip{display:inline-flex;align-items:center;gap:5px;min-width:0;flex:0 0 auto}.agent-chip-name{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;font-size:inherit}.agent-chip-model{display:inline-flex;align-items:center;padding:1px 6px;border-radius:5px;background:var(--bg-2);border:1px solid var(--line);color:var(--accent-2);font-size:10px;font-weight:600;letter-spacing:.04em;white-space:nowrap;text-transform:lowercase;flex:0 0 auto}.agent-def{flex:0 0 auto;display:flex;flex-direction:column;gap:5px;padding:10px 12px;border-bottom:1px solid var(--line);background:var(--bg-1);font-size:var(--txt-meta);overflow:hidden}.agent-def-no-def{color:var(--text-faint);font-style:italic}.agent-def-desc{color:var(--text-dim);line-height:1.45;overflow-wrap:anywhere}.agent-def-row{display:flex;align-items:baseline;gap:8px;min-width:0}.agent-def-label{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;color:var(--text-faint);white-space:nowrap;flex:0 0 auto;min-width:40px}.agent-def-val{color:var(--text-dim);overflow-wrap:anywhere;word-break:break-word;flex:1 1 auto;min-width:0}.agent-def-tools{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;color:var(--accent-2)}.agent-nested{flex:0 0 auto;display:flex;align-items:flex-start;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--bg-1);font-size:var(--txt-meta)}.agent-nested-label{color:var(--text-faint);white-space:nowrap;flex:0 0 auto;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;padding-top:2px}.agent-nested-list{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 auto;min-width:0}.composer-enhance{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s,border-color var(--ease) .15s}.composer-enhance:hover:not(:disabled){background:var(--bg-hover);color:var(--accent);border-color:var(--accent)}.composer-enhance:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.composer-enhance:disabled{opacity:.35;cursor:not-allowed}.composer-enhance-spinner{width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:cockpit-spin .7s linear infinite;display:block}@media (prefers-reduced-motion: reduce){.composer-enhance-spinner{animation-duration:1.6s}}.modal-optimize{max-width:680px}.modal-head-group{display:flex;align-items:center;gap:8px}.modal-title-optimize{color:var(--accent-2)}.optimize-mode-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:20px;background:var(--bg-2);color:var(--text-dim);font-size:10.5px;font-weight:600;letter-spacing:.03em;border:1px solid var(--line)}.optimize-mode-badge[data-mode=llm]{border-color:#4075aa80;color:var(--accent)}.optimize-section{display:flex;flex-direction:column;gap:6px}.optimize-section-label{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint);font-weight:600}.optimize-suggestion{width:100%;box-sizing:border-box;min-height:120px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text);font:inherit;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px;line-height:1.5;resize:vertical;transition:border-color var(--ease) .15s}.optimize-suggestion:focus{outline:none;border-color:var(--accent)}.optimize-diff{padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.6;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-height:200px;overflow-y:auto}.diff-same{color:var(--text-dim)}.diff-add{color:#5bbd74;background:#5bbd7412;display:block;margin-inline:-12px;padding-inline:12px}.diff-del{color:#dc5e59;background:#dc5e5912;text-decoration:line-through;text-decoration-color:#dc5e5980;display:block;margin-inline:-12px;padding-inline:12px}.optimize-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;color:var(--text-dim);font-size:13px;line-height:1.5}.optimize-list li{padding-left:2px}.composer-skills-btn,.composer-mic{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s,border-color var(--ease) .15s;font-size:14px;font-weight:600;letter-spacing:-.02em}.composer-mic:hover{color:var(--text);background:var(--bg-hover)}.voice-dialog{display:flex;flex-direction:column;gap:12px;padding:16px;max-width:min(520px,94vw)}.voice-status{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--text-dim)}.voice-dot{width:9px;height:9px;border-radius:50%;background:var(--text-faint);flex:0 0 auto}.voice-dot[data-on=true]{background:var(--red);animation:mic-pulse 1.3s var(--ease) infinite}@keyframes mic-pulse{50%{box-shadow:0 0 0 4px var(--red-bg)}}.voice-wave{width:100%;height:72px;border-radius:10px;background:var(--bg);border:1px solid var(--line);display:block}.voice-wave[data-paused=true]{opacity:.5}.voice-transcript{min-height:48px;max-height:28dvh;overflow-y:auto;font-size:var(--txt-transcript);line-height:1.5;color:var(--text);background:var(--bg-1);border:1px solid var(--line);border-radius:10px;padding:10px 12px;white-space:pre-wrap}.voice-placeholder{color:var(--text-faint)}.voice-error{font-size:12px;color:var(--red)}.voice-note{font-size:12px;color:var(--text-faint)}.voice-actions{display:flex;align-items:center;gap:8px}.voice-actions-spacer{flex:1 1 auto}@media (prefers-reduced-motion: reduce){.voice-dot[data-on=true]{animation:none;box-shadow:0 0 0 3px var(--red-bg)}}.composer-skills-btn:hover:not(:disabled){background:var(--bg-hover);color:var(--accent);border-color:var(--accent)}.composer-skills-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.composer-skills-btn:disabled{opacity:.35;cursor:not-allowed}.skill-browser-sheet-wrap{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;pointer-events:none}.skill-browser-sheet-wrap>.skill-browser{pointer-events:auto}.skill-browser{width:100%;max-height:70dvh;display:flex;flex-direction:column;background:var(--bg-1);border:1px solid var(--line);border-radius:16px 16px 0 0;overflow:hidden}@media (min-width: 760px){.skill-browser{width:100%;max-width:560px;max-height:80dvh;border-radius:14px}}.skill-browser-head{display:flex;align-items:center;gap:8px;padding:14px 16px 10px;border-bottom:1px solid var(--line);flex:0 0 auto}.skill-browser-title{flex:1 1 auto;font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.01em}.skill-browser-search{padding:10px 12px;flex:0 0 auto;border-bottom:1px solid var(--line)}.skill-search-input{width:100%;box-sizing:border-box;background:var(--bg-2);border:1px solid var(--line);border-radius:8px;color:var(--text);font-size:13.5px;padding:7px 10px;outline:none;transition:border-color var(--ease) .15s}.skill-search-input:focus{border-color:var(--accent)}.skill-search-input::placeholder{color:var(--text-faint)}.skill-search-input::-webkit-search-cancel-button{-webkit-appearance:none}.skill-browser-list{flex:1 1 auto;overflow-y:auto;padding:6px 8px 10px;display:flex;flex-direction:column;gap:2px}.skill-browser-empty{padding:24px 12px;text-align:center;color:var(--text-faint);font-size:13px}.skill-card{width:100%;text-align:left;background:none;border:none;cursor:pointer;border-radius:7px;padding:7px 10px;display:flex;align-items:baseline;gap:6px;transition:background var(--ease) .12s;min-width:0}.skill-card:hover{background:var(--bg-hover)}.skill-card:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}.skill-card .tool-head{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:0 4px;row-gap:2px}.skill-card-name{font-size:13px;font-weight:500;color:var(--text);white-space:nowrap}.skill-card-desc{font-size:12.5px;color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.skill-source-tag{flex:0 0 auto;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint);background:var(--bg-2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;margin-left:auto}.aui-md pre code.hljs{background:transparent;color:var(--text)}.aui-md .hljs-doctag,.aui-md .hljs-keyword,.aui-md .hljs-meta .hljs-keyword,.aui-md .hljs-template-tag,.aui-md .hljs-template-variable,.aui-md .hljs-type,.aui-md .hljs-variable.language_{color:#ff7b72}.aui-md .hljs-title,.aui-md .hljs-title.class_,.aui-md .hljs-title.class_.inherited__,.aui-md .hljs-title.function_{color:#d2a8ff}.aui-md .hljs-attr,.aui-md .hljs-attribute,.aui-md .hljs-literal,.aui-md .hljs-meta,.aui-md .hljs-number,.aui-md .hljs-operator,.aui-md .hljs-variable,.aui-md .hljs-selector-attr,.aui-md .hljs-selector-class,.aui-md .hljs-selector-id{color:#79c0ff}.aui-md .hljs-regexp,.aui-md .hljs-string,.aui-md .hljs-meta .hljs-string{color:#a5d6ff}.aui-md .hljs-built_in,.aui-md .hljs-symbol{color:#ffa657}.aui-md .hljs-comment,.aui-md .hljs-code,.aui-md .hljs-formula{color:#8b949e}.aui-md .hljs-name,.aui-md .hljs-quote,.aui-md .hljs-selector-tag,.aui-md .hljs-selector-pseudo{color:#7ee787}.aui-md .hljs-subst{color:var(--text)}.aui-md .hljs-section{color:#1f6feb;font-weight:700}.aui-md .hljs-bullet{color:#f2cc60}.aui-md .hljs-emphasis{color:var(--text);font-style:italic}.aui-md .hljs-strong{color:var(--text);font-weight:700}.aui-md .hljs-addition{color:#aff5b4;background-color:#033a16}.aui-md .hljs-deletion{color:#ffdcd7;background-color:#67060c}
1
+ .slot-text{display:inline-flex;white-space:pre}.char-slot{position:relative;display:inline-flex;flex:none;justify-content:center;overflow:hidden;overflow-x:visible;overflow-y:clip;line-height:1.3;vertical-align:bottom}.char-slot.is-resizing{overflow-x:clip}.char-sizer{visibility:hidden;white-space:pre}.char-face{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;white-space:pre;will-change:transform}:root{--bg: oklch(16% .012 260);--bg-1: oklch(20% .014 260);--bg-2: oklch(24% .016 260);--bg-hover: oklch(27% .02 260);--line: oklch(32% .015 260);--text: oklch(92% .01 250);--text-dim: oklch(66% .012 250);--text-faint: oklch(52% .012 250);--accent: oklch(70% .15 250);--accent-2: oklch(74% .13 200);--amber: oklch(80% .16 80);--amber-bg: oklch(40% .1 80);--red: oklch(64% .2 25);--red-bg: oklch(30% .09 25);--green: oklch(72% .16 150);--user: oklch(.24 .03 249.98);--txt-transcript: 13.5px;--txt-meta: 11px;--txt-composer: 16px;--hud-h: 34px;--radius: 10px;--ease: cubic-bezier(.16, 1, .3, 1);color-scheme:dark}@media (min-width: 760px){:root{--txt-transcript: 14.5px;--txt-meta: 12px;--txt-composer: 16px}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:var(--txt-transcript);line-height:1.45;-webkit-font-smoothing:antialiased;overscroll-behavior:none}.app{display:flex;flex-direction:column;height:100dvh}.hud{display:flex;align-items:center;gap:12px;height:var(--hud-h);padding:0 12px;padding-top:env(safe-area-inset-top);background:var(--bg-1);border-bottom:1px solid var(--line);font-size:var(--txt-meta);color:var(--text-dim);white-space:nowrap;overflow-x:auto;flex:0 0 auto;box-sizing:content-box}.hud[data-warn=true]{background:var(--amber-bg);color:var(--text)}.hud-brand{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--text);letter-spacing:.02em;flex:0 0 auto}.hud-group{display:inline-flex;gap:4px;align-items:baseline}.hud-k{color:var(--text-faint)}.hud-v{color:var(--text);font-variant-numeric:tabular-nums}.hud-warn-text{color:var(--amber);font-weight:600}.conn-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;background:var(--text-faint)}.conn-connected{background:var(--green)}.conn-connecting{background:var(--amber)}.conn-disconnected{background:var(--red)}.app-body{flex:1 1 auto;display:flex;min-height:0}.rail{width:100%;overflow-y:auto;background:var(--bg);-webkit-overflow-scrolling:touch}.detail{display:none;flex-direction:column;min-width:0;width:100%}.app[data-detail=open] .rail{display:none}.app[data-detail=open] .detail{display:flex}@media (min-width: 760px){.rail{width:300px;flex:0 0 300px;border-right:1px solid var(--line)}.detail,.app[data-detail=open] .detail{display:flex}.app[data-detail=open] .rail,.app[data-detail=closed] .rail{display:block}.back-btn{display:none!important}}.session-list{list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:4px}.session-group{display:flex;flex-direction:column;margin-bottom:10px}.session-group-head{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted, #8a8f98);padding:4px 6px 2px}.session-window{display:flex;flex-direction:column;margin-left:4px;padding-left:6px;border-left:1px solid var(--line)}.session-window-head{display:flex;align-items:baseline;gap:6px;padding:4px 6px 2px;font-size:12px}.session-window-head .window-idx{font-family:ui-monospace,SF Mono,Menlo,monospace;font-weight:700;color:var(--accent);opacity:.85}.session-window-head .window-name{color:var(--text-1, inherit);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-pane-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.pane-glyph{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;opacity:.7;margin-right:2px}.session-item[data-kind=terminal]{background:transparent;border-style:dashed;border-color:var(--line)}.session-item[data-kind=terminal] .pane-glyph{color:var(--red, #e5534b)}.meta-cwd{font-family:ui-monospace,SF Mono,Menlo,monospace;opacity:.7}.terminal-pane-root{min-height:0;padding:8px 8px 10px;gap:8px}.terminal-pane-root .terminal-view{flex:1 1 auto;max-height:none;min-height:0;margin-bottom:0}.terminal-pane-root .terminal-pane-input{flex:0 0 auto}.terminal-pane-input{width:100%;max-width:880px;margin-inline:auto;padding:8px;border:1px solid var(--red);border-radius:12px;background:var(--bg)}.terminal-pane-input .composer-input{width:100%;background:transparent;border:none;outline:none;resize:none;color:var(--text);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript)}.session-item{padding:9px 11px;border-radius:var(--radius);border:1px solid transparent;cursor:pointer;background:var(--bg-1);transition:background var(--ease) .15s,border-color var(--ease) .15s}.session-item:hover{background:var(--bg-hover)}.session-item:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.session-item[data-selected=true]{border-color:var(--accent);background:var(--bg-2)}.session-top{display:flex;align-items:center;gap:7px}.active-dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--text-faint)}.active-dot[data-on=true]{background:var(--green);box-shadow:0 0 6px var(--green)}.session-name{font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.ask-badge{flex:0 0 auto;font-size:9.5px;font-weight:800;letter-spacing:.06em;padding:2px 6px;border-radius:6px;background:var(--amber-bg);color:var(--amber);animation:pulse 1.6s var(--ease) infinite}@keyframes pulse{50%{opacity:.55}}.session-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;font-size:var(--txt-meta);color:var(--text-dim);align-items:center}.meta-prov{font-variant-numeric:tabular-nums;color:var(--text-faint)}.meta-model{color:var(--accent-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}.meta-ctx{font-variant-numeric:tabular-nums;padding:1px 5px;border-radius:5px;background:var(--bg-2);color:var(--text-dim)}.session-empty{list-style:none;padding:16px;color:var(--text-faint);text-align:center}.detail-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--bg-1);flex:0 0 auto}.back-btn{font-size:22px;line-height:1;background:none;border:none;color:var(--accent);padding:2px 8px;cursor:pointer;flex:0 0 auto}.detail-title{display:flex;flex-direction:column;min-width:0}.detail-name{font-weight:700;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-cwd{font-size:var(--txt-meta);color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-name-row{display:flex;align-items:center;gap:6px;min-width:0}.rename-btn{flex:0 0 auto;background:none;border:none;color:var(--text-faint);cursor:pointer;font-size:12px;line-height:1;padding:2px 4px;border-radius:4px}.rename-btn:hover{color:var(--text);background:var(--bg-hover)}.detail-rename-input{width:100%;font-weight:700;font-size:13px;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:3px 7px;outline:none}.detail-rename-input:focus{border-color:var(--accent)}.live-pane{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;padding:12px 12px 6px}.live-pane-head{flex:0 0 auto;font-size:var(--txt-meta);color:var(--text-faint);margin-bottom:6px}.live-pane-body{flex:1 1 auto;margin:0;padding:10px;border-radius:8px;background:var(--bg);border:1px solid var(--line);color:var(--text);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript);white-space:pre;overflow:auto;-webkit-overflow-scrolling:touch}.terminal-view{display:flex;flex-direction:column;width:100%;max-width:880px;margin-inline:auto;margin-bottom:8px;max-height:48dvh;border:1px solid var(--red);border-radius:12px;background:var(--bg);overflow:hidden}.terminal-view-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-bottom:1px solid var(--line);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-meta);color:var(--red);background:var(--red-bg)}.terminal-view-btn{border:1px solid var(--red);background:transparent;color:var(--red);border-radius:6px;padding:2px 10px;font-size:12px;cursor:pointer}.terminal-view-btn:hover{background:var(--red-bg)}.terminal-view-body{flex:1 1 auto;min-height:0;margin:0;padding:10px 12px;background:#0b0d10;color:#c0caf5;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:var(--txt-transcript);line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;-webkit-overflow-scrolling:touch}.terminal-view-body a{color:#7dcfff;text-decoration:underline;text-underline-offset:2px}.terminal-view-body a:hover{color:#a4daff}.terminal-key-bar{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:6px 8px;border-top:1px solid var(--line);background:#0b0d10;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.terminal-key-bar::-webkit-scrollbar{display:none}.terminal-key{flex:0 0 auto;min-width:34px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:#161a22;color:#c0caf5;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px;line-height:1;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation}.terminal-key:hover{background:#232838}.terminal-key:active{background:var(--red-bg);border-color:var(--red);color:var(--red)}.terminal-key-mod{font-size:12px;letter-spacing:.02em}.terminal-key-mod[data-on=true]{background:var(--red);border-color:var(--red);color:#fff}.terminal-key-gap{flex:0 0 auto;width:1px;height:18px;background:var(--line);margin-inline:4px}.thread-root{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;position:relative}.thread-fade{position:absolute;top:0;left:0;right:0;height:64px;background:linear-gradient(to bottom,var(--bg) 38%,transparent);pointer-events:none;opacity:0;transition:opacity .28s var(--ease, ease);z-index:5}.thread-root:focus-within .thread-fade{opacity:1}.app-top-fade{position:fixed;top:0;left:0;right:0;height:calc(env(safe-area-inset-top) + 52px);background:linear-gradient(to bottom,var(--bg) 55%,transparent);pointer-events:none;opacity:0;transition:opacity .28s var(--ease, ease);z-index:40}@media (max-width: 760px){.app:focus-within .app-top-fade{opacity:1}}@media (prefers-reduced-motion: reduce){.app-top-fade{transition:none}}@media (prefers-reduced-motion: reduce){.thread-fade{transition:none}}.thread-viewport{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:12px max(12px,calc((100% - 800px)/2)) 20px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch}.thread-empty{margin:auto;color:var(--text-faint);text-align:center}.load-earlier{align-self:center;flex:0 0 auto;margin:2px 0 4px;padding:5px 12px;font:inherit;font-size:11.5px;color:var(--text-dim);background:var(--bg-2);border:1px solid var(--line);border-radius:999px;cursor:pointer;transition:background .12s ease,color .12s ease}.load-earlier:hover{background:var(--bg-hover);color:var(--text)}.load-earlier:active{background:var(--line)}.msg-row{display:flex;flex-direction:column;gap:3px;max-width:92%;min-width:0}.msg-row[data-role=user]{align-self:flex-end;align-items:flex-end}.msg-body{display:flex;flex-direction:column;gap:6px;background:transparent;border:1px solid transparent;border-radius:var(--radius);font-size:var(--txt-transcript);min-width:0;max-width:100%}.msg-row[data-role=assistant] .msg-body{padding:0}.msg-row[data-role=user] .msg-body{background:var(--user);border:1px solid transparent;border-left:2px solid var(--accent);padding:8px 10px}.msg-row[data-role=system] .msg-body{background:transparent;border:1px dashed var(--line);color:var(--text-dim);padding:8px 10px}.msg-row[data-queued=true]{opacity:.62}.msg-row[data-queued=true] .msg-body{border:1px dashed var(--line);background:transparent}.msg-actions{display:flex;gap:4px;margin-top:2px;padding:0 2px}.msg-row[data-role=user] .msg-actions{justify-content:flex-end}.act-btn{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--text-faint);font-size:11px;cursor:pointer;transition:background var(--ease) .15s,color var(--ease) .15s}.act-btn:hover{background:var(--bg-1);color:var(--text)}.act-copy-done{display:none;align-items:center;gap:4px;color:var(--green)}.act-btn[data-copied] .act-copy-idle{display:none}.act-btn[data-copied] .act-copy-done{display:inline-flex}.act-btn[data-copied]{color:var(--green)}.transcript-img{max-width:min(320px,100%);max-height:240px;border-radius:var(--radius);border:1px solid var(--line);cursor:zoom-in;display:block;object-fit:contain}.lightbox{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:#000000d1;padding:24px;cursor:zoom-out}.lightbox-img{max-width:100%;max-height:100%;border-radius:var(--radius);box-shadow:0 10px 40px #00000080;cursor:default}.lightbox-close{position:absolute;top:16px;right:20px;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:22px;line-height:1;cursor:pointer}.login{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg, #0b0d10);padding:24px}.login-card{display:flex;flex-direction:column;gap:10px;width:min(340px,88vw)}.login-title{margin:0;font-size:18px;font-weight:700;letter-spacing:.02em}.login-sub{margin:0;font-size:13px;color:var(--text-dim)}.login-input{padding:12px 14px;border-radius:10px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:16px}.login-err{min-height:16px;font-size:12px;color:#f87171}.login-btn{padding:12px 14px;border-radius:10px;border:0;background:var(--accent, #3b82f6);color:#fff;font-size:15px;font-weight:600;cursor:pointer}.login-btn:disabled{opacity:.55}.hud-logout{margin-left:8px;border:1px solid var(--line);background:transparent;color:var(--text-dim);border-radius:6px;padding:2px 7px;font-size:13px;cursor:pointer}.pin-modal{display:flex;flex-direction:column;gap:10px;max-height:80vh}.pin-search{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:14px}.pin-unpin{padding:8px 10px;border-radius:8px;cursor:pointer;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px}.pin-list{overflow-y:auto;display:flex;flex-direction:column;gap:4px}.pin-empty{color:var(--text-faint);font-size:12px;padding:16px;text-align:center}.pin-row{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer;border:1px solid var(--line);background:var(--bg-1);color:var(--text)}.pin-row:hover,.pin-row[data-current=true]{border-color:var(--accent, #3b82f6)}.pin-row-title{font-size:13px;font-weight:600}.pin-row-cur{color:var(--accent, #3b82f6);font-weight:400}.pin-row-meta{display:flex;gap:8px;font-size:11px;color:var(--text-faint)}.pin-row-cwd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pin-row-when{margin-left:auto;white-space:nowrap}.pin-toggle{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:28px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);font-size:14px;cursor:pointer}.pin-toggle[aria-pressed=true]{border-color:var(--accent, #3b82f6)}.pin-toggle+.subagents-toggle{margin-left:6px}.subagents-toggle{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px;cursor:pointer}.subagents-toggle[aria-pressed=true]{color:var(--text);border-color:var(--accent, #3b82f6)}.subagents-badge{min-width:16px;padding:0 5px;border-radius:8px;background:var(--accent, #3b82f6);color:#fff;font-size:11px;text-align:center}.sa-panel{position:fixed;top:0;right:0;bottom:0;z-index:900;width:min(560px,100vw);display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--line);box-shadow:-12px 0 40px #0006}@media (min-width: 760px){.sa-panel{width:50vw;max-width:none}}.sa-panel-head{display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;border-bottom:1px solid var(--line)}.sa-panel-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600}.sa-count{padding:0 6px;border-radius:8px;background:var(--bg-1);color:var(--text-dim);font-size:11px}.sa-count-running{color:var(--accent, #3b82f6);font-size:11px}.sa-panel-close{margin-left:auto;width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:18px;cursor:pointer}.sa-panel-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.sa-empty{color:var(--text-faint);font-size:12px;padding:16px}.sa-tabs{display:flex;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line)}.sa-tab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text-dim);font-size:12px;cursor:pointer}.sa-tab[data-on=true]{color:var(--text);border-color:var(--accent, #3b82f6)}.sa-tab-count{font-size:10px;color:var(--text-faint)}.sa-item-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:12px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);font-size:12px;line-height:1.4;cursor:pointer}.sa-item-row:hover{background:var(--bg-1)}.sa-chevron{margin-left:4px;color:var(--text-faint);flex:0 0 auto}.sa-back{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--bg-1);color:var(--text);font-size:18px;cursor:pointer;flex:0 0 auto}.sa-detail-title{min-width:0;flex:1 1 auto;font-weight:400}.sa-thread-root{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.sa-thread-viewport{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:12px;padding:12px}.sa-item{border:1px solid var(--line);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-1)}.sa-summary{display:flex;align-items:center;gap:8px;padding:11px 12px;cursor:pointer;font-size:12px;line-height:1.4}.sa-dot{width:7px;height:7px;border-radius:50%;background:var(--text-faint);flex:0 0 auto}.sa-dot[data-status=running]{background:var(--accent, #3b82f6)}.sa-type{font-weight:600;white-space:nowrap;flex:0 0 auto}.sa-desc{color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}.sa-status{margin-left:auto;color:var(--text-faint);white-space:nowrap;flex:0 0 auto}@media (max-width: 760px){.sa-summary{flex-wrap:wrap}.sa-desc{white-space:normal;overflow:visible;text-overflow:clip;flex-basis:100%}.sa-status{margin-left:auto}}.sa-transcript{padding:6px 10px 10px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}.sa-msg{display:flex;flex-direction:column;gap:3px}.sa-msg-role{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint)}.sa-text{font-size:12.5px;white-space:pre-wrap;word-break:break-word}.sa-think{font-size:11.5px;color:var(--text-dim)}.sa-think-body{white-space:pre-wrap;color:var(--text-faint)}.sa-tool{font-size:11.5px;font-family:ui-monospace,monospace;color:var(--text-dim)}.sa-tool-arg{color:var(--text-faint)}.sa-result{font-size:11px;font-family:ui-monospace,monospace;white-space:pre-wrap;word-break:break-word;color:var(--text-faint);border-left:2px solid var(--line);padding-left:8px}.sa-result[data-error=true]{color:#f87171;border-left-color:#f87171}.aui-md{font-size:var(--txt-transcript);line-height:1.5;overflow-wrap:anywhere;min-width:0;max-width:100%}.aui-md>:first-child{margin-top:0}.aui-md>:last-child{margin-bottom:0}.aui-md p{margin:0 0 8px}.aui-md h1,.aui-md h2,.aui-md h3,.aui-md h4,.aui-md h5,.aui-md h6{margin:14px 0 6px;line-height:1.3;font-weight:700}.aui-md h1{font-size:17px}.aui-md h2{font-size:15.5px}.aui-md h3{font-size:14px}.aui-md h4,.aui-md h5,.aui-md h6{font-size:13px;color:var(--text-dim)}.aui-md a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.aui-md strong{font-weight:700}.aui-md em{font-style:italic}.aui-md del{opacity:.7}.aui-md ul,.aui-md ol{margin:0 0 8px;padding-left:1.4em}.aui-md li{margin:2px 0}.aui-md li>ul,.aui-md li>ol{margin:2px 0}.aui-md li input[type=checkbox]{margin-right:6px;vertical-align:middle}.aui-md blockquote{margin:0 0 8px;padding:2px 10px;border-left:3px solid var(--line);color:var(--text-dim)}.aui-md hr{border:none;border-top:1px solid var(--line);margin:12px 0}.aui-md :not(pre)>code{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:.88em;background:var(--bg-2);border:1px solid var(--line);border-radius:5px;padding:1px 5px;overflow-wrap:anywhere}.aui-md pre{margin:0 0 8px;background:var(--bg);border:1px solid var(--line);border-radius:8px;overflow:hidden}.aui-md pre code{display:block;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;line-height:1.5;color:var(--text);padding:8px 10px;overflow-x:auto;white-space:pre;-webkit-overflow-scrolling:touch}.aui-md-code-lang{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:9.5px;text-transform:lowercase;letter-spacing:.04em;color:var(--text-faint);background:var(--bg-2);border-bottom:1px solid var(--line);padding:3px 10px}.md-table-wrap{max-width:100%;overflow-x:auto;margin:0 0 8px;-webkit-overflow-scrolling:touch}.aui-md table{width:max-content;max-width:none;border-collapse:collapse;font-size:11.5px}.aui-md th,.aui-md td{border:1px solid var(--line);padding:4px 8px;text-align:left;vertical-align:top;min-width:4.5em;max-width:32em;overflow-wrap:anywhere}.aui-md th{background:var(--bg-2);font-weight:700;white-space:nowrap}.aui-md img{max-width:100%;height:auto;border-radius:6px}.block-cot{font-size:11.5px;color:var(--text-dim);border:1px solid var(--line);border-radius:9px;background:#0e1217;padding:5px 9px;margin:2px 0}.block-cot>summary{cursor:pointer;color:var(--text-faint);font-style:italic;list-style:none;display:flex;align-items:baseline;gap:6px;min-width:0}.block-cot>summary::-webkit-details-marker{display:none}.block-cot>summary:before{content:"▸";font-style:normal;flex:0 0 auto}.block-cot[open]>summary:before{content:"▾"}.cot-label{flex:0 0 auto;font-weight:600;font-style:normal}.cot-steps{flex:0 0 auto;opacity:.7;font-style:normal}.cot-last{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-style:normal;opacity:.6}.cot-body{margin-top:6px;display:flex;flex-direction:column;gap:8px}.cot-reasoning,.thinking-text{padding-left:8px;border-left:2px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;opacity:.8}@keyframes thinking-flash{to{background-position:200% center}}.block-cot[data-thinking=true] .cot-label,.block-cot[data-thinking=true] .cot-last,.block-cot[data-thinking=true] .cot-reasoning{background-image:linear-gradient(90deg,oklch(72% .2 20),#f3b01d,#47c86e,#52a9fe,#d56aee,oklch(72% .2 20));background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:thinking-flash 2.4s linear infinite;opacity:1}.block-cot[data-thinking=true]{border-color:#414468}@keyframes shimmer-sweep{to{background-position:200% center}}.shimmer-text{background-image:linear-gradient(90deg,var(--text-faint) 0%,var(--text) 50%,var(--text-faint) 100%);background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:shimmer-sweep 1.6s linear infinite}.block-tool{display:flex;flex-direction:column;gap:4px}.block-tool-use{display:flex;align-items:center;gap:6px;min-width:0;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;color:var(--text-dim);background:var(--bg-2);border-radius:6px;padding:4px 8px;list-style:none;cursor:default}details.block-tool>summary.block-tool-use{cursor:pointer}.block-tool-use::-webkit-details-marker{display:none}.tool-head{display:flex;align-items:center;gap:5px;min-width:0;flex:1 1 auto;overflow:hidden}.tool-arrow{color:var(--accent-2);flex:0 0 auto;transition:transform var(--ease) .15s}details.block-tool[open]>summary .tool-arrow,.tool-arrow[data-peek=true]{transform:rotate(90deg)}.tool-name{color:var(--accent-2);font-weight:600;white-space:nowrap;flex:0 0 auto}.tool-sep{color:var(--text-faint);flex:0 0 auto}.tool-input{color:var(--text-dim);min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-tool-body{display:flex;flex-direction:column;gap:4px}.block-tool-args{margin:0;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:6px 8px;white-space:pre;overflow-x:auto;max-height:220px;overflow-y:auto;-webkit-overflow-scrolling:touch}.block-tool-result{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);border-left:2px solid var(--line);padding:4px 8px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow-y:auto;-webkit-overflow-scrolling:touch}.block-tool-result[data-error=true]{border-left-color:var(--red);background:var(--red-bg);color:var(--text)}.composer{display:flex;flex-direction:column;padding:0 12px 8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));background:transparent;flex:0 0 auto;position:relative}.skill-ac{position:absolute;bottom:100%;left:12px;right:12px;margin-inline:auto;max-width:880px;margin-bottom:6px;display:flex;flex-direction:column;gap:2px;padding:4px;background:var(--bg-1);border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px #00000059;z-index:30;max-height:50dvh;overflow-y:auto}.skill-ac-item{display:block;width:100%;text-align:left;background:transparent;border:none;border-radius:8px;padding:8px 10px;cursor:pointer;font:inherit;color:var(--text)}.skill-ac-item[data-on=true]{background:var(--bg-hover)}.skill-ac-item .tool-head{cursor:pointer}.composer-skill-chip-row{display:flex;margin-bottom:6px}.composer-skill-chip{cursor:default}.ptr-indicator{position:fixed;top:calc(env(safe-area-inset-top) + var(--hud-h) - 30px);left:50%;z-index:45;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--bg-2);border:1px solid var(--line);box-shadow:0 2px 10px #0000004d;pointer-events:none}.ptr-spinner{width:16px;height:16px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent)}.ptr-indicator[data-ready=true] .ptr-spinner{border-top-color:var(--green)}.ptr-indicator[data-refreshing=true] .ptr-spinner{animation:ptr-spin .7s linear infinite}@keyframes ptr-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.ptr-indicator[data-refreshing=true] .ptr-spinner{animation-duration:1.4s}}.composer-card{width:100%;max-width:880px;margin-inline:auto;display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:var(--bg-1);box-shadow:0 2px 10px #00000040}.composer-card:focus-within{border-color:var(--accent)}.composer-toolbar{display:flex;align-items:center;gap:8px}.composer-toolbar-spacer{flex:1 1 auto}.composer-attachments{display:flex;flex-wrap:wrap;gap:6px}.composer-attachments:empty{display:none}.attach-chip{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 4px 4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);font-size:11.5px;color:var(--text)}.attach-chip[data-pending=true]{opacity:.85;border-style:dashed}.chip-thumb{width:26px;height:26px;border-radius:5px;object-fit:cover;flex:0 0 auto;background:var(--bg)}.chip-thumb-empty{border:1px solid var(--line)}.chip-icon{font-size:14px;flex:0 0 auto}.chip-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-spinner{width:11px;height:11px;flex:0 0 auto;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:chip-spin .7s linear infinite}@keyframes chip-spin{to{transform:rotate(360deg)}}.chip-remove{flex:0 0 auto;width:20px;height:20px;border:none;border-radius:6px;background:transparent;color:var(--text-dim);font-size:15px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.chip-remove:hover{background:var(--bg-hover);color:var(--text)}.composer-attach,.composer-send{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s}.composer-attach:hover{background:var(--bg-hover);color:var(--text)}.composer-send{background:var(--accent);color:#0c121a;border-color:transparent}.composer-send:hover{filter:brightness(1.08)}.composer-attach:disabled,.composer-send:disabled{opacity:.4;cursor:not-allowed}.composer-card[data-terminal]{border-color:var(--red)}.composer-card[data-terminal]:focus-within{border-color:var(--red);box-shadow:0 0 0 1px var(--red)}.composer-term-toggle[data-on]{color:var(--red);border-color:var(--red);background:var(--red-bg)}.composer-send[data-terminal]{background:var(--red);color:#fff6f5;border-color:transparent}.composer-send[data-terminal]:hover{filter:brightness(1.08)}.composer-input{width:100%;resize:none;max-height:40dvh;min-height:24px;padding:2px;border:none;background:transparent;color:var(--text);font:inherit;font-size:var(--txt-composer);line-height:1.45}.composer-input:focus{outline:none}.composer-input::placeholder{color:var(--text-faint)}.composer-input-wrap{position:relative;display:flex}.composer-input-wrap .composer-input{flex:1 1 auto}.composer-hint{position:absolute;inset:0;padding:2px;display:none;align-items:center;gap:8px;font-size:var(--txt-meta);line-height:1.45;color:var(--text-faint);pointer-events:none;overflow:hidden;white-space:nowrap}.composer-input:placeholder-shown+.composer-hint{display:flex}.composer-hint-keys{display:inline-flex;align-items:center;gap:6px}.composer-hint .kbd{height:calc(var(--txt-meta) + 5px);min-width:calc(var(--txt-meta) + 5px);font-size:calc(var(--txt-meta) - 1px)}.composer-hint-dot{opacity:.6}@media (max-width: 760px){.composer-hint-keys{display:none}}.modal-backdrop{position:fixed;inset:0;background:#01020399;backdrop-filter:blur(2px);display:flex;align-items:flex-end;justify-content:center;z-index:50;padding:0}@media (min-width: 760px){.modal-backdrop{align-items:center;padding:20px}}.modal{width:100%;max-width:560px;max-height:90dvh;display:flex;flex-direction:column;background:var(--bg-1);border:1px solid var(--line);border-radius:16px 16px 0 0;overflow:hidden}@media (min-width: 760px){.modal{border-radius:16px}}.modal:focus{outline:none}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}.modal-title{font-weight:700;color:var(--amber)}.modal-close{background:none;border:none;color:var(--text-dim);font-size:16px;cursor:pointer;padding:4px 8px}.modal-body{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:18px}.modal-plan{max-width:760px}.plan-review{width:100%}.plan-review-viewport{display:flex;flex-direction:column}.plan-review .msg-row{max-width:100%;align-self:stretch;align-items:stretch}.question{display:flex;flex-direction:column;gap:6px}.q-header{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.06em;color:var(--accent-2)}.q-text{font-size:14px;font-weight:600}.q-hint{font-size:var(--txt-meta);color:var(--text-faint)}.q-options{display:flex;flex-direction:column;gap:7px;margin-top:2px}.option-btn{display:flex;flex-direction:column;gap:2px;text-align:left;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg-2);color:var(--text);cursor:pointer;font:inherit;transition:border-color var(--ease) .15s,background var(--ease) .15s}.option-btn:hover{background:var(--bg-hover)}.option-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.option-btn[data-on=true]{border-color:var(--accent);background:var(--bg);box-shadow:inset 0 0 0 1px var(--accent)}.option-btn:disabled{opacity:.5;cursor:default}.option-btn[data-sending=true]{opacity:1;border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.option-sending{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-size:var(--txt-meta);font-weight:400;color:var(--accent)}.prompt-status{font-size:var(--txt-meta);color:var(--accent)}.option-label{font-size:13px;font-weight:600}.option-desc{font-size:var(--txt-meta);color:var(--text-dim)}.capture-output{margin:0;padding:10px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;color:var(--text-dim);white-space:pre-wrap;overflow-wrap:anywhere;max-height:40dvh;overflow:auto}.modal-foot{display:flex;align-items:center;gap:8px;padding:12px 14px;padding-bottom:calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}.modal-foot-spacer{flex:1 1 auto}.btn-secondary,.btn-primary{display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:9px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--line)}.btn-secondary{background:var(--bg-2);color:var(--text)}.btn-secondary:hover{background:var(--bg-hover)}.btn-primary{background:var(--accent);color:#0c121a;border-color:transparent}.btn-primary:disabled{opacity:.4;cursor:not-allowed}.kbd{display:inline-flex;align-items:center;justify-content:center;height:18px;min-width:18px;padding:0 5px;border-radius:5px;border:1px solid var(--line);background:var(--bg-1);box-shadow:inset 0 -1px #0000004d;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;font-weight:600;line-height:1;color:var(--text-dim);pointer-events:none}.btn-primary .kbd{border-color:#41485366;background:#ffffff2e;box-shadow:none;color:#11161f}.toast{position:fixed;left:50%;top:calc(env(safe-area-inset-top) + var(--hud-h) + 14px);transform:translate(-50%,-12px);background:var(--bg-2);border:1px solid var(--line);color:var(--text);padding:8px 14px;border-radius:10px;font-size:12px;opacity:0;pointer-events:none;transition:opacity var(--ease) .2s,transform var(--ease) .2s;z-index:60;max-width:90vw;text-align:center}@media (max-width: 760px){.toast{top:calc(env(safe-area-inset-top) + var(--hud-h) + 56px)}}.toast.show{opacity:1;transform:translate(-50%)}.toast-ok{border-color:var(--green)}.toast-error{border-color:var(--red);color:var(--text)}.working-indicator{display:inline-flex;align-items:center;gap:7px;color:var(--text-faint);font-size:13px}.working-spinner{width:12px;height:12px;border:2px solid var(--line);border-top-color:var(--accent-2, var(--text));border-radius:50%;animation:cockpit-spin .7s linear infinite;flex:none}@keyframes cockpit-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.working-spinner{animation-duration:1.6s}.block-cot[data-thinking=true] .cot-label,.block-cot[data-thinking=true] .cot-last,.block-cot[data-thinking=true] .cot-reasoning,.shimmer-text{animation:none;background-image:none;-webkit-text-fill-color:var(--accent);color:var(--accent)}}.update-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;background:var(--amber-bg);color:var(--amber);border-bottom:1px solid var(--line);font-size:13px}.update-banner code{background:var(--bg-hover);color:var(--text);padding:1px 6px;border-radius:4px;font-size:12px}.update-dismiss{flex:none;background:transparent;border:0;color:var(--amber);font-size:16px;line-height:1;cursor:pointer;padding:2px 6px}.update-dismiss:hover{color:var(--text)}.update-actions{display:inline-flex;align-items:center;gap:6px;flex:none}.update-now{background:var(--amber);color:var(--bg);border:0;border-radius:6px;font-size:12px;font-weight:700;padding:4px 10px;cursor:pointer}.update-now:hover{filter:brightness(1.08)}.chip-thumb{cursor:zoom-in}.hud-spacer{flex:1 1 auto}.notify-bell{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--text-dim);cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}.notify-bell:hover:not(:disabled){color:var(--text);border-color:var(--text-faint)}.notify-bell[data-state=on]{color:var(--amber);border-color:var(--amber)}.notify-bell:disabled{opacity:.4;cursor:default}.ios-push-hint{padding:8px 12px;font-size:var(--txt-meta);line-height:1.4;color:var(--text);background:var(--amber-bg);border-bottom:1px solid var(--line);flex:0 0 auto}.rail-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--bg);border-bottom:1px solid var(--line)}.rail-new{flex:1;height:var(--hud-h);display:inline-flex;align-items:center;justify-content:center;background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:600;padding:0 10px;cursor:pointer;transition:border-color var(--ease) .15s,background var(--ease) .15s}.rail-new:hover:not(:disabled){border-color:var(--accent);background:var(--bg-hover)}.rail-new:disabled{opacity:.6;cursor:default}.rail-gear{flex:none;width:var(--hud-h);height:var(--hud-h);display:inline-flex;align-items:center;justify-content:center;background:var(--bg-2);color:var(--text-dim);border:1px solid var(--line);border-radius:8px;font-size:15px;cursor:pointer;transition:color var(--ease) .15s,border-color var(--ease) .15s}.rail-gear:hover{color:var(--text);border-color:var(--accent)}.rail-new:focus-visible,.rail-gear:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.rail-new-form{position:sticky;top:0;z-index:2;display:flex;flex-direction:column;gap:8px;padding:8px;background:var(--bg);border-bottom:1px solid var(--line)}.rail-new-name{background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:7px 10px;font-size:var(--txt-composer);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.rail-new-name:focus{outline:none;border-color:var(--accent)}.rail-new-name:disabled{opacity:.6}.rail-new-actions{display:flex;justify-content:flex-end;gap:6px}.rail-new-cancel,.rail-new-create{border-radius:8px;font-size:12px;font-weight:600;padding:6px 12px;cursor:pointer}.rail-new-cancel{background:transparent;color:var(--text-dim);border:1px solid var(--line)}.rail-new-cancel:hover:not(:disabled){color:var(--text)}.rail-new-create{background:var(--accent);color:var(--bg);border:0}.rail-new-create:hover:not(:disabled){filter:brightness(1.08)}.rail-new-cancel:disabled,.rail-new-create:disabled{opacity:.6;cursor:default}.transcript-attachments{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.transcript-thumb-btn{background:none;border:1px solid var(--line);border-radius:8px;padding:0;cursor:zoom-in;overflow:hidden;flex:0 0 auto;display:block;transition:border-color var(--ease) .15s}.transcript-thumb-btn:hover{border-color:var(--accent)}.transcript-thumb-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.transcript-thumb{display:block;max-width:140px;max-height:100px;width:auto;height:auto;border-radius:7px;object-fit:cover}.transcript-file-chip{display:inline-flex;align-items:center;gap:5px;max-width:200px;padding:4px 8px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);font-size:11.5px;color:var(--text);text-decoration:none;transition:border-color var(--ease) .15s,background var(--ease) .15s}.transcript-file-chip:hover{border-color:var(--accent);background:var(--bg-hover)}.transcript-file-chip:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.lightbox-backdrop{position:fixed;inset:0;z-index:100;background:#010203d9;display:flex;align-items:center;justify-content:center;cursor:zoom-out;padding:16px}.lightbox-backdrop:focus{outline:none}.lightbox-img{max-width:100%;max-height:90dvh;width:auto;height:auto;border-radius:10px;cursor:default;box-shadow:0 8px 40px #0009}.config-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:#0000008c}.config-modal{width:100%;max-width:600px;max-height:90dvh;background:var(--bg-1);border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 12px 40px #0006}.config-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid var(--line);flex:0 0 auto}.config-body{flex:1 1 auto;overflow-y:auto;padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;align-content:start}.config-field--wide{grid-column:1 / -1}.config-title{font-size:15px;font-weight:700;color:var(--text)}.config-close{background:transparent;border:0;color:var(--text-dim);font-size:18px;line-height:1;cursor:pointer;padding:2px 6px}.config-close:hover{color:var(--text)}.config-field{display:flex;flex-direction:column;gap:4px;min-width:0}.config-label{font-size:12px;font-weight:600;color:var(--text-dim)}.config-input{width:100%;box-sizing:border-box;background:var(--bg-2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}select.config-input{appearance:none;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--text-dim) 50%),linear-gradient(135deg,var(--text-dim) 50%,transparent 50%);background-position:calc(100% - 16px) calc(50% - 2px),calc(100% - 11px) calc(50% - 2px);background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:28px}.config-input:focus{outline:none;border-color:var(--accent)}.config-input:disabled{opacity:.6}.config-hint{font-size:11px;line-height:1.35;color:var(--text-faint)}.config-hint code{background:var(--bg-hover);color:var(--text-dim);padding:0 4px;border-radius:4px}.config-icon-row{display:flex;align-items:center;gap:12px}.config-icon-preview{border-radius:10px;border:1px solid var(--line);background:var(--bg-2);flex-shrink:0}.config-icon-actions{display:flex;gap:8px}.config-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:11px 16px;border-top:1px solid var(--line)}.config-version{display:flex;flex-wrap:wrap;gap:6px;font-size:11px;color:var(--text-faint)}.config-version-update{color:var(--accent, #3b82f6)}.config-actions{display:flex;justify-content:flex-end;gap:8px;margin-left:auto}.config-cancel,.config-save{border-radius:8px;font-size:13px;font-weight:600;padding:7px 14px;cursor:pointer}.config-cancel{background:transparent;color:var(--text-dim);border:1px solid var(--line)}.config-cancel:hover:not(:disabled){color:var(--text)}.config-save{background:var(--accent);color:var(--bg);border:0}.config-save:hover:not(:disabled){filter:brightness(1.08)}.config-save:disabled,.config-cancel:disabled{opacity:.6;cursor:default}@media (max-width: 560px){.config-overlay{align-items:flex-end;padding:0}.config-modal{max-width:100%;max-height:92dvh;border-radius:var(--radius) var(--radius) 0 0}.config-body{grid-template-columns:1fr}}.term-btn{font-size:13px}.term-btn:hover{color:var(--amber);background:var(--bg-hover)}.term-overlay{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:var(--bg)}.term-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid var(--line);background:var(--bg-1);flex:0 0 auto}.term-title{font-weight:700;font-size:13px;color:var(--amber);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.term-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}.term-newtab{font-size:12px;color:var(--accent);text-decoration:none;padding:4px 8px;border:1px solid var(--line);border-radius:6px}.term-newtab:hover{background:var(--bg-hover)}.term-close{background:none;border:none;color:var(--text-dim);font-size:16px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:6px}.term-close:hover{color:var(--text);background:var(--bg-hover)}.term-frame{flex:1 1 auto;width:100%;border:none;background:var(--bg)}.gate-root{display:flex;align-items:center;justify-content:center;min-height:100dvh;padding:24px;padding-top:max(24px,env(safe-area-inset-top));background:radial-gradient(120% 80% at 50% -10%,var(--bg-1),var(--bg) 60%)}.gate-card{display:flex;flex-direction:column;gap:12px;width:100%;max-width:320px;padding:24px;background:var(--bg-1);border:1px solid var(--line);border-radius:calc(var(--radius) + 4px);box-shadow:0 1px #ffffff0a inset,0 20px 50px -20px #000000b3}.gate-card--probing{flex-direction:row;align-items:center;justify-content:center;gap:10px;color:var(--text-dim)}.gate-brand{display:flex;align-items:center;gap:10px;margin-bottom:6px}.gate-glyph{font-size:22px;line-height:1;color:var(--accent)}.gate-title{font-size:17px;font-weight:650;letter-spacing:.01em;color:var(--text)}.gate-label{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint)}.gate-input{width:100%;padding:11px 12px;font-size:var(--txt-composer);color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);outline:none;transition:border-color .15s var(--ease),background .15s var(--ease)}.gate-input:focus{border-color:var(--accent);background:var(--bg-2)}.gate-input[aria-invalid=true]{border-color:var(--red)}.gate-error{margin:0;font-size:var(--txt-meta);color:var(--red)}.gate-submit{margin-top:4px;padding:11px 12px;font-size:14px;font-weight:600;color:var(--bg);background:var(--accent);border:none;border-radius:var(--radius);cursor:pointer;transition:filter .15s var(--ease),opacity .15s var(--ease)}.gate-submit:hover:not(:disabled){filter:brightness(1.08)}.gate-submit:active:not(:disabled){filter:brightness(.95)}.gate-submit:disabled{opacity:.6;cursor:default}.gate-spinner{width:16px;height:16px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:gate-spin .7s linear infinite}@keyframes gate-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.gate-spinner{animation:none}}.transcript-thumb-loading{display:inline-block;background:var(--bg-2);border:1px solid var(--line)}.skill-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px 3px 7px;border-radius:7px;border:1px solid var(--line);background:var(--bg-2);color:var(--text-dim);font:inherit;font-size:12px;line-height:1.4;cursor:pointer;transition:background var(--ease) .15s,border-color var(--ease) .15s,color var(--ease) .15s;vertical-align:middle}.skill-chip:hover{background:var(--bg-hover);border-color:var(--accent);color:var(--text)}.skill-chip:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.skill-chip:active{background:var(--line)}.skill-chip-icon{font-size:13px;flex:0 0 auto}.skill-chip-name{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.skill-chip-tag{flex:0 0 auto;font-size:9.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--text-faint)}.modal-skill{max-width:min(900px,92vw);max-height:85dvh;width:100%}.modal-title-skill{color:var(--accent)}.skill-modal-body{display:flex;flex-direction:column;gap:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px}.skill-fm{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;margin:0;padding:10px 12px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-size:12px}.skill-fm-row{display:contents}.skill-fm-key{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11.5px;color:var(--text-faint);white-space:nowrap;align-self:start;padding:1px 0}.skill-fm-val{color:var(--text-dim);overflow-wrap:anywhere;word-break:break-word;align-self:start;padding:1px 0;margin:0}.skill-body-wrap{flex:1 1 auto;min-height:0;overflow:visible}.skill-body-thread{width:100%}.skill-body-viewport{display:flex;flex-direction:column}.skill-body-thread .msg-row{max-width:100%;align-self:stretch;align-items:stretch}.tool-arrow-btn{background:none;border:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;color:inherit;flex:0 0 auto;line-height:1}.tool-name-btn{background:none;border:none;padding:0;cursor:pointer;font:inherit;color:var(--accent-2);font-weight:600;white-space:nowrap;flex:0 0 auto;text-decoration:underline;text-underline-offset:2px;text-decoration-color:transparent;transition:text-decoration-color var(--ease) .15s}.tool-name-btn:hover{text-decoration-color:var(--accent-2)}.aui-md-code-lang{display:flex;align-items:center}.aui-md-code-lang-name{flex:1 1 auto}.aui-md-code-open-btn{flex:0 0 auto;background:none;border:none;padding:0 6px;cursor:pointer;font-family:inherit;font-size:10px;color:var(--text-faint);line-height:1;transition:color var(--ease) .15s;border-radius:4px}.aui-md-code-open-btn:hover{color:var(--accent);background:var(--bg-hover)}.aui-md-code-open-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.detail-split{flex:1 1 auto;display:flex;min-width:0;min-height:0;overflow:hidden}.detail-split>.thread-root{flex:1 1 auto;min-width:0}@media (min-width: 760px){.detail-split>.thread-root{flex:1 1 0;min-width:0}.detail-split>.artifact-panel{flex:1 1 0;min-width:0}}.artifact-panel{display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--line);min-height:0;overflow:hidden;outline:none}.artifact-panel[data-mode=sheet]{position:fixed;inset:auto 0 0;border-left:none;border-top:1px solid var(--line);box-shadow:0 -8px 32px #00000073;z-index:200;overscroll-behavior:contain;transition:height .28s var(--ease)}.artifact-panel[data-mode=sheet][data-dragging=true]{transition:none}@media (prefers-reduced-motion: reduce){.artifact-panel[data-mode=sheet]{transition:none}}.artifact-drag-handle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;height:22px;cursor:ns-resize;touch-action:none;background:var(--bg);border-bottom:1px solid var(--line)}.artifact-drag-pip{width:36px;height:4px;border-radius:2px;background:var(--line)}.artifact-panel-head{display:flex;align-items:stretch;gap:0;background:var(--bg-1);border-bottom:1px solid var(--line);flex:0 0 auto;overflow-x:auto;min-height:38px}.artifact-tablist{display:flex;flex:1 1 auto;overflow-x:auto;gap:0}.artifact-tab-wrap{display:inline-flex;align-items:stretch;border-right:1px solid var(--line);flex:0 0 auto;max-width:200px;min-width:0}.artifact-tab{flex:1 1 auto;min-width:0;background:none;border:none;color:var(--text-dim);font-size:11.5px;font-family:inherit;padding:6px 8px 6px 10px;cursor:pointer;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;transition:color var(--ease) .15s,background var(--ease) .15s}.artifact-tab:hover{color:var(--text);background:var(--bg-hover)}.artifact-tab[aria-selected=true]{color:var(--text);background:var(--bg);border-bottom:2px solid var(--accent)}.artifact-tab-close{flex:0 0 auto;background:none;border:none;color:var(--text-faint);cursor:pointer;padding:2px 6px;font-size:10px;line-height:1;border-radius:4px;margin:auto 4px auto 0;transition:color var(--ease) .15s,background var(--ease) .15s}.artifact-tab-close:hover{color:var(--text);background:var(--bg-hover)}.artifact-close-all{flex:0 0 auto;background:none;border:none;border-left:1px solid var(--line);color:var(--text-dim);cursor:pointer;padding:0 12px;font-size:18px;line-height:1;transition:color var(--ease) .15s}.artifact-close-all:hover{color:var(--text)}.artifact-panel-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.artifact-body-wrap{min-height:100%}.artifact-pre{margin:0;padding:12px 14px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.55;white-space:pre;overflow-x:auto;color:var(--text);background:var(--bg);min-height:100%;-webkit-overflow-scrolling:touch}.artifact-pre code{display:block}.artifact-large-note{margin:0;padding:6px 14px;font-size:var(--txt-meta);color:var(--text-faint);background:var(--bg-2);border-bottom:1px solid var(--line)}.agent-chip{display:inline-flex;align-items:center;gap:5px;min-width:0;flex:0 0 auto}.agent-chip-name{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;font-size:inherit}.agent-chip-model{display:inline-flex;align-items:center;padding:1px 6px;border-radius:5px;background:var(--bg-2);border:1px solid var(--line);color:var(--accent-2);font-size:10px;font-weight:600;letter-spacing:.04em;white-space:nowrap;text-transform:lowercase;flex:0 0 auto}.agent-def{flex:0 0 auto;display:flex;flex-direction:column;gap:5px;padding:10px 12px;border-bottom:1px solid var(--line);background:var(--bg-1);font-size:var(--txt-meta);overflow:hidden}.agent-def-no-def{color:var(--text-faint);font-style:italic}.agent-def-desc{color:var(--text-dim);line-height:1.45;overflow-wrap:anywhere}.agent-def-row{display:flex;align-items:baseline;gap:8px;min-width:0}.agent-def-label{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;color:var(--text-faint);white-space:nowrap;flex:0 0 auto;min-width:40px}.agent-def-val{color:var(--text-dim);overflow-wrap:anywhere;word-break:break-word;flex:1 1 auto;min-width:0}.agent-def-tools{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;color:var(--accent-2)}.agent-nested{flex:0 0 auto;display:flex;align-items:flex-start;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--bg-1);font-size:var(--txt-meta)}.agent-nested-label{color:var(--text-faint);white-space:nowrap;flex:0 0 auto;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10.5px;padding-top:2px}.agent-nested-list{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 auto;min-width:0}.composer-enhance{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s,border-color var(--ease) .15s}.composer-enhance:hover:not(:disabled){background:var(--bg-hover);color:var(--accent);border-color:var(--accent)}.composer-enhance:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.composer-enhance:disabled{opacity:.35;cursor:not-allowed}.composer-enhance-spinner{width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:cockpit-spin .7s linear infinite;display:block}@media (prefers-reduced-motion: reduce){.composer-enhance-spinner{animation-duration:1.6s}}.modal-optimize{max-width:680px}.modal-head-group{display:flex;align-items:center;gap:8px}.modal-title-optimize{color:var(--accent-2)}.optimize-mode-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:20px;background:var(--bg-2);color:var(--text-dim);font-size:10.5px;font-weight:600;letter-spacing:.03em;border:1px solid var(--line)}.optimize-mode-badge[data-mode=llm]{border-color:#4075aa80;color:var(--accent)}.optimize-section{display:flex;flex-direction:column;gap:6px}.optimize-section-label{font-size:var(--txt-meta);text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint);font-weight:600}.optimize-suggestion{width:100%;box-sizing:border-box;min-height:120px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text);font:inherit;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px;line-height:1.5;resize:vertical;transition:border-color var(--ease) .15s}.optimize-suggestion:focus{outline:none;border-color:var(--accent)}.optimize-diff{padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.6;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-height:200px;overflow-y:auto}.diff-same{color:var(--text-dim)}.diff-add{color:#5bbd74;background:#5bbd7412;display:block;margin-inline:-12px;padding-inline:12px}.diff-del{color:#dc5e59;background:#dc5e5912;text-decoration:line-through;text-decoration-color:#dc5e5980;display:block;margin-inline:-12px;padding-inline:12px}.optimize-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;color:var(--text-dim);font-size:13px;line-height:1.5}.optimize-list li{padding-left:2px}.composer-skills-btn,.composer-mic{flex:0 0 auto;height:34px;min-width:34px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text-dim);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--ease) .15s,color var(--ease) .15s,border-color var(--ease) .15s;font-size:14px;font-weight:600;letter-spacing:-.02em}.composer-mic:hover{color:var(--text);background:var(--bg-hover)}.voice-dialog{display:flex;flex-direction:column;gap:12px;padding:16px;max-width:min(520px,94vw)}.voice-status{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--text-dim)}.voice-dot{width:9px;height:9px;border-radius:50%;background:var(--text-faint);flex:0 0 auto}.voice-dot[data-on=true]{background:var(--red);animation:mic-pulse 1.3s var(--ease) infinite}@keyframes mic-pulse{50%{box-shadow:0 0 0 4px var(--red-bg)}}.voice-wave{width:100%;height:72px;border-radius:10px;background:var(--bg);border:1px solid var(--line);display:block}.voice-wave[data-paused=true]{opacity:.5}.voice-transcript{min-height:48px;max-height:28dvh;overflow-y:auto;font-size:var(--txt-transcript);line-height:1.5;color:var(--text);background:var(--bg-1);border:1px solid var(--line);border-radius:10px;padding:10px 12px;white-space:pre-wrap}.voice-placeholder{color:var(--text-faint)}.voice-error{font-size:12px;color:var(--red)}.voice-note{font-size:12px;color:var(--text-faint)}.voice-actions{display:flex;align-items:center;gap:8px}.voice-actions-spacer{flex:1 1 auto}@media (prefers-reduced-motion: reduce){.voice-dot[data-on=true]{animation:none;box-shadow:0 0 0 3px var(--red-bg)}}.composer-skills-btn:hover:not(:disabled){background:var(--bg-hover);color:var(--accent);border-color:var(--accent)}.composer-skills-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.composer-skills-btn:disabled{opacity:.35;cursor:not-allowed}.skill-browser-sheet-wrap{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;pointer-events:none}.skill-browser-sheet-wrap>.skill-browser{pointer-events:auto}.skill-browser{width:100%;max-height:70dvh;display:flex;flex-direction:column;background:var(--bg-1);border:1px solid var(--line);border-radius:16px 16px 0 0;overflow:hidden}@media (min-width: 760px){.skill-browser{width:100%;max-width:560px;max-height:80dvh;border-radius:14px}}.skill-browser-head{display:flex;align-items:center;gap:8px;padding:14px 16px 10px;border-bottom:1px solid var(--line);flex:0 0 auto}.skill-browser-title{flex:1 1 auto;font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.01em}.skill-browser-search{padding:10px 12px;flex:0 0 auto;border-bottom:1px solid var(--line)}.skill-search-input{width:100%;box-sizing:border-box;background:var(--bg-2);border:1px solid var(--line);border-radius:8px;color:var(--text);font-size:13.5px;padding:7px 10px;outline:none;transition:border-color var(--ease) .15s}.skill-search-input:focus{border-color:var(--accent)}.skill-search-input::placeholder{color:var(--text-faint)}.skill-search-input::-webkit-search-cancel-button{-webkit-appearance:none}.skill-browser-list{flex:1 1 auto;overflow-y:auto;padding:6px 8px 10px;display:flex;flex-direction:column;gap:2px}.skill-browser-empty{padding:24px 12px;text-align:center;color:var(--text-faint);font-size:13px}.skill-card{width:100%;text-align:left;background:none;border:none;cursor:pointer;border-radius:7px;padding:7px 10px;display:flex;align-items:baseline;gap:6px;transition:background var(--ease) .12s;min-width:0}.skill-card:hover{background:var(--bg-hover)}.skill-card:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}.skill-card .tool-head{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:0 4px;row-gap:2px}.skill-card-name{font-size:13px;font-weight:500;color:var(--text);white-space:nowrap}.skill-card-desc{font-size:12.5px;color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.skill-source-tag{flex:0 0 auto;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint);background:var(--bg-2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;margin-left:auto}.reload-btn{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:60;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:var(--bg-1, var(--bg));color:var(--text-dim, var(--text));font-size:18px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;opacity:.6;box-shadow:0 2px 8px #00000040;transition:opacity var(--ease) .15s,background var(--ease) .15s,transform var(--ease) .15s;-webkit-tap-highlight-color:transparent}.reload-btn:hover{opacity:1;background:var(--bg-hover, var(--bg-2))}.reload-btn:active{transform:rotate(180deg)}.reload-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}@property --auto-send-deplete{syntax: "<angle>"; inherits: false; initial-value: 0deg;}@property --auto-send-spin{syntax: "<angle>"; inherits: false; initial-value: 0deg;}@keyframes auto-send-deplete{0%{--auto-send-deplete: 0deg}to{--auto-send-deplete: 360deg}}@keyframes auto-send-spin{to{--auto-send-spin: 360deg}}.btn-send{position:relative}.btn-send-label{position:relative;z-index:1}.btn-send-armed:before,.btn-send-armed:after{content:"";position:absolute;inset:-3px;border-radius:inherit;padding:3px;pointer-events:none;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude}.btn-send-armed:before{background:conic-gradient(from var(--auto-send-spin),#ff2d55,#ff9500,#ffd60a,#34c759,#00c7be,#0a84ff,#5e5ce6,#bf5af2,#ff2d55);filter:saturate(1.2) brightness(1.1);animation:auto-send-spin 3s linear infinite}.btn-send-armed:after{background:conic-gradient(from 0deg,var(--bg-1) 0 var(--auto-send-deplete),transparent var(--auto-send-deplete));animation:auto-send-deplete var(--auto-send-secs, 5s) linear forwards}@media (prefers-reduced-motion: reduce){.btn-send-armed:before,.btn-send-armed:after{animation:none}}.gate-hint{margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--text-dim, #8a8f98);text-align:center}.gate-hint code{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:11px;padding:1px 5px;border-radius:5px;background:var(--bg-2);color:var(--text, inherit)}.aui-md pre code.hljs{background:transparent;color:var(--text)}.aui-md .hljs-doctag,.aui-md .hljs-keyword,.aui-md .hljs-meta .hljs-keyword,.aui-md .hljs-template-tag,.aui-md .hljs-template-variable,.aui-md .hljs-type,.aui-md .hljs-variable.language_{color:#ff7b72}.aui-md .hljs-title,.aui-md .hljs-title.class_,.aui-md .hljs-title.class_.inherited__,.aui-md .hljs-title.function_{color:#d2a8ff}.aui-md .hljs-attr,.aui-md .hljs-attribute,.aui-md .hljs-literal,.aui-md .hljs-meta,.aui-md .hljs-number,.aui-md .hljs-operator,.aui-md .hljs-variable,.aui-md .hljs-selector-attr,.aui-md .hljs-selector-class,.aui-md .hljs-selector-id{color:#79c0ff}.aui-md .hljs-regexp,.aui-md .hljs-string,.aui-md .hljs-meta .hljs-string{color:#a5d6ff}.aui-md .hljs-built_in,.aui-md .hljs-symbol{color:#ffa657}.aui-md .hljs-comment,.aui-md .hljs-code,.aui-md .hljs-formula{color:#8b949e}.aui-md .hljs-name,.aui-md .hljs-quote,.aui-md .hljs-selector-tag,.aui-md .hljs-selector-pseudo{color:#7ee787}.aui-md .hljs-subst{color:var(--text)}.aui-md .hljs-section{color:#1f6feb;font-weight:700}.aui-md .hljs-bullet{color:#f2cc60}.aui-md .hljs-emphasis{color:var(--text);font-style:italic}.aui-md .hljs-strong{color:var(--text);font-weight:700}.aui-md .hljs-addition{color:#aff5b4;background-color:#033a16}.aui-md .hljs-deletion{color:#ffdcd7;background-color:#67060c}