@clowder-ai/companion 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (57) hide show
  1. package/NOTICE +10 -2
  2. package/README.md +59 -0
  3. package/manifest.json +5 -5
  4. package/package.json +19 -6
  5. package/plugin.yaml +5 -5
  6. package/renderer/call-transcript-view.mjs +238 -0
  7. package/renderer/client.mjs +13 -1
  8. package/renderer/companion-identity.mjs +42 -0
  9. package/renderer/conversation.mjs +144 -24
  10. package/renderer/decision-view.mjs +124 -0
  11. package/renderer/errors.mjs +4 -4
  12. package/renderer/index.html +168 -26
  13. package/renderer/living-body.mjs +147 -0
  14. package/renderer/living-edge.mjs +16 -0
  15. package/renderer/living-geometry.mjs +96 -0
  16. package/renderer/motion-facts.mjs +108 -0
  17. package/renderer/native-window-travel.mjs +89 -0
  18. package/renderer/native-work-motion.mjs +39 -0
  19. package/renderer/peer.mjs +1 -1
  20. package/renderer/pet-controls.mjs +130 -0
  21. package/renderer/pet-motion-assets.mjs +22 -0
  22. package/renderer/pet-motion.mjs +343 -0
  23. package/renderer/recent-bubble.mjs +74 -0
  24. package/renderer/settings-controller.mjs +171 -0
  25. package/renderer/settings-view.mjs +234 -0
  26. package/renderer/skins/ragdoll-v1.png +0 -0
  27. package/renderer/skins/xianxian-codex.webp +0 -0
  28. package/renderer/skins/xianxian-living/clips/carry.webm +0 -0
  29. package/renderer/skins/xianxian-living/clips/peek.webm +0 -0
  30. package/renderer/skins/xianxian-living/clips/peek_fade.webm +0 -0
  31. package/renderer/skins/xianxian-living/clips/pounce.webm +0 -0
  32. package/renderer/skins/xianxian-living/clips/sleep.webm +0 -0
  33. package/renderer/skins/xianxian-living/clips/think.webm +0 -0
  34. package/renderer/skins/xianxian-living/clips/trot.webm +0 -0
  35. package/renderer/skins/xianxian-living/clips/wait.webm +0 -0
  36. package/renderer/skins/xianxian-living/clips/wake.webm +0 -0
  37. package/renderer/skins/xianxian-living/layers/body.webp +0 -0
  38. package/renderer/skins/xianxian-living/layers/closed.webp +0 -0
  39. package/renderer/skins/xianxian-living/layers/earL.webp +0 -0
  40. package/renderer/skins/xianxian-living/layers/earR.webp +0 -0
  41. package/renderer/skins/xianxian-living/layers/head.webp +0 -0
  42. package/renderer/skins/xianxian-living/layers/irisL.webp +0 -0
  43. package/renderer/skins/xianxian-living/layers/irisR.webp +0 -0
  44. package/renderer/skins/xianxian-living/layers/meta.json +88 -0
  45. package/renderer/skins/xianxian-living/layers/mouth.webp +0 -0
  46. package/renderer/skins/xianxian-living/layers/scared.webp +0 -0
  47. package/renderer/skins/xianxian-living/layers/tail.webp +0 -0
  48. package/renderer/skins/xianxian-living/layers/whiteL.webp +0 -0
  49. package/renderer/skins/xianxian-living/layers/whiteR.webp +0 -0
  50. package/renderer/skins/xianxian-sleeping-row.png +0 -0
  51. package/renderer/skins/xianxian-staged-thought-row.png +0 -0
  52. package/renderer/skins/xianxian-working-row.png +0 -0
  53. package/renderer/skins/yarn-ball.png +0 -0
  54. package/renderer/style.css +240 -308
  55. package/renderer/surface.mjs +350 -69
  56. package/renderer/transcript-view.mjs +60 -7
  57. package/source-lock.json +138 -4
