@zhin.js/adapter-sandbox 1.1.24 → 1.1.26

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.
@@ -1,199 +1,500 @@
1
- /** The adapter owns its workbench presentation; no styles from a particular Console shell are required. */
1
+ /**
2
+ * The Sandbox workbench owns its complete presentation. Every colour derives from the Console theme tokens
3
+ * (`--background`, `--primary`, ...) with a light fallback so the page also renders outside the Console, and
4
+ * nothing here relies on Tailwind utilities or on the shared adapter-console stylesheet being injected first.
5
+ * Rules: no hex literals, no gradients, no text below 12px, tap targets of at least 44px under 768px.
6
+ */
2
7
  export const sandboxStyles = `
3
- .zhin-sandbox.agent-playground-shell { position: relative; display: grid; grid-template-columns: 232px minmax(0,1fr); height: calc(100dvh - 72px); min-height: 520px; overflow: hidden; border: 1px solid var(--ac-line); border-radius: 14px; background: var(--ac-panel); }
4
- .zhin-sandbox [hidden], .zhin-sandbox .hidden { display: none !important; }
5
- .zhin-sandbox button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid var(--ac-line); border-radius: 8px; min-height: 34px; padding: 6px 10px; color: var(--ac-ink); background: var(--ac-panel); cursor: pointer; font-size: 12px; line-height: 1.4; }
6
- .zhin-sandbox button:hover:not(:disabled) { background: var(--ac-soft); }
7
- .zhin-sandbox button:disabled { opacity: .45; cursor: not-allowed; }
8
- .zhin-sandbox button.primary { background: var(--ac-primary); color: var(--ac-panel); border-color: var(--ac-primary); }
9
- .zhin-sandbox button.danger, .zhin-sandbox .agent-playground-stop { color: var(--ac-bad); background: var(--ac-bad-bg); border-color: transparent; }
8
+ .zhin-sandbox {
9
+ --sb-bg: hsl(var(--background, 0 0% 100%));
10
+ --sb-fg: hsl(var(--foreground, 0 0% 12%));
11
+ --sb-muted: hsl(var(--muted, 0 0% 96%));
12
+ --sb-muted-fg: hsl(var(--muted-foreground, 0 0% 39%));
13
+ --sb-accent: hsl(var(--accent, 0 0% 95%));
14
+ --sb-border: hsl(var(--border, 0 0% 90%));
15
+ --sb-border-soft: hsl(var(--border, 0 0% 90%) / .7);
16
+ --sb-input: hsl(var(--input, 0 0% 57%));
17
+ --sb-sidebar: hsl(var(--sidebar, 0 0% 97%));
18
+ --sb-primary: hsl(var(--primary, 222 62% 50%));
19
+ --sb-primary-fg: hsl(var(--primary-foreground, 0 0% 99%));
20
+ --sb-primary-soft: hsl(var(--primary, 222 62% 50%) / .1);
21
+ --sb-primary-line: hsl(var(--primary, 222 62% 50%) / .3);
22
+ --sb-ring: hsl(var(--ring, 222 62% 50%));
23
+ --sb-danger: hsl(var(--destructive, 0 68% 42%));
24
+ --sb-danger-fg: hsl(var(--destructive-foreground, 0 0% 100%));
25
+ --sb-danger-soft: hsl(var(--destructive, 0 68% 42%) / .1);
26
+ --sb-danger-line: hsl(var(--destructive, 0 68% 42%) / .3);
27
+ --sb-ok: hsl(var(--success, 145 52% 28%));
28
+ --sb-warn: hsl(var(--warning, 32 80% 30%));
29
+ --sb-warn-soft: hsl(var(--warning, 32 80% 30%) / .12);
30
+ --sb-warn-line: hsl(var(--warning, 32 80% 30%) / .32);
31
+ --sb-info: hsl(var(--info, 222 62% 50%));
32
+ --sb-overlay: hsl(var(--im-shadow, 0 0% 0%) / .5);
33
+ --sb-shadow: hsl(var(--im-shadow, 0 0% 0%) / .16);
34
+ --sb-radius-sm: var(--console-radius-sm, 6px);
35
+ --sb-radius-md: var(--console-radius-md, 10px);
36
+ --sb-radius-lg: var(--console-radius-lg, 14px);
37
+ --sb-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'PingFang SC', monospace;
38
+ color: var(--sb-fg);
39
+ font-family: 'Avenir Next', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
40
+ font-size: 14px;
41
+ line-height: 1.6;
42
+ text-align: left;
43
+ }
44
+ .zhin-sandbox *, .zhin-sandbox *::before, .zhin-sandbox *::after { box-sizing: border-box; }
45
+ .zhin-sandbox :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, pre) { margin: 0; }
46
+ .zhin-sandbox :where(button, input, select, textarea) { font: inherit; color: inherit; }
47
+ .zhin-sandbox :where(a) { color: var(--sb-primary); text-underline-offset: 3px; overflow-wrap: anywhere; }
48
+ .zhin-sandbox :where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--sb-ring); outline-offset: 2px; }
49
+ .zhin-sandbox [hidden] { display: none !important; }
50
+
51
+ /* ---------- Shell ---------- */
52
+ .zhin-sandbox.agent-playground-shell { position: relative; display: grid; grid-template-columns: 232px minmax(0,1fr); width: 100%; height: calc(100dvh - 72px); min-height: 520px; overflow: hidden; isolation: isolate; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-lg); background: var(--sb-bg); }
53
+
54
+ /* ---------- Shared controls ---------- */
55
+ .zhin-sandbox button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-bg); color: var(--sb-fg); font-size: 13px; line-height: 1.4; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
56
+ .zhin-sandbox button:hover:not(:disabled) { background: var(--sb-accent); }
57
+ .zhin-sandbox button:disabled { opacity: .5; cursor: not-allowed; }
58
+ .zhin-sandbox button.primary, .zhin-sandbox .sandbox-send, .zhin-sandbox .sandbox-submit { background: var(--sb-primary); color: var(--sb-primary-fg); border-color: var(--sb-primary); }
59
+ .zhin-sandbox button.primary:hover:not(:disabled), .zhin-sandbox .sandbox-send:hover:not(:disabled), .zhin-sandbox .sandbox-submit:hover:not(:disabled) { background: var(--sb-primary); opacity: .9; }
60
+ .zhin-sandbox button.danger { background: var(--sb-danger); color: var(--sb-danger-fg); border-color: var(--sb-danger); }
61
+ .zhin-sandbox button.danger:hover:not(:disabled) { background: var(--sb-danger); opacity: .9; }
62
+ .zhin-sandbox :where(input:not([type="checkbox"]), select) { width: 100%; min-width: 0; min-height: 34px; padding: 6px 10px; border: 1px solid var(--sb-input); border-radius: var(--sb-radius-sm); background: var(--sb-bg); color: var(--sb-fg); font-size: 13px; line-height: 1.5; }
63
+ .zhin-sandbox :where(input, select):disabled { opacity: .6; cursor: not-allowed; background: var(--sb-muted); }
64
+ .zhin-sandbox :where(input)::placeholder { color: var(--sb-muted-fg); }
65
+ .zhin-sandbox .sandbox-input { width: 100%; }
66
+ .zhin-sandbox .is-spinning { animation: sandbox-spin 1s linear infinite; }
67
+
68
+ /* ---------- Mobile bar and overlays (hidden on wide screens) ---------- */
10
69
  .zhin-sandbox .agent-playground-mobilebar { display: none; }
11
- .zhin-sandbox .agent-playground-sessions { min-width: 0; display: flex; flex-direction: column; background: var(--ac-canvas); border-right: 1px solid var(--ac-line); overflow: hidden; }
12
- .zhin-sandbox .agent-playground-brand { padding: 24px 18px; }
70
+ .zhin-sandbox .agent-playground-inspector-overlay, .zhin-sandbox .channel-overlay { display: none; }
71
+
72
+ /* ---------- Sessions sidebar ---------- */
73
+ .zhin-sandbox .agent-playground-sessions { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--sb-sidebar); border-right: 1px solid var(--sb-border); }
74
+ .zhin-sandbox .agent-playground-brand { padding: 20px 16px 16px; border-bottom: 1px solid var(--sb-border-soft); }
13
75
  .zhin-sandbox .agent-playground-brand > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
14
- .zhin-sandbox .agent-playground-brand > div > div { display: flex; align-items: center; gap: 10px; }
15
- .zhin-sandbox .agent-playground-brand h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
16
- .zhin-sandbox .agent-playground-brand small { font-size: 11px; color: var(--ac-muted); }
17
- .zhin-sandbox .agent-playground-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ac-ink); color: var(--ac-panel); }
18
- .zhin-sandbox .agent-playground-connection { display: grid; place-items: center; color: var(--ac-warn); }
19
- .zhin-sandbox .agent-playground-connection.is-online, .zhin-sandbox .is-online { color: var(--ac-ok); }
20
- .zhin-sandbox .agent-playground-section-label { display: flex; align-items: center; gap: 8px; padding: 0 18px 10px; font-size: 12px; color: var(--ac-muted); }
21
- .zhin-sandbox .agent-playground-section-label button { margin-left: auto; min-height: 28px; padding: 4px; background: transparent; border-color: transparent; }
22
- .zhin-sandbox .agent-playground-session-list { flex: 1; min-height: 0; overflow: auto; padding: 0 10px; }
23
- .zhin-sandbox .agent-playground-session { display: flex; justify-content: flex-start; width: 100%; gap: 10px; padding: 12px 10px; border: 1px solid transparent; margin-bottom: 4px; background: transparent; text-align: left; }
24
- .zhin-sandbox .agent-playground-session.active { background: var(--ac-panel); border-color: var(--ac-line); box-shadow: 0 2px 3px #19283e05; }
25
- .zhin-sandbox .agent-playground-session-icon { color: var(--ac-muted); }
26
- .zhin-sandbox .agent-playground-session.active .agent-playground-session-icon { color: var(--ac-primary); }
27
- .zhin-sandbox .agent-playground-session > div { flex: 1; min-width: 0; }
28
- .zhin-sandbox .agent-playground-session > div > div:first-child { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
29
- .zhin-sandbox .agent-playground-session > div > div:last-child { font-size: 11px; color: var(--ac-muted); margin-top: 4px; }
30
- .zhin-sandbox .agent-playground-new-session { padding: 16px 14px; }
31
- .zhin-sandbox .agent-playground-add { width: 100%; background: var(--ac-panel); }
32
- .zhin-sandbox .agent-playground-new-form { display: grid; gap: 10px; }
33
- .zhin-sandbox .agent-playground-scope-picker, .zhin-sandbox .agent-playground-new-actions { display: flex; gap: 5px; }
34
- .zhin-sandbox .agent-playground-scope-picker button { flex: 1; font-size: 11px; padding: 6px; }
35
- .zhin-sandbox .agent-playground-scope-picker button.active { border-color: var(--ac-primary); color: var(--ac-primary); background: var(--ac-tint); }
36
- .zhin-sandbox .agent-playground-new-actions { justify-content: flex-end; }
37
- .zhin-sandbox .agent-playground-endpoint { padding: 14px 18px; border-top: 1px solid var(--ac-line); display: grid; gap: 3px; }
38
- .zhin-sandbox .agent-playground-endpoint span { font-size: 11px; color: var(--ac-muted); }
39
- .zhin-sandbox .agent-playground-endpoint strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
40
- .zhin-sandbox .agent-playground-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
41
- .zhin-sandbox .agent-playground-runbar { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ac-line); }
42
- .zhin-sandbox .agent-playground-run-identity { display: flex; gap: 10px; align-items: center; min-width: 0; }
43
- .zhin-sandbox .agent-playground-run-identity > div { min-width: 0; }
44
- .zhin-sandbox .agent-playground-run-icon { color: var(--ac-primary); }
45
- .zhin-sandbox .agent-playground-run-title h1 { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
46
- .zhin-sandbox .agent-playground-run-title span { font-size: 11px; color: var(--ac-muted); }
47
- .zhin-sandbox .agent-playground-run-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
48
- .zhin-sandbox .agent-playground-run-actions > a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px; text-decoration: none; }
49
- .zhin-sandbox .agent-playground-run-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ac-muted); font-size: 11px; }
50
- .zhin-sandbox .agent-playground-run-state.is-running { color: var(--ac-primary); }
51
- .zhin-sandbox .agent-playground-run-state.has-problem { color: var(--ac-bad); }
52
- .zhin-sandbox .agent-playground-confirm { display: flex; align-items: center; gap: 10px; background: var(--ac-warn-bg); color: var(--ac-warn); padding: 12px 20px; border-bottom: 1px solid var(--ac-line); font-size: 12px; }
53
- .zhin-sandbox .agent-playground-confirm > div { flex: 1; display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
54
- .zhin-sandbox .agent-playground-run-settings { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 24px; background: var(--ac-canvas); border-bottom: 1px solid var(--ac-line); }
55
- .zhin-sandbox .agent-playground-run-settings label { display: grid; gap: 5px; flex: 1; min-width: 140px; }
56
- .zhin-sandbox .agent-playground-run-settings label > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ac-muted); }
57
- .zhin-sandbox .agent-playground-run-settings input, .zhin-sandbox .agent-playground-run-settings select { font-size: 12px; padding: 7px 9px; }
76
+ .zhin-sandbox .agent-playground-brand > div > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
77
+ .zhin-sandbox .agent-playground-brand h2 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
78
+ .zhin-sandbox .agent-playground-brand small { display: block; font-size: 12px; color: var(--sb-muted-fg); }
79
+ .zhin-sandbox .agent-playground-mark, .zhin-sandbox .agent-playground-empty-mark { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--sb-primary); background: var(--sb-primary-soft); }
80
+ .zhin-sandbox .agent-playground-mark { width: 32px; height: 32px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-md); }
81
+ .zhin-sandbox .agent-playground-connection { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--sb-border); border-radius: 999px; background: var(--sb-bg); color: var(--sb-warn); }
82
+ .zhin-sandbox .agent-playground-connection.is-online { color: var(--sb-ok); border-color: var(--sb-primary-line); }
83
+ .zhin-sandbox .is-online { color: var(--sb-ok); }
84
+ .zhin-sandbox .agent-playground-section-label { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px 16px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--sb-muted-fg); }
85
+ .zhin-sandbox .agent-playground-section-label span:nth-child(2) { font-variant-numeric: tabular-nums; }
86
+ .zhin-sandbox .agent-playground-section-label button { margin-left: auto; min-height: 28px; min-width: 28px; padding: 4px; background: transparent; border-color: transparent; color: var(--sb-muted-fg); }
87
+ .zhin-sandbox .agent-playground-session-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; }
88
+ .zhin-sandbox .agent-playground-session { position: relative; width: 100%; justify-content: flex-start; gap: 10px; margin: 2px 0; padding: 9px 10px; border: 0; border-radius: var(--sb-radius-md); background: transparent; text-align: left; }
89
+ .zhin-sandbox .agent-playground-session:hover:not(:disabled) { background: var(--sb-bg); }
90
+ .zhin-sandbox .agent-playground-session.active { background: var(--sb-bg); box-shadow: inset 2px 0 var(--sb-primary); }
91
+ .zhin-sandbox .agent-playground-session-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--sb-radius-md); background: var(--sb-muted); color: var(--sb-muted-fg); }
92
+ .zhin-sandbox .agent-playground-session.active .agent-playground-session-icon { background: var(--sb-primary-soft); color: var(--sb-primary); }
93
+ .zhin-sandbox .agent-playground-session-copy { flex: 1; min-width: 0; }
94
+ .zhin-sandbox .agent-playground-session-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
95
+ .zhin-sandbox .agent-playground-session-scope { margin-top: 2px; font-size: 12px; color: var(--sb-muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
96
+ .zhin-sandbox .agent-playground-unread { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sb-danger); color: var(--sb-danger-fg); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
97
+ .zhin-sandbox .agent-playground-new-session { padding: 10px 12px; border-top: 1px solid var(--sb-border-soft); }
98
+ .zhin-sandbox .agent-playground-add { width: 100%; min-height: 36px; border: 1px dashed var(--sb-primary-line); background: var(--sb-primary-soft); color: var(--sb-primary); font-weight: 600; }
99
+ .zhin-sandbox .agent-playground-add:hover:not(:disabled) { border-style: solid; background: var(--sb-primary-soft); }
100
+ .zhin-sandbox .agent-playground-new-form { display: grid; gap: 8px; }
101
+ .zhin-sandbox .agent-playground-scope-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: var(--sb-radius-md); background: var(--sb-muted); }
102
+ .zhin-sandbox .agent-playground-scope-picker button { min-height: 30px; padding: 4px; border: 0; background: transparent; color: var(--sb-muted-fg); font-size: 12px; }
103
+ .zhin-sandbox .agent-playground-scope-picker button.active { background: var(--sb-bg); color: var(--sb-fg); box-shadow: 0 1px 4px var(--sb-shadow); }
104
+ .zhin-sandbox .agent-playground-new-actions { display: flex; justify-content: flex-end; gap: 6px; }
105
+ .zhin-sandbox .agent-playground-endpoint { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 10px 16px 12px; border-top: 1px solid var(--sb-border-soft); font-size: 12px; color: var(--sb-muted-fg); }
106
+ .zhin-sandbox .agent-playground-endpoint strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sb-mono); font-size: 12px; font-weight: 500; color: var(--sb-fg); }
107
+
108
+ /* ---------- Main column: run bar ---------- */
109
+ .zhin-sandbox .agent-playground-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: var(--sb-bg); }
110
+ .zhin-sandbox .agent-playground-runbar { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 68px; padding: 12px 20px; border-bottom: 1px solid var(--sb-border-soft); }
111
+ .zhin-sandbox .agent-playground-run-identity { display: flex; flex: 1 1 14rem; align-items: center; gap: 10px; min-width: 0; }
112
+ .zhin-sandbox .agent-playground-run-identity > div { flex: 1; min-width: 0; }
113
+ .zhin-sandbox .agent-playground-run-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-md); background: var(--sb-primary-soft); color: var(--sb-primary); }
114
+ .zhin-sandbox .agent-playground-run-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
115
+ .zhin-sandbox .agent-playground-run-title h1 { min-width: 0; max-width: 100%; overflow: hidden; font-size: 16px; font-weight: 700; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
116
+ .zhin-sandbox .agent-playground-run-title span { flex-shrink: 0; padding: 1px 8px; border: 1px solid var(--sb-border); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--sb-muted-fg); }
117
+ .zhin-sandbox .agent-playground-run-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; max-width: 100%; margin-left: auto; }
118
+ .zhin-sandbox .agent-playground-run-actions > a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); color: var(--sb-muted-fg); font-size: 13px; text-decoration: none; }
119
+ .zhin-sandbox .agent-playground-run-actions > a:hover { background: var(--sb-accent); color: var(--sb-fg); }
120
+ .zhin-sandbox .agent-playground-run-actions > button { color: var(--sb-muted-fg); }
121
+ .zhin-sandbox .agent-playground-run-actions > button:hover:not(:disabled) { border-color: var(--sb-primary-line); color: var(--sb-primary); }
122
+ .zhin-sandbox .agent-playground-run-actions > button.active { border-color: var(--sb-primary-line); background: var(--sb-primary-soft); color: var(--sb-primary); }
123
+ .zhin-sandbox .agent-playground-run-actions > .agent-playground-stop { background: var(--sb-danger-soft); border-color: var(--sb-danger-line); color: var(--sb-danger); }
124
+ .zhin-sandbox .agent-playground-run-actions > .agent-playground-stop:hover:not(:disabled) { background: var(--sb-danger-soft); border-color: var(--sb-danger); color: var(--sb-danger); }
125
+ .zhin-sandbox .agent-playground-run-state { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--sb-muted-fg); font-size: 13px; white-space: nowrap; }
126
+ .zhin-sandbox .agent-playground-run-state.is-running { color: var(--sb-primary); }
127
+ .zhin-sandbox .agent-playground-run-state.is-running svg { animation: sandbox-breathe 1.5s ease-in-out infinite; }
128
+ .zhin-sandbox .agent-playground-run-state.has-problem { color: var(--sb-danger); }
129
+
130
+ /* ---------- Banners and run settings ---------- */
131
+ .zhin-sandbox .agent-playground-confirm { display: flex; align-items: center; gap: 8px 10px; padding: 10px 20px; border-bottom: 1px solid var(--sb-danger-line); background: var(--sb-danger-soft); color: var(--sb-fg); font-size: 13px; }
132
+ .zhin-sandbox .agent-playground-confirm > div { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
133
+ .zhin-sandbox .agent-playground-confirm > div > span { color: var(--sb-muted-fg); }
134
+ .zhin-sandbox .agent-playground-confirm button { min-height: 32px; padding: 4px 12px; background: var(--sb-bg); }
135
+ .zhin-sandbox .sandbox-notice { display: flex; align-items: flex-start; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--sb-warn-line); background: var(--sb-warn-soft); color: var(--sb-fg); font-size: 13px; }
136
+ .zhin-sandbox .sandbox-notice > svg { flex-shrink: 0; margin-top: 3px; color: var(--sb-warn); }
137
+ .zhin-sandbox .sandbox-notice > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
138
+ .zhin-sandbox .sandbox-notice button { min-height: 28px; padding: 2px 10px; background: transparent; }
139
+ .zhin-sandbox .agent-playground-run-settings { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--sb-border-soft); background: var(--sb-sidebar); }
140
+ .zhin-sandbox .agent-playground-run-settings label { display: flex; flex: 1 1 140px; flex-direction: column; gap: 5px; min-width: 0; }
58
141
  .zhin-sandbox .agent-playground-run-settings .agent-playground-directory-field { flex-basis: 100%; }
59
- .zhin-sandbox .agent-playground-run-settings .agent-playground-network-toggle { display: flex; align-items: center; gap: 10px; flex: none; }
60
- .zhin-sandbox .agent-playground-network-toggle i { display: none; }
61
- .zhin-sandbox .agent-playground-run-settings p { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--ac-warn); flex-basis: 100%; }
62
- .zhin-sandbox .agent-playground-conversation { flex: 1; display: flex; min-height: 0; overflow: hidden; }
63
- .zhin-sandbox .agent-playground-message-scroll { flex: 1; min-width: 0; overflow-y: auto; padding: 28px 24px; scrollbar-gutter: stable; }
64
- .zhin-sandbox .agent-playground-empty { max-width: 560px; margin: clamp(24px, 8vh, 100px) auto 32px; text-align: center; }
65
- .zhin-sandbox .agent-playground-empty-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 18px; background: var(--ac-tint); color: var(--ac-primary); }
66
- .zhin-sandbox .agent-playground-empty h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 650; letter-spacing: -.025em; margin-bottom: 10px; }
67
- .zhin-sandbox .agent-playground-empty p { color: var(--ac-muted); font-size: 13px; line-height: 1.8; max-width: 48ch; margin: 0 auto; }
68
- .zhin-sandbox .agent-playground-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
69
- .zhin-sandbox .agent-playground-prompts button { padding: 9px 12px; }
70
- .zhin-sandbox .agent-playground-message-list { display: grid; gap: 24px; max-width: 780px; margin: 0 auto; }
71
- .zhin-sandbox .agent-playground-message { display: flex; align-items: flex-start; gap: 12px; }
72
- .zhin-sandbox .agent-playground-message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ac-tint); color: var(--ac-primary); flex-shrink: 0; }
73
- .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-avatar { background: var(--ac-soft); color: var(--ac-muted); }
74
- .zhin-sandbox .agent-playground-message-main { flex: 1; min-width: 0; }
75
- .zhin-sandbox .agent-playground-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
76
- .zhin-sandbox .agent-playground-message-meta strong { font-size: 12px; font-weight: 650; }
77
- .zhin-sandbox .agent-playground-message-meta time { font-size: 10px; color: var(--ac-muted); }
78
- .zhin-sandbox .agent-playground-message-meta span { color: var(--ac-warn); font-size: 10px; }
79
- .zhin-sandbox .agent-playground-message-content { line-height: 1.8; overflow-wrap: anywhere; }
80
- .zhin-sandbox .agent-playground-message-content img { max-width: 100%; border-radius: 10px; }
81
- .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-content { background: var(--ac-canvas); border-radius: 10px; padding: 12px 16px; }
82
- .zhin-sandbox .agent-playground-message.is-approval { padding: 16px; background: var(--ac-warn-bg); border: 1px solid var(--ac-line); border-radius: 10px; }
83
- .zhin-sandbox .agent-playground-composer { padding: 16px 24px; border-top: 1px solid var(--ac-line); display: grid; gap: 12px; background: var(--ac-panel); }
84
- .zhin-sandbox .agent-playground-composer > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
85
- .zhin-sandbox .agent-playground-composer > div:first-child > div.flex-1 { flex: 1; }
86
- .zhin-sandbox .agent-playground-composer > div:nth-last-child(2) { display: flex; align-items: flex-end; gap: 10px; }
87
- .zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > div { flex: 1; min-width: 0; }
88
- .zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > button { min-height: 42px; padding: 10px 16px; background: var(--ac-primary); border-color: var(--ac-primary); color: var(--ac-panel); }
89
- .zhin-sandbox .agent-playground-composer > div:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 10px; color: var(--ac-muted); }
90
- .zhin-sandbox .agent-playground-composer > div:last-child span { padding: 1px 4px; border: 1px solid var(--ac-line); border-radius: 4px; }
91
- .zhin-sandbox [contenteditable="true"] { padding: 12px 14px; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; line-height: 1.6; overflow-y: auto; outline: none; }
92
- .zhin-sandbox [contenteditable="true"]:focus-visible { border-color: var(--ac-primary); outline: 2px solid var(--ac-primary); outline-offset: 1px; }
93
- .zhin-sandbox [contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--ac-muted); pointer-events: none; }
142
+ .zhin-sandbox .agent-playground-run-settings label > span { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--sb-muted-fg); }
143
+ .zhin-sandbox .agent-playground-run-settings > p { display: flex; flex-basis: 100%; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--sb-warn); }
144
+ .zhin-sandbox .agent-playground-run-settings > p > svg { flex-shrink: 0; margin-top: 3px; }
145
+ .zhin-sandbox .agent-playground-network-toggle { position: relative; flex: none !important; flex-direction: row !important; align-items: center; gap: 10px !important; }
146
+ .zhin-sandbox .agent-playground-network-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
147
+ .zhin-sandbox .agent-playground-network-toggle i { position: relative; display: block; width: 36px; height: 20px; border: 1px solid var(--sb-input); border-radius: 999px; background: var(--sb-muted); cursor: pointer; transition: background-color .16s ease, border-color .16s ease; }
148
+ .zhin-sandbox .agent-playground-network-toggle i::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--sb-bg); box-shadow: 0 1px 3px var(--sb-shadow); content: ""; transition: transform .16s ease; }
149
+ .zhin-sandbox .agent-playground-network-toggle input:checked + i { border-color: var(--sb-primary); background: var(--sb-primary); }
150
+ .zhin-sandbox .agent-playground-network-toggle input:checked + i::after { transform: translateX(16px); }
151
+ .zhin-sandbox .agent-playground-network-toggle input:disabled + i { opacity: .6; cursor: not-allowed; }
152
+ .zhin-sandbox .agent-playground-network-toggle input:focus-visible + i { outline: 2px solid var(--sb-ring); outline-offset: 2px; }
153
+
154
+ /* ---------- Conversation ---------- */
155
+ .zhin-sandbox .agent-playground-conversation { position: relative; flex: 1; display: flex; min-height: 0; overflow: hidden; }
156
+ .zhin-sandbox .agent-playground-message-scroll { flex: 1; min-width: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px; scrollbar-gutter: stable; scrollbar-width: thin; }
157
+ .zhin-sandbox .agent-playground-conversation-details { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
158
+ .zhin-sandbox .agent-playground-details-back { margin-bottom: 12px; border-color: transparent; background: transparent; color: var(--sb-muted-fg); }
159
+ .zhin-sandbox .agent-playground-history-navigation, .zhin-sandbox .agent-playground-history-notice { padding: 8px 16px; font-size: 12px; text-align: center; color: var(--sb-muted-fg); }
160
+ .zhin-sandbox .agent-playground-history-navigation p[role=alert] { color: var(--sb-danger); overflow-wrap: anywhere; }
161
+ .zhin-sandbox .agent-playground-history-navigation button { min-height: 32px; border-color: transparent; background: transparent; color: var(--sb-primary); }
162
+ .zhin-sandbox .agent-playground-empty { display: grid; width: min(100%, 42rem); min-height: 100%; align-content: center; margin: 0 auto; padding: 32px 0; text-align: center; }
163
+ .zhin-sandbox .agent-playground-empty-mark { width: 56px; height: 56px; margin: 0 auto 18px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-lg); }
164
+ .zhin-sandbox .agent-playground-empty h2 { font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; letter-spacing: -.025em; margin-bottom: 8px; }
165
+ .zhin-sandbox .agent-playground-empty p { max-width: 48ch; margin: 0 auto; color: var(--sb-muted-fg); font-size: 14px; line-height: 1.7; }
166
+ .zhin-sandbox .agent-playground-prompts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 22px; }
167
+ .zhin-sandbox .agent-playground-prompts button { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 64px; padding: 12px; border-radius: var(--sb-radius-md); font-size: 13px; text-align: left; }
168
+ .zhin-sandbox .agent-playground-prompts button::after { margin-top: auto; color: var(--sb-primary); content: "\\2197"; }
169
+ .zhin-sandbox .agent-playground-prompts button:hover:not(:disabled) { border-color: var(--sb-primary-line); background: var(--sb-muted); }
170
+ .zhin-sandbox .agent-playground-message-list { display: flex; flex-direction: column; gap: 18px; width: min(100%, 52rem); margin: 0 auto; padding-bottom: 12px; }
171
+ .zhin-sandbox .agent-playground-message { display: flex; align-items: flex-start; gap: 10px; }
172
+ .zhin-sandbox .agent-playground-message.is-user { flex-direction: row-reverse; }
173
+ .zhin-sandbox .agent-playground-message-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-muted); color: var(--sb-muted-fg); }
174
+ .zhin-sandbox .agent-playground-message.is-agent .agent-playground-message-avatar { border-color: var(--sb-primary-line); background: var(--sb-primary-soft); color: var(--sb-primary); }
175
+ .zhin-sandbox .agent-playground-message-main { min-width: 0; max-width: calc(100% - 44px); }
176
+ .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-main { max-width: min(76%, 42rem); }
177
+ .zhin-sandbox .agent-playground-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 2px 4px; font-size: 12px; color: var(--sb-muted-fg); }
178
+ .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-meta { justify-content: flex-end; }
179
+ .zhin-sandbox .agent-playground-message-meta strong { font-weight: 650; color: var(--sb-fg); }
180
+ .zhin-sandbox .agent-playground-message-meta span { color: var(--sb-warn); }
181
+ .zhin-sandbox .agent-playground-message-content { min-width: 0; padding: 10px 14px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-lg); background: var(--sb-bg); line-height: 1.7; overflow-wrap: anywhere; overflow: hidden; }
182
+ .zhin-sandbox .agent-playground-message-content img { max-width: 100%; border-radius: var(--sb-radius-md); }
183
+ .zhin-sandbox .agent-playground-message-content > :first-child { margin-top: 0; }
184
+ .zhin-sandbox .agent-playground-message-content > :last-child { margin-bottom: 0; }
185
+ .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-content { border-color: var(--sb-primary-line); background: var(--sb-primary-soft); }
186
+ .zhin-sandbox .agent-playground-message.is-approval .agent-playground-message-avatar { border-color: var(--sb-warn-line); background: var(--sb-warn-soft); color: var(--sb-warn); }
187
+ .zhin-sandbox .agent-playground-message.is-approval .agent-playground-message-content { border-color: var(--sb-warn-line); background: var(--sb-warn-soft); }
188
+ .zhin-sandbox .agent-playground-message.is-approval .agent-playground-message-meta span:last-of-type { padding: 0 8px; border: 1px solid var(--sb-warn-line); border-radius: 999px; font-weight: 600; }
189
+ .zhin-sandbox .agent-playground-approval-actions { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sb-warn-line); }
190
+ .zhin-sandbox .agent-playground-approval-actions > div { display: flex; flex-wrap: wrap; gap: 6px; }
191
+ .zhin-sandbox .agent-playground-approval-actions button { min-height: 34px; font-weight: 600; }
192
+ .zhin-sandbox .agent-playground-approval-actions button.is-primary { background: var(--sb-primary); border-color: var(--sb-primary); color: var(--sb-primary-fg); }
193
+ .zhin-sandbox .agent-playground-approval-actions button.is-danger { background: var(--sb-danger-soft); border-color: var(--sb-danger-line); color: var(--sb-danger); }
194
+ .zhin-sandbox .agent-playground-approval-actions small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--sb-primary); }
195
+
196
+ /* ---------- Message segments (formerly Tailwind utilities) ---------- */
197
+ .zhin-sandbox .sandbox-chip { display: inline-flex; align-items: center; margin: 0 2px; padding: 1px 6px; border-radius: var(--sb-radius-sm); background: var(--sb-muted); color: var(--sb-fg); font-size: 12px; }
198
+ .zhin-sandbox .sandbox-chip.is-mention { background: var(--sb-accent); }
199
+ .zhin-sandbox .sandbox-inline-face { display: inline-block; width: 24px; height: 24px; margin: 0 2px; vertical-align: middle; }
200
+ .zhin-sandbox .sandbox-segment-note { font-size: 12px; opacity: .8; }
201
+ .zhin-sandbox .sandbox-media-link { display: block; margin: 4px 0; }
202
+ .zhin-sandbox .sandbox-media-image { display: block; max-width: min(320px, 88%); border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); }
203
+ .zhin-sandbox .sandbox-media-video { display: block; max-width: min(360px, 92%); max-height: 288px; margin: 4px 0; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-muted); }
204
+ .zhin-sandbox .sandbox-media-audio { display: block; width: 100%; max-width: 384px; height: 40px; margin: 8px 0; }
205
+ .zhin-sandbox .sandbox-html-frame { display: block; width: 100%; min-width: 0; margin: 4px 0; border: 0; border-radius: var(--sb-radius-md); background: transparent; }
206
+ .zhin-sandbox .sandbox-reply-quote { margin-bottom: 4px; padding: 2px 8px; border: 1px dashed var(--sb-input); border-radius: var(--sb-radius-sm); font-size: 12px; color: var(--sb-muted-fg); }
207
+ .zhin-sandbox .sandbox-forward { display: grid; gap: 4px; margin: 4px 0; padding: 8px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-muted); font-size: 12px; }
208
+ .zhin-sandbox .sandbox-forward-title { font-weight: 600; }
209
+ .zhin-sandbox .sandbox-forward-list { display: grid; gap: 4px; padding-left: 8px; border-left: 2px solid var(--sb-border); }
210
+ .zhin-sandbox .sandbox-forward-more, .zhin-sandbox .sandbox-forward-empty { color: var(--sb-muted-fg); }
211
+
212
+ /* ---------- Rendered Markdown, lists, tables, code ---------- */
213
+ .zhin-sandbox .zhin-markdown { min-width: 0; color: inherit; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
214
+ .zhin-sandbox .zhin-markdown > * + * { margin-top: 8px; }
215
+ .zhin-sandbox .zhin-markdown--inverse { color: inherit; }
216
+ .zhin-sandbox .im-markdown-heading { font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
217
+ .zhin-sandbox .im-markdown-heading-1 { font-size: 20px; }
218
+ .zhin-sandbox .im-markdown-heading-2 { font-size: 18px; }
219
+ .zhin-sandbox .im-markdown-heading-3 { font-size: 16px; }
220
+ .zhin-sandbox .im-markdown-heading-4, .zhin-sandbox .im-markdown-heading-5, .zhin-sandbox .im-markdown-heading-6 { font-size: 14px; }
221
+ .zhin-sandbox .im-markdown-paragraph { margin: 0; }
222
+ .zhin-sandbox .im-markdown-quote { padding: 4px 12px; border-left: 3px solid var(--sb-border); color: var(--sb-muted-fg); }
223
+ .zhin-sandbox .im-markdown-list { padding-left: 22px; list-style: disc; }
224
+ .zhin-sandbox .im-markdown-list-ordered { list-style: decimal; }
225
+ .zhin-sandbox .im-markdown-list > li { padding-left: 2px; }
226
+ .zhin-sandbox .im-markdown-list > li + li { margin-top: 3px; }
227
+ .zhin-sandbox .im-markdown-list > li::marker { color: var(--sb-muted-fg); }
228
+ .zhin-sandbox .zhin-markdown-task { display: flex; align-items: baseline; gap: 8px; margin-left: -22px; list-style: none; }
229
+ .zhin-sandbox .zhin-markdown-task input { flex-shrink: 0; width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; accent-color: var(--sb-primary); transform: translateY(2px); }
230
+ .zhin-sandbox .zhin-markdown-rule { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--sb-border); }
231
+ .zhin-sandbox .im-inline-code { padding: 1px 6px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-muted); font-family: var(--sb-mono); font-size: 13px; }
232
+ .zhin-sandbox .im-message-link { color: var(--sb-primary); }
233
+ .zhin-sandbox .zhin-markdown-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
234
+ .zhin-sandbox .zhin-markdown-table { width: 100%; min-width: 320px; border-collapse: collapse; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
235
+ .zhin-sandbox .zhin-markdown-table th, .zhin-sandbox .zhin-markdown-table td { padding: 8px 12px; border-right: 1px solid var(--sb-border); border-bottom: 1px solid var(--sb-border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
236
+ .zhin-sandbox .zhin-markdown-table th { background: var(--sb-muted); font-weight: 650; white-space: nowrap; }
237
+ .zhin-sandbox .zhin-markdown-table tbody tr:nth-child(even) td { background: var(--sb-muted); }
238
+ .zhin-sandbox .zhin-markdown-table tr:last-child td { border-bottom: 0; }
239
+ .zhin-sandbox .zhin-markdown-table th:last-child, .zhin-sandbox .zhin-markdown-table td:last-child { border-right: 0; }
240
+ .zhin-sandbox .zhin-code-block { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; margin: 4px 0; border: 1px solid hsl(218 18% 28%); border-radius: var(--sb-radius-md); background: hsl(220 19% 10%); color: hsl(210 30% 92%); font-family: var(--sb-mono); }
241
+ .zhin-sandbox .zhin-code-toolbar { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 6px 2px 12px; border-bottom: 1px solid hsl(218 16% 24%); background: hsl(220 18% 13%); }
242
+ .zhin-sandbox .zhin-code-language { color: hsl(210 14% 72%); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
243
+ .zhin-sandbox .zhin-code-streaming { color: hsl(151 48% 63%); font-size: 12px; }
244
+ .zhin-sandbox .zhin-code-streaming::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; animation: sandbox-breathe 1.2s ease-in-out infinite; }
245
+ .zhin-sandbox .zhin-code-actions { display: flex; gap: 2px; margin-left: auto; }
246
+ .zhin-sandbox .zhin-code-actions button, .zhin-sandbox .zhin-code-expand { min-height: 28px; border: 0; border-radius: var(--sb-radius-sm); background: transparent; color: hsl(210 14% 76%); font-size: 12px; }
247
+ .zhin-sandbox .zhin-code-actions button:hover:not(:disabled), .zhin-sandbox .zhin-code-expand:hover:not(:disabled) { background: hsl(215 18% 21%); color: hsl(0 0% 100%); }
248
+ .zhin-sandbox .zhin-code-pre { max-width: 100%; overflow: auto; padding: 8px 0 10px; font: inherit; font-size: 13px; line-height: 1.65; tab-size: 2; }
249
+ .zhin-sandbox .zhin-code-pre--wrap .zhin-code-line-content { white-space: pre-wrap; overflow-wrap: anywhere; }
250
+ .zhin-sandbox .zhin-code-line { display: table-row; }
251
+ .zhin-sandbox .zhin-code-line-number { display: table-cell; width: 42px; padding: 0 12px 0 8px; color: hsl(214 12% 55%); text-align: right; user-select: none; }
252
+ .zhin-sandbox .zhin-code-line-content { display: table-cell; min-width: 100%; padding-right: 16px; white-space: pre; }
253
+ .zhin-sandbox .zhin-code-token--comment { color: hsl(148 23% 60%); font-style: italic; }
254
+ .zhin-sandbox .zhin-code-token--string { color: hsl(44 68% 70%); }
255
+ .zhin-sandbox .zhin-code-token--number { color: hsl(192 62% 68%); }
256
+ .zhin-sandbox .zhin-code-token--keyword { color: hsl(328 63% 73%); font-weight: 500; }
257
+ .zhin-sandbox .zhin-code-token--literal { color: hsl(268 72% 76%); }
258
+ .zhin-sandbox .zhin-code-expand { width: 100%; padding: 6px; border-top: 1px solid hsl(218 16% 22%); border-radius: 0; background: hsl(220 18% 12%); }
259
+
260
+ /* ---------- Recovery panel ---------- */
261
+ .zhin-sandbox .agent-playground-recovery { display: grid; flex: none; gap: 12px; max-height: min(40dvh, 24rem); margin: 16px; overflow: auto; font-size: 14px; }
262
+ .zhin-sandbox .agent-playground-recovery > section, .zhin-sandbox .agent-playground-recovery > details { min-width: 0; padding: 14px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
263
+ .zhin-sandbox .agent-playground-recovery h3 { margin-bottom: 12px; font-size: 14px; font-weight: 600; }
264
+ .zhin-sandbox .agent-playground-recovery summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; cursor: pointer; }
265
+ .zhin-sandbox .agent-playground-recovery time { margin-left: auto; font-size: 12px; color: var(--sb-muted-fg); }
266
+ .zhin-sandbox .agent-playground-recovery details[open] summary { margin-bottom: 14px; }
267
+ .zhin-sandbox .agent-playground-recovery details > a { display: inline-flex; margin: 8px 12px 0 0; }
268
+ .zhin-sandbox .agent-playground-recovery > p[role=alert] { color: var(--sb-danger); overflow-wrap: anywhere; }
269
+ .zhin-sandbox .agent-playground-recovery > button, .zhin-sandbox .agent-playground-recovery > p > button { color: var(--sb-primary); }
270
+ .zhin-sandbox .agent-playground-main:has(> .agent-playground-recovery:not([hidden])) .agent-playground-empty { display: none; }
271
+
272
+ /* ---------- Inline run card ---------- */
273
+ .zhin-sandbox .agent-playground-inline-run { position: relative; overflow: hidden; margin-left: 40px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-lg); background: var(--sb-bg); }
274
+ .zhin-sandbox .agent-playground-inline-run-rail { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--sb-primary); }
275
+ .zhin-sandbox .agent-playground-inline-run.is-running .agent-playground-inline-run-rail { background: var(--sb-info); }
276
+ .zhin-sandbox .agent-playground-inline-run.is-failed .agent-playground-inline-run-rail { background: var(--sb-danger); }
277
+ .zhin-sandbox .agent-playground-inline-run.is-cancelled .agent-playground-inline-run-rail { background: var(--sb-warn); }
278
+ .zhin-sandbox .agent-playground-inline-run-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 14px 14px 12px 16px; }
279
+ .zhin-sandbox .agent-playground-inline-run-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-md); background: var(--sb-primary-soft); color: var(--sb-primary); }
280
+ .zhin-sandbox .agent-playground-inline-run-copy { min-width: 0; }
281
+ .zhin-sandbox .agent-playground-inline-run-copy > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--sb-muted-fg); }
282
+ .zhin-sandbox .agent-playground-inline-run-copy h3 { font-size: 14px; font-weight: 700; }
283
+ .zhin-sandbox .agent-playground-inline-run-copy p { display: -webkit-box; margin-top: 3px; overflow: hidden; font-size: 12px; line-height: 1.5; color: var(--sb-muted-fg); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
284
+ .zhin-sandbox .agent-playground-inline-run-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
285
+ .zhin-sandbox .agent-playground-inline-run-actions button { min-height: 30px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
286
+ .zhin-sandbox .agent-playground-inline-run-actions button.is-stop { background: var(--sb-danger-soft); border-color: var(--sb-danger-line); color: var(--sb-danger); }
287
+ .zhin-sandbox .agent-playground-inline-run-metrics { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); margin: 0; border-top: 1px solid var(--sb-border); border-bottom: 1px solid var(--sb-border); background: var(--sb-muted); font-variant-numeric: tabular-nums; }
288
+ .zhin-sandbox .agent-playground-inline-run-metrics > div { display: flex; align-items: baseline; justify-content: center; gap: 5px; min-width: 0; padding: 7px 6px; border-right: 1px solid var(--sb-border); }
289
+ .zhin-sandbox .agent-playground-inline-run-metrics > div:last-child { border-right: 0; }
290
+ .zhin-sandbox .agent-playground-inline-run-metrics dt { font-size: 12px; color: var(--sb-muted-fg); }
291
+ .zhin-sandbox .agent-playground-inline-run-metrics dd { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
292
+ .zhin-sandbox .agent-playground-inline-run-metrics .has-problem dd { color: var(--sb-danger); }
293
+ .zhin-sandbox .agent-playground-inline-run-steps { display: grid; padding: 6px 14px 6px 16px; list-style: none; }
294
+ .zhin-sandbox .agent-playground-inline-run-steps li { position: relative; display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 34px; }
295
+ .zhin-sandbox .agent-playground-inline-run-steps li:not(:last-child)::after { position: absolute; top: 20px; bottom: -14px; left: 5px; width: 1px; background: var(--sb-border); content: ""; }
296
+ .zhin-sandbox .agent-playground-inline-run-steps i { position: relative; z-index: 1; width: 10px; height: 10px; border: 2px solid var(--sb-bg); border-radius: 50%; background: var(--sb-primary); box-shadow: 0 0 0 1px var(--sb-primary-line); }
297
+ .zhin-sandbox .agent-playground-inline-run-steps li.is-running i { background: var(--sb-info); animation: sandbox-breathe 1.4s ease-in-out infinite; }
298
+ .zhin-sandbox .agent-playground-inline-run-steps li.is-failed i, .zhin-sandbox .agent-playground-inline-run-steps li.is-denied i { background: var(--sb-danger); }
299
+ .zhin-sandbox .agent-playground-inline-run-steps li.is-cancelled i { background: var(--sb-warn); }
300
+ .zhin-sandbox .agent-playground-inline-run-steps li > div { display: flex; flex-direction: column; min-width: 0; }
301
+ .zhin-sandbox .agent-playground-inline-run-steps strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
302
+ .zhin-sandbox .agent-playground-inline-run-steps small { overflow: hidden; font-size: 12px; color: var(--sb-muted-fg); text-overflow: ellipsis; white-space: nowrap; }
303
+ .zhin-sandbox .agent-playground-inline-run-steps li > span { font-size: 12px; color: var(--sb-muted-fg); font-variant-numeric: tabular-nums; }
304
+ .zhin-sandbox .agent-playground-inline-run-steps li.is-failed > span, .zhin-sandbox .agent-playground-inline-run-steps li.is-denied > span { color: var(--sb-danger); }
305
+ .zhin-sandbox .agent-playground-inline-run-empty { padding: 12px 16px; font-size: 12px; text-align: center; color: var(--sb-muted-fg); }
306
+ .zhin-sandbox .agent-playground-inline-run footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 8px 16px; }
307
+ .zhin-sandbox .agent-playground-inline-run footer button { min-height: 30px; padding: 2px 6px; border: 0; background: transparent; color: var(--sb-muted-fg); font-size: 12px; }
308
+ .zhin-sandbox .agent-playground-inline-run footer button:hover:not(:disabled) { color: var(--sb-primary); }
309
+ .zhin-sandbox .agent-playground-inline-run footer button:first-child svg { transition: transform .15s ease; }
310
+ .zhin-sandbox .agent-playground-inline-run footer button:first-child[aria-expanded="true"] svg { transform: rotate(180deg); }
311
+
312
+ /* ---------- Composer ---------- */
313
+ .zhin-sandbox .agent-playground-composer { position: relative; z-index: 2; display: grid; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--sb-border-soft); background: var(--sb-bg); }
314
+ .zhin-sandbox .sandbox-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
315
+ .zhin-sandbox .sandbox-toolbar-spacer { flex: 1; min-width: 16px; }
316
+ .zhin-sandbox .sandbox-tool-button { width: 34px; padding: 4px; color: var(--sb-muted-fg); }
317
+ .zhin-sandbox .sandbox-tool-button.is-active { background: var(--sb-primary); border-color: var(--sb-primary); color: var(--sb-primary-fg); }
318
+ .zhin-sandbox .sandbox-tool-button.is-active:hover:not(:disabled) { background: var(--sb-primary); opacity: .9; }
319
+ .zhin-sandbox .sandbox-composer-tabs { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border-radius: var(--sb-radius-md); background: var(--sb-muted); }
320
+ .zhin-sandbox .sandbox-composer-tabs button { min-height: 28px; padding: 2px 10px; border-color: transparent; background: transparent; color: var(--sb-muted-fg); font-size: 12px; white-space: nowrap; }
321
+ .zhin-sandbox .sandbox-composer-tabs button.active { background: var(--sb-bg); color: var(--sb-fg); box-shadow: 0 1px 4px var(--sb-shadow); }
322
+ .zhin-sandbox .sandbox-panel { display: grid; gap: 8px; max-height: 256px; overflow-y: auto; padding: 12px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-muted); }
323
+ .zhin-sandbox .sandbox-panel-hint { font-size: 12px; color: var(--sb-muted-fg); }
324
+ .zhin-sandbox .sandbox-panel .sandbox-submit { justify-self: start; }
325
+ .zhin-sandbox .sandbox-face-grid { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 4px; }
326
+ .zhin-sandbox .sandbox-face-button { width: 100%; min-width: 0; height: 40px; padding: 0; }
327
+ .zhin-sandbox .sandbox-face-img { width: 32px; height: 32px; }
328
+ .zhin-sandbox .sandbox-empty-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; font-size: 13px; color: var(--sb-muted-fg); }
329
+ .zhin-sandbox .sandbox-empty-hint > svg { opacity: .5; }
330
+ .zhin-sandbox .sandbox-editor-row { display: flex; align-items: flex-start; gap: 8px; }
331
+ .zhin-sandbox .sandbox-editor-wrap { position: relative; flex: 1; min-width: 0; }
332
+ .zhin-sandbox .sandbox-send { min-height: 44px; padding: 8px 16px; font-weight: 600; }
333
+ .zhin-sandbox [contenteditable="true"] { min-height: 44px; padding: 10px 12px; background: var(--sb-muted); border: 1px solid var(--sb-input); border-radius: var(--sb-radius-md); line-height: 1.6; overflow-y: auto; outline: none; }
334
+ .zhin-sandbox [contenteditable="true"]:focus-visible { border-color: var(--sb-ring); outline: 2px solid var(--sb-ring); outline-offset: 1px; }
335
+ .zhin-sandbox [contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--sb-muted-fg); pointer-events: none; }
94
336
  .zhin-sandbox .editor-face { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
95
- .zhin-sandbox .editor-image { max-height: 100px; max-width: 100%; display: inline-block; }
96
- .zhin-sandbox .sandbox-composer-tabs { display: flex; gap: 3px; padding: 3px; background: var(--ac-soft); border-radius: 8px; }
97
- .zhin-sandbox .sandbox-composer-tabs button { border-color: transparent; min-height: 26px; background: transparent; }
98
- .zhin-sandbox .sandbox-composer-tabs button.active { color: var(--ac-primary); background: var(--ac-panel); }
99
- .zhin-sandbox .sandbox-markdown-preview { max-height: 200px; min-height: 44px; padding: 12px; overflow: auto; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; }
100
- .zhin-sandbox .sandbox-markdown-preview-empty { color: var(--ac-muted); }
101
- .zhin-sandbox .agent-playground-inspector { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 90%); z-index: 30; display: flex; flex-direction: column; background: var(--ac-canvas); border-left: 1px solid var(--ac-line); overflow: auto; }
102
- .zhin-sandbox .agent-playground-inspector-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--ac-line); }
337
+ .zhin-sandbox .editor-image { max-width: 100%; max-height: 100px; display: inline-block; vertical-align: middle; border-radius: var(--sb-radius-sm); }
338
+ .zhin-sandbox .editor-video, .zhin-sandbox .editor-audio, .zhin-sandbox .editor-at { display: inline-flex; align-items: center; margin: 0 2px; padding: 0 8px; border-radius: var(--sb-radius-sm); background: var(--sb-accent); font-size: 13px; vertical-align: baseline; }
339
+ .zhin-sandbox .editor-at { color: var(--sb-primary); }
340
+ .zhin-sandbox .sandbox-markdown-preview { min-height: 44px; max-height: 240px; padding: 10px 12px; overflow: auto; background: var(--sb-muted); border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); }
341
+ .zhin-sandbox .sandbox-markdown-preview-empty { font-size: 13px; color: var(--sb-muted-fg); }
342
+ .zhin-sandbox .sandbox-at-popover { position: absolute; z-index: 50; min-width: 240px; max-height: 288px; overflow-y: auto; padding: 4px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: hsl(var(--popover, 0 0% 100%)); box-shadow: 0 8px 24px var(--sb-shadow); }
343
+ .zhin-sandbox .sandbox-at-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--sb-radius-sm); cursor: pointer; }
344
+ .zhin-sandbox .sandbox-at-item:hover { background: var(--sb-accent); }
345
+ .zhin-sandbox .sandbox-at-item > svg { flex-shrink: 0; color: var(--sb-muted-fg); }
346
+ .zhin-sandbox .sandbox-at-name { font-size: 13px; font-weight: 600; }
347
+ .zhin-sandbox .sandbox-at-id { font-size: 12px; color: var(--sb-muted-fg); }
348
+ .zhin-sandbox .sandbox-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; line-height: 1.8; color: var(--sb-muted-fg); }
349
+ .zhin-sandbox .sandbox-hints > svg { flex-shrink: 0; }
350
+ .zhin-sandbox .sandbox-hint-key { padding: 1px 6px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-muted); color: var(--sb-fg); font-family: var(--sb-mono); font-size: 12px; line-height: 1.4; }
351
+ .zhin-sandbox .sandbox-hint-text { margin-right: 6px; }
352
+
353
+ /* ---------- Inspector ---------- */
354
+ .zhin-sandbox .agent-playground-inspector { position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column; width: min(360px, 90%); min-width: 0; overflow-y: auto; background: var(--sb-sidebar); border-left: 1px solid var(--sb-border); box-shadow: -12px 0 32px var(--sb-shadow); scrollbar-width: thin; }
355
+ .zhin-sandbox .agent-playground-inspector-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 12px 16px; border-bottom: 1px solid var(--sb-border-soft); }
103
356
  .zhin-sandbox .agent-playground-inspector-head > div:last-child { display: flex; gap: 6px; }
104
- .zhin-sandbox .agent-playground-inspector-head span { font-size: 11px; color: var(--ac-muted); }
105
- .zhin-sandbox .agent-playground-inspector-head h2 { font-size: 17px; font-weight: 650; }
106
- .zhin-sandbox .agent-playground-inspector-tabs { display: flex; gap: 6px; padding: 14px 16px; }
107
- .zhin-sandbox .agent-playground-inspector-tabs button { flex: 1; background: transparent; border-color: transparent; }
108
- .zhin-sandbox .agent-playground-inspector-tabs button.active { background: var(--ac-panel); border-color: var(--ac-line); color: var(--ac-primary); }
109
- .zhin-sandbox .agent-playground-inspector-section { padding: 18px 20px; border-bottom: 1px solid var(--ac-line); }
110
- .zhin-sandbox .agent-playground-inspector-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 650; }
111
- .zhin-sandbox .agent-playground-inspector-title small { color: var(--ac-muted); font-weight: 400; font-size: 10px; }
112
- .zhin-sandbox .agent-playground-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
113
- .zhin-sandbox .agent-playground-metrics > div { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 4px 8px; padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
114
- .zhin-sandbox .agent-playground-metrics svg { width: 15px; height: 15px; color: var(--ac-muted); }
115
- .zhin-sandbox .agent-playground-metrics strong { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
116
- .zhin-sandbox .agent-playground-metrics span { grid-column: 2; font-size: 10px; color: var(--ac-muted); }
117
- .zhin-sandbox .agent-playground-metrics .has-problem svg { color: var(--ac-bad); }
118
- .zhin-sandbox .agent-playground-context-list { display: grid; gap: 8px; font-size: 11px; }
119
- .zhin-sandbox .agent-playground-context-list > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px; }
120
- .zhin-sandbox .agent-playground-context-list dt { color: var(--ac-muted); }
121
- .zhin-sandbox .agent-playground-context-list dd { overflow-wrap: anywhere; }
122
- .zhin-sandbox .agent-playground-trace-list { display: grid; gap: 14px; }
123
- .zhin-sandbox .agent-playground-trace-item { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; }
124
- .zhin-sandbox .agent-playground-trace-item > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
125
- .zhin-sandbox .agent-playground-trace-item strong { font-weight: 600; }
126
- .zhin-sandbox .agent-playground-trace-item small, .zhin-sandbox .agent-playground-trace-item time { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
127
- .zhin-sandbox .agent-playground-trace-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; margin-top: 6px; }
128
- .zhin-sandbox .agent-playground-trace-item.is-error .agent-playground-trace-dot { background: var(--ac-bad); }
129
- .zhin-sandbox .agent-playground-artifact-empty, .zhin-sandbox .agent-playground-trace-empty, .zhin-sandbox .agent-playground-trace-notice { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--ac-muted); padding: 12px 0; }
130
- .zhin-sandbox .agent-playground-trace-notice { color: var(--ac-bad); }
357
+ .zhin-sandbox .agent-playground-inspector-head > div:first-child > span { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--sb-primary); }
358
+ .zhin-sandbox .agent-playground-inspector-head h2 { font-size: 15px; font-weight: 700; }
359
+ .zhin-sandbox .agent-playground-inspector-head button { width: 34px; padding: 0; color: var(--sb-muted-fg); }
360
+ .zhin-sandbox .agent-playground-inspector-tabs { display: grid; flex-shrink: 0; grid-template-columns: 1fr 1.35fr; gap: 4px; margin: 10px 12px 0; padding: 3px; border: 1px solid var(--sb-border-soft); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
361
+ .zhin-sandbox .agent-playground-inspector-tabs button { min-width: 0; min-height: 32px; border-color: transparent; background: transparent; color: var(--sb-muted-fg); font-size: 12px; font-weight: 600; }
362
+ .zhin-sandbox .agent-playground-inspector-tabs button.active { background: var(--sb-muted); border-color: var(--sb-border); color: var(--sb-fg); }
363
+ .zhin-sandbox .agent-playground-inspector-tabs button span { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--sb-accent); color: var(--sb-muted-fg); font-size: 12px; font-variant-numeric: tabular-nums; }
364
+ .zhin-sandbox .agent-playground-inspector-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
365
+ .zhin-sandbox .agent-playground-inspector-section { padding: 14px; border-bottom: 1px solid var(--sb-border-soft); }
366
+ .zhin-sandbox .agent-playground-inspector-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 650; }
367
+ .zhin-sandbox .agent-playground-inspector-title small { font-size: 12px; font-weight: 500; letter-spacing: .03em; color: var(--sb-muted-fg); }
368
+ .zhin-sandbox .agent-playground-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); overflow: hidden; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
369
+ .zhin-sandbox .agent-playground-metrics > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; min-width: 0; padding: 10px; }
370
+ .zhin-sandbox .agent-playground-metrics > div:nth-child(odd) { border-right: 1px solid var(--sb-border); }
371
+ .zhin-sandbox .agent-playground-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--sb-border); }
372
+ .zhin-sandbox .agent-playground-metrics svg { grid-row: span 2; width: 15px; height: 15px; color: var(--sb-primary); }
373
+ .zhin-sandbox .agent-playground-metrics strong { overflow: hidden; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
374
+ .zhin-sandbox .agent-playground-metrics span { font-size: 12px; color: var(--sb-muted-fg); }
375
+ .zhin-sandbox .agent-playground-metrics .has-problem svg, .zhin-sandbox .agent-playground-metrics .has-problem strong { color: var(--sb-danger); }
376
+ .zhin-sandbox .agent-playground-context-list { display: grid; }
377
+ .zhin-sandbox .agent-playground-context-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; padding: 6px 0; border-bottom: 1px dashed var(--sb-border); font-size: 12px; }
378
+ .zhin-sandbox .agent-playground-context-list > div:last-child { border-bottom: 0; }
379
+ .zhin-sandbox .agent-playground-context-list dt { flex-shrink: 0; color: var(--sb-muted-fg); }
380
+ .zhin-sandbox .agent-playground-context-list dd { min-width: 0; overflow: hidden; font-family: var(--sb-mono); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
381
+ .zhin-sandbox .agent-playground-trace-section { flex: 1; }
382
+ .zhin-sandbox .agent-playground-trace-list { position: relative; display: grid; }
383
+ .zhin-sandbox .agent-playground-trace-list::before { position: absolute; top: 10px; bottom: 10px; left: 5px; width: 1px; background: var(--sb-border); content: ""; }
384
+ .zhin-sandbox .agent-playground-trace-item { position: relative; display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: start; gap: 8px; padding: 6px 0; font-size: 12px; }
385
+ .zhin-sandbox .agent-playground-trace-dot { position: relative; z-index: 1; width: 10px; height: 10px; margin-top: 5px; border: 2px solid var(--sb-sidebar); border-radius: 50%; background: var(--sb-muted-fg); box-shadow: 0 0 0 1px var(--sb-border); }
386
+ .zhin-sandbox .agent-playground-trace-item.is-success .agent-playground-trace-dot { background: var(--sb-ok); }
387
+ .zhin-sandbox .agent-playground-trace-item.is-running .agent-playground-trace-dot, .zhin-sandbox .agent-playground-trace-item.is-thinking .agent-playground-trace-dot { background: var(--sb-info); }
388
+ .zhin-sandbox .agent-playground-trace-item.is-tool .agent-playground-trace-dot, .zhin-sandbox .agent-playground-trace-item.is-usage .agent-playground-trace-dot { background: var(--sb-primary); }
389
+ .zhin-sandbox .agent-playground-trace-item.is-capability .agent-playground-trace-dot { background: var(--sb-warn); }
390
+ .zhin-sandbox .agent-playground-trace-item.is-problem .agent-playground-trace-dot { background: var(--sb-danger); }
391
+ .zhin-sandbox .agent-playground-trace-item > div { display: flex; flex-direction: column; min-width: 0; }
392
+ .zhin-sandbox .agent-playground-trace-item strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
393
+ .zhin-sandbox .agent-playground-trace-item small { overflow: hidden; font-size: 12px; color: var(--sb-muted-fg); text-overflow: ellipsis; white-space: nowrap; }
394
+ .zhin-sandbox .agent-playground-trace-item time { margin-top: 2px; font-size: 12px; color: var(--sb-muted-fg); font-variant-numeric: tabular-nums; }
395
+ .zhin-sandbox .agent-playground-trace-loading, .zhin-sandbox .agent-playground-trace-empty, .zhin-sandbox .agent-playground-trace-notice, .zhin-sandbox .agent-playground-artifact-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 80px; padding: 12px; border: 1px dashed var(--sb-border); border-radius: var(--sb-radius-md); font-size: 12px; line-height: 1.5; text-align: center; color: var(--sb-muted-fg); }
396
+ .zhin-sandbox .agent-playground-artifact-empty { flex-direction: column; min-height: 104px; }
397
+ .zhin-sandbox .agent-playground-trace-notice { min-height: 0; margin-bottom: 10px; border-color: var(--sb-warn-line); color: var(--sb-warn); }
398
+ .zhin-sandbox .agent-playground-trace-loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--sb-primary); animation: sandbox-pulse .9s ease-in-out infinite alternate; }
399
+ .zhin-sandbox .agent-playground-trace-loading i:nth-child(2) { animation-delay: .15s; }
400
+ .zhin-sandbox .agent-playground-trace-loading i:nth-child(3) { animation-delay: .3s; }
401
+ .zhin-sandbox .agent-playground-task-section, .zhin-sandbox .agent-playground-artifact-section { flex: 0 0 auto; }
402
+ .zhin-sandbox .agent-playground-artifact-section { flex: 1 0 auto; }
131
403
  .zhin-sandbox .agent-playground-task-list, .zhin-sandbox .agent-playground-artifact-list { display: grid; gap: 8px; }
132
- .zhin-sandbox .agent-playground-task-list article { padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
133
- .zhin-sandbox .agent-playground-task-list article > div { display: flex; justify-content: space-between; font-size: 11px; }
134
- .zhin-sandbox .agent-playground-task-list code { color: var(--ac-muted); font-size: 10px; }
135
- .zhin-sandbox .agent-playground-task-list dl { display: flex; gap: 14px; margin-top: 8px; font-size: 10px; }
136
- .zhin-sandbox .agent-playground-task-list dt { color: var(--ac-muted); }
137
- .zhin-sandbox .agent-playground-artifact-list article { border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; overflow: hidden; }
138
- .zhin-sandbox .agent-playground-artifact-list article > button { width: 100%; border: 0; border-radius: 0; padding: 12px; text-align: left; }
139
- .zhin-sandbox .agent-playground-artifact-list article > button > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
140
- .zhin-sandbox .agent-playground-artifact-list small { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
141
- .zhin-sandbox .agent-playground-artifact-list em { font-style: normal; color: var(--ac-muted); font-size: 10px; }
142
- .zhin-sandbox .agent-playground-artifact-detail { padding: 12px; font-size: 11px; display: grid; gap: 8px; }
143
- .zhin-sandbox .agent-playground-artifact-detail pre { max-height: 320px; overflow: auto; padding: 10px; background: var(--ac-canvas); border-radius: 6px; }
144
- .zhin-sandbox .agent-playground-artifact-detail footer { display: flex; justify-content: space-between; color: var(--ac-muted); }
145
- .zhin-sandbox .agent-playground-studio-link { display: grid; gap: 6px; padding: 18px 20px; font-size: 12px; margin-top: auto; border-top: 1px solid var(--ac-line); text-decoration: none; }
146
- .zhin-sandbox .agent-playground-studio-link span { display: flex; gap: 7px; align-items: center; }
147
- .zhin-sandbox .agent-playground-studio-link code { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
148
- .zhin-sandbox .agent-playground-inspector-overlay, .zhin-sandbox .channel-overlay { display: none; }
149
- .zhin-sandbox .agent-playground-inline-run { border: 1px solid var(--ac-line); border-radius: 10px; padding: 16px; background: var(--ac-canvas); }
150
- .zhin-sandbox .agent-playground-inline-run-head { display: flex; align-items: flex-start; gap: 10px; }
151
- .zhin-sandbox .agent-playground-inline-run-icon { color: var(--ac-muted); padding-top: 4px; }
152
- .zhin-sandbox .agent-playground-inline-run-copy { flex: 1; min-width: 0; }
153
- .zhin-sandbox .agent-playground-inline-run-copy > span { font-size: 10px; color: var(--ac-muted); }
154
- .zhin-sandbox .agent-playground-inline-run-copy h3 { font-size: 14px; font-weight: 600; }
155
- .zhin-sandbox .agent-playground-inline-run-copy p { font-size: 12px; color: var(--ac-muted); overflow-wrap: anywhere; margin-top: 4px; }
156
- .zhin-sandbox .agent-playground-inline-run-actions { display: flex; gap: 6px; }
157
- .zhin-sandbox .agent-playground-inline-run-metrics { display: flex; flex-wrap: wrap; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--ac-line); font-variant-numeric: tabular-nums; }
158
- .zhin-sandbox .agent-playground-inline-run-metrics dt { font-size: 10px; color: var(--ac-muted); }
159
- .zhin-sandbox .agent-playground-inline-run-metrics dd { font-size: 13px; font-weight: 600; }
160
- .zhin-sandbox .agent-playground-inline-run-steps { padding: 0; list-style: none; margin: 16px 0; display: grid; gap: 12px; }
161
- .zhin-sandbox .agent-playground-inline-run-steps li { display: flex; align-items: flex-start; gap: 8px; }
162
- .zhin-sandbox .agent-playground-inline-run-steps li > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
163
- .zhin-sandbox .agent-playground-inline-run-steps strong { font-size: 12px; font-weight: 600; }
164
- .zhin-sandbox .agent-playground-inline-run-steps small, .zhin-sandbox .agent-playground-inline-run-steps li > span { font-size: 10px; color: var(--ac-muted); overflow-wrap: anywhere; }
165
- .zhin-sandbox .agent-playground-inline-run-steps i { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; }
166
- .zhin-sandbox .agent-playground-inline-run-steps .is-failed i { background: var(--ac-bad); }
167
- .zhin-sandbox .agent-playground-inline-run-empty { font-size: 12px; padding-top: 12px; color: var(--ac-muted); }
168
- .zhin-sandbox .agent-playground-inline-run footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
169
- .zhin-sandbox .agent-playground-inline-run footer { margin-top: 12px; }
170
- .zhin-sandbox .agent-playground-conversation-details { padding: 20px; overflow: auto; flex: 1; }
171
- .zhin-sandbox .agent-playground-history-navigation, .zhin-sandbox .agent-playground-history-notice { text-align: center; padding: 10px; color: var(--ac-muted); font-size: 12px; }
404
+ .zhin-sandbox .agent-playground-task-list article { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 2px 8px; padding: 10px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
405
+ .zhin-sandbox .agent-playground-task-list article > i { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--sb-muted-fg); }
406
+ .zhin-sandbox .agent-playground-task-list article.is-running > i { background: var(--sb-info); }
407
+ .zhin-sandbox .agent-playground-task-list article.is-completed > i { background: var(--sb-ok); }
408
+ .zhin-sandbox .agent-playground-task-list article.is-failed > i { background: var(--sb-danger); }
409
+ .zhin-sandbox .agent-playground-task-list article.is-cancelled > i { background: var(--sb-warn); }
410
+ .zhin-sandbox .agent-playground-task-list article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
411
+ .zhin-sandbox .agent-playground-task-list strong { font-size: 13px; font-weight: 650; }
412
+ .zhin-sandbox .agent-playground-task-list code { overflow: hidden; font-family: var(--sb-mono); font-size: 12px; color: var(--sb-muted-fg); text-overflow: ellipsis; }
413
+ .zhin-sandbox .agent-playground-task-list dl { display: grid; grid-column: 2; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--sb-border); }
414
+ .zhin-sandbox .agent-playground-task-list dl > div { display: flex; flex-direction: column; }
415
+ .zhin-sandbox .agent-playground-task-list dt { font-size: 12px; color: var(--sb-muted-fg); }
416
+ .zhin-sandbox .agent-playground-task-list dd { font-size: 12px; font-variant-numeric: tabular-nums; }
417
+ .zhin-sandbox .agent-playground-artifact-list article { overflow: hidden; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-md); background: var(--sb-bg); }
418
+ .zhin-sandbox .agent-playground-artifact-list article.is-expanded { border-color: var(--sb-primary-line); }
419
+ .zhin-sandbox .agent-playground-artifact-list article > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; text-align: left; }
420
+ .zhin-sandbox .agent-playground-artifact-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-sm); background: var(--sb-primary-soft); color: var(--sb-primary); }
421
+ .zhin-sandbox .agent-playground-artifact-list article > button > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
422
+ .zhin-sandbox .agent-playground-artifact-list strong, .zhin-sandbox .agent-playground-artifact-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
423
+ .zhin-sandbox .agent-playground-artifact-list strong { font-size: 13px; font-weight: 600; }
424
+ .zhin-sandbox .agent-playground-artifact-list small, .zhin-sandbox .agent-playground-artifact-list em { font-size: 12px; font-style: normal; color: var(--sb-muted-fg); }
425
+ .zhin-sandbox .agent-playground-artifact-list article.is-completed em { color: var(--sb-ok); }
426
+ .zhin-sandbox .agent-playground-artifact-list article.is-failed em, .zhin-sandbox .agent-playground-artifact-list article.is-denied em { color: var(--sb-danger); }
427
+ .zhin-sandbox .agent-playground-artifact-list article > button > svg { color: var(--sb-muted-fg); transition: transform .16s ease; }
428
+ .zhin-sandbox .agent-playground-artifact-list article.is-expanded > button > svg { transform: rotate(180deg); }
429
+ .zhin-sandbox .agent-playground-artifact-detail { display: grid; gap: 8px; padding: 0 10px 10px 46px; font-size: 12px; }
430
+ .zhin-sandbox .agent-playground-artifact-detail > code { font-family: var(--sb-mono); font-size: 12px; color: var(--sb-muted-fg); overflow-wrap: anywhere; }
431
+ .zhin-sandbox .agent-playground-artifact-detail pre { max-height: 240px; overflow: auto; padding: 10px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-muted); font-family: var(--sb-mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
432
+ .zhin-sandbox .agent-playground-artifact-detail footer { display: flex; justify-content: space-between; gap: 8px; color: var(--sb-muted-fg); }
433
+ .zhin-sandbox .sandbox-file-link { display: inline-flex; align-items: center; gap: 4px; color: var(--sb-primary); }
434
+ .zhin-sandbox .agent-playground-studio-link { display: flex; flex-shrink: 0; flex-direction: column; gap: 4px; margin: 12px; padding: 10px 12px; border: 1px solid var(--sb-primary-line); border-radius: var(--sb-radius-md); background: var(--sb-primary-soft); color: var(--sb-primary); font-size: 13px; text-decoration: none; }
435
+ .zhin-sandbox .agent-playground-studio-link > span { display: flex; align-items: center; gap: 6px; font-weight: 650; }
436
+ .zhin-sandbox .agent-playground-studio-link code { overflow: hidden; font-family: var(--sb-mono); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
437
+
438
+ /* ---------- Animations ---------- */
439
+ @keyframes sandbox-spin { to { transform: rotate(360deg); } }
440
+ @keyframes sandbox-breathe { 0%, 100% { opacity: .5; transform: scale(.92); } 50% { opacity: 1; transform: scale(1); } }
441
+ @keyframes sandbox-pulse { from { opacity: .25; transform: translateY(1px); } to { opacity: 1; transform: translateY(-1px); } }
442
+
443
+ /* ---------- Responsive ---------- */
172
444
  @media (min-width: 1280px) {
173
445
  .zhin-sandbox.agent-playground-shell.has-inspector { grid-template-columns: 232px minmax(0,1fr) 330px; }
174
- .zhin-sandbox .agent-playground-inspector { position: static; width: auto; }
446
+ .zhin-sandbox .agent-playground-inspector { position: static; width: auto; box-shadow: none; }
175
447
  }
176
448
  @media (max-width: 1279px) {
177
- .zhin-sandbox .agent-playground-inspector-overlay { display: block; position: absolute; inset: 0; background: #18181b40; z-index: 25; }
449
+ .zhin-sandbox .agent-playground-inspector-overlay { display: block; position: absolute; inset: 0; z-index: 25; background: var(--sb-overlay); }
450
+ }
451
+ @media (max-width: 1023px) {
452
+ .zhin-sandbox .agent-playground-inline-run-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
453
+ .zhin-sandbox .agent-playground-inline-run-metrics > div:nth-child(3) { border-right: 0; }
454
+ .zhin-sandbox .agent-playground-inline-run-metrics > div:nth-child(n+4) { border-top: 1px solid var(--sb-border); }
178
455
  }
179
456
  @media (max-width: 767px) {
180
- .zhin-sandbox.agent-playground-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); height: calc(100dvh - 92px); min-height: 480px; border-radius: 10px; }
181
- .zhin-sandbox .agent-playground-mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--ac-line); }
182
- .zhin-sandbox .agent-playground-mobilebar strong { font-size: 13px; }
183
- .zhin-sandbox .agent-playground-mobilebar button { font-size: 11px; padding: 6px; }
184
- .zhin-sandbox .agent-playground-sessions { display: none; position: absolute; inset: 0 auto 0 0; width: min(280px,85%); z-index: 40; }
457
+ .zhin-sandbox.agent-playground-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); height: calc(100dvh - 92px); min-height: 480px; border-radius: var(--sb-radius-md); }
458
+ .zhin-sandbox button, .zhin-sandbox .agent-playground-run-actions > a { min-height: 44px; min-width: 44px; }
459
+ .zhin-sandbox :where(input:not([type="checkbox"]), select) { min-height: 44px; font-size: 16px; }
460
+ .zhin-sandbox .agent-playground-network-toggle { min-height: 44px; }
461
+ .zhin-sandbox .agent-playground-network-toggle i { width: 44px; height: 26px; }
462
+ .zhin-sandbox .agent-playground-network-toggle i::after { width: 20px; height: 20px; }
463
+ .zhin-sandbox .agent-playground-network-toggle input:checked + i::after { transform: translateX(18px); }
464
+ .zhin-sandbox .agent-playground-mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--sb-border); background: var(--sb-bg); }
465
+ .zhin-sandbox .agent-playground-mobilebar strong { font-size: 14px; }
466
+ .zhin-sandbox .agent-playground-mobilebar button { min-height: 44px; padding: 6px 10px; border-color: transparent; background: transparent; color: var(--sb-muted-fg); font-size: 13px; }
467
+ .zhin-sandbox .agent-playground-sessions { display: none; position: absolute; inset: 0 auto 0 0; z-index: 40; width: min(300px, 88%); box-shadow: 12px 0 32px var(--sb-shadow); }
185
468
  .zhin-sandbox .agent-playground-sessions.show { display: flex; }
186
- .zhin-sandbox .channel-overlay { display: block; position: absolute; inset: 0; z-index: 35; background: #18181b40; }
187
- .zhin-sandbox .agent-playground-runbar { padding: 12px; align-items: flex-start; flex-direction: column; gap: 10px; }
188
- .zhin-sandbox .agent-playground-run-actions { justify-content: flex-start; }
469
+ .zhin-sandbox .channel-overlay { display: block; position: absolute; inset: 0; z-index: 35; background: var(--sb-overlay); }
470
+ .zhin-sandbox .agent-playground-runbar { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 12px; }
471
+ /* In a column the 14rem flex-basis would become the identity row height. */
472
+ .zhin-sandbox .agent-playground-run-identity { flex: 0 0 auto; width: 100%; }
473
+ .zhin-sandbox .agent-playground-run-actions { flex-wrap: nowrap; justify-content: flex-start; margin-left: 0; overflow-x: auto; max-width: 100%; }
189
474
  .zhin-sandbox .agent-playground-run-actions > button[aria-controls="sandbox-run-inspector"] { display: none; }
190
- .zhin-sandbox .agent-playground-message-scroll { padding: 20px 12px; }
191
- .zhin-sandbox .agent-playground-composer { padding: 12px; }
192
- .zhin-sandbox .agent-playground-composer > div:last-child { max-height: 32px; overflow: hidden; }
193
- .zhin-sandbox .agent-playground-confirm { padding: 12px; flex-wrap: wrap; }
475
+ .zhin-sandbox .agent-playground-run-actions > a, .zhin-sandbox .agent-playground-run-actions > button { flex-shrink: 0; white-space: nowrap; width: auto; font-size: 13px; }
476
+ .zhin-sandbox .agent-playground-run-title span { display: none; }
477
+ .zhin-sandbox .agent-playground-message-scroll { padding: 16px 10px; }
478
+ .zhin-sandbox .agent-playground-message-main { max-width: calc(100% - 40px); }
479
+ .zhin-sandbox .agent-playground-message.is-user .agent-playground-message-main { max-width: 86%; }
480
+ .zhin-sandbox .agent-playground-message-content { padding: 8px 12px; }
481
+ .zhin-sandbox .agent-playground-composer { padding: 10px 12px; }
482
+ .zhin-sandbox .sandbox-toolbar-spacer { display: none; }
483
+ .zhin-sandbox .sandbox-composer-tabs button { padding: 4px 12px; }
484
+ .zhin-sandbox .sandbox-face-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
485
+ .zhin-sandbox .sandbox-face-button { height: 44px; }
486
+ .zhin-sandbox .sandbox-hints { display: none; }
487
+ .zhin-sandbox .agent-playground-confirm, .zhin-sandbox .sandbox-notice { padding: 10px 12px; flex-wrap: wrap; }
194
488
  .zhin-sandbox .agent-playground-confirm > div { flex-basis: 100%; }
195
- .zhin-sandbox .agent-playground-run-settings { padding: 12px; max-height: 240px; overflow: auto; }
196
- .zhin-sandbox .agent-playground-empty { margin-top: 24px; }
197
- .zhin-sandbox .agent-playground-prompts { flex-direction: column; }
489
+ .zhin-sandbox .agent-playground-run-settings { max-height: 256px; overflow-y: auto; padding: 12px; }
490
+ .zhin-sandbox .agent-playground-empty { padding: 20px 0; }
491
+ .zhin-sandbox .agent-playground-prompts { grid-template-columns: 1fr; }
492
+ .zhin-sandbox .agent-playground-inline-run { margin-left: 0; }
493
+ .zhin-sandbox .agent-playground-inline-run-head { grid-template-columns: auto minmax(0,1fr); }
494
+ .zhin-sandbox .agent-playground-inline-run-actions { grid-column: 1 / -1; justify-content: flex-start; }
495
+ .zhin-sandbox .agent-playground-scope-picker button, .zhin-sandbox .agent-playground-section-label button, .zhin-sandbox .agent-playground-inspector-tabs button, .zhin-sandbox .sandbox-composer-tabs button, .zhin-sandbox .agent-playground-confirm button, .zhin-sandbox .agent-playground-inline-run-actions button, .zhin-sandbox .agent-playground-inline-run footer button, .zhin-sandbox .zhin-code-actions button, .zhin-sandbox .zhin-code-expand, .zhin-sandbox .sandbox-notice button, .zhin-sandbox .agent-playground-history-navigation button, .zhin-sandbox .agent-playground-inspector-head button, .zhin-sandbox .sandbox-tool-button { min-height: 44px; min-width: 44px; }
496
+ }
497
+ @media (prefers-reduced-motion: reduce) {
498
+ .zhin-sandbox *, .zhin-sandbox *::before, .zhin-sandbox *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
198
499
  }
199
500
  `;