@alexpeng/dsh-custom-plugin 0.9.3 → 0.10.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +1687 -866
  2. package/NOTICE +71 -0
  3. package/README.i18n.yaml +7 -7
  4. package/README.md +344 -335
  5. package/README.zh.md +309 -302
  6. package/lib/client.js +9458 -2063
  7. package/lib/client.js.map +1 -1
  8. package/lib/index.js +233 -99
  9. package/lib/types/balance.d.ts +44 -0
  10. package/lib/types/client/api.d.ts +13 -8
  11. package/lib/types/client/bg-ascii.d.ts +397 -0
  12. package/lib/types/client/bg-field.d.ts +60 -0
  13. package/lib/types/client/bg-focus.d.ts +63 -0
  14. package/lib/types/client/bg-layer.d.ts +152 -0
  15. package/lib/types/client/bg-ocean.d.ts +31 -0
  16. package/lib/types/client/bg-params.d.ts +142 -0
  17. package/lib/types/client/bg-pointer.d.ts +107 -0
  18. package/lib/types/client/bg-shader.d.ts +329 -0
  19. package/lib/types/client/bg-wake.d.ts +57 -0
  20. package/lib/types/client/custom.d.ts +4 -1
  21. package/lib/types/client/index.d.ts +1 -1
  22. package/lib/types/client/palette.d.ts +100 -0
  23. package/lib/types/client/panel-bounds.d.ts +65 -0
  24. package/lib/types/client/styles.d.ts +9 -4
  25. package/lib/types/client/ui/anchor.d.ts +55 -0
  26. package/lib/types/client/ui/appearance-controls.d.ts +24 -0
  27. package/lib/types/client/ui/command-model.d.ts +28 -0
  28. package/lib/types/client/ui/folders-model.d.ts +31 -0
  29. package/lib/types/client/ui/index-bridge.d.ts +6 -0
  30. package/lib/types/client/ui/overlays.d.ts +66 -0
  31. package/lib/types/client/ui/primitives.d.ts +93 -0
  32. package/lib/types/client/ui/prompt-model.d.ts +37 -0
  33. package/lib/types/host-service.d.ts +68 -15
  34. package/lib/types/pricing.d.ts +8 -4
  35. package/lib/types/protocol.d.ts +48 -2
  36. package/lib/types/usage.d.ts +8 -4
  37. package/locale/en.json +1 -1
  38. package/locale/zh.json +1 -1
  39. package/package.json +106 -105
@@ -63,7 +63,10 @@ export interface OverlayProps {
63
63
  useSessions: SnapshotSelectorHook<SessionListLike>;
64
64
  useWorkspaces: SnapshotSelectorHook<WorkspaceListLike>;
65
65
  }
66
- export interface QuoteDockProps extends SessionScopedProps {
66
+ /** Bridges the host's input actions into `insertDraft` so prompts and the
67
+ * command palette can write into the composer. Quote selection lives in DSH
68
+ * itself now, so this no longer owns a selection popup. */
69
+ export interface InputBridgeProps extends SessionScopedProps {
67
70
  input: InputStateLike;
68
71
  inputActions: InputActionsLike;
69
72
  }
@@ -2,7 +2,7 @@
2
2
  * Browser-half entry for dsh-custom-plugin.
3
3
  *
4
4
  * Mounts the Custom UI surfaces (overlay, timeline, folders, prompts,
5
- * balance, quote reply) through eight injections into seven official slots.
5
+ * balance) through eight injections into seven official slots.
6
6
  * The slots ledger is
7
7
  * the only coupling point: the declarations are provided by the web shell
8
8
  * itself, so this plugin needs no family-side integration to work. All
@@ -25,6 +25,59 @@ export declare function hexToRgb(hex: string): [number, number, number];
25
25
  * Invalid input degrades to a neutral gray at the same lightness.
26
26
  */
27
27
  export declare function toDarkRamp(hex: string, lightness: number): string;
28
+ /**
29
+ * Character ink for the ASCII backdrop: the surface keeps its hue, saturation
30
+ * is compressed the same way the dark ramp compresses it, and lightness moves
31
+ * by a fixed per-theme delta (up on dark surfaces, down on light ones), scaled
32
+ * by the caller (`inkScale`: one value per piece plus the user's strength
33
+ * choice). The target is "clearly on screen but not competing with body text",
34
+ * not WCAG text contrast.
35
+ *
36
+ * The two deltas are calibrated independently, from the composited page rather
37
+ * than the raw canvas, and on 2026-11-08 the light side was re-taken because
38
+ * the previous target was wrong: −0.31 measured 0.15% mean ink mass / 2.99%
39
+ * peak — but through the shell's stacked surfaces (≈10% transmission, see
40
+ * `BACKDROP_ALPHA_*`) and onto the `+` / `*` half of the ramp, whose glyphs
41
+ * cover 5.5% / 4.4% of a cell. The numbers described a picture the user
42
+ * correctly called "根本看不出来". −0.7 lands the ink at 179 luma under the
43
+ * surface (ink luma 55 on 234.8), and with the backdrop alphas and
44
+ * `FLOW_LEVEL_FLOOR` the on/off A/B is now an unmistakable character field in
45
+ * the margins and a faint texture behind the reading column.
46
+ *
47
+ * On the dark canvas (#1c1e21, 29.8 luma) the same *relative* step is
48
+ * perceptually much stronger, and the eye is also less sensitive at low
49
+ * luminance: the DeVries-Rose law puts the threshold contrast at roughly
50
+ * sqrt(234.8 / 29.8) ≈ 2.8× the light one, so a dark patch needs ~2.5–2.8× the
51
+ * light relative modulation to feel equal — not the same number. +0.38
52
+ * delivered 6.7× (9.37% Michelson) and read as the loudest thing on screen;
53
+ * +0.15 measures 2.1–2.7× on mean ink mass across all eight pieces (0.34% dark
54
+ * vs 0.15% light for `flow`; 8.17% vs 2.99% peak), i.e. inside that band.
55
+ * Going lower misses it: +0.10 only reaches 1.4×. Equalising the raw Michelson
56
+ * instead would need a ~1-luma step on dark, which is invisible.
57
+ */
58
+ export declare function inkFor(surfaceHex: string, dark: boolean, scale?: number): string;
59
+ /** Lower bound of the ink-strength multiplier. */
60
+ export declare const INK_SCALE_MIN = 0.4;
61
+ /** Upper bound of the ink-strength multiplier. */
62
+ export declare const INK_SCALE_MAX = 2.2;
63
+ /** Clamp an ink-strength multiplier; missing/non-finite means 1 (the
64
+ * calibrated per-theme delta). */
65
+ export declare function inkScaleFor(value: number | undefined): number;
66
+ /** Ink lightness drop from a light surface. Re-calibrated 2026-11-08 on the
67
+ * live Desktop host after the 1%-Michelson target was rejected by the user as
68
+ * "根本看不出来": the old −0.31 measured its numbers through the shell's ≈10%
69
+ * transmission window and on the light half of the ramp, which is "texture
70
+ * exists", not "texture is seen". −0.7 puts the ink at 179 luma under the
71
+ * surface; the live A/B target (关闭 vs 开启 一眼能分出来) is met together with
72
+ * the backdrop token alphas and `FLOW_LEVEL_FLOOR`. See {@link inkFor}. */
73
+ export declare const LIGHT_INK_DELTA = -0.7;
74
+ /** Ink lightness lift from a dark surface. Smaller in magnitude than the
75
+ * light drop on purpose: the DeVries-Rose threshold contrast at 29.8 luma is
76
+ * ~2.8× the light one, so dark needs a bigger *relative* step but a smaller
77
+ * absolute one. +0.15 measures 0.34% mean ink mass / 8.17% peak, i.e. 2.1–2.7×
78
+ * the light figure across pieces; the old +0.38 measured 6.7× and glared.
79
+ * See {@link inkFor}. */
80
+ export declare const DARK_INK_DELTA = 0.15;
28
81
  /** Body-canvas lightness for the dark variant of a palette family. */
29
82
  export declare const DARK_CANVAS_LIGHTNESS = 0.12;
30
83
  /** How much of a family's HSL saturation survives on the dark ramp. 0.55
@@ -32,3 +85,50 @@ export declare const DARK_CANVAS_LIGHTNESS = 0.12;
32
85
  * (gold / rose / peach) down from "eye-catching" to "ambient" on the dark
33
86
  * canvas; 0.4 turned them into mud, 0.7 still glared. */
34
87
  export declare const DARK_SATURATION_SCALE = 0.55;
