@binblink/wasmnest-plugin-sdk-mobile 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +363 -2
  2. package/README_en.md +353 -0
  3. package/bin/build.js +269 -0
  4. package/bin/cli.js +96 -0
  5. package/bin/lib.js +349 -0
  6. package/bin/manifest-gen.js +324 -0
  7. package/bin/package.js +150 -0
  8. package/bin/scaffold.js +285 -0
  9. package/dev-shell/README.md +151 -0
  10. package/dev-shell/index.html +27 -0
  11. package/dev-shell/package.json +27 -0
  12. package/dev-shell/pnpm-workspace.yaml +9 -0
  13. package/dev-shell/postcss.config.js +6 -0
  14. package/dev-shell/src/App.vue +90 -0
  15. package/dev-shell/src/apps/mock-terminal/MockTerminalSlotCard.vue +51 -0
  16. package/dev-shell/src/apps/mock-terminal/MockTerminalView.vue +168 -0
  17. package/dev-shell/src/apps/mock-terminal/index.ts +50 -0
  18. package/dev-shell/src/components/DevToolbar.vue +100 -0
  19. package/dev-shell/src/components/DialogHost.vue +119 -0
  20. package/dev-shell/src/components/LogPanel.vue +80 -0
  21. package/dev-shell/src/i18n.ts +22 -0
  22. package/dev-shell/src/loader.ts +239 -0
  23. package/dev-shell/src/locale.ts +29 -0
  24. package/dev-shell/src/locales/en-shell.ts +328 -0
  25. package/dev-shell/src/locales/index.ts +70 -0
  26. package/dev-shell/src/locales/shell.ts +328 -0
  27. package/dev-shell/src/main.ts +58 -0
  28. package/dev-shell/src/mock/dialog-service.ts +58 -0
  29. package/dev-shell/src/mock/file-transfer.ts +390 -0
  30. package/dev-shell/src/mock/mobile-api.ts +369 -0
  31. package/dev-shell/src/mock/preset-tasks.ts +186 -0
  32. package/dev-shell/src/mock/session.ts +121 -0
  33. package/dev-shell/src/mock-context.ts +351 -0
  34. package/dev-shell/src/registry.ts +151 -0
  35. package/dev-shell/src/shared-runtime.ts +44 -0
  36. package/dev-shell/src/shell/ShellView.vue +52 -0
  37. package/dev-shell/src/shell/adapters/devAppSource.ts +155 -0
  38. package/dev-shell/src/shell/components/PluginContextHost.vue +40 -0
  39. package/dev-shell/src/shell/components/ShellAppCell.vue +75 -0
  40. package/dev-shell/src/shell/components/ShellAppIcon.vue +111 -0
  41. package/dev-shell/src/shell/components/ShellAppSurface.vue +46 -0
  42. package/dev-shell/src/shell/components/ShellBrandTile.vue +27 -0
  43. package/dev-shell/src/shell/components/ShellCapsuleMenu.vue +123 -0
  44. package/dev-shell/src/shell/components/ShellChip.vue +49 -0
  45. package/dev-shell/src/shell/components/ShellGroupCard.vue +17 -0
  46. package/dev-shell/src/shell/components/ShellHost.vue +75 -0
  47. package/dev-shell/src/shell/components/ShellNotificationShade.vue +496 -0
  48. package/dev-shell/src/shell/components/ShellPermissionPrompt.vue +127 -0
  49. package/dev-shell/src/shell/components/ShellPlaceholderSurface.vue +33 -0
  50. package/dev-shell/src/shell/components/ShellSection.vue +27 -0
  51. package/dev-shell/src/shell/components/ShellSheet.vue +74 -0
  52. package/dev-shell/src/shell/components/ShellStatusbar.vue +84 -0
  53. package/dev-shell/src/shell/components/screens/PluginRoutePage.vue +98 -0
  54. package/dev-shell/src/shell/components/screens/ShellAppDetailScreen.vue +378 -0
  55. package/dev-shell/src/shell/components/screens/ShellAppRunScreen.vue +90 -0
  56. package/dev-shell/src/shell/components/screens/ShellAppsScreen.vue +195 -0
  57. package/dev-shell/src/shell/components/screens/ShellHomeScreen.vue +316 -0
  58. package/dev-shell/src/shell/components/screens/ShellPermissionsScreen.vue +376 -0
  59. package/dev-shell/src/shell/components/screens/ShellSettingsScreen.vue +240 -0
  60. package/dev-shell/src/shell/components/screens/ShellSwitcherScreen.vue +559 -0
  61. package/dev-shell/src/shell/components/ui/ConfirmDialog.vue +137 -0
  62. package/dev-shell/src/shell/components/ui/Toggle.vue +53 -0
  63. package/dev-shell/src/shell/composables/useShellApps.ts +415 -0
  64. package/dev-shell/src/shell/composables/useShellNavigation.ts +197 -0
  65. package/dev-shell/src/shell/composables/useShellNotifications.ts +115 -0
  66. package/dev-shell/src/shell/composables/useShellOpen.ts +35 -0
  67. package/dev-shell/src/shell/composables/useShellOverlays.ts +101 -0
  68. package/dev-shell/src/shell/composables/useShellPreferences.ts +143 -0
  69. package/dev-shell/src/shell/composables/useShellRecent.ts +84 -0
  70. package/dev-shell/src/shell/composables/useToast.ts +33 -0
  71. package/dev-shell/src/shell/index.ts +88 -0
  72. package/dev-shell/src/shell/logger.ts +45 -0
  73. package/dev-shell/src/shell/permissions.ts +145 -0
  74. package/dev-shell/src/shell/registry.ts +220 -0
  75. package/dev-shell/src/shell/styles/shell.css +841 -0
  76. package/dev-shell/src/shell/types.ts +137 -0
  77. package/dev-shell/src/shell/utils.ts +54 -0
  78. package/dev-shell/src/styles/main.css +153 -0
  79. package/dev-shell/src/styles/mobile.css +884 -0
  80. package/dev-shell/src/styles/wallpaper.css +130 -0
  81. package/dev-shell/src/theme.ts +71 -0
  82. package/dev-shell/src/vite-env.d.ts +20 -0
  83. package/dev-shell/tailwind.config.js +101 -0
  84. package/dev-shell/tsconfig.json +16 -0
  85. package/dev-shell/vite.config.ts +130 -0
  86. package/dist/index.d.ts +84 -0
  87. package/dist/index.js +161 -0
  88. package/dist/types.d.ts +637 -0
  89. package/dist/types.js +0 -0
  90. package/dist/vite-plugin.d.ts +16 -0
  91. package/dist/vite-plugin.js +95 -0
  92. package/package.json +80 -3
  93. package/src/constants.ts +6 -0
  94. package/src/global-dialog.ts +168 -0
  95. package/src/index.ts +87 -0
  96. package/src/runtime.ts +44 -0
  97. package/src/types.ts +715 -0
  98. package/src/ui/PluginGlobalDialog.vue +388 -0
  99. package/src/ui/Select.d.ts +37 -0
  100. package/src/ui/Select.vue +307 -0
  101. package/src/ui/plugin-global-dialog.d.ts +11 -0
  102. package/src/ui/useSwipeTabs.d.ts +20 -0
  103. package/src/ui/useSwipeTabs.ts +53 -0
  104. package/src/vite-plugin.ts +132 -0
  105. package/template/.gitignore +4 -0
  106. package/template/README.md +46 -0
  107. package/template/package.json +23 -0
  108. package/template/plugin.json +13 -0
  109. package/template/rust/Cargo.toml +19 -0
  110. package/template/rust/src/lib.rs +33 -0
  111. package/template/src/env.d.ts +24 -0
  112. package/template/src/index.ts +37 -0
  113. package/template/tsconfig.json +17 -0
  114. package/template/vite.config.ts +21 -0