@@ -1,309 +1,241 @@
1
- * {
2
- box-sizing: border-box;
3
- }
4
- html,
5
- body {
6
- margin: 0;
7
- width: 100%;
8
- height: 100%;
9
- overflow: hidden;
10
- background: transparent;
11
- }
12
- body {
13
- font:
14
- 13px -apple-system,
15
- BlinkMacSystemFont,
16
- "PingFang SC",
17
- sans-serif;
18
- color: var(--cafe-text);
19
- display: flex;
20
- flex-direction: column;
21
- align-items: center;
22
- justify-content: flex-end;
23
- padding: 10px;
24
- }
25
- [hidden] {
26
- display: none !important;
27
- }
28
- button,
29
- input {
30
- font: inherit;
31
- }
32
- button {
33
- cursor: pointer;
34
- border: 0;
35
- color: inherit;
36
- }
37
- button:focus-visible,
38
- input:focus-visible {
39
- outline: 2px solid var(--cafe-accent);
40
- outline-offset: 3px;
41
- }
42
- button:disabled {
43
- opacity: 0.5;
44
- cursor: default;
45
- }
46
- #pet {
47
- width: 96px;
48
- height: 104px;
49
- flex-shrink: 0;
50
- background: url("./skins/yanyan-codex.webp") 0 0 / 768px 936px;
51
- animation: idle 4.8s steps(6) infinite;
52
- -webkit-app-region: drag;
53
- filter: drop-shadow(0 4px 5px #0003);
54
- }
55
- @keyframes idle {
56
- to {
57
- background-position-x: -576px;
58
- }
59
- }
60
- #dock {
61
- width: 100%;
62
- flex-shrink: 0;
63
- padding: 11px 12px 10px;
64
- background: var(--cafe-surface-elevated);
65
- border: 1px solid var(--cafe-border-subtle);
66
- border-radius: 20px;
67
- box-shadow: 0 4px 16px #0002;
68
- }
69
- .voice-state {
70
- display: flex;
71
- align-items: center;
72
- justify-content: center;
73
- gap: 7px;
74
- min-height: 25px;
75
- }
76
- #orb {
77
- width: 8px;
78
- height: 8px;
79
- flex-shrink: 0;
80
- border-radius: 50%;
81
- background: var(--cafe-text-muted);
82
- }
83
- body.connecting #orb {
84
- background: var(--semantic-warning);
85
- animation: pulse 1.5s ease-in-out infinite;
86
- }
87
- body.connected #orb {
88
- background: var(--semantic-success);
89
- animation: pulse 3.5s ease-in-out infinite;
90
- }
91
- @keyframes pulse {
92
- 50% {
93
- opacity: 0.5;
94
- }
95
- }
96
- #status {
97
- margin: 0;
98
- line-height: 1.45;
99
- text-align: center;
100
- font-size: 12px;
101
- overflow-wrap: anywhere;
102
- }
103
- #idle {
104
- padding: 7px 0 4px;
105
- }
106
- #begin {
107
- width: 100%;
108
- border-radius: 12px;
109
- padding: 10px 20px;
110
- font-weight: 600;
111
- background: var(--accent-100);
112
- }
113
- #begin:hover {
114
- background: var(--accent-200);
115
- }
116
- #controls {
117
- display: grid;
118
- grid-template-columns: repeat(4, 1fr);
119
- gap: 4px;
120
- padding: 6px 0 9px;
121
- }
122
- #controls button {
123
- display: flex;
124
- flex-direction: column;
125
- align-items: center;
126
- justify-content: center;
127
- gap: 5px;
128
- min-height: 51px;
129
- border-radius: 11px;
130
- background: transparent;
131
- font-size: 11px;
132
- white-space: nowrap;
133
- }
134
- #controls button:hover {
135
- background: var(--cafe-surface);
136
- }
137
- #controls button[aria-pressed="true"],
138
- #controls button[aria-expanded="true"] {
139
- background: var(--accent-100);
140
- color: var(--accent-700);
141
- }
142
- #controls #end {
143
- color: var(--semantic-critical);
144
- }
145
- #controls #end:hover {
146
- background: var(--semantic-critical-surface);
147
- }
148
- #controls svg {
149
- width: 19px;
150
- height: 19px;
151
- stroke: currentColor;
152
- fill: none;
153
- stroke-width: 1.8;
154
- stroke-linecap: round;
155
- stroke-linejoin: round;
156
- }
157
- #access {
158
- display: flex;
159
- align-items: center;
160
- justify-content: center;
161
- gap: 8px;
162
- padding-top: 7px;
163
- border-top: 1px solid var(--cafe-border-subtle);
164
- }
165
- #share {
166
- flex: 1;
167
- min-height: 32px;
168
- padding: 6px 10px;
169
- border-radius: 9px;
170
- font-weight: 600;
171
- background: var(--accent-100);
172
- color: var(--accent-700);
173
- }
174
- #share:hover {
175
- background: var(--accent-200);
176
- }
177
- #share[aria-pressed="true"] {
178
- background: var(--semantic-success-surface);
179
- color: var(--semantic-success);
180
- }
181
- #documents {
182
- background: transparent;
183
- color: var(--cafe-text-secondary);
184
- font-size: 11px;
185
- padding: 7px 3px;
186
- border-radius: 6px;
187
- }
188
- #documents:hover {
189
- background: var(--cafe-surface);
190
- }
191
- #screen-status {
192
- margin: 8px 0 0;
193
- padding: 7px 9px;
194
- font-size: 11px;
195
- line-height: 1.5;
196
- overflow-wrap: anywhere;
197
- border-radius: 8px;
198
- background: var(--semantic-warning-surface);
199
- color: var(--cafe-text-secondary);
200
- }
201
- #screen-status[data-state="sharing"] {
202
- background: var(--semantic-success-surface);
203
- }
204
- #connection-scope {
205
- margin: 7px 0 0;
206
- text-align: center;
207
- font-size: 10px;
208
- line-height: 1.4;
209
- color: var(--cafe-text-muted);
210
- }
211
- #details {
212
- align-self: stretch;
213
- min-height: 0;
214
- flex: 1;
215
- margin-bottom: 5px;
216
- background: var(--cafe-surface-elevated);
217
- border: 1px solid var(--cafe-border-subtle);
218
- border-radius: 18px;
219
- overflow: hidden;
220
- display: flex;
221
- flex-direction: column;
222
- box-shadow: 0 3px 16px #0002;
223
- }
224
- #details header {
225
- display: flex;
226
- align-items: center;
227
- gap: 9px;
228
- padding: 10px 14px;
229
- border-bottom: 1px solid var(--cafe-border-subtle);
230
- }
231
- #details header span {
232
- color: var(--cafe-text-muted);
233
- font-size: 11px;
234
- flex: 1;
235
- }
236
- #collapse {
237
- background: transparent;
238
- font-size: 12px;
239
- padding: 4px;
240
- color: var(--cafe-text-secondary);
241
- }
242
- #transcript {
243
- min-height: 0;
244
- flex: 1;
245
- overflow-y: auto;
246
- padding: 10px 14px;
247
- line-height: 1.65;
248
- }
249
- #transcript p {
250
- margin: 0 0 12px;
251
- white-space: pre-wrap;
252
- overflow-wrap: anywhere;
253
- }
254
- #transcript .user {
255
- color: var(--cafe-text-secondary);
256
- }
257
- #transcript .user::before,
258
- #transcript .assistant::before {
259
- display: block;
260
- margin-bottom: 3px;
261
- font-size: 10px;
262
- color: var(--cafe-text-muted);
263
- }
264
- #transcript .user::before {
265
- content: "你";
266
- }
267
- #transcript .assistant::before {
268
- content: var(--speaker-label, "猫猫");
269
- }
270
- #transcript .tool {
271
- font-size: 11px;
272
- color: var(--cafe-text-secondary);
273
- }
274
- .empty {
275
- color: var(--cafe-text-muted);
276
- }
277
- #compose {
278
- display: flex;
279
- align-items: center;
280
- gap: 6px;
281
- border-top: 1px solid var(--cafe-border-subtle);
282
- padding: 9px;
283
- }
284
- #message {
285
- width: 100%;
286
- min-width: 0;
287
- border: 0;
288
- padding: 5px 3px;
289
- background: transparent;
290
- color: inherit;
291
- }
292
- #compose button {
293
- border-radius: 50%;
294
- background: var(--accent-100);
295
- min-width: 30px;
296
- height: 30px;
297
- }
1
+ @import url("./theme.css");
2
+ :root {
3
+ --pet-scale: 1;
4
+ --desktop-paper: #fffbf6;
5
+ --desktop-work: #fcf7f0;
6
+ --desktop-rail: #efe9e3;
7
+ --desktop-ink: #141413;
8
+ --desktop-body: #3d3d3a;
9
+ --desktop-muted: #6f6b63;
10
+ --desktop-line: #e5dfd5;
11
+ --desktop-line-strong: #d8d1c6;
12
+ --desktop-primary: #b05f45;
13
+ --desktop-danger: #b3362c;
14
+ --desktop-success: #3f8552;
15
+ --desktop-warning: #a8721c;
16
+ }
17
+ * { box-sizing: border-box; }
18
+ [hidden] { display: none !important; }
19
+ body { margin: 0; overflow: hidden; color: var(--desktop-ink); background: transparent; font: 14px Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
20
+ button, textarea, input { font: inherit; }
21
+ button { cursor: pointer; color: inherit; }
22
+ button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--cafe-accent); outline-offset: 3px; }
23
+ button:disabled { opacity: .45; cursor: default; }
24
+ .icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
25
+ .icon { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
26
+ #desktop { position: relative; width: 100vw; height: 100vh; }
27
+ #anchor { position: absolute; left: 8px; top: 8px; width: calc(120px * var(--pet-scale)); height: calc(130px * var(--pet-scale)); }
28
+ #pet { width: 120px; height: 130px; display: block; border: 0; padding: 0; background: url("./skins/xianxian-codex.webp") 0 0 / 960px 1170px; filter: drop-shadow(0 6px 4px #0002); touch-action: none; cursor: grab; transform: scale(var(--pet-scale)); transform-origin: left top; }
29
+ #pet.dragging { cursor: grabbing; }
30
+ #pet[data-skin="xianxian-codex"] { position: relative; background-image: none; overflow: visible; }
31
+ #living-sit { position: absolute; left: 0; bottom: 10px; width: 120px; height: 120px; overflow: visible; pointer-events: none; }
32
+ #living-video, #living-video-transition { position: absolute; object-fit: fill; pointer-events: none; }
33
+ #pet[data-direction="left"] #living-video, #pet[data-direction="left"] #living-video-transition { transform: scaleX(-1); }
34
+ #pet[data-action="held"] #living-sit { transform: translateY(-4px) scale(.98); transform-origin: 50% 80%; }
35
+ #living-sit [data-layer="tail"] { transform-box: view-box; transform-origin: 168px 456px; animation: living-tail 3.4s ease-in-out infinite; }
36
+ #living-sit [data-layer="head"] { transform-box: view-box; transform-origin: 300px 280px; animation: living-head 5.5s ease-in-out infinite; }
37
+ #living-sit [data-layer="ear-left"], #living-sit [data-layer="ear-right"] { transform-box: view-box; }
38
+ #living-sit [data-layer="ear-left"] { transform-origin: 219px 101px; }
39
+ #living-sit [data-layer="ear-right"] { transform-origin: 391px 100px; }
40
+ #pet[data-pose="listening"] #living-sit [data-layer="ear-left"] { transform: rotate(-8deg); }
41
+ #pet[data-pose="listening"] #living-sit [data-layer="ear-right"] { transform: rotate(8deg); }
42
+ #living-sit [data-layer="closed"] { opacity: 0; animation: living-blink 5.8s linear infinite; }
43
+ #pet[data-action="idle"] #living-sit [data-layer="tail"] { animation: living-idle-tail 4.8s ease-in-out infinite; }
44
+ #pet[data-action="idle"] #living-sit [data-layer="head"] { animation: living-idle-head 6.8s ease-in-out infinite; }
45
+ #pet[data-action="idle"] #living-sit [data-layer="ear-left"] { animation: living-idle-ear-left 8.1s ease-in-out infinite; }
46
+ #pet[data-action="idle"] #living-sit [data-layer="ear-right"] { animation: living-idle-ear-right 7.3s ease-in-out infinite; }
47
+ #pet[data-action="idle"] #living-sit [data-layer="closed"] { animation: living-idle-blink 5.8s steps(1, end) infinite; }
48
+ #living-sit [data-layer="mouth"], #living-sit [data-layer="scared"] { opacity: 0; }
49
+ #pet[data-pose="scared"] #living-sit [data-layer="scared"] { opacity: 1; }
50
+ #pet[data-pose="sleeping"] #living-sit [data-layer="closed"] { opacity: 1; animation: none; }
51
+ @keyframes living-tail { 50% { transform: rotate(5deg); } }
52
+ @keyframes living-head { 50% { transform: rotate(2deg); } }
53
+ @keyframes living-blink { 0%, 96%, 100% { opacity: 0; } 97%, 98% { opacity: 1; } }
54
+ @keyframes living-idle-tail { 0%, 12%, 100% { transform: rotate(0); } 34% { transform: rotate(10deg); } 62% { transform: rotate(-8deg); } 80% { transform: rotate(3deg); } }
55
+ @keyframes living-idle-head { 0%, 12%, 100% { transform: rotate(0); } 35% { transform: rotate(5deg); } 69% { transform: rotate(-3deg); } }
56
+ @keyframes living-idle-ear-left { 0%, 68%, 76%, 100% { transform: rotate(0); } 71% { transform: rotate(-9deg); } 73% { transform: rotate(3deg); } }
57
+ @keyframes living-idle-ear-right { 0%, 30%, 39%, 100% { transform: rotate(0); } 33% { transform: rotate(8deg); } 36% { transform: rotate(-3deg); } }
58
+ @keyframes living-idle-blink { 0%, 24%, 30%, 74%, 80%, 100% { opacity: 0; } 25%, 29%, 75%, 79% { opacity: 1; } }
59
+ @keyframes living-wake-anchor {
60
+ from { left: var(--living-left-start); top: var(--living-top-start); }
61
+ to { left: var(--living-left-end); top: var(--living-top-end); }
62
+ }
63
+ #indicators { position: absolute; bottom: 0; right: 0; display: flex; gap: 4px; }
64
+ #indicators button { width: 32px; height: 32px; border: 1px solid #fff9; border-radius: 50%; display: grid; place-items: center; background: #236b59; color: white; box-shadow: 0 2px 5px #0003; }
65
+ #indicators button:hover { background: #ab4842; }
66
+ #indicators button[data-state="connecting"] { background: #a77b36; animation: pulse 1.8s infinite; }
67
+ #indicators button[data-state="muted"] { background: #5f6670; }
68
+ #indicators button[data-state="receive-only"] { background: #476dac; }
69
+ #indicators svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
70
+ #share-badge { background: #476dac !important; }
71
+ #pending-badge { width: auto !important; min-width: 32px; padding: 0 9px; border-radius: 999px !important; background: #9b6841 !important; font-size: 11px; font-weight: 700; white-space: nowrap; }
72
+ @keyframes pulse { 50% { opacity: .65; } }
73
+ .floating { position: absolute; z-index: 3; border-radius: 12px; border: 1px solid var(--desktop-line-strong); background: var(--desktop-paper); box-shadow: 0 14px 28px #18171526, 0 2px 5px #1817150f; }
74
+ .floating { max-height: 500px; overflow: auto; }
75
+ #bubble { width: 240px; max-height: 80px; overflow: hidden; padding: 8px 11px; pointer-events: none; }
76
+ #bubble p { margin: 0; display: flex; min-width: 0; font-size: 11px; line-height: 1.45; overflow: hidden; white-space: nowrap; }
77
+ #bubble p + p { margin-top: 4px; }
78
+ #bubble [data-role="user"] { color: var(--cafe-text-secondary); }
79
+ .floating button { border: 0; background: transparent; border-radius: 7px; padding: 8px 11px; font-weight: 400; }
80
+ .floating button:hover:not(:disabled) { background: var(--cafe-surface); }
81
+ .floating .primary { background: var(--desktop-primary); color: white; }
82
+ .floating .primary:hover:not(:disabled) { background: #8f4730; color: white; }
83
+ .floating .destructive { background: var(--desktop-danger); color: white; font-weight: 500; }
84
+ .floating .destructive:hover:not(:disabled) { background: #942c24; }
85
+ .floating .destructive.compact { min-width: 72px; padding: 6px 12px; }
86
+ #actions { padding: 12px; width: 364px; overflow: hidden; }
87
+ .action-row { display: flex; align-items: center; gap: 4px; }
88
+ .action-row button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; font-size: 12px; white-space: nowrap; }
89
+ .action-row button .icon { width: 16px; height: 16px; }
90
+ #active-actions { border-top: 1px solid var(--desktop-line); margin-top: 9px; padding-top: 9px; }
91
+ #status { font-size: 12px; line-height: 1.45; margin: 8px 0 0; color: var(--desktop-muted); }
92
+ .call-status-line { min-height: 24px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
93
+ .call-status-line strong { font-size: 13px; font-weight: 600; }
94
+ .call-status-line span:not(.status-dot) { color: var(--desktop-muted); font-size: 12px; }
95
+ .status-dot { width: 8px; height: 8px; flex: none; border-radius: 999px; background: var(--desktop-success); }
96
+ [data-connection-state="recovering"] .status-dot { background: var(--desktop-warning); }
97
+ .call-work { margin: 3px 0 0 15px; color: var(--desktop-muted); font-size: 12px; }
98
+ .call-share-context { display: flex; align-items: center; gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--desktop-line); }
99
+ .call-share-context > span, .call-share-line > span { display: grid; gap: 1px; min-width: 0; }
100
+ .call-share-context strong, .call-share-line strong { overflow: hidden; color: var(--desktop-body); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
101
+ .call-share-context small, .call-share-line small { color: var(--desktop-muted); font-size: 11px; }
102
+ .call-recent { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--desktop-line); }
103
+ .call-recent-label { color: var(--desktop-muted); font-size: 11px; letter-spacing: .05em; }
104
+ .call-recent p { margin: 4px 0 0; display: flex; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12px; line-height: 1.45; }
105
+ .recent-speaker { flex: none; }
106
+ .recent-message { min-width: 0; flex: 1 1 auto; overflow: hidden; direction: rtl; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
107
+ .recent-message[data-direction="rtl"] { direction: ltr; }
108
+ .recent-message-text { unicode-bidi: isolate; }
109
+ .call-recent p[data-role="user"] { color: var(--desktop-muted); }
110
+ .call-actions { justify-content: flex-end; }
111
+ .call-actions #end { min-width: 88px; margin-left: auto; }
112
+ #menu { width: 340px; padding: 8px; }
113
+ #menu .menu-title { display: block; padding: 7px 11px 6px; color: var(--cafe-text-muted); font-size: 10px; font-weight: 500; letter-spacing: .04em; }
114
+ #menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 33px; text-align: left; font-size: 12px; line-height: 1.4; }
115
+ #menu button .icon { color: var(--cafe-text-secondary); width: 16px; height: 16px; }
116
+ #menu .primary .icon { color: inherit; }
117
+ #menu button:disabled { opacity: .36; }
118
+ #menu .menu-status { margin-left: auto; color: var(--cafe-text-muted); font-size: 10px; }
119
+ #menu [aria-pressed="true"] .menu-status { color: var(--accent-700); }
120
+ #menu .menu-divider { height: 1px; margin: 4px 8px; background: color-mix(in srgb, var(--cafe-border-subtle), transparent 28%); }
121
+ #menu .quiet-action { color: var(--cafe-text-secondary); }
122
+ .name-card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px 7px 9px; }
123
+ .name-card-actions button { justify-content: center; }
124
+ #menu-status { margin: 2px 10px 8px; color: var(--desktop-muted); font-size: 12px; line-height: 1.45; }
125
+ .call-context { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 7px; min-height: 40px; padding: 7px 10px; border-bottom: 1px solid var(--desktop-line); color: var(--desktop-muted); font-size: 12px; }
126
+ .call-context strong { color: var(--desktop-ink); font-size: 13px; }
127
+ .call-context > small { grid-column: 2 / 4; }
128
+ .call-share-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding-top: 6px; border-top: 1px solid var(--desktop-line); min-width: 0; }
129
+ .call-context-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
130
+ .call-context-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; white-space: nowrap; }
131
+ #menu .call-context { margin: -8px -8px 5px; }
132
+ #chat { width: 400px; max-height: 500px; display: flex; flex-direction: column; overflow: hidden; }
133
+ #chat header { padding: 7px 9px 7px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--cafe-border-subtle); }
134
+ #chat header button { font-size: 12px; color: var(--cafe-text-secondary); }
135
+ #chat-transcript { height: 230px; overflow: auto; padding: 14px; line-height: 1.7; font-size: 13px; }
136
+ #chat-transcript p { margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
137
+ #chat-transcript p:not(.empty) { width: fit-content; max-width: 92%; padding: 7px 10px; border-radius: 9px; }
138
+ #chat-transcript p.user { margin-left: auto; background: var(--desktop-rail); }
139
+ #chat-transcript p.assistant { margin-right: auto; background: var(--desktop-work); border: 1px solid var(--desktop-line); }
140
+ .empty { color: var(--cafe-text-muted); font-size: 13px; }
141
+ #compose { display: flex; align-items: flex-end; padding: 10px; gap: 8px; border-top: 1px solid var(--cafe-border-subtle); }
142
+ #message { resize: none; border: 0; min-width: 0; flex: 1; background: transparent; padding: 5px; color: inherit; line-height: 1.5; }
143
+ #chat small { color: var(--cafe-text-muted); font-size: 10px; padding: 0 14px 10px; }
144
+ .call-transcript { width: 420px; height: 210px; display: flex; flex-direction: column; overflow: hidden; }
145
+ .call-transcript[data-expanded="true"] { height: 500px; }
146
+ .transcript-call-context { flex: none; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; padding: 7px 8px; }
147
+ .transcript-call-context #transcript-call-state { min-width: 0; overflow-wrap: anywhere; }
148
+ .transcript-call-context #transcript-call-mic-state { grid-column: 2 / 4; grid-row: 2; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
149
+ .transcript-call-context .call-context-actions { grid-column: 3; grid-row: 1; gap: 2px; }
150
+ .transcript-call-context .call-context-actions button { padding: 6px; }
151
+ .transcript-call-context .destructive.compact { min-width: 64px; padding-inline: 9px; }
152
+ .transcript-return { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--desktop-line) !important; background: var(--desktop-work) !important; color: var(--desktop-body); padding: 3px 6px !important; font-size: 11px; font-weight: 500 !important; white-space: nowrap; }
153
+ .transcript-return:hover:not(:disabled) { background: var(--desktop-rail) !important; }
154
+ #call-transcript-log { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 5px; }
155
+ .call-transcript-row { margin: 0 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
156
+ .call-transcript-row.voice.user { color: var(--desktop-muted); font-size: 13px; font-weight: 400; }
157
+ .call-transcript-row.voice.assistant { color: var(--desktop-ink); font-size: 16px; font-weight: 500; line-height: 1.5; }
158
+ .call-transcript-row.typed.user { width: fit-content; max-width: 88%; margin-left: auto; padding: 7px 11px; border-radius: 12px; background: var(--desktop-rail); color: var(--desktop-ink); font-size: 13px; }
159
+ .call-transcript-row[data-live="true"]::after { content: " 实时"; color: #8f4730; font-size: 11px; font-weight: 500; letter-spacing: .05em; }
160
+ .call-transcript:not([data-expanded="true"]) #call-transcript-log { max-height: 112px; }
161
+ .call-transcript:not([data-expanded="true"]) .call-transcript-row.voice.user { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
162
+ .call-transcript:not([data-expanded="true"]) .call-transcript-row.voice.assistant { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
163
+ .call-transcript[data-expanded="true"] #call-transcript-log[data-has-more="true"] { mask-image: linear-gradient(to bottom, transparent 0, black 28px); }
164
+ #call-compose { flex: none; display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid #e5dfd5; }
165
+ #call-message { min-width: 0; flex: 1; height: 32px; border: 1px solid var(--desktop-line-strong); border-radius: 8px; background: var(--desktop-paper); color: var(--desktop-ink); padding: 6px 10px; }
166
+ #call-compose button { height: 32px; padding: 6px 12px; }
167
+ .new-content { position: absolute; right: 12px; bottom: 53px; border: 1px solid #d8d1c6 !important; background: #fffbf6 !important; color: #8f4730; box-shadow: 0 2px 8px #1817151a; font-size: 11px; }
168
+ #call-transcript-status, .call-transcript-foot { flex: none; color: #5f5d57; font-size: 11px; padding: 0 12px 7px; }
169
+ .call-transcript:not([data-expanded="true"]) .call-transcript-foot { display: none; }
170
+ .settings-panel { width: 360px; max-height: 500px; display: flex; flex-direction: column; overflow: hidden; }
171
+ .settings-head { flex: none; min-height: 44px; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--desktop-line); }
172
+ .settings-head button { width: 28px; padding: 5px; font-size: 20px; line-height: 1; }
173
+ .settings-head strong { font-size: 14px; }
174
+ .settings-loading, .settings-copy, .settings-empty { color: var(--desktop-muted); font-size: 12px; line-height: 1.55; }
175
+ .settings-loading { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--desktop-line); }
176
+ .settings-page { min-height: 0; overflow-y: auto; }
177
+ .settings-row { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 0 !important; border-bottom: 1px solid var(--desktop-line) !important; padding: 9px 16px !important; text-align: left; }
178
+ .settings-row > span:first-child, .settings-row strong { color: var(--desktop-ink); font-weight: 400; }
179
+ .settings-row small { display: block; margin-top: 2px; color: var(--desktop-muted); font-size: 11px; font-weight: 400; line-height: 1.35; }
180
+ .settings-value { margin-left: auto; color: var(--desktop-muted); font-size: 12px; }
181
+ .settings-row[data-drilldown] .settings-value::after { content: " ›"; }
182
+ .setting-switch i { position: relative; width: 27px; height: 16px; flex: none; border-radius: 999px; background: var(--desktop-line-strong); }
183
+ .setting-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #0003; transition: transform .15s; }
184
+ .setting-switch[data-checked="true"] i { background: var(--desktop-ink); }
185
+ .setting-switch[data-checked="true"] i::after { transform: translateX(11px); }
186
+ .setting-switch[data-settlement="unconfirmed"] i { display: none; }
187
+ .setting-switch[data-settlement="unconfirmed"]::after { content: "未确认"; color: var(--desktop-muted); font-size: 12px; }
188
+ .settings-footer { display: flex; justify-content: space-between; padding: 4px 7px; }
189
+ .settings-footer button { color: var(--desktop-muted); font-size: 12px; }
190
+ .settings-copy { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--desktop-line); }
191
+ .settings-roster { border-bottom: 1px solid var(--desktop-line); }
192
+ .settings-choice { width: 100%; min-height: 48px; display: grid; grid-template-columns: 1fr auto; padding: 7px 16px !important; border-radius: 0 !important; text-align: left; }
193
+ .settings-choice strong, .settings-choice span { grid-column: 1; }
194
+ .settings-choice strong { font-size: 13px; font-weight: 500; }
195
+ .settings-choice span { color: var(--desktop-muted); font-size: 11px; }
196
+ .settings-choice[data-selected="true"]::after { content: "✓"; grid-column: 2; grid-row: 1 / span 2; align-self: center; }
197
+ .settings-field { display: block; padding: 10px 16px; color: var(--desktop-muted); font-size: 11px; }
198
+ .settings-field textarea { width: 100%; margin-top: 6px; resize: none; border: 1px solid var(--desktop-line-strong); border-radius: 8px; background: var(--desktop-paper); color: var(--desktop-ink); padding: 8px 10px; line-height: 1.45; }
199
+ .settings-field > small { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; }
200
+ .settings-field[data-settlement="unconfirmed"]::after { content: "保存结果未确认"; display: block; margin-top: 5px; color: #8f4730; font-size: 11px; }
201
+ .settings-eyebrow { margin: 0; padding: 10px 16px 0; color: var(--desktop-muted); font-size: 11px; }
202
+ .settings-eyebrow + .settings-copy { padding-top: 3px; }
203
+ .settings-skins { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--desktop-line); }
204
+ .settings-skins button { min-height: 46px; border-radius: 0; border-bottom: 1px solid var(--desktop-rail); text-align: left; }
205
+ .settings-skins button[data-selected="true"] { background: var(--desktop-work); font-weight: 500; }
206
+ .settings-skins button[data-selected="true"]::after { content: " ✓"; float: right; }
207
+ .settings-size > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; }
208
+ .settings-size input { width: 100%; accent-color: var(--desktop-ink); }
209
+ .settings-confirm { padding: 16px; }
210
+ .settings-confirm > strong { display: block; font-size: 14px; }
211
+ .settings-confirm p { color: var(--desktop-body); font-size: 13px; line-height: 1.6; }
212
+ .settings-confirm > div { display: flex; justify-content: flex-end; gap: 8px; }
213
+ .settings-confirm #settings-confirm-apply { border: 1px solid var(--desktop-line-strong); background: var(--desktop-paper); }
214
+ .settings-notice { flex: none; margin: 8px 12px 0; border: 1px solid var(--desktop-line); border-radius: 8px; padding: 8px 10px; color: var(--desktop-muted); font-size: 11px; }
215
+ .settings-notice[data-kind="rejected"], .settings-notice[data-kind="reconciled_not_saved"], .settings-notice[data-kind="disable_failed"] { color: #8f4730; }
216
+ .settings-notice-actions { display: flex; justify-content: flex-end; padding: 0 8px; }
217
+ .settings-notice-actions button { color: var(--desktop-muted); font-size: 11px; }
218
+ .settings-empty { padding: 16px; }
219
+ .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
298
220
  @media (prefers-reduced-motion: reduce) {
299
- #pet,
300
- body.connecting #orb,
301
- body.connected #orb {
302
- animation: none;
303
- }
304
- }
305
- #history { background: transparent; color: var(--cafe-text-secondary); padding: 7px 3px; font-size: 11px; }
306
- #identity { margin: 0 0 3px; text-align: center; font-weight: 600; }
307
- #pet[data-skin="xianxian-codex"] { background-image: url("./skins/xianxian-codex.webp"); }
308
- #pet[data-skin="ragdoll-v1"], #pet[data-skin="yarn-ball"] { background: url("./skins/ragdoll-v1.png") center / contain no-repeat; animation: none; }
309
- #pet[data-skin="yarn-ball"] { background-image: url("./skins/yarn-ball.png"); }
221
+ #pet, #indicators button, #living-sit [data-layer], #pet[data-action="idle"] #living-sit [data-layer] { animation: none; }
222
+ #living-sit [data-layer="closed"] { opacity: 0; }
223
+ }
224
+ #pet[data-skin="yanyan-codex"] { background-image: url("./skins/yanyan-codex.webp"); }
225
+ #pet[data-skin="ragdoll-v1"] { background-image: url("./skins/ragdoll-v1.png"); animation: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
226
+ #pet[data-skin="yarn-ball"] { background-image: url("./skins/yarn-ball.png"); animation: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
227
+ #chat-transcript p[data-author]::before { content: attr(data-author); display: block; color: var(--cafe-text-muted); font-size: 10px; margin-bottom: 2px; }
228
+ #chat-transcript p[data-companion]::after { content: attr(data-companion) " · " attr(data-companion-live) " · " attr(data-companion-deep); display: block; color: var(--cafe-text-muted); font-size: 9px; line-height: 1.35; margin-top: 4px; }
229
+ #chat-transcript p[data-live="true"] { border-left: 2px solid var(--cafe-accent); }
230
+ #history { padding: 0; font-size: 10px; color: var(--cafe-text-secondary); }
231
+ #decisions { width: 320px; min-height: 180px; padding: 8px 12px 12px; display: flex; flex-direction: column; overflow: hidden; }
232
+ #decisions header { display: flex; align-items: center; justify-content: space-between; flex: none; }
233
+ #decisions header strong { font-size: 13px; }
234
+ #decisions header button, #decision-more { font-size: 11px; color: var(--cafe-text-secondary); }
235
+ #decision-status, #decisions small { color: var(--cafe-text-secondary); font-size: 11px; line-height: 1.5; flex: none; }
236
+ #decision-status { margin: 7px 0 4px; }
237
+ #decision-list { list-style: none; margin: 4px 0 8px; padding: 0; max-height: 290px; min-height: 55px; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
238
+ #decision-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 4px; border-top: 1px solid var(--cafe-border-subtle); padding: 9px 2px; line-height: 1.45; overflow-wrap: anywhere; }
239
+ #decision-list li strong { grid-column: 1; display: block; font-size: 12px; font-weight: 600; }
240
+ #decision-list li span { grid-column: 1; display: block; color: var(--cafe-text-secondary); font-size: 10px; margin-top: 2px; }
241
+ #decision-list li button { grid-column: 2; grid-row: 1 / span 2; padding: 5px 6px; font-size: 10px; white-space: nowrap; }