teapot-coding-agent 0.35.14 → 0.35.15
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/dist/server/api.js +163 -6
- package/dist/server/image-resize.js +133 -0
- package/package.json +1 -1
- package/public/assets/index-DgvUnJm-.css +1 -0
- package/public/assets/index-U0afHQC8.js +30 -0
- package/public/assets/index-U0afHQC8.js.map +1 -0
- package/public/assets/{shiki-DAibuTrJ.js → shiki-BzdfW5Bh.js} +2 -2
- package/public/assets/{shiki-DAibuTrJ.js.map → shiki-BzdfW5Bh.js.map} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-BqjSsAGD.js +0 -30
- package/public/assets/index-BqjSsAGD.js.map +0 -1
- package/public/assets/index-LBxICetH.css +0 -1
package/dist/server/api.js
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
import { Hono } from "hono";
|
|
5
5
|
import { serve, upgradeWebSocket } from "@hono/node-server";
|
|
6
6
|
import { WebSocketServer } from "ws";
|
|
7
|
-
import { readFileSync } from "node:fs";
|
|
7
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { currentSkills } from "../agent/tools.js";
|
|
9
|
+
import { readSkillFile } from "../agent/skills.js";
|
|
10
|
+
import { detectImageTools, downscaleImage, widthName, MAX_EDGE } from "./image-resize.js";
|
|
9
11
|
import { promises as fs } from "node:fs";
|
|
10
12
|
import { fileURLToPath } from "node:url";
|
|
11
13
|
import { parseSchedule } from "../scheduler/cron.js";
|
|
@@ -1162,6 +1164,43 @@ export function buildApp(master) {
|
|
|
1162
1164
|
return c.json({ error: err.message }, 400);
|
|
1163
1165
|
}
|
|
1164
1166
|
});
|
|
1167
|
+
/**
|
|
1168
|
+
* The BODY of one skill, by name.
|
|
1169
|
+
*
|
|
1170
|
+
* The list endpoint returns name/description/source only, which is what the `/` palette and the
|
|
1171
|
+
* settings list need — a skill body is up to tens of KB and no list should carry every one.
|
|
1172
|
+
* Reading is separate and on demand, the same shape as the timeline's event paging.
|
|
1173
|
+
*
|
|
1174
|
+
* Resolved through `currentSkills` rather than from a path in the request: the client never
|
|
1175
|
+
* names a file, so there is no traversal surface, and a skill that is not in this agent's roots
|
|
1176
|
+
* simply does not exist here.
|
|
1177
|
+
*/
|
|
1178
|
+
app.get("/api/agents/:id/skills/:name", async (c) => {
|
|
1179
|
+
const a = master.agents.get(c.req.param("id"));
|
|
1180
|
+
if (!a)
|
|
1181
|
+
return notFound(c, "agent", c.req.param("id"));
|
|
1182
|
+
const want = c.req.param("name");
|
|
1183
|
+
try {
|
|
1184
|
+
const list = await currentSkills(a.toolCtx);
|
|
1185
|
+
const def = list.find((s) => s.name === want);
|
|
1186
|
+
if (!def)
|
|
1187
|
+
return c.json({ error: `no skill named ${want}` }, 404);
|
|
1188
|
+
const text = await readSkillFile(def);
|
|
1189
|
+
// a hard cap, like the code preview: a pathological file must not fill the panel
|
|
1190
|
+
const MAX = 400_000;
|
|
1191
|
+
return c.json({
|
|
1192
|
+
name: def.name,
|
|
1193
|
+
description: def.description,
|
|
1194
|
+
source: def.source,
|
|
1195
|
+
files: def.files,
|
|
1196
|
+
text: text.length > MAX ? `${text.slice(0, MAX)}\n… truncated` : text,
|
|
1197
|
+
truncated: text.length > MAX,
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
catch (err) {
|
|
1201
|
+
return c.json({ error: err.message }, 400);
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1165
1204
|
// force a context compaction pass (slash command /compact)
|
|
1166
1205
|
app.post("/api/agents/:id/compact", async (c) => {
|
|
1167
1206
|
const a = master.agents.get(c.req.param("id"));
|
|
@@ -1597,16 +1636,70 @@ export function buildApp(master) {
|
|
|
1597
1636
|
webp: "image/webp",
|
|
1598
1637
|
avif: "image/avif",
|
|
1599
1638
|
};
|
|
1639
|
+
/**
|
|
1640
|
+
* Serve an asset, optionally downscaled to a requested width.
|
|
1641
|
+
*
|
|
1642
|
+
* `?w=1920` returns a 1920-wide (long-edge) version, generated once and CACHED ON DISK next to
|
|
1643
|
+
* the original. The client uses this through `<img srcset>`, so the browser picks the width it
|
|
1644
|
+
* needs from the DISPLAY area and the device pixel ratio — no guessing on our side, which is the
|
|
1645
|
+
* problem a fixed size at upload time cannot solve: the same server is viewed on a laptop and a
|
|
1646
|
+
* 4K monitor, and a phone photo is 6000px wide regardless.
|
|
1647
|
+
*
|
|
1648
|
+
* Untrusted input is bounded three ways: the width must be one of the ALLOWED_WIDTHS ladder (a
|
|
1649
|
+
* client cannot ask for 10000 distinct sizes and fill the disk), the name must pass `assetName`,
|
|
1650
|
+
* and the derived file is written under a name that function still accepts.
|
|
1651
|
+
*/
|
|
1652
|
+
const ALLOWED_WIDTHS = [640, 1280, 1920, 2560, 3840];
|
|
1653
|
+
/**
|
|
1654
|
+
* The width ladder, for the client's `srcset`.
|
|
1655
|
+
*
|
|
1656
|
+
* Registered BEFORE `/api/assets/:name`: Hono matches in registration order, so the parameterised
|
|
1657
|
+
* route would otherwise swallow `meta` and answer 404 — measured, and the reason this is a
|
|
1658
|
+
* separate literal route rather than something the `:name` handler inspects.
|
|
1659
|
+
*/
|
|
1660
|
+
app.get("/api/assets/meta", (c) => c.json({ widths: ALLOWED_WIDTHS }));
|
|
1600
1661
|
app.get("/api/assets/:name", async (c) => {
|
|
1601
1662
|
const name = assetName(c.req.param("name") ?? "");
|
|
1602
1663
|
if (!name)
|
|
1603
1664
|
return c.notFound();
|
|
1604
1665
|
const ext = name.split(".").pop();
|
|
1666
|
+
const mime = assetMime[ext] ?? "application/octet-stream";
|
|
1667
|
+
const src = path.join(assetsDir, name);
|
|
1668
|
+
const rawW = c.req.query("w");
|
|
1669
|
+
const wanted = rawW ? Number(rawW) : 0;
|
|
1670
|
+
if (wanted && !ALLOWED_WIDTHS.includes(wanted)) {
|
|
1671
|
+
// a bounded ladder, so a client cannot mint unbounded files
|
|
1672
|
+
return c.json({ error: `unsupported width ${rawW}` }, 400);
|
|
1673
|
+
}
|
|
1605
1674
|
try {
|
|
1606
|
-
|
|
1675
|
+
// the cache header is immutable+1y, so a resized response must be cached on disk or every
|
|
1676
|
+
// viewer regenerates it
|
|
1677
|
+
if (wanted) {
|
|
1678
|
+
const cached = path.join(assetsDir, widthName(name, wanted));
|
|
1679
|
+
if (existsSync(cached)) {
|
|
1680
|
+
return c.body(await fs.readFile(cached), 200, {
|
|
1681
|
+
"content-type": mime,
|
|
1682
|
+
"cache-control": "public, max-age=31536000, immutable",
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
const toolName = await imageToolName();
|
|
1686
|
+
if (toolName) {
|
|
1687
|
+
const tool = { name: toolName, kind: toolName === "ffmpeg" ? "ffmpeg" : toolName };
|
|
1688
|
+
const r = await downscaleImage(src, cached, tool, wanted);
|
|
1689
|
+
if (r.resized) {
|
|
1690
|
+
return c.body(await fs.readFile(cached), 200, {
|
|
1691
|
+
"content-type": mime,
|
|
1692
|
+
"cache-control": "public, max-age=31536000, immutable",
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
// no tool, or the resize did not help: serve the original rather than fail. `srcset` still
|
|
1697
|
+
// works — the browser just gets more pixels than it asked for.
|
|
1698
|
+
}
|
|
1699
|
+
const buf = await fs.readFile(src);
|
|
1607
1700
|
return c.body(buf, 200, {
|
|
1608
|
-
"content-type":
|
|
1609
|
-
// the name is a
|
|
1701
|
+
"content-type": mime,
|
|
1702
|
+
// the name is a UUID and never reused, so it can be cached forever
|
|
1610
1703
|
"cache-control": "public, max-age=31536000, immutable",
|
|
1611
1704
|
});
|
|
1612
1705
|
}
|
|
@@ -1614,6 +1707,20 @@ export function buildApp(master) {
|
|
|
1614
1707
|
return c.notFound();
|
|
1615
1708
|
}
|
|
1616
1709
|
});
|
|
1710
|
+
/**
|
|
1711
|
+
* The image optimiser, probed at most ONCE.
|
|
1712
|
+
*
|
|
1713
|
+
* Booting is not async here, and probing runs the binaries, so it is resolved lazily on the
|
|
1714
|
+
* first upload and the promise is kept — every later upload reuses the answer instead of
|
|
1715
|
+
* re-probing. A missing tool caches as null, which is a valid result.
|
|
1716
|
+
*/
|
|
1717
|
+
let imageToolsProbe = null;
|
|
1718
|
+
const imageToolName = () => {
|
|
1719
|
+
imageToolsProbe ??= detectImageTools()
|
|
1720
|
+
.then((r) => r.tool?.name ?? null)
|
|
1721
|
+
.catch(() => null);
|
|
1722
|
+
return imageToolsProbe;
|
|
1723
|
+
};
|
|
1617
1724
|
app.post("/api/assets", async (c) => {
|
|
1618
1725
|
/**
|
|
1619
1726
|
* Accepts the raw image body, not a multipart form.
|
|
@@ -1637,8 +1744,58 @@ export function buildApp(master) {
|
|
|
1637
1744
|
}
|
|
1638
1745
|
await fs.mkdir(assetsDir, { recursive: true });
|
|
1639
1746
|
const name = `${crypto.randomUUID().replace(/-/g, "")}.${ext}`;
|
|
1640
|
-
|
|
1641
|
-
|
|
1747
|
+
const dest = path.join(assetsDir, name);
|
|
1748
|
+
await fs.writeFile(dest, buf);
|
|
1749
|
+
/**
|
|
1750
|
+
* Downscale with a native binary when one exists.
|
|
1751
|
+
*
|
|
1752
|
+
* A phone photo is 6000x4000 and is displayed with `background-size: cover` at window size, so
|
|
1753
|
+
* the browser decodes and keeps decoded ~24 megapixels for nothing — reported as "背景画像が
|
|
1754
|
+
* 大きいとブラウザがリサイズでかなり重くなっちゃう". Doing it once here makes every later repaint
|
|
1755
|
+
* cheap.
|
|
1756
|
+
*
|
|
1757
|
+
* A MISSING OPTIMISER IS NOT AN ERROR: `downscaleImage` returns `resized:false` and the
|
|
1758
|
+
* original stays. The response says what happened so the UI can be honest rather than
|
|
1759
|
+
* silently claiming to have optimised something.
|
|
1760
|
+
*/
|
|
1761
|
+
/**
|
|
1762
|
+
* The ORIGINAL is stored untouched; sizes are derived on demand by `?w=`.
|
|
1763
|
+
*
|
|
1764
|
+
* Resizing once at upload looked simpler but cannot be right: the same asset is viewed on a
|
|
1765
|
+
* laptop and a 4K monitor, and `background-size: cover` means the needed width depends on the
|
|
1766
|
+
* DISPLAY area. Baking one size in either wastes bytes on the small screen or upscales on the
|
|
1767
|
+
* large one. Storing the original and serving `?w=` lets the browser choose from `srcset`,
|
|
1768
|
+
* which is the only place the real display size is known.
|
|
1769
|
+
*/
|
|
1770
|
+
return c.json({
|
|
1771
|
+
name,
|
|
1772
|
+
url: `/api/assets/${name}`,
|
|
1773
|
+
bytes: buf.length,
|
|
1774
|
+
});
|
|
1775
|
+
});
|
|
1776
|
+
/**
|
|
1777
|
+
* Which optional native tools were found.
|
|
1778
|
+
*
|
|
1779
|
+
* "設定ウィンドウにオプション機能がどれくらい見つかったかとかは入れると良い方" — a feature that
|
|
1780
|
+
* silently does nothing when a binary is missing is indistinguishable from a broken one, so the
|
|
1781
|
+
* panel reports what is actually available rather than leaving the operator to guess.
|
|
1782
|
+
*/
|
|
1783
|
+
app.get("/api/features", async (c) => {
|
|
1784
|
+
const [image, script] = await Promise.all([
|
|
1785
|
+
detectImageTools().catch(() => ({ tool: null, found: [] })),
|
|
1786
|
+
Promise.resolve({ present: process.platform !== "win32" && existsSync("/usr/bin/script") }),
|
|
1787
|
+
]);
|
|
1788
|
+
return c.json({
|
|
1789
|
+
imageResize: {
|
|
1790
|
+
available: !!image.tool,
|
|
1791
|
+
tool: image.tool?.name ?? null,
|
|
1792
|
+
/** every candidate, so "ffmpeg missing but imagemagick present" is visible */
|
|
1793
|
+
found: image.found,
|
|
1794
|
+
maxEdge: MAX_EDGE,
|
|
1795
|
+
},
|
|
1796
|
+
// a pty is what makes terminal resizing work at all; on Windows this is expected to be off
|
|
1797
|
+
pty: { available: script.present, provider: script.present ? "script" : null },
|
|
1798
|
+
});
|
|
1642
1799
|
});
|
|
1643
1800
|
app.delete("/api/assets/:name", async (c) => {
|
|
1644
1801
|
const name = assetName(c.req.param("name") ?? "");
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Downscale an uploaded background image with a NATIVE binary, if one exists.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this is not done in the browser
|
|
5
|
+
*
|
|
6
|
+
* A wallpaper is displayed with `background-size: cover` at the window's size — a 6000x4000 phone
|
|
7
|
+
* photo is never shown at more than ~2000x1200, but the browser still decodes the full thing and
|
|
8
|
+
* keeps it decoded. Reported as "背景画像が大きいとブラウザがリサイズでかなり重くなっちゃう".
|
|
9
|
+
* Resizing once on the server costs a few hundred milliseconds at upload and makes every later
|
|
10
|
+
* repaint cheap.
|
|
11
|
+
*
|
|
12
|
+
* `ffmpeg.wasm` would avoid the external dependency at the cost of tens of MB of wasm to do work
|
|
13
|
+
* that a native binary does in one call. So: use whatever native tool is present, and when none
|
|
14
|
+
* is, keep the original. A missing optimiser must never fail an upload — the image still works,
|
|
15
|
+
* it is just as heavy as before.
|
|
16
|
+
*
|
|
17
|
+
* ## Why execFile and not a shell
|
|
18
|
+
*
|
|
19
|
+
* The source path is derived from a server-generated `randomUUID`, but it still reaches a `-i`
|
|
20
|
+
* argument, so arguments are passed as an ARRAY with no shell in between. Nothing about an
|
|
21
|
+
* uploaded file can be read as a flag or a command.
|
|
22
|
+
*/
|
|
23
|
+
import { execFile } from "node:child_process";
|
|
24
|
+
import { existsSync, promises as fs } from "node:fs";
|
|
25
|
+
import path from "node:path";
|
|
26
|
+
import { promisify } from "node:util";
|
|
27
|
+
const run = promisify(execFile);
|
|
28
|
+
/** long edge, in pixels. Deliberately above any realistic window: `cover` on a 4K display at
|
|
29
|
+
* devicePixelRatio 2 still lands near this, so this is a quality floor, not a UX cap. */
|
|
30
|
+
export const MAX_EDGE = 2560;
|
|
31
|
+
const CANDIDATES = [
|
|
32
|
+
// ffmpeg first: it is the one most likely to be on a machine that has neither imagemagick nor
|
|
33
|
+
// a package manager, and `-vf scale` is a single pass.
|
|
34
|
+
{ name: "ffmpeg", kind: "ffmpeg", probe: ["-version"] },
|
|
35
|
+
{ name: "magick", kind: "magick", probe: ["-version"] },
|
|
36
|
+
// ImageMagick 6 ships `convert` only; same invocation, different binary name
|
|
37
|
+
{ name: "convert", kind: "convert", probe: ["-version"] },
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* Which image tools exist? Probing runs them, so the answer is what actually works here rather
|
|
41
|
+
* than what a PATH scan suggests — a broken symlink or a stub shim is not a usable optimiser.
|
|
42
|
+
*/
|
|
43
|
+
export async function detectImageTools() {
|
|
44
|
+
const found = [];
|
|
45
|
+
let tool = null;
|
|
46
|
+
for (const c of CANDIDATES) {
|
|
47
|
+
let present = false;
|
|
48
|
+
try {
|
|
49
|
+
await run(c.name, c.probe, { timeout: 5000 });
|
|
50
|
+
present = true;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
present = false;
|
|
54
|
+
}
|
|
55
|
+
found.push({ name: c.name, present });
|
|
56
|
+
// `convert` is a common name for unrelated programs; only take it after the two specific
|
|
57
|
+
// ones, which is what the CANDIDATES order already does.
|
|
58
|
+
if (present && !tool)
|
|
59
|
+
tool = { name: c.name, kind: c.kind };
|
|
60
|
+
}
|
|
61
|
+
return { tool, found };
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* build the argv for a downscale into `out`.
|
|
65
|
+
*
|
|
66
|
+
* `width` is the LONG EDGE to fit within — the same meaning as `srcset`'s `w` descriptors, which
|
|
67
|
+
* is what lets the client's chosen width be honoured directly.
|
|
68
|
+
*/
|
|
69
|
+
export function resizeArgs(tool, src, out, width = MAX_EDGE) {
|
|
70
|
+
const scale = `scale='min(${width},iw)':'min(${width},ih)':force_original_aspect_ratio=decrease`;
|
|
71
|
+
if (tool.kind === "ffmpeg") {
|
|
72
|
+
// `-y` overwrite, `-frames:v 1` in case the input is an animated GIF (we want a still)
|
|
73
|
+
return ["-y", "-loglevel", "error", "-i", src, "-vf", scale, "-frames:v", "1", out];
|
|
74
|
+
}
|
|
75
|
+
const geometry = `${width}x${width}>`; // only shrink, never enlarge
|
|
76
|
+
return [`${src}[0]`, "-resize", geometry, "-strip", out];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Downscale `src` into `out`. Returns whether it did anything, and never throws.
|
|
80
|
+
*
|
|
81
|
+
* "Did nothing" is a normal outcome: no tool installed, an image already small enough, or a tool
|
|
82
|
+
* that failed on this particular file. The caller keeps the original in every one of those cases,
|
|
83
|
+
* so an upload is never lost to an optimiser problem.
|
|
84
|
+
*/
|
|
85
|
+
export async function downscaleImage(src, out, tool, width = MAX_EDGE) {
|
|
86
|
+
if (!tool)
|
|
87
|
+
return { resized: false, reason: "no image tool installed" };
|
|
88
|
+
let bytesBefore;
|
|
89
|
+
try {
|
|
90
|
+
bytesBefore = (await fs.stat(src)).size;
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return { resized: false, reason: "source missing" };
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
await run(tool.name, resizeArgs(tool, src, out, width), { timeout: 60_000 });
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
return { resized: false, reason: `${tool.name} failed: ${err.message.slice(0, 120)}` };
|
|
100
|
+
}
|
|
101
|
+
if (!existsSync(out))
|
|
102
|
+
return { resized: false, reason: `${tool.name} produced no output` };
|
|
103
|
+
const bytesAfter = (await fs.stat(out)).size;
|
|
104
|
+
/**
|
|
105
|
+
* Keep whichever is SMALLER, and delete the other.
|
|
106
|
+
*
|
|
107
|
+
* A re-encode can GROW a file — an already-optimised WebP fed through a lossy JPEG encoder is
|
|
108
|
+
* the usual way. Shipping the larger of the two would be strictly worse in both transfer and
|
|
109
|
+
* decode, so the comparison decides and the loser is removed.
|
|
110
|
+
*/
|
|
111
|
+
if (bytesAfter >= bytesBefore) {
|
|
112
|
+
await fs.rm(out, { force: true }).catch(() => { });
|
|
113
|
+
return { resized: false, reason: "re-encode was not smaller", bytesBefore, bytesAfter };
|
|
114
|
+
}
|
|
115
|
+
return { resized: true, bytesBefore, bytesAfter };
|
|
116
|
+
}
|
|
117
|
+
/** the scaled filename for an asset: same stem, `-w` suffix, same extension */
|
|
118
|
+
export function scaledName(name) {
|
|
119
|
+
const ext = path.extname(name);
|
|
120
|
+
return `${path.basename(name, ext)}-w${ext}`;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The cached filename for a specific width: `<stem>-w<width>.<ext>`.
|
|
124
|
+
*
|
|
125
|
+
* Kept within `assetName()`'s grammar (`[a-f0-9]{32}\.(ext)`) is NOT possible with a width in the
|
|
126
|
+
* name, so these derived files are never served through `/api/assets/:name` directly — they are
|
|
127
|
+
* read internally and their bytes returned. That is deliberate: the public route only accepts the
|
|
128
|
+
* 32-hex form, so a derived name can never be requested as if it were an original.
|
|
129
|
+
*/
|
|
130
|
+
export function widthName(name, width) {
|
|
131
|
+
const ext = path.extname(name);
|
|
132
|
+
return `${path.basename(name, ext)}-w${width}${ext}`;
|
|
133
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bg-darkest:#1a1c22;--bg-dark:#232630;--bg-mid:#2b2e39;--bg-light:#343845;--fg:#dcdee4;--dim:#9298a5;--muted:#6b7280;--line:#1d2027;--line-strong:#1d2027;--acc:#5865f2;--ok:#3ba55d;--warn:#faa81a;--err:#ed4245;--tool:#3ba0c9;--term-bg:#0d0e12;--term-fg:#dcdee4;--text-xs:11px;--text-sm:13px;--text-md:14px;--text-lg:16px;--text-xl:20px;--leading-tight:1.25;--leading-normal:1.45;--leading-relaxed:1.6;--tracking-tight:-.011em;--tracking-tighter:-.02em;--space-1:2px;--space-2:4px;--space-3:6px;--space-4:8px;--space-5:12px;--space-6:16px;--space-7:24px;--radius-sm:6px;--radius-md:9px;--radius-lg:12px;--radius-xl:16px;--radius-pill:999px;--ease-out:cubic-bezier(.22, 1, .36, 1);--dur-fast:.12s;--dur-base:.2s;--dur-slow:.24s;--shadow-sm:0 1px 2px #0006;--shadow-lg:0 8px 24px -6px #000a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-family:Inter,Geist,SF Pro Text,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,sans-serif}[data-theme=midnight]{--bg-darkest:#0d0f18;--bg-dark:#12141f;--bg-mid:#1b1f31;--bg-light:#252a42;--fg:#dfe2f2;--dim:#8a90ad;--line:#0a0c14;--acc:#8b7cf7;--ok:#54c08a;--warn:#e5b567;--err:#ef6a6a;--tool:#6aa9e9;--term-bg:#0a0c13;--term-fg:#dfe2f2}[data-theme=tea]{--bg-darkest:#241c16;--bg-dark:#2e241c;--bg-mid:#3b2f24;--bg-light:#493b2d;--fg:#f0e4d2;--dim:#b39d82;--line:#1b140f;--acc:#d98e32;--ok:#7fa653;--warn:#e0b058;--err:#cf5b47;--tool:#c9975f;--term-bg:#1d1712;--term-fg:#ecdcc3}[data-theme=coffee]{--bg-darkest:#191410;--bg-dark:#211a14;--bg-mid:#30271e;--bg-light:#403527;--fg:#ede3d0;--dim:#a89478;--line:#120d07;--acc:#c68a4b;--ok:#8aa15c;--warn:#d9a441;--err:#c25450;--tool:#a67c52;--term-bg:#15100c;--term-fg:#e8dcc5}[data-theme=matcha]{--bg-darkest:#1b2217;--bg-dark:#232b1e;--bg-mid:#2f3a28;--bg-light:#3c4a33;--fg:#e8eeda;--dim:#9aab84;--line:#131a10;--acc:#8db64e;--ok:#6fae4e;--warn:#d8b13c;--err:#cd5c50;--tool:#5da88f;--term-bg:#151b11;--term-fg:#dfe8cb}[data-theme=matrix]{--bg-darkest:#060a06;--bg-dark:#0a0f0a;--bg-mid:#122116;--bg-light:#18301d;--fg:#c9f2cf;--dim:#6fa075;--line:#030603;--acc:#2fd558;--ok:#39c95f;--warn:#b8d977;--err:#ff6b6b;--tool:#57c99b;--term-bg:#030503;--term-fg:#3f7}[data-theme=sunset]{--bg-darkest:#1c1422;--bg-dark:#241b2b;--bg-mid:#33253e;--bg-light:#452f52;--fg:#f2e6ea;--dim:#ab93a8;--line:#150e1b;--acc:#f2784b;--ok:#63b46f;--warn:#eda63d;--err:#e25563;--tool:#b06ac9;--term-bg:#170f1d;--term-fg:#f0dfe4}[data-theme=light]{--bg-darkest:#eceef4;--bg-dark:#f6f7fa;--bg-mid:#e2e5ee;--bg-light:#fff;--fg:#24272f;--dim:#5d6470;--line:#d8dbe4;--acc:#4757d8;--ok:#2b8a4b;--warn:#b97a0f;--err:#d83c3f;--tool:#2278a8;--term-bg:#fff;--term-fg:#24272f;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--line-strong:#7f8b9c}[data-theme=strawberry]{--bg-darkest:#fbe4ea;--bg-dark:#fdf0f3;--bg-mid:#f7d4de;--bg-light:#fffafb;--fg:#4a2733;--dim:#96707e;--line:#f0ccd6;--acc:#e05575;--ok:#4d9e63;--warn:#c98a2d;--err:#d43d51;--tool:#b05687;--term-bg:#fff5f8;--term-fg:#4a2733;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--line-strong:#b06a83}[data-theme=ramune]{--bg-darkest:#ddeff7;--bg-dark:#ecf7fb;--bg-mid:#c9e7f4;--bg-light:#fbfeff;--fg:#173342;--dim:#5b7d90;--line:#c2e2ef;--acc:#1d86ae;--ok:#3a9e6e;--warn:#cf9a2a;--err:#d64f5c;--tool:#3a9db8;--term-bg:#f4fbfd;--term-fg:#173342;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--line-strong:#4a8aae}*{box-sizing:border-box}html[data-appearance=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}html[data-appearance=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html,body,#root{height:100%;margin:0}body{background:var(--bg-dark);color:var(--fg);font-size:var(--text-md);background:var(--bg-dark)}.bgphoto{object-fit:cover;object-position:center;z-index:0;pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;filter:brightness(calc(1 - var(--bg-image-dim,.55)));position:fixed;inset:0}.layout{z-index:1;grid-template-columns:250px 1fr clamp(320px,370px,32vw);height:100dvh;display:grid;position:relative;overflow:hidden}.layout.right-hidden{grid-template-columns:250px 1fr}.layout.right-hidden .rightbar{display:none}@media (width<=1100px){.layout,.layout.right-hidden{grid-template-columns:220px 1fr}.layout.right-hidden .rightbar,.layout .rightbarbackdrop{display:block}.rightbar .rightbarhead{z-index:1;display:flex;position:sticky;top:0}.rightbar{z-index:5;width:min(420px,92vw);box-shadow:none;transition:transform .18s,box-shadow .18s;position:fixed;top:0;bottom:0;right:0;transform:translate(100%)}.rightbar.open{transform:none;box-shadow:-8px 0 24px #0007}}.sidebar{background:var(--bg-darkest);flex-direction:column;padding:10px 8px;display:flex;overflow:hidden auto}.themepop{background:var(--bg-mid);border:1px solid var(--bg-light);border-radius:var(--radius-lg);gap:var(--space-4);flex-direction:column;padding:10px;display:flex;position:static}.trow{align-items:center;gap:var(--space-3);font-size:var(--text-sm);color:var(--fg);cursor:pointer;display:flex}.trow select{background:var(--bg-darkest);border-radius:var(--radius-md);color:var(--fg);border:none;outline:none;padding:3px 6px}.themegrid{gap:var(--space-2);grid-template-columns:1fr 1fr;display:grid}.themebtn{align-items:center;gap:var(--space-3);background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-xs);text-align:left;border:1px solid #0000;min-width:0;padding:5px 8px;display:flex;overflow:hidden}.themebtn>:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.themebtn:hover{filter:brightness(1.15)}.themebtn.on{border-color:var(--acc)}.swdots{gap:var(--space-1);flex-shrink:0;display:inline-flex}.themepick{gap:var(--space-3);margin-top:var(--space-3);grid-template-columns:repeat(auto-fill,minmax(104px,1fr));display:grid}.themecard{gap:var(--space-2);cursor:pointer;color:var(--fg);font-size:var(--text-xs);text-align:left;background:0 0;border:none;flex-direction:column;min-width:0;padding:0;display:flex}.themecard-preview{border-radius:var(--radius-md);border:1px solid var(--line);width:100%;height:62px;transition:border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);display:block;overflow:hidden}.themecard:hover .themecard-preview{border-color:var(--dim);transform:translateY(-1px)}.themecard.on .themecard-preview{border-color:var(--acc);box-shadow:0 0 0 2px var(--acc)}.themecard-label{text-overflow:ellipsis;white-space:nowrap;color:var(--dim);overflow:hidden}.themecard.on .themecard-label{color:var(--fg);font-weight:600}.tprev{width:100%;height:100%;display:block;position:relative}.tprev-nav{width:22%;position:absolute;inset:0 auto 0 0}.tprev-head{height:18%;position:absolute;top:0;left:22%;right:0}.tprev-panel{border-radius:3px;margin:5%;position:absolute;inset:18% 0 0 22%}.tprev-line{border-radius:2px;height:5%;position:absolute}.tprev-dot{border-radius:50%;width:7px;height:7px;position:absolute}.themeeditor{margin-top:var(--space-5)}.cfgsub{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em;color:var(--dim);margin:var(--space-5) 0 var(--space-3);font-weight:600}.paletterows{gap:var(--space-2) var(--space-4);margin:var(--space-3) 0;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));display:grid}.paletterow{align-items:center;gap:var(--space-2);font-size:var(--text-xs);min-width:0;display:flex}.paletterow input[type=color]{border:1px solid var(--line);border-radius:var(--radius-sm);cursor:pointer;background:0 0;flex-shrink:0;width:26px;height:22px;padding:0}.paletterow-label{color:var(--dim);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.paletterow-hex{background:var(--bg-darkest);border:1px solid var(--line);width:8.5em;color:var(--fg);border-radius:var(--radius-sm);padding:2px var(--space-2);font-size:var(--text-xs);flex-shrink:0}.paletterow-hex:focus{border-color:var(--acc);outline:none}.bgpreview{margin-top:var(--space-3)}.bgpreview img{object-fit:cover;border-radius:var(--radius-md);border:1px solid var(--line);max-width:100%;max-height:120px;display:block}.bgpreview .btnrow{margin-top:var(--space-2);align-items:center}.swdots i{border-radius:50%;width:9px;height:9px;display:inline-block;box-shadow:inset 0 0 0 1px #0004}.agent-list{flex:1;min-width:0;min-height:0;overflow-y:auto}.wsheader{align-items:center;gap:var(--space-3);font-size:var(--text-xs);letter-spacing:.04em;text-transform:uppercase;color:var(--dim);cursor:pointer;-webkit-user-select:none;user-select:none;border-top:1px solid var(--line);margin-top:6px;padding:10px 10px 4px;font-weight:600;display:flex}.wsheader:first-child{border-top:none;margin-top:0}.wsheader:hover{color:var(--fg)}.wsheader .wscaret{width:12px;font-size:var(--text-xs);flex-shrink:0}.wsheader .wscount{border-radius:var(--radius-pill);background:var(--bg-light);color:var(--dim);font-size:var(--text-xs);letter-spacing:0;flex-shrink:0;margin-left:auto;padding:0 6px;font-weight:600;line-height:15px}.agent-item{align-items:center;gap:var(--space-4);border-radius:var(--radius-md);cursor:pointer;color:var(--fg);min-width:0;margin-bottom:2px;padding:7px 10px;display:flex}.agent-item>span:not(.dot):not(.caret):not(.caret-spacer):not(.notifbadge):not(.subcount):not(.subtag):not(.ghosttag):not(.mini-cron):not(.goaldone){text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.agent-item .subtag{color:var(--dim);font-size:var(--text-xs)}.agent-item .goaldone{flex-shrink:0}.caret{cursor:pointer;width:12px;color:var(--dim);font-size:var(--text-xs);text-align:center;-webkit-user-select:none;user-select:none;flex-shrink:0}.caret:hover{color:var(--fg)}.caret-spacer{flex-shrink:0;width:12px}.agent-item:hover{background:var(--bg-mid)}.agent-item.collapsed{cursor:pointer}.agent-item.sel{background:var(--bg-mid)}.agent-item.sub-row{color:var(--dim)}.agent-item.sub-row.sel{color:var(--fg)}.dot{border-radius:50%;flex-shrink:0;width:9px;height:9px}.dot.running{background:var(--ok);box-shadow:0 0 6px var(--ok)}.dot.waiting{background:var(--dim);box-shadow:none}.dot.needs_operator{background:var(--acc);box-shadow:0 0 0 2px color-mix(in srgb, var(--acc) 35%, transparent)}.badge.needs_operator,.badge.waiting{color:var(--acc)}.dot.idle{background:var(--warn)}.dot.stopped{background:var(--dim)}.dot.error{background:var(--err);box-shadow:0 0 6px var(--err)}.sidebar .metrics{font-size:var(--text-xs);color:var(--dim);border-top:1px solid var(--line);margin-top:12px;padding:8px 10px;line-height:1.7}.sidebar-footer{border-top:1px solid var(--line);gap:var(--space-1);flex-direction:column;margin-top:auto;padding-top:8px;display:flex}.footer-row{align-items:center;gap:var(--space-4);display:flex}.footer-row .conn{margin-left:0}.sidebar-footer .metrics{border-top:none;margin-top:4px;padding:0}.brand{align-items:center;gap:var(--space-4);font-size:var(--text-md);color:var(--fg);display:flex}.version{color:var(--dim);font-size:var(--text-xs);font-family:ui-monospace,Menlo,monospace}.channel{flex-direction:column;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.chan-head{align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-bottom:1px solid var(--line);background:var(--bg-dark);flex-shrink:0;display:flex}.chan-head .hash{color:var(--dim);font-size:var(--text-xl);font-weight:300}.chan-head .title{font-weight:600;font-size:var(--text-lg);letter-spacing:var(--tracking-tight)}.chan-head .sub{color:var(--dim);font-size:var(--text-xs);margin-left:var(--space-2);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chan-head .head-actions{align-items:center;gap:var(--space-2);margin-left:auto;display:flex}.chan-head .head-sep{width:1px;margin:var(--space-1) var(--space-1);background:var(--line);align-self:stretch}.chan-head .runbtn{min-width:74px;height:24px;padding:0 var(--space-4);background:var(--ok);color:#fff;border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);transition:background-color var(--dur-fast) ease, filter var(--dur-fast) ease;border:none;justify-content:center;align-items:center;font-weight:700;line-height:1;display:inline-flex}.chan-head .runbtn:hover{filter:brightness(1.12)}.chan-head .runbtn.danger{background:var(--err)}.badge{font-size:var(--text-xs);border-radius:var(--radius-pill);padding:1px var(--space-4);background:var(--bg-light);vertical-align:middle;font-weight:500}.badge.running{color:var(--ok)}.badge.error{color:var(--err)}.badge.idle{color:var(--warn)}.badge.done{color:var(--acc)}.badge.queued{color:var(--warn);white-space:nowrap;background:#faa81a1a;border:1px solid #faa81a44}.feed{padding:var(--space-5) 0;overscroll-behavior:contain;flex:1;min-height:0;overflow-y:auto}.msg{gap:var(--space-6);padding:var(--space-2) var(--space-6);transition:background-color var(--dur-fast) ease;display:flex}.msg:hover{background:#ffffff08}.msg.pending{opacity:.75}.msg.pending .ts{color:var(--warn);font-weight:600}.msg.pending .avatar{animation:1.6s ease-in-out infinite pulse}.msg.pending .editbtn.cancel{color:var(--err)}.msg.withdrawn{opacity:.55}.msg.withdrawn .msg-body{text-decoration:line-through;-webkit-text-decoration-color:var(--muted);text-decoration-color:var(--muted)}.msg.withdrawn .msg-head{text-decoration:none}.msg.withdrawn .ts{color:var(--muted);font-weight:600}.msg.grouped{padding-top:0}.avatar{width:38px;height:38px;font-size:var(--text-lg);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;margin-top:2px;display:flex}.msg-body{flex:1;min-width:0}.msg-head{gap:var(--space-4);align-items:baseline;display:flex}.actor{color:var(--warn);font-size:var(--text-xs);white-space:nowrap}.runcard{gap:var(--space-4);flex-direction:column;display:flex}.statgrid{gap:var(--space-3);grid-template-columns:repeat(3,1fr);display:grid}.stat{background:var(--bg-mid);border-radius:var(--radius-md);gap:var(--space-1);flex-direction:column;min-width:0;padding:5px 8px;display:flex}.stat span{color:var(--dim);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em}.stat b{font-size:var(--text-md);text-overflow:ellipsis;overflow:hidden}.statrow{align-items:center;gap:var(--space-4);font-size:var(--text-sm);min-width:0;display:flex}.statrow .k{color:var(--dim);text-transform:uppercase;font-size:var(--text-xs);letter-spacing:.05em;white-space:nowrap;flex-shrink:0;width:auto;min-width:58px}.pill{border-radius:var(--radius-pill);font-size:var(--text-xs);background:var(--bg-mid);white-space:nowrap;margin-left:auto;padding:1px 8px}.pill.ok{color:var(--ok)}.pill.warn{color:var(--warn)}.pill.crit{color:var(--err);background:#ed42451a}.bartrack{border-radius:var(--radius-sm);background:var(--bg-light);height:6px;margin-top:2px;overflow:hidden}.rtgrid{gap:var(--space-2);grid-template-columns:repeat(3,minmax(0,1fr));display:grid}.rtcell{background:var(--bg-dark);border-radius:var(--radius-md);flex-direction:column;gap:1px;min-width:0;padding:5px 7px;display:flex;overflow:hidden}.rtcell>span{color:var(--dim);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.rtcell>b{font-size:var(--text-md);white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;font-weight:600;line-height:1.15;overflow:hidden}.rtcell>em{color:var(--dim);white-space:nowrap;text-overflow:ellipsis;font-size:10.5px;font-style:normal;overflow:hidden}.rtsep{color:var(--dim);padding:0 2px;font-weight:400}.barfill{border-radius:var(--radius-sm);background:var(--ok);min-width:2px;height:100%;transition:width .3s}.barfill.warn{background:var(--warn)}.barfill.crit{background:var(--err)}.author{font-weight:600;font-size:var(--text-md);letter-spacing:var(--tracking-tight)}.ts{color:var(--dim);font-size:var(--text-xs)}.content{white-space:pre-wrap;word-break:break-word;line-height:1.45}.content p{margin:2px 0}.content pre{background:var(--bg-darkest);border-radius:var(--radius-md);padding:8px;overflow-x:auto}.content pre>code{white-space:pre-wrap;overflow-wrap:anywhere}.content code{background:var(--bg-darkest);border-radius:var(--radius-sm);font-size:var(--text-sm);padding:1px 4px}.content pre code{background:0 0;padding:0}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{font-size:var(--text-md);margin:8px 0 2px}.content h1{font-size:var(--text-lg);letter-spacing:var(--tracking-tight)}.content h2{font-size:var(--text-md)}.content blockquote{border-left:3px solid var(--bg-light);color:var(--dim);background:#ffffff05;border-radius:0 4px 4px 0;margin:4px 0;padding:2px 10px}.content blockquote p{margin:2px 0}.content hr{border:none;border-top:1px solid var(--bg-light);margin:8px 0}.content del{color:var(--dim)}.content img{border-radius:var(--radius-md);max-width:100%}.content li.task{margin-left:-18px;list-style:none}.content li:has(>input[type=checkbox]){margin-left:-18px;list-style:none}.content li input[type=checkbox]{accent-color:var(--ok);margin-right:6px}input[type=checkbox]{accent-color:var(--acc)}.content a{color:var(--tool);text-decoration:underline;-webkit-text-decoration-color:color-mix(in srgb, var(--tool) 45%, transparent);text-decoration-color:color-mix(in srgb, var(--tool) 45%, transparent);text-underline-offset:2px}.content a:hover{filter:brightness(1.15)}.themebtn.on{background:var(--acc);color:#fff}.trow select:focus{outline:1px solid var(--acc)}.tbl{margin:6px 0;overflow-x:auto}.tbl table{border-collapse:collapse;font-size:var(--text-sm)}.tbl th,.tbl td{border:1px solid var(--bg-light);text-align:left;padding:3px 9px}.tbl th{background:var(--bg-darkest);font-weight:600}.embed{border-left:3px solid var(--tool);background:var(--bg-darkest);border-radius:var(--radius-sm);font-size:var(--text-sm);margin-top:3px;padding:6px 10px}.msg{--grouped-gap:var(--space-2)}.msg.grouped .avatar.avghost{align-self:flex-start;width:38px;height:0;min-height:0;margin-top:0}.msg.grouped{padding:0 var(--space-6)}.embed.grouped{margin-top:var(--grouped-gap)}.msg:not(.grouped).next-grouped{padding-bottom:0}.msg:not(.grouped).next-grouped .embed{margin-bottom:0}.msg.grouped:not(.next-grouped){padding-bottom:3px}.embed.grouped{border-radius:var(--radius-sm)}.embed.fail{border-color:var(--err)}.embed.warn-embed{border-color:var(--warn)}.embed.warn-embed .mono{color:var(--warn)}.embed.done{border-color:var(--ok)}.embed.running{border-color:var(--warn)}.embed.running summary .meta:after{content:"⋯";color:var(--warn);margin-left:6px;animation:1s step-end infinite blink;display:inline-block}.embed summary{gap:var(--space-4)}.embed summary .mono{font-family:ui-monospace,Menlo,monospace}.toolbody{background:var(--bg-darkest);border-radius:var(--radius-sm);white-space:pre-wrap;word-break:break-word;max-height:340px;font-size:var(--text-sm);margin:4px 0;padding:6px 8px;overflow-y:auto}.toolbody.del{border-left:2px solid var(--err);color:#f0a5a6;background:#ed424514}.toolbody.add{border-left:2px solid var(--ok);color:#9fd8ae;background:#3ba55d14}.toolbody.patch{padding:4px 8px}.toolbody.patch .pline{white-space:pre-wrap;word-break:break-word}.toolbody.patch .pline.add{color:#9fd8ae;border-left:2px solid var(--ok);background:#3ba55d14;padding-left:4px}.toolbody.patch .pline.del{color:#f0a5a6;border-left:2px solid var(--err);background:#ed424514;padding-left:4px}.toolbody.patch .pline.meta{color:var(--dim)}.embed.question{border-color:var(--acc);background:#5865f20f}.qopts{gap:var(--space-3);flex-wrap:wrap;margin-top:6px;display:flex}.qopt{background:var(--acc);color:#fff;border-radius:var(--radius-pill);cursor:pointer;font-size:var(--text-sm);border:none;padding:3px 12px}.qopt:hover{filter:brightness(1.15)}.qopt:disabled{opacity:.45;cursor:default;filter:none}.embed.question.answered{opacity:.75}.qfree{gap:var(--space-3);margin-top:8px;display:flex}.qfree input{background:var(--bg-mid);border:1px solid var(--bg-light);border-radius:var(--radius-md);color:var(--fg);font-size:var(--text-sm);outline:none;flex:1;padding:4px 10px}.qfree input:focus{border-color:var(--acc)}.qfree button{background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);border:none;padding:4px 12px}.qfree button:disabled{opacity:.45;cursor:default}.bashelapsed{color:var(--warn);font-size:var(--text-xs);margin-left:8px}.embed.question .meta{margin-top:6px}.embed.decision{border-color:var(--acc);background:#5865f20f}.embed.decision summary .meta{margin-left:6px}.embed.decision .content{font-size:var(--text-sm);margin-top:3px}.embed summary{cursor:pointer;-webkit-user-select:none;user-select:none;list-style-position:outside}.embed summary::marker{color:var(--dim)}.embed[open] summary{margin-bottom:4px}.embed .mono{font-family:ui-monospace,Menlo,monospace;font-size:var(--text-sm);white-space:pre-wrap;word-break:break-word;max-height:340px;overflow-y:auto}.embed .meta{color:var(--dim);font-size:var(--text-xs);margin-top:3px}.reasoning{border-left:3px dashed var(--bg-light);color:var(--dim);font-size:var(--text-sm);border-radius:var(--radius-sm);background:#ffffff05;margin:2px 0;padding:2px 10px}.reasoning summary{cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.75}.reasoning summary:hover{opacity:1;color:var(--fg)}.reasoning[open] summary{margin-bottom:4px}.reasoning .mono{white-space:pre-wrap;word-break:break-word;max-height:260px;overflow-y:auto}.msg.live .avatar{animation:1.6s ease-in-out infinite pulse}.cursor{color:var(--acc);animation:1s step-end infinite blink}.interrupted{color:var(--warn);font-size:var(--text-xs);margin-top:3px}@keyframes blink{50%{opacity:0}}@keyframes pulse{50%{opacity:.55}}.conn{background:var(--err);vertical-align:middle;width:8px;height:8px;box-shadow:0 0 6px var(--err);border-radius:50%;display:inline-block}.conn.ok{background:var(--ok);box-shadow:0 0 6px var(--ok)}.copybtn{border:1px solid var(--bg-light);color:var(--dim);border-radius:var(--radius-sm);font-size:var(--text-xs);cursor:pointer;background:0 0;flex-shrink:0;padding:0 5px;line-height:16px}.copybtn:hover{color:var(--fg);filter:brightness(1.3)}.embed summary{align-items:center;gap:var(--space-3);display:flex}.toolcopy{gap:var(--space-2);flex-shrink:0;margin-left:auto;display:flex}.msgfoot{align-items:center;gap:var(--space-3);color:var(--dim);font-size:var(--text-xs);margin-top:4px;display:flex}.imgstage{gap:var(--space-3);flex-wrap:wrap;margin-bottom:6px;display:flex}.imgchip{display:inline-flex;position:relative}.imgchip img{object-fit:cover;border-radius:var(--radius-md);border:1px solid var(--line);width:64px;height:64px}.imgchip .imgx{background:var(--err);color:#fff;width:16px;height:16px;font-size:var(--text-xs);cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex;position:absolute;top:-5px;right:-5px}.promptimgs{gap:var(--space-3);flex-wrap:wrap;margin-top:4px;display:flex}img.promptimg{border-radius:var(--radius-md);border:1px solid var(--line);max-width:180px;max-height:120px}.bgjob-note{color:var(--warn)}.bgjob-note b{color:var(--fg);font-family:ui-monospace,Menlo,monospace}details.reasoning .thinkscroll{white-space:pre-wrap;word-break:break-word;scrollbar-gutter:stable;max-height:220px;overflow-y:auto}.thinktimer{color:var(--dim);font-size:var(--text-xs);margin-left:6px;font-weight:400}.termdrawer{background:var(--term-bg);border-top:1px solid var(--line);flex-direction:column;display:flex}.termgrip{cursor:ns-resize;background:var(--bg-light);opacity:.6;border-bottom:1px solid var(--line);height:6px}.termgrip:hover{opacity:1}.termbar{font-size:var(--text-xs);color:var(--dim);border-bottom:1px solid var(--line);background:var(--bg-darkest);justify-content:space-between;align-items:center;padding:4px 10px;display:flex}.termtabs{gap:var(--space-1);flex:1;align-items:center;min-width:0;display:flex;overflow-x:auto}.termtab{align-items:center;gap:var(--space-3);border-radius:var(--radius-md);cursor:pointer;color:var(--dim);font-size:var(--text-xs);white-space:nowrap;background:var(--bg-mid);padding:2px 8px;display:inline-flex}.termtab.active{color:var(--fg);background:var(--bg-light)}.termtab:hover{filter:brightness(1.15)}.tabx{color:inherit;opacity:.5;cursor:pointer;font-size:var(--text-xs);background:0 0;border:none;padding:0}.tabx:hover{opacity:1;color:var(--err)}.termbody{gap:var(--space-2);background:var(--term-bg);flex:1;min-height:0;padding:4px;display:flex}.termbody.split .termpane{width:50%}.termpane{border-radius:var(--radius-md);background:var(--term-bg);flex:1;min-width:0;position:relative;overflow:hidden}.termpane:not(.focused){opacity:.9}.termpane.focused{box-shadow:none}.termhost{position:absolute;inset:0}.termsession{padding:4px 6px;position:absolute;inset:0}.termsplit{background:var(--line);border-radius:var(--radius-sm);cursor:col-resize;flex-shrink:0;width:3px}.termempty{font-size:var(--text-xs);color:var(--dim);place-items:center;display:grid;position:absolute;inset:0}.jump{background:var(--acc);color:#fff;border-radius:var(--radius-pill);padding:var(--space-3) var(--space-5);cursor:pointer;font-size:var(--text-sm);letter-spacing:var(--tracking-tight);box-shadow:var(--shadow-lg);z-index:2;transition:opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);border:none;font-weight:600;position:absolute;top:-34px;left:50%;transform:translate(-50%)}.jump:hover{filter:brightness(1.08)}.jump:active{transform:translate(-50%)translateY(1px)}@starting-style{.jump{opacity:0;transform:translate(-50%)translateY(6px)}}.channel:has(.termdrawer) .composer:not(.maximized) .jump{top:auto;bottom:calc(var(--termh,300px) + 100% + 6px);left:50%}.channel:has(.termdrawer) div.composer.maximized .jump{inset:10px 16px auto auto;transform:none}.divider-msg{align-items:center;gap:var(--space-5);color:var(--dim);font-size:var(--text-xs);padding:4px 18px;display:flex}.divider-msg:before,.divider-msg:after{content:"";background:var(--line);flex:1;height:1px}.divider-msg.err{color:var(--err)}.divider-msg.compacting{color:var(--acc);animation:1.6s ease-in-out infinite pulse}.goalline{color:var(--dim);font-size:var(--text-xs);padding:4px 18px}.goalline-label{color:var(--dim);display:block}.goalline.warn .goalline-label{color:var(--warn)}.goalline.err .goalline-label{color:var(--err)}.goalline .card{text-align:left;margin-top:6px}.day-divider{align-items:center;gap:var(--space-5);padding:14px 18px 6px;display:flex}.day-divider:before,.day-divider:after{content:"";background:var(--bg-light);flex:1;height:1px}.spinner{border:2px solid var(--dim);vertical-align:-1px;border-top-color:#0000;border-radius:50%;width:10px;height:10px;margin-right:6px;animation:.7s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{border-top-color:var(--dim);opacity:.6;animation:none}}.day-divider span{color:var(--dim);font-size:var(--text-xs)}.composer{padding:0 16px 18px;position:relative}.composer form{background:var(--bg-light);border-radius:var(--radius-lg);gap:var(--space-4);align-items:flex-end;padding:10px 12px;display:flex}.composer textarea{color:var(--fg);font:inherit;resize:none;background:0 0;border:none;outline:none;flex:1;line-height:1.4;overflow-y:auto}.cmds{background:var(--bg-mid);border:1px solid var(--bg-light);border-radius:var(--radius-lg);z-index:3;position:absolute;bottom:calc(100% - 8px);left:16px;right:16px;overflow:hidden;box-shadow:0 -6px 20px #0007}.cmdrow{gap:var(--space-5);cursor:pointer;font-size:var(--text-sm);align-items:baseline;padding:7px 12px;display:flex}.cmdrow:hover{background:var(--bg-light)}.cmdrow.active{background:var(--acc);color:#fff}.cmdrow.active .muted{color:#e6e9ff}.cmdrow .muted{font-size:var(--text-xs)}.composer button{background:var(--acc);color:#fff;border-radius:var(--radius-lg);cursor:pointer;border:none;padding:7px 14px;font-weight:600}.composer button:hover{opacity:.9}.composer label{color:var(--dim);font-size:var(--text-xs);gap:var(--space-2);white-space:nowrap;align-items:center;display:flex}.hint{color:var(--dim);font-size:var(--text-xs);margin-top:5px}.composer .flashhint{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;animation:flashhint-in var(--dur-fast) var(--ease-out);margin:0;position:absolute;bottom:3px;left:22px;right:22px;overflow:hidden}@keyframes flashhint-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}.helpsec{margin-bottom:var(--space-5)}.helprow{gap:var(--space-4);font-size:var(--text-sm);border-bottom:1px solid var(--bg-light);grid-template-columns:minmax(96px,auto) 1fr;align-items:baseline;padding:4px 0;display:grid}.helprow:last-child{border-bottom:none}.helprow>b{color:var(--fg);white-space:nowrap;font-weight:600}.helprow>span{color:var(--dim);line-height:1.5}.helprow .kbdgroup{align-items:center;gap:3px;display:inline-flex}.helprow kbd{text-align:center;background:var(--bg-light);border-radius:var(--radius-sm);min-width:20px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:var(--text-xs);color:var(--fg);padding:1px 5px;display:inline-block}.helprow code{background:var(--bg-darkest);border-radius:var(--radius-sm);padding:0 4px;font-size:11.5px}.rightbarbackdrop{z-index:4;background:#0004;display:none;position:fixed;inset:0}.rightbarhead{justify-content:space-between;align-items:center;gap:var(--space-4);background:var(--bg-dark);border-bottom:1px solid var(--line);margin:-14px -14px 0;padding:10px 14px;display:none}.rightbarhead .muted{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em}.rightbar{background:var(--bg-dark);border-left:1px solid var(--line);font-size:var(--text-sm);scrollbar-gutter:stable;flex-direction:column;min-height:0;padding:14px;display:flex;overflow-y:auto}.rightbar>*{flex-shrink:0}.rightbar h3{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em;color:var(--dim);margin:14px 0 6px}.rightbar h3:first-of-type{margin-top:0}.card{background:var(--bg-darkest);border-radius:var(--radius-lg);white-space:pre-wrap;word-break:break-word;max-height:200px;padding:10px;overflow-y:auto}.card.goalcard,.card.runcard{max-height:none;overflow-y:visible}.muted{color:var(--dim)}.prog .progrow{gap:var(--space-4);margin-bottom:4px;display:flex}.prog .progrow b{color:var(--dim);text-transform:uppercase;font-size:var(--text-xs);letter-spacing:.05em;flex-shrink:0;min-width:62px;padding-top:2px}.embed .progrow{gap:var(--space-4);margin-bottom:4px;display:flex}.embed .progrow b{color:var(--dim);text-transform:uppercase;font-size:var(--text-xs);letter-spacing:.05em;flex-shrink:0;min-width:62px;padding-top:2px}.embed .progrow span{min-width:0}.inline-md{display:inline}.inline-md>:first-child{margin-top:0}.inline-md>:last-child{margin-bottom:0}.prog .progrow.warn span{color:var(--err)}.msg-head .editbtn{color:var(--dim);cursor:pointer;font-size:var(--text-xs);opacity:0;background:0 0;border:none;padding:0 2px;transition:opacity .12s}.msg:hover .msg-head .editbtn,.msg.pending .msg-head .editbtn{opacity:1}.msg-head .editbtn:focus-visible{opacity:1;outline:2px solid var(--acc);outline-offset:1px}.msg-head .editbtn:hover{color:var(--acc)}.branch-row{color:var(--dim);font-size:var(--text-xs);cursor:pointer;justify-content:space-between;padding:3px 0;display:flex}.branch-row:hover,.branch-row.cur{color:var(--fg)}.mini-cron{font-size:var(--text-xs);opacity:.75;margin-left:auto}.sched-row{border-radius:var(--radius-md);cursor:pointer;margin-bottom:2px;padding:6px 8px}.sched-row:hover,.sched-row.cur{background:var(--bg-mid)}.sched-top{gap:var(--space-3);font-size:var(--text-sm);align-items:baseline;display:flex}.sched-row .sched-meta{color:var(--dim);font-size:var(--text-xs);margin-top:2px}.sched-row .sched-prompt{color:var(--dim);font-size:var(--text-xs);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;overflow:hidden}.badge.cron{color:var(--tool);white-space:nowrap;background:#3ba0c91a;border:1px solid #3ba0c944}.sesscard{gap:var(--space-3);font-size:var(--text-sm);flex-direction:column;display:flex}.sessrow{align-items:center;gap:var(--space-4);display:flex}.filebox{background:var(--bg-darkest);border-radius:var(--radius-lg);height:260px;padding:4px;overflow-y:auto}.filerow{align-items:center;gap:var(--space-3);cursor:pointer;font-size:var(--text-sm);color:var(--fg);border-radius:var(--radius-sm);padding:3px 8px;display:flex}.filerow:hover{background:var(--bg-mid)}.filerow .ficon{width:10px;color:var(--dim);font-size:var(--text-xs);text-align:center;flex-shrink:0}.filerow.isdir .fname{font-weight:600}.fname{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.fsize{color:var(--dim);font-size:var(--text-xs);flex-shrink:0;margin-left:auto}.sessrow .k{color:var(--dim);text-transform:uppercase;width:74px;font-size:var(--text-xs);letter-spacing:.05em;flex-shrink:0}.ellip{text-overflow:ellipsis;white-space:nowrap;text-align:left;direction:rtl;overflow:hidden}.modelbox{gap:var(--space-3);background:var(--bg-darkest);border-radius:var(--radius-lg);flex-direction:column;padding:10px;display:flex}.modelbox select,.modelbox input[type=text]{background:var(--bg-mid);border-radius:var(--radius-md);color:var(--fg);font:inherit;border:none;outline:none;min-width:0;padding:6px 8px}.modelbox button{background:var(--acc);border-radius:var(--radius-md);color:#fff;cursor:pointer;font-weight:600;font-size:var(--text-sm);white-space:nowrap;box-sizing:border-box;justify-content:center;align-items:center;gap:var(--space-2);border:none;min-width:7.5em;height:28px;padding:6px 10px;line-height:1;display:inline-flex}.modelbox button:hover{opacity:.9}.modelbox .meta{color:var(--dim);font-size:var(--text-xs)}.btnrow{gap:var(--space-3);margin:8px 0;display:flex}.btnrow button{background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);border:none;padding:6px 10px}.btnrow button:hover{filter:brightness(1.2)}.btnrow .runbtn{background:var(--ok);color:#fff;font-weight:600}.btnrow .runbtn,.btnrow .danger{min-width:74px}.btnrow .danger{background:var(--err);color:#fff;font-weight:600}.ctrlrow{align-items:center;gap:var(--space-4);font-size:var(--text-sm);margin-top:6px;display:flex}.ctrlrow label{align-items:center;gap:var(--space-3);cursor:pointer;color:var(--fg);white-space:nowrap;display:flex}.ctrlrow .muted{font-size:var(--text-xs)}.featgrid{margin-bottom:var(--space-5);flex-direction:column;gap:2px;display:flex}.featrow{gap:var(--space-4);font-size:var(--text-sm);border-bottom:1px solid var(--bg-light);grid-template-columns:minmax(150px,auto) 1fr;align-items:baseline;padding:4px 0;display:grid}.featrow:last-child{border-bottom:none}.featrow>b{color:var(--fg);white-space:nowrap;font-weight:600}.skilllist{gap:var(--space-2);flex-direction:column;display:flex}.skillrow{border:1px solid var(--line);border-radius:var(--radius-md);background:var(--bg-darkest);flex-direction:column;gap:2px;display:flex}.skillhead{cursor:pointer;text-align:left;width:100%;font:inherit;color:inherit;border-radius:var(--radius-md);background:0 0;border:none;grid-template-columns:12px auto;align-items:baseline;gap:2px 7px;padding:7px 9px;display:grid}.skillhead:hover{background:var(--bg-dark)}.skillhead>b{color:var(--acc);font-size:var(--text-sm);word-break:break-all}.skillhead>.skillcaret{color:var(--dim);font-size:var(--text-xs)}.skillhead>.muted{font-size:var(--text-xs);grid-column:2;line-height:1.45}.skillbody{border-top:1px solid var(--line);font-size:var(--text-xs);white-space:pre-wrap;word-break:break-word;max-height:340px;color:var(--fg);margin:0;padding:8px 10px 10px;line-height:1.5;overflow-y:auto}.goalstate{background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-xs);border:none;padding:3px 10px}.goalstate.on.active{background:var(--ok);color:#fff;font-weight:600}.goalstate.on.done{background:var(--acc);color:#fff;font-weight:600}.goalstate.on.paused{background:var(--warn);color:#fff;font-weight:600}.goalstate:disabled{cursor:default;filter:none}.verifycard{border-left:3px solid var(--tool);margin-top:6px}.auditcard{border-left:3px solid var(--warn);margin-top:6px}.auditcard.ok{border-left-color:var(--ok)}.vtitle{font-weight:600;font-size:var(--text-xs);color:var(--dim);text-transform:uppercase;letter-spacing:.04em;align-items:center;gap:var(--space-3);margin-bottom:4px;display:flex}.iconbtn{background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;width:26px;height:24px;font-size:var(--text-sm);transition:background-color var(--dur-fast) ease, filter var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);border:none;flex:none;justify-content:center;align-self:flex-end;align-items:center;padding:0;display:inline-flex}.iconbtn-glyph{justify-content:center;align-items:center;width:100%;height:100%;line-height:1;display:inline-flex}.iconbtn:hover{filter:brightness(1.3)}.iconbtn.active{background:var(--acc);color:#fff}.overlay{z-index:10;background:#0009;place-items:center;display:grid;position:fixed;inset:0}.modal{background:var(--bg-mid);border-radius:var(--radius-lg);width:min(760px,94vw);max-height:88vh;padding:16px 18px;overflow-y:auto}.modal:has(.cfgbody){flex-direction:column;height:min(660px,88vh);display:flex;overflow:hidden}.modal:has(.cfgbody)>form{flex-direction:column;flex:1;min-height:0;display:flex}.cfgbody{flex:1;gap:0;min-height:0;display:flex}.modal:has(.cfgbody){flex-direction:column;display:flex}.cfgmenu{gap:var(--space-1);border-right:1px solid var(--bg-light);border-bottom:none;flex-direction:column;flex:0 0 148px;padding:2px 10px 2px 0;display:flex;overflow-y:auto}.cfgmenu-item{text-align:left;border-radius:var(--radius-md);width:100%;color:var(--dim);font:inherit;font-size:var(--text-sm);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;padding:7px 9px;display:block}.cfgmenu-item:hover{color:var(--fg);background:var(--bg-darkest)}.cfgmenu-item.on{color:var(--fg);background:var(--bg-darkest);border-color:var(--acc);box-shadow:inset 2px 0 0 var(--acc);font-weight:600}.cfgmenu-label{pointer-events:none}.cfgpanel{flex:1;min-width:0;padding:2px 0 2px 14px;overflow-y:auto}.cfgpanel fieldset.hide,.cfgpanel legend{display:none}.cfgpanel fieldset{border:none;margin:0;padding:0}.cfgfoot{gap:var(--space-5);border-top:1px solid var(--bg-light);flex:none;justify-content:flex-end;align-items:center;padding-top:10px;display:flex}.cfgsave{background:var(--acc);border-radius:var(--radius-md);color:#fff;cursor:pointer;font:inherit;border:none;padding:7px 16px;font-weight:600}.cfgsave:hover{filter:brightness(1.12)}.cfgtoggle{align-items:center;gap:var(--space-3);font-size:var(--text-sm);color:var(--fg);cursor:pointer;flex-flow:wrap;margin-top:8px;display:flex}.mcpcard{border:1px solid var(--bg-light);border-radius:var(--radius-lg);margin-bottom:8px;padding:8px}.mcpcard .cfgrow{margin-bottom:5px}.mcpcard .cfgrow:last-child{margin-bottom:0}.mcpresult{font-size:var(--text-xs);overflow-wrap:anywhere;margin-top:4px}.mcpresult.err{color:var(--err)}.mcpresult.ok{color:var(--ok)}.mcpresult-head{margin-bottom:2px}.mcptools{flex-direction:column;gap:2px;margin:3px 0 0;padding:0 0 0 2px;list-style:none;display:flex}.mcptools li{gap:var(--space-3);min-width:0;color:var(--dim);align-items:baseline;display:flex}.mcptools code{color:var(--fg);flex-shrink:0;font-size:11px}.mcptool-desc{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:11px;overflow:hidden}.mcpstate{font-size:var(--text-xs);white-space:nowrap;color:var(--dim)}.mcpstate.connected{color:var(--ok)}.mcpstate.error{color:var(--err)}.mcpstate.disabled{color:var(--dim)}.cfgrow.archrow{align-items:center;gap:var(--space-4);flex-wrap:nowrap}.archmain{gap:var(--space-1);flex-direction:column;flex:1;min-width:0;display:flex}.archmain b{font-size:var(--text-sm)}.archmain .muted{font-size:var(--text-xs)}.archmain .mono{font-size:var(--text-xs);max-width:100%}.archrow button{white-space:nowrap;flex:none}.archrow .archrestore{background:var(--acc);border-color:var(--acc);color:#fff;font-weight:600}.archrow .archrestore:hover{filter:brightness(1.12)}@media (width<=620px){.cfgrow.archrow{flex-wrap:wrap}.archrow button{flex:auto}.cfgbody{flex-direction:column}.cfgmenu{border-right:none;border-bottom:1px solid var(--bg-light);flex-flow:row;flex:none;padding:0 0 6px;overflow-x:auto}.cfgmenu-item{width:auto}.cfgpanel{padding:10px 0 0}}.modal-head{margin-bottom:var(--space-5);font-size:var(--text-lg);letter-spacing:var(--tracking-tight);justify-content:space-between;align-items:center;display:flex}.modal label{gap:var(--space-2);color:var(--dim);font-size:var(--text-sm);flex-direction:column;display:flex}.modal input[type=text],.modal input[type=number],.modal input[type=password],.modal input[type=url],.modal input[type=email],.modal select,.modal textarea{background:var(--bg-darkest);border-radius:var(--radius-md);color:var(--fg);font:inherit;border:1px solid #0000;outline:none;min-width:0;padding:7px 9px}.modal input:focus,.modal select:focus,.modal textarea:focus{border-color:var(--acc)}.modal ::placeholder{color:#7c818f;opacity:1}.modal select option{background:var(--bg-darkest);color:var(--fg)}.modal input.compact{font-size:var(--text-sm);padding:5px 8px}.modal textarea{resize:vertical}.w100{width:100%}.mono{font-family:ui-monospace,Menlo,monospace;font-size:var(--text-sm)}.modal fieldset{border:1px solid var(--bg-light);border-radius:var(--radius-lg);margin:0 0 4px;padding:10px}.modal fieldset legend{color:var(--dim);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em;padding:0 6px}.cfgrow{gap:var(--space-3);flex-wrap:wrap;align-items:center;margin-bottom:6px;display:flex}.cfgrow input{background:var(--bg-darkest);border:1px solid var(--bg-light);border-radius:var(--radius-md);color:var(--fg);font-size:var(--text-sm);flex:1;min-width:0;padding:5px 8px}.cfgrow select{background:var(--bg-darkest);border:1px solid var(--bg-light);border-radius:var(--radius-md);color:var(--fg);font-size:var(--text-sm);padding:5px 8px}.cfgrow .cfgname{width:90px;color:var(--warn);flex:none;font-weight:600}.cfgrow .cfgkeys{gap:var(--space-2);flex-direction:column;flex-basis:100%;padding-left:96px;display:flex}.cfgrow .cfgkeyrow{gap:var(--space-2);align-items:center;display:flex}.cfgrow .cfgkeyrow input{flex:1}.cfgrow .cfgkeyrow button,.cfgrow .cfgkeys>button{flex:none}.cfgrow .cfgkeys>button{align-self:flex-start}.cfgrow button{background:var(--bg-mid);border:1px solid var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-xs);padding:4px 8px}.cfgrow button:hover{background:var(--bg-light)}.cfgrow button.danger{background:var(--err);border-color:var(--err);color:#fff}.cfggrid{gap:var(--space-4);grid-template-columns:repeat(auto-fit,minmax(150px,1fr));display:grid}.cfggrid label,.cfgcol label{gap:var(--space-2);color:var(--dim);font-size:var(--text-xs);flex-direction:column;display:flex}.cfggrid input{background:var(--bg-darkest);border:1px solid var(--bg-light);border-radius:var(--radius-md);color:var(--fg);width:100%;padding:5px 8px}.cfgcol{margin-bottom:8px}.cfgcol textarea{background:var(--bg-darkest);border:1px solid var(--bg-light);border-radius:var(--radius-md);color:var(--fg);font:inherit;font-size:var(--text-sm);width:100%;margin-top:4px;padding:5px 8px}.presetbtn{background:var(--bg-light);color:var(--fg);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);border:1px solid #0000;flex:1;padding:7px 10px}.presetbtn.active{background:var(--acc);color:#fff}.wizmodels{gap:var(--space-1);border:1px solid var(--bg-light);border-radius:var(--radius-md);background:var(--bg-darkest);flex-direction:column;max-height:190px;padding:4px;display:flex;overflow-y:auto}.wizmodel{align-items:baseline;gap:var(--space-4);text-align:left;border-radius:var(--radius-sm);width:100%;color:var(--fg);cursor:pointer;font-size:var(--text-sm);background:0 0;border:1px solid #0000;padding:4px 7px;display:flex}.wizmodel:hover{background:var(--bg-light)}.wizmodel.active{border-color:var(--acc)}.wizmodel .muted{font-size:var(--text-xs);white-space:nowrap;margin-left:auto}.forkchip{align-items:center;gap:var(--space-2);white-space:nowrap;color:var(--dim);font-size:var(--text-xs);cursor:pointer;display:flex}.dirlist{background:var(--bg-darkest);border-radius:var(--radius-md);height:220px;padding:4px;overflow-y:auto}.direntry{border-radius:var(--radius-sm);cursor:pointer;font-size:var(--text-md);padding:4px 8px}.direntry:hover{background:var(--bg-light)}.filepreview{border-radius:var(--radius-lg);max-height:62vh;overflow:auto}.filetoolbar{gap:var(--space-3);margin-bottom:8px;display:flex}.filetoolbar button{background:var(--bg-light);color:var(--dim);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);border:none;padding:4px 12px}.filetoolbar button:hover{color:var(--fg);filter:brightness(1.15)}.filetoolbar button.on{background:var(--acc);color:#fff;font-weight:600}.fileeditor{gap:var(--space-4);flex-direction:column;display:flex}.fileeditor textarea{background:var(--bg-darkest);min-height:55vh;max-height:65vh;color:var(--fg);border:1px solid var(--bg-light);border-radius:var(--radius-lg);font-size:var(--text-sm);white-space:pre;padding:10px;line-height:1.45;overflow:auto}.filerow-actions{justify-content:flex-end;align-items:center;gap:var(--space-5);display:flex}.savebtn{background:var(--ok);color:#fff;border-radius:var(--radius-md);cursor:pointer;font-weight:600;font-size:var(--text-sm);border:none;padding:5px 14px}.savebtn:disabled{opacity:.4;cursor:default}.mdpreview{background:var(--bg-darkest);border-radius:var(--radius-lg);max-height:62vh;padding:14px 16px;overflow:auto}.filepreview .shiki,.filepreview .shiki span{color:var(--shiki-light);font-family:ui-monospace,Menlo,monospace;font-size:var(--text-sm)}html[data-appearance=dark] .filepreview .shiki,html[data-appearance=dark] .filepreview .shiki span{color:var(--shiki-dark)}.filepreview .shiki{background-color:var(--shiki-dark-bg);font-size:var(--text-sm);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;margin:0;padding:10px 12px}html[data-appearance=light] .filepreview .shiki{background-color:var(--shiki-light-bg)}.notifbtn{position:relative}.notifbtn.has-unread{color:var(--acc)}.notifdot{background:var(--err);color:#fff;border-radius:var(--radius-pill);font-size:var(--text-xs);padding:2px 4px;font-style:normal;font-weight:700;line-height:1;position:absolute;top:-4px;right:-4px}.brand-row{align-items:center;margin-top:2px;display:flex}.notifbackdrop{z-index:7;position:fixed;inset:0}.notifpanel{z-index:8;background:var(--bg-mid);border:1px solid var(--bg-light);border-radius:var(--radius-lg);width:min(360px,88vw);position:absolute;bottom:8px;left:8px;overflow:hidden;box-shadow:0 8px 30px #000a}.notifhead{border-bottom:1px solid var(--line);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em;color:var(--dim);justify-content:space-between;align-items:center;padding:8px 12px;display:flex}.notiflist{max-height:46vh;overflow-y:auto}.notifitem{border-bottom:1px solid var(--line);cursor:pointer;padding:8px 12px}.notifitem:last-child{border-bottom:none}.notifitem:hover{background:var(--bg-light)}.notifitem .nhead{align-items:baseline;gap:var(--space-3);min-width:0;display:flex}.notifitem .ntitle{font-weight:600;font-size:var(--text-sm);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.notifitem.error .ntitle{color:var(--err)}.notifitem.finish .ntitle{color:var(--ok)}.notifitem.question .ntitle{color:var(--acc)}.notifitem .nbody{font-size:var(--text-xs);color:var(--dim);word-break:break-word;margin-top:3px}.subcount{font-size:var(--text-xs);color:var(--dim);background:var(--bg-light);border-radius:var(--radius-pill);white-space:nowrap;flex-shrink:0;padding:1px 7px}.subcount.live{color:var(--ok)}.mediapreview{gap:var(--space-4);flex-direction:column;align-items:center;display:flex}.mediapreview img{border-radius:var(--radius-lg);background:var(--bg-darkest);max-width:100%;max-height:65vh}.mediapreview video{border-radius:var(--radius-lg);background:#000;max-width:100%;max-height:65vh}.mediapreview audio{width:100%}.composer{flex-direction:column;display:flex}.composer .hint{flex-shrink:0}.composer.maximized{z-index:5;background:var(--bg-dark);padding:16px 16px 18px;position:absolute;inset:0}.composer.maximized:before{content:"";background:var(--bg-dark);z-index:-1;position:absolute;inset:0}.composer.maximized form{flex:1;align-items:stretch;min-height:0}.composer.maximized textarea{resize:none;flex:1;max-height:none;height:auto!important}.composer.maximized .maxbtn,.composer.maximized form>button[type=submit]{align-self:flex-end}.maxbtn{font-size:var(--text-xs);justify-content:center;align-items:center;line-height:1;display:inline-flex;padding:0!important}.filerow.gitignored .fname,.filerow.gitignored .ficon,.filerow.gitignored .fsize{opacity:.38}.embed.compaction{border-left-color:var(--tool)}.embed.compaction summary .meta{color:var(--tool)}.avatar.ghosted{opacity:.35;transition:opacity .15s}.msg:hover .avatar.ghosted{opacity:1}.grouptime{display:none}.notifitem{opacity:1}.notifitem.read{opacity:.55}.notifitem.read .ntitle{font-weight:400}.nreadbtn{font-size:var(--text-xs);flex-shrink:0;width:auto;padding:0 6px}.flash-target{outline:2px solid var(--acc);border-radius:var(--radius-lg);transition:outline-color .6s}.msg.flash-target{background:color-mix(in srgb, var(--acc) 12%, transparent)}.agent-item .ghost{opacity:.55}.ghosttag{font-size:var(--text-xs);flex-shrink:0}.filetoggle{text-align:center;flex-shrink:0;width:26px;padding:0}h3 .filetoggle{margin-left:0}.notifbadge{font-size:var(--text-xs);color:var(--acc);background:var(--bg-light);border-radius:var(--radius-pill);white-space:nowrap;flex-shrink:0;margin-left:auto;padding:1px 6px}.agent-item.sel .notifbadge{background:var(--bg-darkest)}input[type=checkbox]{background-color:var(--bg-darkest);border:1px solid var(--line-strong);border-radius:var(--radius-sm)}input[type=number]{appearance:textfield}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.modal>button,.modal button:not(.iconbtn):not([class]){background:var(--bg-light);color:var(--fg);border:1px solid var(--dim);border-radius:var(--radius-md);font:inherit;cursor:pointer;padding:6px 10px}.modal>button:hover,.modal button:not(.iconbtn):not([class]):hover{background:var(--bg-mid);border-color:var(--acc)}.modal>button:focus-visible,.modal button:not(.iconbtn):not([class]):focus-visible{outline:2px solid var(--acc);outline-offset:1px}.todopane,.todopane-edit{box-sizing:border-box;border-radius:var(--radius-md);background:var(--bg-darkest);width:100%;height:11.5em;min-height:7em;max-height:40vh;color:var(--fg);font-size:var(--text-sm);resize:vertical;border:none;padding:6px 8px;line-height:1.45;display:block;overflow-y:auto}.todopane-edit{font-family:ui-monospace,Menlo,monospace}html[data-bg-image=on]{--bg-darkest:color-mix(in srgb, var(--bg-darkest-solid,#1a1c22) calc(var(--surface-alpha,.82) * 100%), transparent);--bg-dark:color-mix(in srgb, var(--bg-dark-solid,#232630) calc(var(--surface-alpha,.82) * 100%), transparent);--bg-mid:color-mix(in srgb, var(--bg-mid-solid,#2b2e39) calc(var(--surface-alpha,.82) * 100%), transparent);--bg-light:color-mix(in srgb, var(--bg-light-solid,#343845) calc(var(--surface-alpha,.82) * 100%), transparent)}html[data-bg-image=on] .embed,html[data-bg-image=on] .content pre,html[data-bg-image=on] .content code,html[data-bg-image=on] .content thead,html[data-bg-image=on] .content th,html[data-bg-image=on] .card,html[data-bg-image=on] .mcpresult{background-image:none}html[data-bg-image=on] .content pre code{background:0 0;padding:0}html[data-bg-image=on] .bgpreview{background-color:var(--bg-darkest-solid,var(--bg-darkest))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}
|