88
+ /**
89
+ * Surface alpha of each shell background token while a backdrop renderer is
90
+ * mounted. The "veil" that makes the layer reachable at all.
91
+ *
92
+ * The layer is geometrically behind every content surface, so what the eye
93
+ * sees of it is the product of each stacked surface's *complement* alpha.
94
+ * Measured 2026-11-08 on the live Desktop host (1280×822 CSS, dpr 1.5,
95
+ * 天青灰 + glass): the reading column stacks three translucent surfaces
96
+ * (`--dsw-alias-bg-base` twice, `--dsw-alias-bg-layer-1` once) at the shell's
97
+ * glass values 0.5 / 0.5 / 0.6, so only **10%** of the ink reaches the eye —
98
+ * an ink step of 162 raw luma composites to 16 luma, which is why every ΔL
99
+ * calibration from the previous round measured "texture exists" and the user
100
+ * still saw nothing. The sidebar multiplied out to 24% the same way.
101
+ *
102
+ * These three values lower the alphas of the *same* RGB, so the page hue does
103
+ * not move at all (the canvas tint equals the family colour): the reading
104
+ * column now transmits ≈ 0.41 and the sidebar ≈ 0.40, i.e. 4× the ink, and
105
+ * cards / dialogs / the composer keep their own untouched opaque fills so
106
+ * text-heavy surfaces never get texture behind them. Only the three tokens
107
+ * measured in the live stack are overridden (`-bg-layer-2` and `-bg-overlay`
108
+ * are left alone: they paint menus and overlays, and no measured content
109
+ * surface sits behind them). Do not raise these back toward the shell values
110
+ * to "restore the glass look" — that is exactly the 10%-transmission state the
111
+ * user rejected.
112
+ */
113
+ export declare const BACKDROP_ALPHA_BASE = 0.25;
114
+ /** `--dsw-alias-bg-layer-1` — the frame and the outer content shell. */
115
+ export declare const BACKDROP_ALPHA_LAYER1 = 0.27;
116
+ /** `--dsw-specific-sidebar-fill` — the sidebar column (tab colour, a notch
117
+ * denser than the base). */
118
+ export declare const BACKDROP_ALPHA_SIDEBAR = 0.27;
119
+ /**
120
+ * Identity of the theme-token override an appearance repaint would install.
121
+ *
122
+ * Re-registering the very same variables through the theme service is a costly
123
+ * no-op: it re-applies tokens for the whole shell even when the palette and the
124
+ * glass toggle did not move (which is what every slider tick does). The painter
125
+ * compares this key and skips the registration when it has not changed.
126
+ *
127
+ * `'none'` means the painter leaves the shell's own tokens alone; `'neutral'`
128
+ * is the glass-only override; `'backdrop'` is the low-alpha override a mounted
129
+ * renderer needs (no palette); `palette:<name>|glass:<0|1>|backdrop:<0|1>` is a
130
+ * family override (glass changes the alpha form of the same values, and a
131
+ * mounted renderer replaces them with the backdrop alphas, so all three
132
+ * dimensions are part of the key).
133
+ */
134
+ export declare function appearanceTokenKey(bg: string | undefined, glass: boolean, backdrop?: boolean): string;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Panel placement for the floating personalize panel.
3
+ *
4
+ * The panel is a non-modal popover over a live page: it must never cover the
5
+ * bottom input dock (the composer grows with the draft and moves between the
6
+ * hero and session layouts), must stay inside the viewport, and must keep the
7
+ * spot the user dragged it to unless that spot breaks either rule. All of that
8
+ * is geometry only, so it lives here as pure functions and is pinned by
9
+ * `tests/panel-bounds.spec.ts`; the DOM measurement stays in `custom.tsx`.
10
+ * @module @alexpeng/dsh-custom-plugin/client/panel-bounds
11
+ */
12
+ /** Kept between the panel's bottom edge and the composer's top edge. */
13
+ export declare const COMPOSER_CLEARANCE = 10;
14
+ export interface PanelSize {
15
+ readonly w: number;
16
+ readonly h: number;
17
+ }
18
+ /** Anything with an axis-aligned border box (a `DOMRect` satisfies this). */
19
+ export interface PanelBox {
20
+ readonly top: number;
21
+ readonly bottom: number;
22
+ readonly width: number;
23
+ readonly height: number;
24
+ }
25
+ export interface PanelFrameInput {
26
+ readonly viewport: PanelSize;
27
+ /** Where the panel sits when it has never been dragged. */
28
+ readonly preferred: {
29
+ readonly right: number;
30
+ readonly top: number;
31
+ };
32
+ readonly width: number;
33
+ readonly maxHeight: number;
34
+ /** Shortest usable panel: below this the body is unreadable, so the frame
35
+ * moves up instead of shrinking further. */
36
+ readonly minHeight: number;
37
+ readonly margin: number;
38
+ /** Viewport y of the protected strip (composer top minus clearance), or
39
+ * null when the page has no composer to avoid. */
40
+ readonly safeBottom: number | null;
41
+ /** Resting place from a previous drag, or null for the default anchor. */
42
+ readonly pos: {
43
+ readonly x: number;
44
+ readonly y: number;
45
+ } | null;
46
+ }
47
+ export interface PanelFrame {
48
+ readonly left: number;
49
+ readonly top: number;
50
+ readonly width: number;
51
+ readonly height: number;
52
+ }
53
+ /**
54
+ * Place the panel: clamp the width into the viewport, raise the bottom limit
55
+ * above the composer, shorten from the bottom (never from the top, which
56
+ * carries the drag handle), and clamp a dragged position on both axes.
57
+ */
58
+ export declare function panelFrame(input: PanelFrameInput): PanelFrame;
59
+ /**
60
+ * Pick the composer's top edge from the editable text boxes on the page: the
61
+ * composer is the lowest editable box with usable area. Returns null when the
62
+ * page shows none (a dialog-only screen), which leaves the panel on the
63
+ * viewport-height fallback.
64
+ */
65
+ export declare function pickComposerTop(boxes: readonly PanelBox[], viewport: PanelSize, minWidth?: number, minHeight?: number): number | null;
@@ -1,7 +1,12 @@
1
1
  /**
2
- * Static styles for the Custom suite, injected as one owned <style> tag at
3
- * install time (removed by the disposer). Global class names are prefixed
4
- * vx- and must not be scoped by CSS Modules.
2
+ * Static styles for the Custom suite, aligned with the host's design tokens.
3
+ *
4
+ * Injected as one owned <style> tag at install time (removed by the disposer).
5
+ * Every colour, radius, shadow, font and motion value resolves from the host's
6
+ * `--dsw-*` / `--ds-*` tokens, with the shipped fallbacks kept only so the
7
+ * first paint before the theme sheet loads still reads. Class names are global
8
+ * and prefixed `vx-`; they mount into product slots and overlays and must not
9
+ * be CSS-Module scoped.
5
10
  * @module @alexpeng/dsh-custom-plugin/client/styles
6
11
  */