@@ -0,0 +1,884 @@
1
+ /* ============================================
2
+ 移动端主题变量
3
+ ============================================ */
4
+
5
+ /* 深色模式(默认) - 与桌面端 warm 色板深色同源
6
+ (bg-page #15130F / bg-sidebar #191712 / bg-card #1D1A15 / bg-hover #2A261E,墨纸体系) */
7
+ :root {
8
+ /* 背景色 - 与桌面端同名 token 对齐(tertiary 取 border-strong 色调,作强内嵌面) */
9
+ --mobile-bg-primary: #15130F;
10
+ --mobile-bg-secondary: #191712;
11
+ --mobile-bg-tertiary: #3C372B;
12
+ --mobile-bg-card: #1D1A15;
13
+ --mobile-bg-elevated: #2A261E;
14
+
15
+ /* 卡片阴影 */
16
+ --mobile-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
17
+ --mobile-card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
18
+ --mobile-card-shadow-connected: 0 2px 12px rgba(34, 197, 94, 0.15), 0 1px 3px rgba(0, 0, 0, 0.2);
19
+
20
+ /* 文字色 - 与桌面端 warm 深色 text token 同源 */
21
+ --mobile-text-primary: #ECE8DC;
22
+ --mobile-text-secondary: #9C9482;
23
+ --mobile-text-muted: #6B6455;
24
+ --mobile-text-disabled: #55503F;
25
+
26
+ /* 强调色上的文字 */
27
+ --mobile-text-on-accent: #15130F;
28
+ --mobile-border: rgba(236, 232, 220, 0.1);
29
+ --mobile-border-hover: rgba(236, 232, 220, 0.2);
30
+ --mobile-border-active: rgba(236, 232, 220, 0.3);
31
+
32
+ /* 强调色 - 与桌面端 warm 色板 primary 同源 */
33
+ --mobile-accent: #ECE8DC;
34
+ --mobile-accent-muted: rgba(236, 232, 220, 0.12);
35
+ --mobile-accent-secondary: rgba(236, 232, 220, 0.2);
36
+
37
+ /* 状态色 - 与桌面端语义色同源(success #22C55E / warning #F59E0B / danger #EF4444) */
38
+ --mobile-success: #22C55E;
39
+ --mobile-success-muted: rgba(34, 197, 94, 0.14);
40
+ --mobile-success-connected-bg: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(21, 128, 61, 0.18));
41
+ --mobile-success-connected-border: rgba(34, 197, 94, 0.2);
42
+ --mobile-warning: #f59e0b;
43
+ --mobile-warning-muted: rgba(245, 158, 11, 0.1);
44
+ --mobile-error: #ef4444;
45
+ --mobile-error-muted: rgba(239, 68, 68, 0.1);
46
+
47
+ /* 弹窗遮罩 */
48
+ --mobile-overlay: rgba(0, 0, 0, 0.6);
49
+ --mobile-overlay-heavy: rgba(0, 0, 0, 0.8);
50
+ --mobile-overlay-light: rgba(0, 0, 0, 0.4);
51
+
52
+ /* 终端色 - 终端区保持比页面更深一档的暖黑 */
53
+ --mobile-terminal-bg: #0F0D0A;
54
+ --mobile-terminal-header: rgba(29, 26, 21, 0.9);
55
+
56
+ /* 导航栏(激活色跟随主色 --mobile-accent:palette 切换时指示条/激活态同步变色,warm 下与主色同值不变) */
57
+ --mobile-nav-bg: rgba(21, 19, 15, 0.9);
58
+ --mobile-nav-border: rgba(236, 232, 220, 0.2);
59
+ --mobile-nav-active: var(--mobile-accent);
60
+ --mobile-nav-inactive: #6B6455;
61
+
62
+ /* 输入框 - 终端输入区专属配色,比终端输出区稍亮 */
63
+ --mobile-input-bg: #1D1A15;
64
+ --mobile-input-border: rgba(236, 232, 220, 0.25);
65
+ --mobile-input-focus: rgba(236, 232, 220, 0.45);
66
+ --mobile-input-placeholder: #55503F;
67
+
68
+ /* 触控目标最小尺寸(恒常值,不随屏幕缩放) */
69
+ --mobile-input-height: 44px;
70
+ --mobile-nav-item-height: 44px;
71
+ --mobile-touch-target-min: 44px;
72
+
73
+ /* 代码查看器 */
74
+ --mobile-code-gutter-bg: rgba(236, 232, 220, 0.04);
75
+ --mobile-code-gutter-border: rgba(156, 148, 130, 0.15);
76
+ --mobile-code-gutter-color: rgba(156, 148, 130, 0.5);
77
+
78
+ /* 快捷键面板功能色 */
79
+ /* 快捷键/命令 chip:墨纸主题强调色(与 send 同源),Enter/Del 保留 confirm/danger 语义色 */
80
+ --mobile-shortcut-color: #ECE8DC;
81
+ --mobile-shortcut-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
82
+ --mobile-shortcut-border: rgba(236, 232, 220, 0.3);
83
+ --mobile-shortcut-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
84
+
85
+ --mobile-custom-cmd-color: #ECE8DC;
86
+ --mobile-custom-cmd-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
87
+ --mobile-custom-cmd-border: rgba(236, 232, 220, 0.3);
88
+ --mobile-custom-cmd-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
89
+ --mobile-arrow-color: #F59E0B;
90
+ --mobile-arrow-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
91
+ --mobile-arrow-border: rgba(245, 158, 11, 0.35);
92
+ --mobile-arrow-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
93
+ --mobile-send-color: #ECE8DC;
94
+ --mobile-send-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
95
+ --mobile-send-border: rgba(236, 232, 220, 0.3);
96
+ --mobile-send-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
97
+ --mobile-execute-color: #F59E0B;
98
+ --mobile-execute-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
99
+ --mobile-execute-border: rgba(245, 158, 11, 0.35);
100
+ --mobile-execute-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
101
+ --mobile-add-cmd-color: #ECE8DC;
102
+ --mobile-add-cmd-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
103
+ --mobile-add-cmd-border: rgba(236, 232, 220, 0.5);
104
+ --mobile-add-cmd-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
105
+ --mobile-edit-cmd-color: #F59E0B;
106
+ --mobile-edit-cmd-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
107
+ --mobile-edit-cmd-border: rgba(245, 158, 11, 0.35);
108
+ --mobile-edit-cmd-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
109
+ --mobile-danger-color: #EF4444;
110
+ --mobile-danger-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
111
+ --mobile-danger-border: rgba(239, 68, 68, 0.5);
112
+ --mobile-danger-solid-bg: rgba(239, 68, 68, 0.9);
113
+ --mobile-confirm-color: #22C55E;
114
+ --mobile-confirm-bg: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
115
+ --mobile-confirm-border: rgba(34, 197, 94, 0.5);
116
+
117
+ /* 输入助手悬浮球 */
118
+ --mobile-input-assist-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
119
+
120
+ /* 分组卡片 */
121
+ --mobile-group-bg: #1D1A15;
122
+ --mobile-group-border: rgba(236, 232, 220, 0.08);
123
+ --mobile-group-divider: rgba(236, 232, 220, 0.06);
124
+ --mobile-group-row-active: rgba(236, 232, 220, 0.05);
125
+
126
+ /* 分组标题 */
127
+ --mobile-section-title-color: #6B6455;
128
+
129
+ /* 图标 chip 色调 (12% 透明底) - 状态色与桌面端语义色同源,violet 为移动端分类装饰色 */
130
+ --mobile-chip-cyan: #ECE8DC;
131
+ --mobile-chip-cyan-bg: rgba(236, 232, 220, 0.12);
132
+ --mobile-chip-emerald: #22C55E;
133
+ --mobile-chip-emerald-bg: rgba(34, 197, 94, 0.14);
134
+ --mobile-chip-amber: #F59E0B;
135
+ --mobile-chip-amber-bg: rgba(245, 158, 11, 0.14);
136
+ --mobile-chip-violet: #a78bfa;
137
+ --mobile-chip-violet-bg: rgba(167, 139, 250, 0.12);
138
+ --mobile-chip-red: #EF4444;
139
+ --mobile-chip-red-bg: rgba(239, 68, 68, 0.14);
140
+ --mobile-chip-zinc: #ABA492;
141
+ --mobile-chip-zinc-bg: rgba(236, 232, 220, 0.08);
142
+
143
+ /* badge 状态 */
144
+ --mobile-badge-zinc-color: #ABA492;
145
+ --mobile-badge-zinc-bg: rgba(236, 232, 220, 0.08);
146
+
147
+ /* 行文字 */
148
+ --mobile-row-title: #ECE8DC;
149
+ --mobile-row-sub: #9C9482;
150
+ --mobile-row-value: #ABA492;
151
+
152
+ /* 滚动条 - 与桌面端全局 scrollbar 规则同源(track=bg-hover / thumb=text-tertiary / hover=text-secondary) */
153
+ --scrollbar-track-bg: #2A261E;
154
+ --scrollbar-thumb-bg: #6B6455;
155
+ --scrollbar-thumb-hover-bg: #9C9482;
156
+ }
157
+
158
+ /* 浅色模式 - 当 html 没有 .dark 类且元素有 .mobile-ui 或 .mobile-app 类时生效
159
+ (与桌面端 warm 色板浅色同源:bg-page #F5F4F0 / bg-sidebar #EFEDE7 / bg-card #FDFCFA / bg-hover #E7E4DC) */
160
+ html:not(.dark) .mobile-ui,
161
+ html:not(.dark) .mobile-app {
162
+ /* 背景色 - 与桌面端同名 token 对齐(tertiary 取 border-strong 色调,作强内嵌面) */
163
+ --mobile-bg-primary: #F5F4F0;
164
+ --mobile-bg-secondary: #EFEDE7;
165
+ --mobile-bg-tertiary: #D6D2C4;
166
+ --mobile-bg-card: #FDFCFA;
167
+ --mobile-bg-elevated: #E7E4DC;
168
+
169
+ /* 卡片阴影 - 浅色模式阴影更明显以增强层次 */
170
+ --mobile-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
171
+ --mobile-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
172
+ --mobile-card-shadow-connected: 0 2px 8px rgba(5, 150, 105, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
173
+
174
+ /* 文字色 - 与桌面端 warm 浅色 text token 同源(primary 对比度 ~13:1) */
175
+ --mobile-text-primary: #26231B;
176
+ --mobile-text-secondary: #7C7565;
177
+ --mobile-text-muted: #ABA492;
178
+ --mobile-text-disabled: #C6BFAE;
179
+
180
+ /* 强调色上的文字 - 与桌面端 warm 色板 primary-contrast 同源 */
181
+ --mobile-text-on-accent: #FDFCFA;
182
+
183
+ /* 边框色 - 墨色基(#26231B)alpha,与桌面端 border 色相同源 */
184
+ --mobile-border: rgba(38, 35, 27, 0.12);
185
+ --mobile-border-hover: rgba(38, 35, 27, 0.2);
186
+ --mobile-border-active: rgba(38, 35, 27, 0.4);
187
+
188
+ /* 强调色 - 与桌面端 warm 色板 primary 同源(墨色) */
189
+ --mobile-accent: #1D1A14;
190
+ --mobile-accent-muted: rgba(29, 26, 20, 0.08);
191
+ --mobile-accent-secondary: rgba(29, 26, 20, 0.16);
192
+
193
+ /* 状态色 */
194
+ --mobile-success: #059669;
195
+ --mobile-success-muted: rgba(5, 150, 105, 0.1);
196
+ --mobile-success-connected-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(6, 95, 70, 0.16));
197
+ --mobile-success-connected-border: rgba(5, 150, 105, 0.25);
198
+ --mobile-warning: #d97706;
199
+ --mobile-warning-muted: rgba(217, 119, 6, 0.1);
200
+ --mobile-error: #dc2626;
201
+ --mobile-error-muted: rgba(220, 38, 38, 0.1);
202
+
203
+ /* 弹窗遮罩 */
204
+ --mobile-overlay: rgba(0, 0, 0, 0.4);
205
+ --mobile-overlay-heavy: rgba(0, 0, 0, 0.6);
206
+ --mobile-overlay-light: rgba(0, 0, 0, 0.2);
207
+
208
+ /* 终端色 - 浅色终端区取暖白 */
209
+ --mobile-terminal-bg: #FAF9F5;
210
+ --mobile-terminal-header: rgba(245, 244, 240, 0.95);
211
+
212
+ /* 导航栏(激活色跟随主色 --mobile-accent:palette 切换时指示条/激活态同步变色) */
213
+ --mobile-nav-bg: rgba(253, 252, 250, 0.9);
214
+ --mobile-nav-border: rgba(38, 35, 27, 0.1);
215
+ --mobile-nav-active: var(--mobile-accent);
216
+ --mobile-nav-inactive: #ABA492;
217
+
218
+ /* 输入框 - 输入面取页面色(桌面端卡片内输入框同规则),聚焦用墨色 accent */
219
+ --mobile-input-bg: #F5F4F0;
220
+ --mobile-input-border: rgba(38, 35, 27, 0.2);
221
+ --mobile-input-focus: rgba(29, 26, 20, 0.45);
222
+ --mobile-input-placeholder: #ABA492;
223
+
224
+ /* 代码查看器 */
225
+ --mobile-code-gutter-bg: rgba(0, 0, 0, 0.04);
226
+ --mobile-code-gutter-border: rgba(0, 0, 0, 0.08);
227
+ --mobile-code-gutter-color: rgba(124, 117, 101, 0.55);
228
+
229
+ /* 快捷键面板功能色 - 浅色模式使用饱和度适中的配色 */
230
+ /* 快捷键/命令 chip:墨纸主题强调色(与 send 同源),Enter/Del 保留 confirm/danger 语义色 */
231
+ --mobile-shortcut-color: #1D1A14;
232
+ --mobile-shortcut-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
233
+ --mobile-shortcut-border: rgba(29, 26, 20, 0.3);
234
+ --mobile-shortcut-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
235
+
236
+ --mobile-custom-cmd-color: #1D1A14;
237
+ --mobile-custom-cmd-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
238
+ --mobile-custom-cmd-border: rgba(29, 26, 20, 0.3);
239
+ --mobile-custom-cmd-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
240
+ --mobile-arrow-color: #a16207;
241
+ --mobile-arrow-bg: linear-gradient(135deg, rgba(161, 98, 7, 0.1), rgba(161, 98, 7, 0.05));
242
+ --mobile-arrow-border: rgba(161, 98, 7, 0.3);
243
+ --mobile-arrow-active-bg: linear-gradient(135deg, rgba(161, 98, 7, 0.2), rgba(161, 98, 7, 0.12));
244
+ --mobile-send-color: #1D1A14;
245
+ --mobile-send-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
246
+ --mobile-send-border: rgba(29, 26, 20, 0.3);
247
+ --mobile-send-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
248
+ --mobile-execute-color: #B45309;
249
+ --mobile-execute-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.1), rgba(180, 83, 9, 0.05));
250
+ --mobile-execute-border: rgba(180, 83, 9, 0.3);
251
+ --mobile-execute-active-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.12));
252
+ --mobile-add-cmd-color: #1D1A14;
253
+ --mobile-add-cmd-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
254
+ --mobile-add-cmd-border: rgba(29, 26, 20, 0.4);
255
+ --mobile-add-cmd-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
256
+ --mobile-edit-cmd-color: #B45309;
257
+ --mobile-edit-cmd-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.1), rgba(180, 83, 9, 0.05));
258
+ --mobile-edit-cmd-border: rgba(180, 83, 9, 0.3);
259
+ --mobile-edit-cmd-active-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.12));
260
+ --mobile-danger-color: #dc2626;
261
+ --mobile-danger-bg: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
262
+ --mobile-danger-border: rgba(220, 38, 38, 0.4);
263
+ --mobile-danger-solid-bg: rgba(220, 38, 38, 0.85);
264
+ --mobile-confirm-color: #059669;
265
+ --mobile-confirm-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(5, 150, 105, 0.08));
266
+ --mobile-confirm-border: rgba(5, 150, 105, 0.4);
267
+
268
+ /* 分组卡片 - 浅色模式 */
269
+ --mobile-group-bg: #FDFCFA;
270
+ --mobile-group-border: rgba(38, 35, 27, 0.08);
271
+ --mobile-group-divider: rgba(38, 35, 27, 0.06);
272
+ --mobile-group-row-active: rgba(38, 35, 27, 0.04);
273
+
274
+ /* 分组标题 */
275
+ --mobile-section-title-color: #ABA492;
276
+
277
+ /* 图标 chip 色调 - 浅色模式(状态色用加深变体保证对比度,色相与桌面端语义色同族) */
278
+ --mobile-chip-cyan: #1D1A14;
279
+ --mobile-chip-cyan-bg: rgba(29, 26, 20, 0.1);
280
+ --mobile-chip-emerald: #059669;
281
+ --mobile-chip-emerald-bg: rgba(5, 150, 105, 0.1);
282
+ --mobile-chip-amber: #d97706;
283
+ --mobile-chip-amber-bg: rgba(217, 119, 6, 0.1);
284
+ --mobile-chip-violet: #7c3aed;
285
+ --mobile-chip-violet-bg: rgba(124, 58, 237, 0.1);
286
+ --mobile-chip-red: #dc2626;
287
+ --mobile-chip-red-bg: rgba(220, 38, 38, 0.1);
288
+ --mobile-chip-zinc: #7C7565;
289
+ --mobile-chip-zinc-bg: rgba(38, 35, 27, 0.06);
290
+
291
+ /* badge 状态 */
292
+ --mobile-badge-zinc-color: #7C7565;
293
+ --mobile-badge-zinc-bg: rgba(38, 35, 27, 0.06);
294
+
295
+ /* 行文字 */
296
+ --mobile-row-title: #26231B;
297
+ --mobile-row-sub: #ABA492;
298
+ --mobile-row-value: #7C7565;
299
+
300
+ /* 输入助手悬浮球 */
301
+ --mobile-input-assist-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
302
+
303
+ /* 滚动条 - 与桌面端全局 scrollbar 规则同源 */
304
+ --scrollbar-track-bg: #E7E4DC;
305
+ --scrollbar-thumb-bg: #ABA492;
306
+ --scrollbar-thumb-hover-bg: #7C7565;
307
+ }
308
+
309
+ /* 主题切换过渡动画 */
310
+ .mobile-ui,
311
+ .mobile-app {
312
+ transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
313
+ }
314
+
315
+ /* ==================== 流式字号(自适应文字大小) ==================== */
316
+ /* 所有移动端文字随视口宽度在 320px(小屏) → 1200px(平板) 之间等比缩放:
317
+ 360px 处等于原有固定字号(xs=10 / sm=12 / base=14 / lg=16 / xl=18 / 2xl=24),
318
+ 更窄窗口继续缩小,平板自动放大。style.css 中 .mobile-ui 下的
319
+ h1/p/button/text-* 等规则均引用这些变量,因此全端文字一次生效。 */
320
+
321
+ .mobile-ui,
322
+ .mobile-app {
323
+ /* --mobile-font-scale:外观设置字体大小档位驱动(normal=1 / large=1.125 / xlarge=1.25),
324
+ useMobileSettings 在 html 上写入 inline 值,未设置时回退 1 */
325
+ --font-size-xs: calc(clamp(0.5625rem, 0.625rem + (100vw - 360px) / 840 * 2, 0.75rem) * var(--mobile-font-scale, 1)); /* 9 / 10 / 12px */
326
+ --font-size-sm: calc(clamp(0.6875rem, 0.75rem + (100vw - 360px) / 840 * 2, 0.875rem) * var(--mobile-font-scale, 1)); /* 11 / 12 / 14px */
327
+ --font-size-base: calc(clamp(0.8125rem, 0.875rem + (100vw - 360px) / 840 * 2, 1rem) * var(--mobile-font-scale, 1)); /* 13 / 14 / 16px */
328
+ --font-size-lg: calc(clamp(0.9375rem, 1rem + (100vw - 360px) / 840 * 2, 1.125rem) * var(--mobile-font-scale, 1)); /* 15 / 16 / 18px */
329
+ --font-size-xl: calc(clamp(1.0625rem, 1.125rem + (100vw - 360px) / 840 * 2, 1.25rem) * var(--mobile-font-scale, 1)); /* 17 / 18 / 20px */
330
+ --font-size-2xl: calc(clamp(1.375rem, 1.5rem + (100vw - 360px) / 840 * 2, 1.625rem) * var(--mobile-font-scale, 1)); /* 22 / 24 / 26px */
331
+ }
332
+
333
+ /* text-2xl:style.css 未映射,补充一条流式规则(用于 emoji 图标等大字号) */
334
+ .mobile-ui .text-2xl {
335
+ font-size: var(--font-size-2xl);
336
+ line-height: 1.3;
337
+ }
338
+
339
+ /* ============================================
340
+ xterm 终端滚动 - 全局禁用 viewport 原生滚动
341
+ 移动端使用外层伪滚动容器 + scrollToLine 方案
342
+ xterm-viewport 的滚动由外层容器接管
343
+ ============================================ */
344
+
345
+ .xterm-viewport {
346
+ overflow-y: hidden !important;
347
+ touch-action: none !important;
348
+ pointer-events: none !important;
349
+ /* 强制隐藏任何残留滚动条 */
350
+ scrollbar-width: none !important;
351
+ }
352
+
353
+ .xterm-viewport::-webkit-scrollbar {
354
+ display: none !important;
355
+ width: 0 !important;
356
+ }
357
+
358
+ /* ============================================
359
+ Shared Loading Overlay
360
+ 多个视图共享的加载遮罩样式
361
+ ============================================ */
362
+
363
+ .mobile-loading-overlay {
364
+ position: fixed;
365
+ inset: 0;
366
+ z-index: 50;
367
+ background: var(--mobile-bg-primary);
368
+ display: flex;
369
+ flex-direction: column;
370
+ align-items: center;
371
+ justify-content: center;
372
+ gap: 1rem;
373
+ }
374
+
375
+ .mobile-loading-spinner {
376
+ width: 32px;
377
+ height: 32px;
378
+ border: 3px solid var(--mobile-border);
379
+ border-top-color: var(--mobile-accent);
380
+ border-radius: 50%;
381
+ animation: mobile-spin 0.8s linear infinite;
382
+ }
383
+
384
+ @keyframes mobile-spin {
385
+ to { transform: rotate(360deg); }
386
+ }
387
+
388
+ .mobile-loading-text {
389
+ font-size: clamp(0.75rem, 0.875rem + (100vw - 360px) / 840, 0.9375rem);
390
+ color: var(--mobile-text-muted);
391
+ margin: 0;
392
+ }
393
+
394
+ /* Loading fade transition */
395
+ .mobile-loading-fade-enter-active,
396
+ .mobile-loading-fade-leave-active {
397
+ transition: opacity 0.3s ease;
398
+ }
399
+
400
+ .mobile-loading-fade-enter-from,
401
+ .mobile-loading-fade-leave-to {
402
+ opacity: 0;
403
+ }
404
+
405
+ /* ==================== 分组卡片通用语言 ==================== */
406
+
407
+ .group-section-title {
408
+ font-size: clamp(0.625rem, 0.6875rem + (100vw - 360px) / 800, 0.75rem);
409
+ font-weight: 600;
410
+ letter-spacing: 0.08em;
411
+ text-transform: uppercase;
412
+ color: var(--mobile-section-title-color);
413
+ padding-left: 0.375rem;
414
+ margin-bottom: 0.5rem;
415
+ }
416
+
417
+ .group-card {
418
+ background: var(--mobile-group-bg);
419
+ border: 1px solid var(--mobile-group-border);
420
+ border-radius: 1rem;
421
+ overflow: hidden;
422
+ }
423
+
424
+ .group-card > .group-row + .group-row {
425
+ border-top: 1px solid var(--mobile-group-divider);
426
+ }
427
+
428
+ .group-row {
429
+ display: flex;
430
+ align-items: center;
431
+ gap: 0.75rem;
432
+ padding: 0.8125rem 1rem;
433
+ min-height: 3.5rem;
434
+ }
435
+
436
+ button.group-row,
437
+ .group-row-btn {
438
+ width: 100%;
439
+ cursor: pointer;
440
+ /* button 默认 text-align:center 会被后代标题继承,导致行内文字居中;统一左对齐 */
441
+ text-align: left;
442
+ transition: background-color 0.15s ease;
443
+ }
444
+
445
+ button.group-row:active,
446
+ .group-row-btn:active {
447
+ background: var(--mobile-group-row-active);
448
+ }
449
+
450
+ .group-row-title {
451
+ font-size: clamp(0.875rem, 0.9375rem + (100vw - 360px) / 800, 1rem);
452
+ font-weight: 500;
453
+ color: var(--mobile-row-title);
454
+ }
455
+
456
+ .group-row-label {
457
+ font-size: clamp(0.875rem, 0.9375rem + (100vw - 360px) / 800, 1rem);
458
+ color: var(--mobile-row-title);
459
+ }
460
+
461
+ .group-row-sub {
462
+ font-size: clamp(0.6875rem, 0.75rem + (100vw - 360px) / 800, 0.8125rem);
463
+ color: var(--mobile-row-sub);
464
+ }
465
+
466
+ .group-row-value {
467
+ font-size: clamp(0.75rem, 0.8125rem + (100vw - 360px) / 800, 0.875rem);
468
+ color: var(--mobile-row-value);
469
+ }
470
+
471
+ /* ==================== 列表行内联状态文字 ==================== */
472
+
473
+ /* 任务状态行内文字:语义色弱标记。宽度不可预测的内容一律 nowrap,
474
+ 宁可与相邻的运行时长争空间也不折行(折行会让整行行高突变)。 */
475
+ .task-state {
476
+ flex-shrink: 0;
477
+ white-space: nowrap;
478
+ font-weight: 600;
479
+ }
480
+
481
+ .task-state--idle { color: var(--mobile-chip-zinc); }
482
+ .task-state--in-progress { color: var(--mobile-chip-amber); }
483
+ .task-state--asking { color: var(--mobile-chip-violet); }
484
+ .task-state--retrying { color: var(--mobile-chip-amber); }
485
+ .task-state--completed { color: var(--mobile-chip-emerald); }
486
+ .task-state--interrupted { color: var(--mobile-chip-red); }
487
+
488
+ /* ==================== 图标 chip ==================== */
489
+
490
+ .icon-chip {
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: center;
494
+ width: clamp(2rem, 2.25rem + (100vw - 360px) / 800 * 4, 2.5rem);
495
+ height: clamp(2rem, 2.25rem + (100vw - 360px) / 800 * 4, 2.5rem);
496
+ border-radius: 0.625rem;
497
+ flex-shrink: 0;
498
+ }
499
+
500
+ .chip-cyan { color: var(--mobile-chip-cyan); background: var(--mobile-chip-cyan-bg); }
501
+ .chip-emerald { color: var(--mobile-chip-emerald); background: var(--mobile-chip-emerald-bg); }
502
+ .chip-amber { color: var(--mobile-chip-amber); background: var(--mobile-chip-amber-bg); }
503
+ .chip-violet { color: var(--mobile-chip-violet); background: var(--mobile-chip-violet-bg); }
504
+ .chip-red { color: var(--mobile-chip-red); background: var(--mobile-chip-red-bg); }
505
+ .chip-zinc { color: var(--mobile-chip-zinc); background: var(--mobile-chip-zinc-bg); }
506
+
507
+ /* 卡片内的图标 chip:会话配置卡在用(.config-icon / .config-icon-sm)。
508
+ 这两个类此前只被引用、从未定义,卡片图标实际是以裸 SVG 尺寸贴在色块上,
509
+ 与 .icon-chip 的 36px 圆角 chip 视觉不齐。 */
510
+ .config-icon {
511
+ display: flex;
512
+ align-items: center;
513
+ justify-content: center;
514
+ width: clamp(2.25rem, 2.5rem + (100vw - 360px) / 800 * 4, 2.5rem);
515
+ height: clamp(2.25rem, 2.5rem + (100vw - 360px) / 800 * 4, 2.5rem);
516
+ border-radius: 0.75rem;
517
+ flex-shrink: 0;
518
+ }
519
+
520
+ .config-icon-sm {
521
+ display: flex;
522
+ align-items: center;
523
+ justify-content: center;
524
+ width: 1.75rem;
525
+ height: 1.75rem;
526
+ border-radius: 0.5rem;
527
+ flex-shrink: 0;
528
+ }
529
+
530
+ /* ==================== 状态 badge ==================== */
531
+
532
+ .status-badge {
533
+ display: inline-flex;
534
+ align-items: center;
535
+ gap: 0.375rem;
536
+ flex-shrink: 0;
537
+ font-size: clamp(0.625rem, 0.6875rem + (100vw - 360px) / 840, 0.75rem);
538
+ font-weight: 600;
539
+ padding: 0.2rem 0.55rem;
540
+ border-radius: 999px;
541
+ }
542
+
543
+ .badge-emerald { color: var(--mobile-chip-emerald); background: var(--mobile-chip-emerald-bg); }
544
+ .badge-amber { color: var(--mobile-chip-amber); background: var(--mobile-chip-amber-bg); }
545
+ .badge-cyan { color: var(--mobile-chip-cyan); background: var(--mobile-chip-cyan-bg); }
546
+ .badge-zinc { color: var(--mobile-badge-zinc-color); background: var(--mobile-badge-zinc-bg); }
547
+
548
+ .status-dot {
549
+ width: 6px;
550
+ height: 6px;
551
+ border-radius: 999px;
552
+ }
553
+
554
+ .dot-emerald {
555
+ background: var(--mobile-chip-emerald);
556
+ box-shadow: 0 0 6px color-mix(in srgb, var(--mobile-chip-emerald) 80%, transparent);
557
+ }
558
+
559
+ /* ==================== 页面标题 ==================== */
560
+
561
+ .page-title {
562
+ font-size: clamp(1.25rem, 1.375rem + (100vw - 360px) / 800 * 2, 1.5rem);
563
+ font-weight: 600;
564
+ letter-spacing: -0.025em;
565
+ color: var(--mobile-text-primary);
566
+ }
567
+
568
+ .page-subtitle {
569
+ font-size: clamp(0.6875rem, 0.75rem + (100vw - 360px) / 800, 0.8125rem);
570
+ color: var(--mobile-text-muted);
571
+ margin-top: 0.125rem;
572
+ }
573
+
574
+ /* ==================== 页面 header ==================== */
575
+
576
+ .page-header {
577
+ padding: 1.5rem 1.25rem 1rem;
578
+ }
579
+
580
+ .page-header-row {
581
+ display: flex;
582
+ align-items: flex-end;
583
+ justify-content: space-between;
584
+ }
585
+
586
+ /* ==================== 设置二级页面 ==================== */
587
+
588
+ /* 分组标题 */
589
+ .settings-section-title {
590
+ font-size: clamp(0.625rem, 0.6875rem + (100vw - 360px) / 840, 0.75rem);
591
+ font-weight: 600;
592
+ letter-spacing: 0.06em;
593
+ text-transform: uppercase;
594
+ color: var(--mobile-text-muted);
595
+ padding-left: 0.25rem;
596
+ margin: 0;
597
+ }
598
+
599
+ /* 设置项分组卡片:行与行之间用分隔线 */
600
+ .settings-group {
601
+ background: var(--mobile-bg-card);
602
+ border: 1px solid var(--mobile-border);
603
+ border-radius: 0.75rem;
604
+ overflow: hidden;
605
+ }
606
+
607
+ .settings-row {
608
+ display: flex;
609
+ align-items: center;
610
+ justify-content: space-between;
611
+ gap: 1rem;
612
+ min-height: 3.25rem;
613
+ padding: 0.75rem 1rem;
614
+ }
615
+
616
+ .settings-row + .settings-row {
617
+ border-top: 1px solid var(--mobile-border);
618
+ }
619
+
620
+ button.settings-row {
621
+ width: 100%;
622
+ text-align: left;
623
+ cursor: pointer;
624
+ transition: background-color 0.15s ease;
625
+ }
626
+
627
+ button.settings-row:active {
628
+ background: var(--mobile-bg-elevated);
629
+ }
630
+
631
+ .settings-label {
632
+ font-size: clamp(0.8125rem, 0.9375rem + (100vw - 360px) / 840, 1rem);
633
+ color: var(--mobile-text-primary);
634
+ }
635
+
636
+ .settings-desc {
637
+ /* 说明文字:比 settings-label 小一号,手机上 10px 起、平板 11px 封顶 */
638
+ font-size: clamp(0.5625rem, 0.625rem + (100vw - 360px) / 840, 0.6875rem);
639
+ color: var(--mobile-text-muted);
640
+ margin-top: 0.125rem;
641
+ }
642
+
643
+ .settings-value {
644
+ font-size: clamp(0.75rem, 0.875rem + (100vw - 360px) / 840, 0.9375rem);
645
+ color: var(--mobile-text-secondary);
646
+ }
647
+
648
+ /* 下拉选择器:隐藏原生箭头,用统一的 chevron */
649
+ .settings-select {
650
+ appearance: none;
651
+ -webkit-appearance: none;
652
+ min-width: 7.5rem;
653
+ padding: 0.4375rem 2rem 0.4375rem 0.75rem;
654
+ font-size: clamp(0.75rem, 0.875rem + (100vw - 360px) / 840, 0.9375rem);
655
+ color: var(--mobile-text-primary);
656
+ background-color: var(--mobile-input-bg);
657
+ border: 1px solid var(--mobile-input-border);
658
+ border-radius: 0.625rem;
659
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
660
+ background-repeat: no-repeat;
661
+ background-position: right 0.5rem center;
662
+ background-size: 1rem;
663
+ transition: border-color 0.15s ease;
664
+ }
665
+
666
+ .settings-select:focus {
667
+ outline: none;
668
+ border-color: var(--mobile-accent);
669
+ }
670
+
671
+ /* 数字输入框 */
672
+ .settings-number-input {
673
+ width: 4.5rem;
674
+ padding: 0.4375rem 0.5rem;
675
+ font-size: clamp(0.75rem, 0.875rem + (100vw - 360px) / 840, 0.9375rem);
676
+ text-align: center;
677
+ color: var(--mobile-text-primary);
678
+ background: var(--mobile-input-bg);
679
+ border: 1px solid var(--mobile-input-border);
680
+ border-radius: 0.625rem;
681
+ transition: border-color 0.15s ease;
682
+ }
683
+
684
+ .settings-number-input:focus {
685
+ outline: none;
686
+ border-color: var(--mobile-accent);
687
+ }
688
+
689
+ /* ==================== 数字步进器(−/+ 按钮包夹输入框,settings 视图共用) ==================== */
690
+
691
+ .settings-stepper {
692
+ display: inline-flex;
693
+ align-items: center;
694
+ gap: 0.125rem;
695
+ background: var(--mobile-bg-elevated);
696
+ border: 1px solid var(--mobile-border);
697
+ border-radius: 0.625rem;
698
+ padding: 0.125rem;
699
+ }
700
+
701
+ .settings-stepper-btn {
702
+ display: flex;
703
+ align-items: center;
704
+ justify-content: center;
705
+ width: 2.75rem;
706
+ height: 2.75rem;
707
+ border-radius: 0.4375rem;
708
+ border: none;
709
+ background: transparent;
710
+ color: var(--mobile-text-secondary);
711
+ cursor: pointer;
712
+ transition: background-color 0.15s ease, color 0.15s ease;
713
+ }
714
+
715
+ .settings-stepper-btn:active {
716
+ background: var(--mobile-accent-muted);
717
+ color: var(--mobile-accent);
718
+ }
719
+
720
+ .settings-stepper-btn:disabled {
721
+ opacity: 0.35;
722
+ cursor: not-allowed;
723
+ }
724
+
725
+ .settings-stepper .settings-number-input {
726
+ width: 3.25rem;
727
+ border: none;
728
+ background: transparent;
729
+ padding: 0.25rem 0;
730
+ }
731
+
732
+ .settings-stepper .settings-number-input:focus {
733
+ border: none;
734
+ }
735
+
736
+ /* ==================== Modal Transitions ==================== */
737
+
738
+ /* Center Modal: scale + fade */
739
+ .center-modal-enter-active,
740
+ .center-modal-leave-active {
741
+ transition: opacity 280ms ease;
742
+ }
743
+ .center-modal-enter-active .modal-panel,
744
+ .center-modal-leave-active .modal-panel {
745
+ transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
746
+ opacity 280ms ease;
747
+ }
748
+ .center-modal-enter-from,
749
+ .center-modal-leave-to {
750
+ opacity: 0;
751
+ }
752
+ .center-modal-enter-from .modal-panel,
753
+ .center-modal-leave-to .modal-panel {
754
+ transform: scale(0.92);
755
+ opacity: 0;
756
+ }
757
+
758
+ /* Bottom Sheet: slide up */
759
+ .bottom-sheet-enter-active,
760
+ .bottom-sheet-leave-active {
761
+ transition: opacity 280ms ease;
762
+ }
763
+ .bottom-sheet-enter-active .modal-panel,
764
+ .bottom-sheet-leave-active .modal-panel {
765
+ transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
766
+ }
767
+ .bottom-sheet-enter-from,
768
+ .bottom-sheet-leave-to {
769
+ opacity: 0;
770
+ }
771
+ .bottom-sheet-enter-from .modal-panel,
772
+ .bottom-sheet-leave-to .modal-panel {
773
+ transform: translateY(100%);
774
+ }
775
+
776
+ /* ==================== 主色色板(与桌面端同名 palette 同源) ====================
777
+ 仅覆盖主色相关 token(--mobile-accent 系 + text-on-accent),色值取自
778
+ wasmnest-desktop/src/style.css 同名 palette(改色需双端同改)。
779
+ 背景/文字/边框等基础 token 的默认值(warm 色板)已与桌面端对齐;
780
+ 其余 palette 仅切换主色,不覆盖背景(与桌面端「色板只换主色调」策略一致)。 */
781
+
782
+ :root[data-palette='forest'] {
783
+ --mobile-accent: #86c49b;
784
+ --mobile-accent-muted: rgba(134, 196, 155, 0.12);
785
+ --mobile-accent-secondary: rgba(134, 196, 155, 0.2);
786
+ --mobile-text-on-accent: #101713;
787
+ }
788
+ :root[data-palette='ocean'] {
789
+ --mobile-accent: #5fd0e8;
790
+ --mobile-accent-muted: rgba(95, 208, 232, 0.12);
791
+ --mobile-accent-secondary: rgba(95, 208, 232, 0.2);
792
+ --mobile-text-on-accent: #0b1620;
793
+ }
794
+ :root[data-palette='sunset'] {
795
+ --mobile-accent: #f5a383;
796
+ --mobile-accent-muted: rgba(245, 163, 131, 0.12);
797
+ --mobile-accent-secondary: rgba(245, 163, 131, 0.2);
798
+ --mobile-text-on-accent: #1b1210;
799
+ }
800
+ :root[data-palette='violet'] {
801
+ --mobile-accent: #b9a6f7;
802
+ --mobile-accent-muted: rgba(185, 166, 247, 0.12);
803
+ --mobile-accent-secondary: rgba(185, 166, 247, 0.2);
804
+ --mobile-text-on-accent: #141020;
805
+ }
806
+
807
+ /* 浅色模式:同名 palette 的浅色主色(与桌面端 light 变体同源) */
808
+ html:not(.dark)[data-palette='forest'] .mobile-ui {
809
+ --mobile-accent: #3e6b4f;
810
+ --mobile-accent-muted: rgba(62, 107, 79, 0.12);
811
+ --mobile-accent-secondary: rgba(62, 107, 79, 0.2);
812
+ --mobile-text-on-accent: #fdfcf7;
813
+ }
814
+ html:not(.dark)[data-palette='ocean'] .mobile-ui {
815
+ --mobile-accent: #0e7490;
816
+ --mobile-accent-muted: rgba(14, 116, 144, 0.12);
817
+ --mobile-accent-secondary: rgba(14, 116, 144, 0.2);
818
+ --mobile-text-on-accent: #ffffff;
819
+ }
820
+ html:not(.dark)[data-palette='sunset'] .mobile-ui {
821
+ --mobile-accent: #d9532a;
822
+ --mobile-accent-muted: rgba(217, 83, 42, 0.12);
823
+ --mobile-accent-secondary: rgba(217, 83, 42, 0.2);
824
+ --mobile-text-on-accent: #fefaf5;
825
+ }
826
+ html:not(.dark)[data-palette='violet'] .mobile-ui {
827
+ --mobile-accent: #6d4fc6;
828
+ --mobile-accent-muted: rgba(109, 79, 198, 0.12);
829
+ --mobile-accent-secondary: rgba(109, 79, 198, 0.2);
830
+ --mobile-text-on-accent: #fcfbfe;
831
+ }
832
+
833
+ /* ==================== 色板选择器色块(设置页「主色色板」展示用) ====================
834
+ default 跟随当前主题默认主色(深色 = 象牙白 / 浅色 = 近黑),
835
+ 其余与上方同名 palette 主色同源(改色需双端同改)。 */
836
+ :root {
837
+ --mobile-palette-swatch-default: #ECE8DC;
838
+ --mobile-palette-swatch-forest: #86c49b;
839
+ --mobile-palette-swatch-ocean: #5fd0e8;
840
+ --mobile-palette-swatch-sunset: #f5a383;
841
+ --mobile-palette-swatch-violet: #b9a6f7;
842
+ }
843
+ /* 浅色模式下色块使用浅色 palette 主色(与上方 light 变体同源) */
844
+ html:not(.dark) .mobile-ui {
845
+ --mobile-palette-swatch-default: #1D1A14;
846
+ --mobile-palette-swatch-forest: #3e6b4f;
847
+ --mobile-palette-swatch-ocean: #0e7490;
848
+ --mobile-palette-swatch-sunset: #d9532a;
849
+ --mobile-palette-swatch-violet: #6d4fc6;
850
+ }
851
+
852
+ /* ==================== 移动端隐藏原生滚动条 ==================== */
853
+ /* 移动端以触摸滚动为主(惯性滚动已由 WebView 提供),原生占位式滚动条
854
+ * (8px 参与布局)既挤窄内容区又无视觉价值:整个移动端统一隐藏。
855
+ *
856
+ * 覆盖规则(与隐藏同源冲突时,显式样式的更高特异性优先):
857
+ * - 代码查看器(FileViewerModal .viewer-body)保留 4px 细条滚动条——
858
+ * 其规则只覆盖 width/height,故本规则不用 display:none(display 无竞争对手
859
+ * 会被继承生效、连带把细条也藏掉),只用 width:0/height:0 归零,细条规则
860
+ * 靠更高特异性覆盖回 4px;
861
+ * - 终端(terminal.css)xterm 滚动条已各自显式隐藏;
862
+ * - 终端输入栏(TerminalInputBar)各面板已各自 scrollbar-width: none。
863
+ *
864
+ * 隐藏后原 scrollbar-gutter: stable 预留的 8px 槽位失去载体,会在
865
+ * Chromium 变体间产生不可预测的空白(部分实现仍按占位滚动条厚度预留),
866
+ * 一并复位为 auto——各视图的 scrollbar-gutter-stable 类保留不删,仅作
867
+ * 「该容器曾需要防宽度抖动」的历史标注。
868
+ */
869
+ ::-webkit-scrollbar {
870
+ width: 0;
871
+ height: 0;
872
+ }
873
+
874
+ ::-webkit-scrollbar-track {
875
+ background: transparent;
876
+ }
877
+
878
+ ::-webkit-scrollbar-thumb {
879
+ background: transparent;
880
+ }
881
+
882
+ .scrollbar-gutter-stable {
883
+ scrollbar-gutter: auto;
884
+ }