7
- export declare const STATIC_CSS = "/* dsh-custom-plugin static styles. Every rule is global by design: the UI\n * mounts into product slots and overlays, so class names are prefixed vx-\n * and must not be scoped by CSS Modules. Dynamic rules (body background,\n * global-glass blur) are managed at runtime by a style\n * element in custom.tsx and do not live here. */\n.vx-root {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483000;\n font-family: ui-sans-serif, system-ui, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;\n }\n .vx-fx {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n .vx-anchor {\n display: inline-block;\n width: 0;\n height: 1px;\n vertical-align: bottom;\n }\n .vx-turn-actions {\n display: inline-flex;\n gap: 4px;\n margin-left: 10px;\n vertical-align: middle;\n align-items: center;\n }\n .vx-chip {\n pointer-events: auto;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 8px;\n padding: 2px 8px;\n font-size: 11px;\n cursor: pointer;\n backdrop-filter: blur(6px);\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n gap: 3px;\n }\n .vx-chip:hover {\n background: rgba(255, 255, 255, .28);\n }\n .vx-link {\n text-decoration: none;\n }\n .vx-glass {\n border-radius: 16px;\n background: rgba(255, 255, 255, .64);\n -webkit-backdrop-filter: blur(9px) saturate(1.22);\n backdrop-filter: blur(9px) saturate(1.22);\n box-shadow: 0 0 1px 1px rgba(17, 17, 26, .07) inset, 0 1px 2px rgba(17, 17, 26, .05) inset, 0px 4px 16px rgba(17, 17, 26, .05), 0px 8px 24px rgba(17, 17, 26, .05), 0px 16px 56px rgba(17, 17, 26, .05);\n }\n @media (prefers-color-scheme: dark) {\n .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n }\n /* The GUI theme can disagree with the OS scheme (dsh selects light/dark\n independently \u2014 dark GUI on a light OS left these surfaces frosted\n light), so the frost fills and panel text colors key on the mirrored\n root classes, not the OS alone. The media queries above remain the\n pre-boot fallback, before the client has applied the classes; the liquid\n rules below out-rank these by specificity, not by order. */\n :root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .64);\n color: inherit;\n }\n :root.vx-dark .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n :root.vx-light .vx-panel,\n :root.vx-light .vx-modal,\n :root.vx-light .vx-folders {\n color: #20242e;\n }\n :root.vx-dark .vx-panel,\n :root.vx-dark .vx-modal,\n :root.vx-dark .vx-folders {\n color: #e8ebf2;\n }\n :root.vx-light .vx-balance-hover {\n color: #20242e;\n }\n :root.vx-dark .vx-balance-hover {\n color: #e8ebf2;\n }\n /* Liquid glass: the SVG displacement filter bends the backdrop at the\n surface's edges; the chained blur+saturate keeps text over the middle of\n large panels readable (pure displacement leaves the mid-area untouched,\n which read as \"nothing happened\"). Chromium runs this chain; engines\n without SVG-referencing backdrop filters fall back to frost below. */\n .vx-liquid .vx-glass {\n background: rgba(255, 255, 255, .1);\n backdrop-filter: url(#vx-lg) blur(2.5px) saturate(1.12);\n -webkit-backdrop-filter: url(#vx-lg) blur(2.5px) saturate(1.12);\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n }\n /* The GUI theme classes are mirrored onto <html> by the client, so the\n liquid fill has to out-rank the theme frost fills *inside* .vx-root as\n well. The previous \".vx-root.* .vx-liquid .vx-glass\" rules never matched\n anything \u2014 vx-liquid lives on <html>, an ANCESTOR of .vx-root, not a\n descendant \u2014 which left the big panels at the 64% frost fill while the\n balance hover (mounted outside .vx-root) sat at 10%: the \"panel is not\n liquid, the balance card is\" report, verbatim. */\n :root.vx-liquid.vx-dark .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n :root.vx-liquid.vx-light .vx-glass {\n background: rgba(255, 255, 255, .1);\n }\n :root.vx-liquid .vx-root.vx-dark .vx-glass {\n background: rgba(0, 0, 0, .1);\n }\n :root.vx-liquid .vx-root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .1);\n }\n @supports not (backdrop-filter: url(#vx-lg)) {\n .vx-liquid .vx-glass {\n background: rgba(255, 255, 255, .64);\n backdrop-filter: blur(9px) saturate(1.22);\n -webkit-backdrop-filter: blur(9px) saturate(1.22);\n }\n @media (prefers-color-scheme: dark) {\n .vx-liquid .vx-glass {\n background: rgba(13, 17, 25, .62);\n }\n }\n }\n .vx-balance-wrap {\n display: inline-flex;\n align-items: center;\n position: relative;\n }\n .vx-balance-text {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 8px;\n font-size: 12.5px;\n color: inherit;\n background: rgba(127, 164, 224, .16);\n border: 1px solid rgba(127, 164, 224, .4);\n cursor: default;\n white-space: nowrap;\n }\n .vx-balance-text:hover {\n background: rgba(127, 164, 224, .28);\n }\n .vx-balance-text.vx-balance-open {\n background: rgba(127, 164, 224, .36);\n border-color: rgba(127, 164, 224, .8);\n }\n .vx-balance-today {\n opacity: .75;\n font-size: 11.5px;\n }\n .vx-balance-hover {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n z-index: 70;\n width: 360px;\n max-height: 480px;\n overflow: auto;\n padding: 12px;\n color: #20242e;\n font-size: 12px;\n pointer-events: auto;\n }\n @media (prefers-color-scheme: dark) {\n .vx-balance-hover {\n color: #e8ebf2;\n }\n }\n .vx-balance-lines {\n font-size: 13px;\n margin: 6px 0;\n }\n .vx-header-btn {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n border-radius: 8px;\n font-size: 12.5px;\n color: inherit;\n background: rgba(127, 164, 224, .16);\n border: 1px solid rgba(127, 164, 224, .4);\n cursor: pointer;\n white-space: nowrap;\n }\n .vx-header-btn:hover {\n background: rgba(127, 164, 224, .3);\n }\n .vx-quote-btn {\n position: absolute;\n transform: translate(-50%, -100%);\n pointer-events: auto;\n background: rgba(40, 48, 64, .96);\n color: #eef1f7;\n border: 1px solid rgba(255, 255, 255, .25);\n padding: 5px 12px;\n border-radius: 9px;\n font-size: 12px;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .28);\n display: inline-flex;\n align-items: center;\n gap: 5px;\n }\n .vx-panel {\n position: absolute;\n width: 430px;\n max-width: calc(100vw - 40px);\n height: min(660px, calc(100vh - 110px));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n }\n @media (prefers-color-scheme: dark) {\n .vx-panel, .vx-modal, .vx-folders {\n color: #e8ebf2;\n }\n }\n .vx-panel-head {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 14px;\n cursor: move;\n user-select: none;\n border-bottom: 1px solid rgba(150, 160, 180, .25);\n position: relative;\n z-index: 1;\n }\n .vx-panel-title {\n font-weight: 600;\n font-size: 13px;\n }\n .vx-panel-sub {\n font-size: 11px;\n opacity: .62;\n white-space: nowrap;\n }\n .vx-tabs {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: 8px 10px 4px;\n border-bottom: 1px solid rgba(150, 160, 180, .2);\n position: relative;\n z-index: 1;\n }\n .vx-tab {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .75;\n font-size: 12px;\n padding: 5px 9px;\n border-radius: 8px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n .vx-tab.on {\n opacity: 1;\n background: rgba(255, 255, 255, .28);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);\n }\n .vx-panel-body {\n flex: 1;\n overflow: auto;\n padding: 12px 14px;\n position: relative;\n z-index: 1;\n }\n .vx-col {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .vx-row {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .vx-row.wrap {\n flex-wrap: wrap;\n }\n .vx-flex1 {\n flex: 1;\n }\n .vx-section-title {\n font-weight: 600;\n font-size: 12.5px;\n margin-top: 4px;\n opacity: .9;\n }\n .vx-swatches {\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n gap: 6px;\n }\n .vx-swatch {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 3px;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 0;\n }\n .vx-swatch-box {\n width: 34px;\n height: 26px;\n border-radius: 8px;\n border: 2px solid rgba(120, 130, 150, .4);\n box-sizing: border-box;\n }\n .vx-swatch.on .vx-swatch-box {\n border-color: #7fa4e0;\n box-shadow: 0 0 0 2px rgba(127, 164, 224, .35);\n }\n .vx-swatch-label {\n font-size: 10px;\n opacity: .85;\n }\n .vx-btn {\n pointer-events: auto;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 9px;\n padding: 6px 12px;\n font-size: 12px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n }\n .vx-btn:hover {\n background: rgba(255, 255, 255, .28);\n }\n .vx-btn.on {\n background: rgba(127, 164, 224, .35);\n border-color: rgba(127, 164, 224, .8);\n }\n .vx-btn:disabled {\n opacity: .5;\n cursor: default;\n }\n .vx-btn-sm {\n padding: 2px 8px;\n font-size: 11px;\n }\n .vx-btn-danger {\n background: rgba(214, 88, 88, .22);\n border-color: rgba(214, 88, 88, .55);\n }\n .vx-btn.big {\n padding: 10px 16px;\n font-size: 13px;\n }\n .vx-input {\n flex: 1;\n min-width: 0;\n border: 1px solid rgba(128, 140, 160, .4);\n background: rgba(255, 255, 255, .16);\n color: inherit;\n border-radius: 9px;\n padding: 6px 10px;\n font-size: 12px;\n }\n .vx-toggle-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 12.5px;\n }\n .vx-muted {\n color: rgba(120, 128, 148, .95);\n font-size: 11.5px;\n }\n .vx-error {\n color: #d85858;\n font-size: 12px;\n }\n .vx-pad {\n padding: 12px;\n }\n .vx-pad-sm {\n padding: 6px 2px;\n }\n .vx-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 300px;\n overflow: auto;\n }\n .vx-list-item {\n text-align: left;\n border: none;\n background: rgba(255, 255, 255, .1);\n color: inherit;\n border-radius: 8px;\n padding: 6px 10px;\n font-size: 12px;\n cursor: pointer;\n }\n .vx-list-item:hover {\n background: rgba(255, 255, 255, .22);\n }\n .vx-list-item.on {\n background: rgba(127, 164, 224, .28);\n box-shadow: inset 0 0 0 1px rgba(127, 164, 224, .45);\n }\n .vx-list-item:disabled {\n opacity: .55;\n cursor: not-allowed;\n }\n .vx-check-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 12.5px;\n padding: 4px 2px;\n }\n .vx-check-title {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .vx-badge {\n background: rgba(127, 164, 224, .3);\n border-radius: 8px;\n padding: 0 6px;\n font-size: 10px;\n }\n .vx-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 11.5px;\n }\n .vx-table th, .vx-table td {\n border: 1px solid rgba(128, 140, 160, .3);\n padding: 4px 6px;\n text-align: right;\n }\n .vx-table th:first-child, .vx-table td:first-child {\n text-align: left;\n }\n .vx-folder {\n display: flex;\n flex-direction: column;\n }\n .vx-folder-head {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 5px 4px;\n border-radius: 9px;\n cursor: grab;\n }\n .vx-folder-head:hover {\n background: rgba(255, 255, 255, .14);\n }\n .vx-folder-head.drop-inside {\n background: rgba(127, 164, 224, .3);\n outline: 1px dashed rgba(127, 164, 224, .8);\n }\n .vx-folder-head.drop-before {\n box-shadow: 0 -2px 0 0 rgba(127, 164, 224, .9);\n }\n .vx-folder-head.drop-after {\n box-shadow: 0 2px 0 0 rgba(127, 164, 224, .9);\n }\n .vx-folder-name {\n font-size: 12.5px;\n font-weight: 600;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .vx-folder-body {\n border-left: 1px dashed rgba(128, 140, 160, .35);\n margin-left: 14px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n .vx-item-row {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 3px 4px;\n border-radius: 8px;\n }\n .vx-item-row:hover {\n background: rgba(255, 255, 255, .12);\n }\n .vx-item-name {\n flex: 1;\n text-align: left;\n border: none;\n background: transparent;\n color: inherit;\n font-size: 12px;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0;\n }\n .vx-mini {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .75;\n cursor: pointer;\n padding: 2px;\n border-radius: 6px;\n display: inline-flex;\n align-items: center;\n }\n .vx-mini:hover {\n opacity: 1;\n background: rgba(255, 255, 255, .2);\n }\n .vx-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n border: 1px dashed rgba(128, 140, 160, .4);\n border-radius: 10px;\n padding: 8px;\n }\n .vx-prompt-card {\n border: 1px solid rgba(128, 140, 160, .3);\n background: rgba(255, 255, 255, .1);\n border-radius: 10px;\n padding: 8px 10px;\n }\n .vx-prompt-title {\n font-weight: 600;\n font-size: 12.5px;\n }\n .vx-prompt-body {\n margin-top: 4px;\n font-size: 11.5px;\n opacity: .85;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 72px;\n overflow: hidden;\n }\n .vx-modal-mask {\n position: absolute;\n inset: 0;\n pointer-events: auto;\n background: rgba(8, 10, 16, .4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 60;\n }\n .vx-modal {\n position: relative;\n width: min(760px, 92vw);\n max-height: 82vh;\n overflow: auto;\n padding: 16px;\n color: #20242e;\n pointer-events: auto;\n }\n .vx-pop-head {\n display: flex;\n gap: 8px;\n align-items: center;\n margin-bottom: 8px;\n font-weight: 600;\n font-size: 13px;\n }\n .vx-svgbox {\n overflow: auto;\n background: rgba(12, 14, 20, .6);\n border-radius: 12px;\n padding: 14px;\n }\n .vx-svgbox svg {\n max-width: 100%;\n height: auto;\n }\n .vx-pre {\n white-space: pre-wrap;\n word-break: break-all;\n font-size: 10.5px;\n opacity: .85;\n }\n .vx-toasts {\n position: absolute;\n left: 50%;\n bottom: 26px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n pointer-events: auto;\n z-index: 80;\n }\n .vx-toast {\n display: flex;\n gap: 10px;\n align-items: center;\n color: #f2f4f8;\n background: rgba(26, 32, 44, .92);\n border: 1px solid rgba(255, 255, 255, .12);\n padding: 8px 14px;\n border-radius: 12px;\n font-size: 12.5px;\n box-shadow: 0 10px 30px rgba(0, 0, 0, .3);\n max-width: 560px;\n backdrop-filter: blur(9px);\n -webkit-backdrop-filter: blur(9px);\n }\n @media (prefers-color-scheme: dark) {\n .vx-toast {\n background: rgba(18, 22, 30, .94);\n }\n }\n .vx-foot-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n border: 1px solid rgba(127, 164, 224, .4);\n background: rgba(127, 164, 224, .14);\n color: inherit;\n cursor: pointer;\n padding: 4px 10px;\n border-radius: 10px;\n margin: 2px;\n }\n .vx-foot-btn:hover {\n background: rgba(127, 164, 224, .3);\n }\n .vx-foot-label {\n font-size: 12px;\n }\n .vx-folders {\n position: fixed;\n left: 12px;\n bottom: 60px;\n width: 272px;\n max-height: min(560px, calc(100vh - 220px));\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n z-index: 55;\n }\n /* \u5934\u90E8\u884C\uFF08\u56FE\u6807 + \u6807\u9898 + \u6309\u94AE\uFF09\u4E0B\u79FB\u5E76\u62C9\u5F00\u4E0E\u5BB9\u5668\u8FB9\u7F18\u7684\u95F4\u8DDD */\n .vx-folders .vx-pop-head {\n padding: 14px 14px 0;\n }\n .vx-folders-body {\n flex: 1;\n overflow: auto;\n padding: 4px 14px 12px;\n position: relative;\n z-index: 1;\n }\n .vx-prompt-pop {\n position: fixed;\n width: 320px;\n max-height: 420px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n color: #20242e;\n z-index: 65;\n padding: 10px 12px;\n }\n .vx-settings-page {\n display: flex;\n flex-direction: column;\n gap: 14px;\n max-width: 720px;\n }\n .vx-mmd-wrap {\n position: relative;\n margin: 6px 0;\n border: 1px solid rgba(127, 164, 224, .35);\n border-radius: 12px;\n overflow: hidden;\n background: rgba(127, 164, 224, .05);\n }\n .vx-mmd-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 6px;\n border-bottom: 1px solid rgba(127, 164, 224, .25);\n background: rgba(127, 164, 224, .08);\n }\n .vx-mmd-btn {\n border: none;\n background: transparent;\n color: inherit;\n opacity: .65;\n font-size: 12px;\n padding: 3px 10px;\n border-radius: 8px;\n cursor: pointer;\n }\n .vx-mmd-btn:hover {\n opacity: 1;\n background: rgba(127, 164, 224, .18);\n }\n .vx-mmd-btn.active {\n opacity: 1;\n background: rgba(127, 164, 224, .28);\n font-weight: 600;\n }\n .vx-mmd-live {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n color: inherit;\n text-decoration: none;\n padding: 3px 8px;\n }\n .vx-mmd-live:hover {\n opacity: 1;\n }\n .vx-mmd-stage {\n padding: 16px 12px;\n overflow-x: auto;\n text-align: center;\n }\n .vx-mmd-stage svg {\n max-width: 100%;\n height: auto;\n }\n\n /* DSH can select a theme independently of the operating system. The root\n classes are applied from the resolved GUI theme and intentionally win\n over the media-query fallback above. */\n .vx-root.vx-dark .vx-glass {\n background: rgba(13, 17, 25, .62);\n color: #eef1f7;\n }\n .vx-root.vx-dark .vx-balance-hover,\n .vx-root.vx-dark .vx-panel,\n .vx-root.vx-dark .vx-modal,\n .vx-root.vx-dark .vx-folders {\n color: #e8ebf2;\n }\n .vx-root.vx-dark .vx-toast {\n background: rgba(18, 22, 30, .94);\n }\n\n .vx-root.vx-light .vx-glass {\n background: rgba(255, 255, 255, .64);\n color: #20242e;\n }\n .vx-root.vx-light .vx-balance-hover,\n .vx-root.vx-light .vx-panel,\n .vx-root.vx-light .vx-modal,\n .vx-root.vx-light .vx-folders {\n color: #20242e;\n }\n .vx-root.vx-light .vx-toast {\n background: rgba(26, 32, 44, .92);\n }\n";
12
+ export declare const STATIC_CSS = "/* dsh-custom-plugin static styles: host-token design system. */\n/* Motion tokens live on the document root, not on .vx-root: the settings page\n and the dialogs/toasts it owns render outside our overlay layer, and an\n undefined custom property invalidates the whole animation shorthand there. */\n:root {\n --vx-ease: var(--ds-ease-in-out, cubic-bezier(.4, 0, .2, 1));\n --vx-ease-out: cubic-bezier(.16, 1, .3, 1);\n --vx-ease-in: cubic-bezier(.4, 0, 1, 1);\n --vx-dur-open: var(--ds-transition-duration, .2s);\n --vx-dur-pop: .18s;\n --vx-dur-close: .15s;\n --vx-dur-dialog: .22s;\n}\n.vx-root {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483000;\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n -webkit-font-smoothing: antialiased;\n}\n\n@keyframes vx-pop-in {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)) scale(.985); }\n}\n@keyframes vx-pop-in-liquid {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out-liquid {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)); }\n}\n@keyframes vx-fade-in { from { opacity: 0; } to { opacity: 1; } }\n@keyframes vx-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes vx-dialog-in {\n from { opacity: 0; transform: translateY(10px) scale(.975); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-dialog-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(4px) scale(.985); }\n}\n@keyframes vx-toast-in {\n from { opacity: 0; transform: translateY(10px) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-toast-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(6px) scale(.98); }\n}\n@keyframes vx-section-in {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-rotate { to { transform: rotate(360deg); } }\n\n/* Page background layer. Appended to <body>, never inside .vx-root: the\n overlay slot is nested in the shell's z-index:20 layer, where a negative\n z-index would still sit above the content it must stay behind. */\n.vx-bg {\n position: fixed;\n inset: 0;\n pointer-events: none;\n background: transparent;\n z-index: -1;\n}\n.vx-bg > canvas {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: block;\n}\n.vx-fx {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.vx-anchor {\n display: inline-block;\n width: 0;\n height: 1px;\n vertical-align: bottom;\n}\n.vx-turn-actions {\n display: inline-flex;\n gap: 4px;\n margin-left: 10px;\n vertical-align: middle;\n align-items: center;\n}\n\n/* ---------- material system ---------- */\n/* Frost: an evenly diffused milk pane. It is deliberately opaque \u2014 no clear\n body and no edge lensing \u2014 so it can never be mistaken for liquid glass. */\n.vx-glass,\n.vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .9), rgba(244, 246, 250, .84));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 16px 40px rgba(15, 23, 42, .1);\n border-radius: var(--dsw-radius-lg, 16px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n:root.vx-dark .vx-glass,\n:root.vx-dark .vx-popover {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 16px 40px rgba(0, 0, 0, .36);\n}\n:root.vx-glass-off .vx-glass,\n:root.vx-glass-off .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n}\n/* Liquid: Apple-style clear glass. The body is colourless and clearly lighter\n than frost (82% -> 74% light, 70% -> 62% dark), so the app behind the floating\n window still reads through it. That window is its own compositor surface, so a\n real backdrop refraction is unavailable; the lens is carried by edge optics\n instead: a bright 1px specular rim, a soft top bevel, a darker bottom inner\n shade and a faint cyan/magenta dispersion in the rim. */\n.vx-liquid .vx-glass,\n.vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .86) 0%, rgba(242, 246, 250, .78) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 8px 14px -12px rgba(255, 255, 255, .9),\n inset 0 -10px 18px -14px rgba(22, 32, 52, .24),\n inset 0 0 0 1px rgba(255, 255, 255, .4),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 24px 56px rgba(15, 25, 45, .18);\n}\n:root.vx-dark .vx-liquid .vx-glass,\n:root.vx-dark .vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .7) 0%, rgba(20, 22, 27, .62) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .28),\n inset 0 8px 14px -12px rgba(255, 255, 255, .16),\n inset 0 -10px 18px -14px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .12),\n 0 0 0 .5px rgba(0, 0, 0, .4),\n 0 24px 56px rgba(0, 0, 0, .45);\n}\n/* The 1px rim carries most of the glass read in the floating window: a bright\n specular arc plus a barely-there dispersion fringe. */\n.vx-liquid .vx-popover::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .7) 0%,\n rgba(255, 255, 255, .92) 14%,\n rgba(255, 255, 255, .16) 34%,\n rgba(255, 255, 255, .55) 50%,\n rgba(255, 255, 255, .1) 68%,\n rgba(210, 255, 245, .3) 84%,\n rgba(255, 190, 235, .55) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-liquid .vx-popover::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .3) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .22) 100%);\n}\n/* A live background needs no special material: the clear body already transmits\n it. Only a two-point fill reduction keeps the texture from competing with the\n copy, and the edge optics stay untouched in every background mode. */\n:root.vx-bg-live:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live:not(.vx-glass-off) .vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .88), rgba(244, 246, 250, .82));\n -webkit-backdrop-filter: blur(24px) saturate(1.3);\n backdrop-filter: blur(24px) saturate(1.3);\n}\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .84) 0%, rgba(242, 246, 250, .76) 100%);\n}\n@supports not (backdrop-filter: url(#vx-lg)) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: rgba(251, 252, 255, .62);\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .9),\n 0 0 0 .5px rgba(0, 0, 0, .12),\n 0 18px 44px rgba(15, 25, 45, .16);\n }\n}\n@media (prefers-reduced-transparency: reduce) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n}\n\n/* ---------- chips, header and rail buttons ---------- */\n.vx-chip {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-secondary, #61666b);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 2px 8px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n line-height: var(--dsw-font-xxxs-11-line-height, 14px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 3px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-chip:hover {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-link { text-decoration: none; }\n.vx-header-btn,\n.vx-foot-btn,\n.vx-balance-text {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n min-height: 28px;\n border-radius: var(--dsw-radius-sm, 8px);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-secondary, #61666b);\n background: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-header-btn:hover,\n.vx-foot-btn:hover,\n.vx-balance-text:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n/* The session header row places the native agent-preset chip and our injected\n * buttons in one 10px-gap flex row. The chip right-insets its label by 2px\n * (padding: 0 2px 0 0), so the 10px padding above left a wider gap between\n * our two buttons than between the chip and the first of them. Match the\n * native inset so both gaps read as one rhythm. */\n.vx-header-btn { padding: 3px 2px; }\n.vx-header-btn[aria-expanded='true'],\n.vx-balance-text.vx-balance-open {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-balance-wrap { display: inline-flex; align-items: center; position: relative; }\n.vx-balance-today {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-balance-lines { font-size: var(--dsw-font-xs-13-font-size, 13px); margin: 6px 0; }\n\n/* ---------- buttons ---------- */\n.vx-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-height: 30px;\n padding: 0 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 1px solid transparent;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: 18px;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-button:disabled { opacity: .5; cursor: default; }\n.vx-button-sm { min-height: 26px; padding: 0 9px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-button-block { width: 100%; }\n.vx-button-primary {\n background: var(--dsw-alias-button-primary-fill, #1b1b1c);\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n.vx-button-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover, #2c2c2e); }\n.vx-button-secondary {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n border-color: var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-secondary:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-button-ghost {\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-button-ghost:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-button-danger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 20%, transparent);\n}\n.vx-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-icon-button:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-icon-button-sm { width: 24px; height: 24px; font-size: 14px; }\n\n/* Legacy text buttons kept for surfaces not yet migrated. */\n.vx-btn {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 11px;\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-btn:hover { background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)); }\n.vx-btn.on,\n.vx-btn[aria-pressed='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n border-color: var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-btn:disabled { opacity: .5; cursor: default; }\n.vx-btn-sm { padding: 2px 8px; font-size: var(--dsw-font-xxxs-11-font-size, 11px); }\n.vx-btn-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-btn.big { padding: 9px 15px; font-size: var(--dsw-font-xs-13-font-size, 13px); }\n\n/* ---------- inputs, fields, switches, segmented controls ---------- */\n.vx-input {\n flex: 1;\n min-width: 0;\n min-height: 30px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3, #fff));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 10px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n.vx-input::placeholder { color: var(--dsw-alias-label-caption, #adb2b8); }\n.vx-input:focus-visible { outline-color: var(--dsw-alias-state-business-primary, #4176e6); outline-width: var(--dsw-focus-ring-width, 2px); }\n.vx-field { display: flex; flex-direction: column; gap: 6px; }\n.vx-field-label { font-size: var(--dsw-font-xxs-strong-12-font-size, 12px); font-weight: 500; color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-field-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-field-error { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-switch-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }\n.vx-switch-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.vx-switch-label { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-primary, #1b1b1c); cursor: pointer; }\n.vx-switch-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-switch {\n position: relative;\n width: 36px;\n height: 20px;\n flex: 0 0 auto;\n border: none;\n border-radius: 999px;\n background: var(--dsw-alias-state-idle-primary, #d4d4d4);\n cursor: pointer;\n padding: 0;\n transition: background-color var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on { background: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-switch-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 999px;\n background: var(--dsw-alias-switch-thumb, #fff);\n transition: transform var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on .vx-switch-thumb { transform: translateX(16px); }\n.vx-switch-row.is-disabled { opacity: .5; }\n.vx-segmented { display: flex; flex-direction: column; gap: 6px; }\n.vx-segmented-track {\n display: inline-flex;\n align-self: flex-start;\n gap: 2px;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-segmented-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 26px;\n padding: 0 10px;\n border: none;\n border-radius: calc(var(--dsw-radius-sm, 8px) - 2px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-segmented-item.on {\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-shadow-lv1, 0 2px 4px rgba(0, 0, 0, .05));\n}\n.vx-toggle-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n\n/* ---------- layout ---------- */\n.vx-col { display: flex; flex-direction: column; gap: 10px; }\n.vx-row { display: flex; gap: 8px; align-items: center; }\n.vx-row.wrap { flex-wrap: wrap; }\n.vx-flex1 { flex: 1; }\n.vx-ellipsis {\n max-width: 60%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-section-title {\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n margin-top: 4px;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-muted {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n}\n.vx-note {\n border-left: 2px solid var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n padding: 4px 0 4px 9px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-error { color: var(--dsw-alias-state-error-primary, #ec1313); font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-pad { padding: 12px; }\n.vx-pad-sm { padding: 6px 2px; }\n.vx-badge {\n display: inline-flex;\n align-items: center;\n border-radius: 999px;\n padding: 0 7px;\n min-height: 18px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-badge-accent { background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 14%, transparent); color: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-badge-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-badge-success { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 14%, transparent); color: var(--dsw-alias-state-success-primary, #22c55e); }\n.vx-kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 4px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-family: var(--ds-font-family-code, monospace);\n font-size: 10px;\n}\n\n/* ---------- cards ---------- */\n.vx-card {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n border-radius: var(--dsw-radius-lg, 16px);\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n padding: 16px;\n}\n/* Settings sheet: one self-contained material plane, painted from neutral\n colours instead of the host's per-mode tokens, so switching \u80CC\u666F\u52A8\u6548 between\n \u5173\u95ED/\u5B57\u7B26/\u5149\u5F71 cannot turn it into flat white. Frost is a milky 94% sheet;\n liquid is the same clear Apple-style pane as the popovers (88% -> 80%) with\n the identical edge optics. Cards inside are transparent groups, not a second\n material layer. */\n.vx-settings-page.vx-glass-on {\n position: relative;\n width: 100%;\n max-width: 980px;\n box-sizing: border-box;\n padding: 16px;\n border-radius: 22px;\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(28px) saturate(1.3);\n backdrop-filter: blur(28px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .08);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .34);\n}\n.vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .66), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .9) 0%, rgba(242, 246, 250, .82) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .97),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 60px rgba(15, 25, 45, .2);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .76) 0%, rgba(20, 22, 27, .68) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 60px rgba(0, 0, 0, .46);\n}\n/* Same specular rim as the popovers and dialogs. */\n.vx-settings-page.vx-glass-on.vx-liquid::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .92) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n/* A live background may only nudge the transmission; the optics never move, so\n the sheet reads as the same material in all three background modes. */\n.vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(250, 251, 253, .92), rgba(244, 246, 250, .86));\n}\n.vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .88) 0%, rgba(242, 246, 250, .8) 100%);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .74) 0%, rgba(20, 22, 27, .66) 100%);\n}\n.vx-settings-page.vx-glass-off {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n/* Grouped content inside the sheet: transparent, separated by a hairline. */\n.vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .24);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .55),\n inset 0 0 0 .5px rgba(255, 255, 255, .35);\n}\n.vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .18);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .6),\n inset 0 0 0 .5px rgba(255, 255, 255, .3);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .06);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .12),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .05);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n.vx-settings-page.vx-glass-off .vx-card {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow: inset 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n.vx-card-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n.vx-card-titles { flex: 1; min-width: 0; }\n.vx-card-title {\n margin: 0;\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-card-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-card-actions { display: flex; align-items: center; gap: 6px; }\n.vx-card-body { display: flex; flex-direction: column; gap: 10px; }\n\n/* ---------- empty / loading ---------- */\n.vx-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 28px 16px;\n text-align: center;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-empty-icon { opacity: .6; }\n.vx-empty-title { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-empty-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); line-height: 18px; }\n.vx-empty-action { margin-top: 4px; }\n.vx-spinner { display: inline-flex; align-items: center; gap: 3px; }\n.vx-spinner-dot {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: var(--dsw-alias-label-tertiary, #979da6);\n animation: vx-spin 1s infinite ease-in-out;\n}\n.vx-spinner-dot:nth-child(2) { animation-delay: .15s; }\n.vx-spinner-dot:nth-child(3) { animation-delay: .3s; }\n@keyframes vx-spin {\n 0%, 80%, 100% { opacity: .3; transform: scale(.8); }\n 40% { opacity: 1; transform: scale(1); }\n}\n\n/* ---------- anchors / swatches / parameters ---------- */\n.vx-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }\n.vx-swatch {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-swatch:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-swatch-box {\n width: 100%;\n height: 26px;\n border-radius: var(--dsw-radius-sm, 8px);\n box-shadow: 0 0 0 1px var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n box-sizing: border-box;\n transition: box-shadow var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-swatch.on .vx-swatch-box {\n box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-swatch-label {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-param-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.vx-param-row { display: grid; grid-template-columns: 52px 1fr 54px; gap: 8px; align-items: center; }\n.vx-param-label { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-param-val {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n text-align: right;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-range { width: 100%; height: 18px; margin: 0; accent-color: var(--dsw-alias-state-business-primary, #4176e6); }\n\n/* ---------- export ---------- */\n.vx-format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }\n.vx-format-card {\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: left;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: transparent;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-format-card:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-format-card.on { border-color: var(--dsw-alias-state-business-primary, #4176e6); background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 8%, transparent); }\n.vx-format-title { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-format-hint { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-export-progress { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--dsw-radius-sm, 8px); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-export-result {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 10%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-export-result-copy { min-width: 0; }\n.vx-budget-track {\n height: 6px;\n border-radius: 999px;\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n overflow: hidden;\n}\n.vx-budget-fill {\n height: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-budget-fill.over { background: var(--dsw-alias-state-warn-primary, #f59e0b); }\n/* Daily usage bars: one track per row, so the percentage is measured inside\n the space left by the date column instead of overflowing the card. */\n.vx-bar-track {\n flex: 1 1 auto;\n min-width: 0;\n height: 6px;\n border-radius: 999px;\n overflow: hidden;\n background: transparent;\n}\n.vx-bar-fill {\n display: block;\n height: 100%;\n min-width: 2px;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }\n.vx-count-cell {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 10px 6px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-count-value { font-size: var(--dsw-font-l-20-font-size, 20px); font-weight: 500; line-height: 1.2; }\n.vx-count-label { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-command-dialog { max-width: 620px; }\n.vx-command-input { margin-bottom: 4px; }\n.vx-command-list { max-height: min(420px, 56vh); }\n.vx-command-item { display: flex; align-items: center; gap: 10px; }\n.vx-command-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.vx-command-foot {\n display: flex;\n align-items: center;\n gap: 14px;\n width: 100%;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-command-foot .vx-kbd { margin: 0 2px; }\n\n/* ---------- lists ---------- */\n.vx-list {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 300px;\n overflow: auto;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-list-item {\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 8px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-list-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-list-item.on,\n.vx-list-item[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-list-item:disabled { opacity: .5; cursor: default; }\n.vx-check-row { display: flex; gap: 8px; align-items: center; font-size: var(--dsw-font-xs-13-font-size, 13px); padding: 5px 4px; }\n.vx-check-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* ---------- tables ---------- */\n.vx-table { width: 100%; border-collapse: collapse; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-table th,\n.vx-table td {\n border-bottom: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n padding: 5px 6px;\n text-align: right;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-table th {\n font-weight: 500;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-table th:first-child,\n.vx-table td:first-child { text-align: left; }\n\n/* ---------- folders ---------- */\n.vx-folder-list { display: flex; flex-direction: column; gap: 2px; }\n.vx-rename-input { flex: 1; min-width: 0; min-height: 24px; padding: 2px 6px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-folder { display: flex; flex-direction: column; }\n.vx-folder-head {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 4px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: grab;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-folder-head:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-folder-head.drop-inside {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n outline: 1px dashed var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-folder-head.drop-before { box-shadow: 0 -2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-head.drop-after { box-shadow: 0 2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-name {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-folder-body {\n border-left: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n margin-left: 14px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.vx-item-row {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 3px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-item-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-item-name {\n flex: 1;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0;\n}\n.vx-item-name:hover { color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-mini {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #979da6);\n cursor: pointer;\n padding: 3px;\n border-radius: var(--dsw-radius-xs, 4px);\n display: inline-flex;\n align-items: center;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-mini:hover { color: var(--dsw-alias-label-primary, #1b1b1c); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px;\n}\n\n/* ---------- prompts ---------- */\n.vx-toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n}\n.vx-toolbar .vx-input { flex: 1 1 160px; }\n.vx-select { flex: 0 0 auto !important; width: auto; min-width: 96px; }\n.vx-textarea { resize: vertical; min-height: 140px; line-height: 20px; padding: 8px 10px; }\n.vx-prompt-grid {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.vx-prompt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }\n.vx-prompt-card {\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-bg-layer-3, transparent);\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px 10px;\n}\n.vx-prompt-title {\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-prompt-body {\n margin-top: 4px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, #61666b);\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 54px;\n overflow: hidden;\n}\n\n/* ---------- dialogs ---------- */\n.vx-dialog-mask {\n position: fixed;\n inset: 0;\n z-index: 60;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n pointer-events: auto;\n background: var(--dsw-alias-bg-mask-1, rgba(8, 10, 16, .25));\n animation: vx-fade-in .18s var(--vx-ease-out);\n}\n.vx-dialog-mask[data-state='closed'] { animation: vx-fade-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n max-height: 82vh;\n width: min(520px, 100%);\n pointer-events: auto;\n border: none;\n border-radius: var(--dsw-radius-xl, 20px);\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-elevation-prominent, 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 32px rgba(0, 0, 0, .12));\n animation: vx-dialog-in var(--vx-dur-dialog) var(--vx-ease-out);\n}\n/* Dialogs follow the same two materials. They render inside the main document,\n so the backdrop chain really does frost / refract the page behind. */\n:root:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .12);\n}\n:root.vx-dark:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .4);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(252, 253, 255, .62) 0%, rgba(248, 250, 253, .54) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 64px rgba(15, 25, 45, .22);\n}\n:root.vx-dark:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .66) 0%, rgba(20, 22, 27, .58) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 64px rgba(0, 0, 0, .5);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .9) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark.vx-liquid:not(.vx-glass-off) .vx-dialog::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n.vx-dialog[data-state='closed'] { animation: vx-dialog-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog-sm { max-width: 360px; }\n.vx-dialog-md { max-width: 520px; }\n.vx-dialog-lg { max-width: 720px; }\n.vx-dialog-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 16px 18px 8px;\n}\n.vx-dialog-titles { flex: 1; min-width: 0; }\n.vx-dialog-title {\n margin: 0;\n font-size: var(--dsw-font-m-18-font-size, 16px);\n font-weight: 500;\n line-height: var(--dsw-font-m-18-line-height, 28px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-dialog-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-dialog-body {\n padding: 4px 18px 8px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 10px 18px 16px;\n}\n.vx-discard-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f59e0b) 14%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-dialog-text { font-size: var(--dsw-font-xs-13-font-size, 13px); line-height: 20px; }\n/* One shell for every anchored card: a fixed head, exactly one scrolling body\n and a fixed foot. The cards used to set their own paddings, which is how the\n balance card ended up looking like a different surface from the prompt card. */\n.vx-pop-head {\n display: flex;\n flex: 0 0 auto;\n gap: 8px;\n align-items: center;\n padding: 12px 14px 6px;\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-pop-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 4px 14px 10px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-svgbox {\n overflow: auto;\n background: var(--dsw-alias-markdown-code-block, var(--dsw-alias-bg-layer-2, rgba(0, 0, 0, .04)));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 14px;\n}\n.vx-svgbox svg { max-width: 100%; height: auto; }\n\n/* ---------- popovers / panels ---------- */\n.vx-popover {\n position: fixed;\n box-sizing: border-box;\n pointer-events: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-popover[data-state='open'] { animation: vx-pop-in var(--vx-dur-pop) var(--vx-ease-out); }\n.vx-popover[data-state='closed'] { animation: vx-pop-out var(--vx-dur-close) var(--vx-ease-in) forwards; }\n/* A scale animation distorts an SVG backdrop filter's coordinate space. Liquid\n cards slide/fade instead of scaling so the refraction stays aligned while\n the card enters. */\n.vx-liquid .vx-popover[data-state='open'] { animation-name: vx-pop-in-liquid; }\n.vx-liquid .vx-popover[data-state='closed'] { animation-name: vx-pop-out-liquid; }\n/* Card widths stay content-driven; head/body/foot come from the shared shell. */\n.vx-prompt-list { max-height: none; overflow: visible; }\n.vx-pop-search {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 6px;\n padding: 0 14px 6px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-pop-group {\n padding: 6px 2px 2px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-prompt-row {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-family: inherit;\n padding: 6px 8px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-prompt-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-prompt-row-name { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-prompt-row-text {\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n color: var(--dsw-alias-label-secondary, #61666b);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-prompt-row-tags { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-pop-foot {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 6px 14px 12px;\n border-top: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n}\n/* The usage tables sit in a 380px card; fixed layout keeps six columns from\n pushing the panel into horizontal scroll. */\n.vx-balance-pop .vx-table { table-layout: fixed; }\n.vx-balance-pop .vx-table th,\n.vx-balance-pop .vx-table td {\n padding: 4px 3px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n white-space: nowrap;\n}\n.vx-balance-pop .vx-table th:first-child,\n.vx-balance-pop .vx-table td:first-child {\n width: 34%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.vx-balance-pop .vx-table th:not(:first-child),\n.vx-balance-pop .vx-table td:not(:first-child) { text-align: right; }\n.vx-balance-totals {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-balance-hint { margin-top: 6px; }\n.vx-settings-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }\n/* The host settings surface is a side panel, not a full page: a stacked nav\n strip keeps the card at full panel width instead of squeezing it beside a\n rail. */\n.vx-settings-shell { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }\n.vx-settings-nav {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n.vx-settings-nav-item {\n text-align: left;\n white-space: nowrap;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-settings-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-settings-nav-item.on {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-settings-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }\n@media (max-width: 760px) {\n .vx-settings-nav { gap: 2px; }\n}\n\n/* ---------- toasts ---------- */\n.vx-toast-stack {\n position: fixed;\n left: 50%;\n bottom: 26px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n pointer-events: auto;\n z-index: 80;\n}\n.vx-toast {\n display: flex;\n gap: 10px;\n align-items: center;\n max-width: min(560px, calc(100vw - 32px));\n padding: 8px 10px 8px 14px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-toast-bg, #353638);\n color: var(--dsw-alias-toast-label, #fff);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n box-shadow: var(--dsw-shadow-lv2, 0 4px 12px rgba(0, 0, 0, .12));\n}\n.vx-toast[data-state='open'] { animation: vx-toast-in .22s var(--vx-ease-out); }\n.vx-toast[data-state='closed'] { animation: vx-toast-out .16s var(--vx-ease-in) forwards; }\n.vx-toast-error { background: var(--dsw-alias-state-error-primary, #ec1313); color: var(--dsw-static-neutral-00, #fff); }\n.vx-toast-text { flex: 1; min-width: 0; }\n.vx-toast-action,\n.vx-toast-close {\n border: none;\n background: transparent;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n border-radius: var(--dsw-radius-xs, 4px);\n padding: 2px 6px;\n opacity: .8;\n}\n.vx-toast-action { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }\n.vx-toast-close { font-size: 14px; line-height: 1; padding: 2px 5px; }\n.vx-toast-action:hover,\n.vx-toast-close:hover { opacity: 1; background: rgba(255, 255, 255, .14); }\n\n/* ---------- mermaid ---------- */\n.vx-mmd-wrap {\n position: relative;\n margin: 6px 0;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n overflow: hidden;\n background: var(--dsw-alias-markdown-code-block, transparent);\n}\n.vx-mmd-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n background: var(--dsw-alias-markdown-code-block-banner, transparent);\n}\n.vx-mmd-btn {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n padding: 3px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n}\n.vx-mmd-btn:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-mmd-btn.active {\n background: var(--dsw-alias-markdown-code-segment-selected, var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-mmd-live {\n margin-left: auto;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n text-decoration: none;\n padding: 3px 8px;\n}\n.vx-mmd-live:hover { color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-mmd-stage { padding: 16px 12px; overflow-x: auto; text-align: center; }\n.vx-mmd-stage svg { max-width: 100%; height: auto; }\n\n/* ---------- motion / focus polish ---------- */\n.vx-section-in {\n display: flex;\n flex-direction: column;\n gap: 14px;\n animation: vx-section-in .22s var(--vx-ease-out);\n}\n.vx-icon-spin { animation: vx-rotate .9s linear infinite; transform-origin: center; }\n.vx-button,\n.vx-icon-button,\n.vx-header-btn,\n.vx-settings-nav-item,\n.vx-prompt-row,\n.vx-list-item {\n outline: none;\n transition-property: background-color, color, border-color, transform, opacity;\n transition-duration: var(--ds-transition-duration-fast, .1s);\n transition-timing-function: var(--vx-ease);\n}\n.vx-button:focus-visible,\n.vx-icon-button:focus-visible,\n.vx-header-btn:focus-visible,\n.vx-settings-nav-item:focus-visible,\n.vx-prompt-row:focus-visible,\n.vx-list-item:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary-new-colorprimary-new-color, #4d6bfe);\n outline-offset: 2px;\n}\n.vx-button:active:not(:disabled),\n.vx-icon-button:active:not(:disabled),\n.vx-header-btn:active,\n.vx-settings-nav-item:active,\n.vx-prompt-row:active,\n.vx-list-item:active { transform: scale(.97); }\n\n/* ---------- reduced motion ---------- */\n@media (prefers-reduced-motion: reduce) {\n .vx-root *,\n .vx-settings-page,\n .vx-settings-page *,\n .vx-popover,\n .vx-dialog,\n .vx-dialog-mask,\n .vx-toast,\n .vx-toast-stack {\n animation: none !important;\n transition: none !important;\n transform: none !important;\n }\n}\n";
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Anchored-popover geometry.
3
+ *
4
+ * Floating surfaces in this plugin are anchored to the control that opened
5
+ * them, never dragged. This module owns the pure placement math so the
6
+ * flip/clamp behaviour can be pinned by unit tests; the DOM measurement in
7
+ * `overlays.tsx` only feeds rectangles in and applies the returned frame.
8
+ * @module @alexpeng/dsh-custom-plugin/client/ui/anchor
9
+ */
10
+ /** Axis-aligned box of the trigger (a `DOMRect` satisfies this). */
11
+ export interface AnchorRect {
12
+ readonly top: number;
13
+ readonly bottom: number;
14
+ readonly left: number;
15
+ readonly right: number;
16
+ readonly width: number;
17
+ readonly height: number;
18
+ }
19
+ /** Desired size of the floating surface. */
20
+ export interface AnchorSize {
21
+ readonly width: number;
22
+ readonly height: number;
23
+ }
24
+ /** Visible viewport size. */
25
+ export interface AnchorViewport {
26
+ readonly width: number;
27
+ readonly height: number;
28
+ }
29
+ export interface AnchorOptions {
30
+ /** Space between the trigger and the surface. Defaults to 8px. */
31
+ readonly gap?: number;
32
+ /** Minimum distance kept from every viewport edge. Defaults to 8px. */
33
+ readonly margin?: number;
34
+ /** Which trigger edge the surface aligns to. Defaults to `start`. */
35
+ readonly align?: 'start' | 'end' | 'center';
36
+ /** Side tried first. Defaults to `bottom`. */
37
+ readonly preferred?: 'top' | 'bottom';
38
+ }
39
+ export interface AnchorFrame {
40
+ readonly left: number;
41
+ readonly top: number;
42
+ readonly maxHeight: number;
43
+ readonly placement: 'top' | 'bottom';
44
+ /** CSS transform origin matching the chosen side. */
45
+ readonly origin: string;
46
+ }
47
+ /**
48
+ * Place a floating surface next to its trigger.
49
+ *
50
+ * The surface opens on `preferred` when that side has room for the requested
51
+ * height, flips to the other side when it does not, and otherwise stays on the
52
+ * roomier side with `maxHeight` capped to the available space. Horizontally it
53
+ * aligns to the requested trigger edge and is clamped into the viewport.
54
+ */
55
+ export declare function anchorFrame(trigger: AnchorRect, size: AnchorSize, viewport: AnchorViewport, options?: AnchorOptions): AnchorFrame;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Appearance controls shared by the header quick panel and the settings page.
3
+ *
4
+ * Presentational only: config in, callbacks out. Every visual value comes from
5
+ * the host tokens in styles.ts.
6
+ * @module @alexpeng/dsh-custom-plugin/client/ui/appearance-controls
7
+ */
8
+ import * as React from 'react';
9
+ import type { BgFxPreset, BgStrength, CustomPluginConfig } from '../../protocol.ts';
10
+ import { type BgParamKey, type BgTier } from '../bg-params.ts';
11
+ export interface AppearanceControlsProps {
12
+ cfg: CustomPluginConfig;
13
+ dark: boolean;
14
+ onSet: (key: keyof CustomPluginConfig, value: string | boolean) => void;
15
+ onTier: (tier: BgTier) => void;
16
+ onPreset: (preset: BgFxPreset) => void;
17
+ onStrength: (strength: BgStrength) => void;
18
+ onFocus: (on: boolean) => void;
19
+ onParam: (key: BgParamKey, value: number) => void;
20
+ onRestoreParams: () => void;
21
+ compact?: boolean;
22
+ }
23
+ /** Colour, weather, glass and background-motion controls. */
24
+ export declare function AppearanceControls(props: AppearanceControlsProps): React.ReactElement;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Pure command-palette model: filtering, grouping and the recent-command list.
3
+ * @module @alexpeng/dsh-custom-plugin/client/ui/command-model
4
+ */
5
+ export interface PaletteCommand {
6
+ key: string;
7
+ label: string;
8
+ detail: string;
9
+ group: string;
10
+ disabled?: boolean;
11
+ run: () => void;
12
+ }
13
+ export interface CommandGroup {
14
+ group: string;
15
+ items: PaletteCommand[];
16
+ }
17
+ /** Case-insensitive filter over label and detail, capped for long lists. */
18
+ export declare function filterCommands(items: readonly PaletteCommand[], query: string, limit?: number): PaletteCommand[];
19
+ /** Group commands in first-seen order so the rendered sections stay stable. */
20
+ export declare function groupCommands(items: readonly PaletteCommand[]): CommandGroup[];
21
+ /** Move a command key to the front of the recent list, de-duplicated. */
22
+ export declare function recordRecent(list: readonly string[], key: string, max?: number): string[];
23
+ /** Commands whose keys appear in the recent list, in recent order. */
24
+ export declare function recentCommands(items: readonly PaletteCommand[], recent: readonly string[]): PaletteCommand[];
25
+ /** Read the recent list from storage; storage failures degrade to empty. */
26
+ export declare function loadRecent(storage: Storage | null): string[];
27
+ /** Persist the recent list; storage failures are ignored. */
28
+ export declare function saveRecent(storage: Storage | null, list: readonly string[]): void;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Pure folder-tree operations. The panel renders the result; every mutation
3
+ * here returns a new tree so the caller can persist it in one write.
4
+ * @module @alexpeng/dsh-custom-plugin/client/ui/folders-model
5
+ */
6
+ import type { FolderNode } from '../../protocol.ts';
7
+ export type MoveZone = 'before' | 'inside' | 'after';
8
+ /** Deep copy of a forest. */
9
+ export declare function cloneFolders(nodes: readonly FolderNode[]): FolderNode[];
10
+ /** Find one node by id anywhere in the forest. */
11
+ export declare function findFolder(nodes: readonly FolderNode[], id: string): FolderNode | null;
12
+ /** Total descendants + own refs, used by the count badge. */
13
+ export declare function folderCount(node: FolderNode): number;
14
+ /** Append a node under `parentId`, or at the root when `parentId` is null. */
15
+ export declare function addFolder(nodes: readonly FolderNode[], parentId: string | null, node: FolderNode): FolderNode[];
16
+ /** Rename one node; an empty name is rejected. */
17
+ export declare function renameFolder(nodes: readonly FolderNode[], id: string, name: string): FolderNode[];
18
+ /** Remove one node and its subtree. */
19
+ export declare function deleteFolder(nodes: readonly FolderNode[], id: string): FolderNode[];
20
+ /** True when `candidateId` is `ancestorId` or lives inside its subtree. */
21
+ export declare function isDescendant(nodes: readonly FolderNode[], ancestorId: string, candidateId: string): boolean;
22
+ /** Move a folder relative to another. Refuses cycles and self moves. */
23
+ export declare function moveFolder(nodes: readonly FolderNode[], sourceId: string, targetId: string, zone: MoveZone): FolderNode[];
24
+ /** Move within the current sibling list by one position (keyboard path). */
25
+ export declare function moveFolderOrder(nodes: readonly FolderNode[], id: string, direction: -1 | 1): FolderNode[];
26
+ /**
27
+ * Filter the forest by a free-text query against folder names and referenced
28
+ * ids. A folder survives when it or any descendant matches; matching subtrees
29
+ * keep their original shape.
30
+ */
31
+ export declare function filterFolders(nodes: readonly FolderNode[], query: string): FolderNode[];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Pure helpers for the settings-page index bridge.
3
+ * @module @alexpeng/dsh-custom-plugin/client/ui/index-bridge
4
+ */
5
+ /** De-duplicate host ids while preserving their order and dropping junk. */
6
+ export declare function uniqueIds(ids: readonly unknown[]): string[];
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Floating-surface behaviour: anchored popovers, modal dialogs, and the toast
3
+ * stack. Geometry comes from `anchor.ts`; every surface carries the entrance /
4
+ * exit animation, focus contract and Escape/outside-click handling here so the
5
+ * feature components stay presentational.
6
+ * @module @alexpeng/dsh-custom-plugin/client/ui/overlays
7
+ */
8
+ import * as React from 'react';
9
+ /** Whether the user asked the platform for reduced motion. */
10
+ export declare function useReducedMotion(): boolean;
11
+ /**
12
+ * Keep a surface mounted through its exit animation. `state` is written to
13
+ * `data-state` so CSS can run the matching keyframes.
14
+ */
15
+ export declare function usePresence(open: boolean, exitMs?: number): {
16
+ mounted: boolean;
17
+ state: 'open' | 'closed';
18
+ };
19
+ export interface PopoverProps {
20
+ open: boolean;
21
+ anchor: React.RefObject<HTMLElement | null>;
22
+ onClose: () => void;
23
+ children?: React.ReactNode;
24
+ ariaLabel: string;
25
+ width?: number;
26
+ maxHeight?: number;
27
+ className?: string;
28
+ align?: 'start' | 'end' | 'center';
29
+ gap?: number;
30
+ margin?: number;
31
+ initialFocus?: 'first' | 'none';
32
+ }
33
+ /**
34
+ * Non-modal anchored popover: opens on the trigger, flips when the viewport
35
+ * runs out of room, closes on Escape or an outside pointer press, and returns
36
+ * focus to the trigger it opened from.
37
+ */
38
+ export declare function Popover(props: PopoverProps): React.ReactElement | null;
39
+ export interface DialogProps {
40
+ open: boolean;
41
+ onClose: () => void;
42
+ title: string;
43
+ description?: string;
44
+ children?: React.ReactNode;
45
+ footer?: React.ReactNode;
46
+ size?: 'sm' | 'md' | 'lg';
47
+ dismissible?: boolean;
48
+ className?: string;
49
+ }
50
+ /** Modal dialog: focus trap, Escape / mask close, entrance and exit motion. */
51
+ export declare function Dialog(props: DialogProps): React.ReactElement | null;
52
+ export interface ToastItem {
53
+ id: number;
54
+ text: string;
55
+ kind: string;
56
+ action: {
57
+ label: string;
58
+ run: () => void;
59
+ } | null;
60
+ }
61
+ /** Toast stack using the host's toast material and tokens. Dismissed rows stay
62
+ * mounted for their exit animation, in place, so the stack does not jump. */
63
+ export declare function ToastStack(props: {
64
+ items: readonly ToastItem[];
65
+ onDismiss: (id: number) => void;
66
+ }): React.ReactElement;