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

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 (122) hide show
  1. package/README.md +439 -2
  2. package/README_en.md +415 -0
  3. package/bin/build.js +271 -0
  4. package/bin/cli.js +96 -0
  5. package/bin/lib.js +349 -0
  6. package/bin/manifest-gen.js +327 -0
  7. package/bin/package.js +151 -0
  8. package/bin/scaffold.js +299 -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 +43 -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 +332 -0
  25. package/dev-shell/src/locales/index.ts +70 -0
  26. package/dev-shell/src/locales/shell.ts +331 -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 +374 -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 +144 -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 +501 -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 +359 -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 +357 -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 +417 -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 +44 -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/useSlotCarousel.ts +238 -0
  71. package/dev-shell/src/shell/composables/useToast.ts +33 -0
  72. package/dev-shell/src/shell/index.ts +88 -0
  73. package/dev-shell/src/shell/logger.ts +45 -0
  74. package/dev-shell/src/shell/permissions.ts +145 -0
  75. package/dev-shell/src/shell/registry.ts +220 -0
  76. package/dev-shell/src/shell/slotCards.ts +47 -0
  77. package/dev-shell/src/shell/styles/shell.css +1155 -0
  78. package/dev-shell/src/shell/surfaceIntent.ts +107 -0
  79. package/dev-shell/src/shell/types.ts +152 -0
  80. package/dev-shell/src/shell/utils.ts +54 -0
  81. package/dev-shell/src/styles/main.css +153 -0
  82. package/dev-shell/src/styles/mobile.css +981 -0
  83. package/dev-shell/src/styles/wallpaper.css +130 -0
  84. package/dev-shell/src/theme.ts +71 -0
  85. package/dev-shell/src/vite-env.d.ts +20 -0
  86. package/dev-shell/tailwind.config.js +101 -0
  87. package/dev-shell/tsconfig.json +16 -0
  88. package/dev-shell/vite.config.ts +130 -0
  89. package/dist/index.d.ts +124 -0
  90. package/dist/index.js +229 -0
  91. package/dist/types.d.ts +738 -0
  92. package/dist/types.js +0 -0
  93. package/dist/vite-plugin.d.ts +16 -0
  94. package/dist/vite-plugin.js +95 -0
  95. package/package.json +88 -3
  96. package/src/constants.ts +6 -0
  97. package/src/global-dialog.ts +168 -0
  98. package/src/index.ts +96 -0
  99. package/src/runtime.ts +44 -0
  100. package/src/types.ts +822 -0
  101. package/src/ui/AppUpdateSection.d.ts +44 -0
  102. package/src/ui/AppUpdateSection.vue +253 -0
  103. package/src/ui/PluginGlobalDialog.vue +388 -0
  104. package/src/ui/QuickCard.d.ts +33 -0
  105. package/src/ui/QuickCard.vue +167 -0
  106. package/src/ui/Select.d.ts +37 -0
  107. package/src/ui/Select.vue +307 -0
  108. package/src/ui/plugin-global-dialog.d.ts +11 -0
  109. package/src/ui/useSwipeTabs.d.ts +20 -0
  110. package/src/ui/useSwipeTabs.ts +53 -0
  111. package/src/update.ts +123 -0
  112. package/src/vite-plugin.ts +132 -0
  113. package/template/.gitignore +4 -0
  114. package/template/README.md +46 -0
  115. package/template/package.json +23 -0
  116. package/template/plugin.json +13 -0
  117. package/template/rust/Cargo.toml +19 -0
  118. package/template/rust/src/lib.rs +33 -0
  119. package/template/src/env.d.ts +24 -0
  120. package/template/src/index.ts +37 -0
  121. package/template/tsconfig.json +17 -0
  122. package/template/vite.config.ts +21 -0
@@ -0,0 +1,981 @@
1
+ /* ============================================
2
+ 移动端主题变量
3
+ ============================================ */
4
+
5
+ /* 深色模式(默认) - 与桌面端 warm 色板深色同源
6
+ (bg-page #15130F / bg-sidebar #191712 / bg-card #1D1A15 / bg-hover #2A261E,墨纸体系) */
7
+ :root,
8
+ .theme-base {
9
+ /* 背景色 - 与桌面端同名 token 对齐(tertiary 取 border-strong 色调,作强内嵌面) */
10
+ --mobile-bg-primary: #15130F;
11
+ --mobile-bg-secondary: #191712;
12
+ --mobile-bg-tertiary: #3C372B;
13
+ --mobile-bg-card: #1D1A15;
14
+ --mobile-bg-elevated: #2A261E;
15
+
16
+ /* 卡片阴影 */
17
+ --mobile-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
18
+ --mobile-card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
19
+ --mobile-card-shadow-connected: 0 2px 12px rgba(34, 197, 94, 0.15), 0 1px 3px rgba(0, 0, 0, 0.2);
20
+
21
+ /* 文字色 - 与桌面端 warm 深色 text token 同源。
22
+ muted 从 #6B6455 提到 #8A8270(2026-11-05 unslop 审核):原值对页面 3.16:1,
23
+ 承受不了 12px 分组标签 / 说明文字的阅读负担;新值对页面 4.87:1、对卡面 4.55:1。 */
24
+ --mobile-text-primary: #ECE8DC;
25
+ --mobile-text-secondary: #9C9482;
26
+ --mobile-text-muted: #8A8270;
27
+ --mobile-text-disabled: #55503F;
28
+
29
+ /* 强调色上的文字 */
30
+ --mobile-text-on-accent: #15130F;
31
+ --mobile-border: rgba(236, 232, 220, 0.1);
32
+ --mobile-border-hover: rgba(236, 232, 220, 0.2);
33
+ --mobile-border-active: rgba(236, 232, 220, 0.3);
34
+
35
+ /* 强调色 - 与桌面端 warm 色板 primary 同源 */
36
+ --mobile-accent: #ECE8DC;
37
+ --mobile-accent-muted: rgba(236, 232, 220, 0.12);
38
+ --mobile-accent-secondary: rgba(236, 232, 220, 0.2);
39
+
40
+ /* 状态色 - 与桌面端语义色同源(success #22C55E / warning #F59E0B / danger #EF4444) */
41
+ --mobile-success: #22C55E;
42
+ --mobile-success-muted: rgba(34, 197, 94, 0.14);
43
+ --mobile-success-connected-bg: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(21, 128, 61, 0.18));
44
+ --mobile-success-connected-border: rgba(34, 197, 94, 0.2);
45
+ --mobile-warning: #f59e0b;
46
+ --mobile-warning-muted: rgba(245, 158, 11, 0.1);
47
+ --mobile-error: #ef4444;
48
+ --mobile-error-muted: rgba(239, 68, 68, 0.1);
49
+ /* 信息色 - 与桌面端 --color-info 同源(深色 #60A5FA / 浅色 #2563EB),
50
+ 玻璃主题的冷调采样源(体色 / caustic / 光晕 / 环境光);不随主色色板变化,
51
+ 与桌面「info 恒为蓝」同口径。 */
52
+ --mobile-info: #60A5FA;
53
+
54
+ /* 弹窗遮罩 */
55
+ --mobile-overlay: rgba(0, 0, 0, 0.6);
56
+ --mobile-overlay-heavy: rgba(0, 0, 0, 0.8);
57
+ --mobile-overlay-light: rgba(0, 0, 0, 0.4);
58
+
59
+ /* 终端色 - 终端区保持比页面更深一档的暖黑 */
60
+ --mobile-terminal-bg: #0F0D0A;
61
+ --mobile-terminal-header: rgba(29, 26, 21, 0.9);
62
+
63
+ /* 导航栏(激活色跟随主色 --mobile-accent:palette 切换时指示条/激活态同步变色,warm 下与主色同值不变) */
64
+ --mobile-nav-bg: rgba(21, 19, 15, 0.9);
65
+ --mobile-nav-border: rgba(236, 232, 220, 0.2);
66
+ --mobile-nav-active: var(--mobile-accent);
67
+ --mobile-nav-inactive: #8A8270;
68
+
69
+ /* 输入框 - 终端输入区专属配色,比终端输出区稍亮 */
70
+ --mobile-input-bg: #1D1A15;
71
+ --mobile-input-border: rgba(236, 232, 220, 0.25);
72
+ --mobile-input-focus: rgba(236, 232, 220, 0.45);
73
+ --mobile-input-placeholder: #8A8270;
74
+
75
+ /* 触控目标最小尺寸(恒常值,不随屏幕缩放) */
76
+ --mobile-input-height: 44px;
77
+ --mobile-nav-item-height: 44px;
78
+ --mobile-touch-target-min: 44px;
79
+
80
+ /* 代码查看器 */
81
+ --mobile-code-gutter-bg: rgba(236, 232, 220, 0.04);
82
+ --mobile-code-gutter-border: rgba(156, 148, 130, 0.15);
83
+ --mobile-code-gutter-color: rgba(156, 148, 130, 0.5);
84
+
85
+ /* 快捷键面板功能色 */
86
+ /* 快捷键/命令 chip:墨纸主题强调色(与 send 同源),Enter/Del 保留 confirm/danger 语义色 */
87
+ --mobile-shortcut-color: #ECE8DC;
88
+ --mobile-shortcut-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
89
+ --mobile-shortcut-border: rgba(236, 232, 220, 0.3);
90
+ --mobile-shortcut-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
91
+
92
+ --mobile-custom-cmd-color: #ECE8DC;
93
+ --mobile-custom-cmd-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
94
+ --mobile-custom-cmd-border: rgba(236, 232, 220, 0.3);
95
+ --mobile-custom-cmd-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
96
+ --mobile-arrow-color: #F59E0B;
97
+ --mobile-arrow-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
98
+ --mobile-arrow-border: rgba(245, 158, 11, 0.35);
99
+ --mobile-arrow-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
100
+ --mobile-send-color: #ECE8DC;
101
+ --mobile-send-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
102
+ --mobile-send-border: rgba(236, 232, 220, 0.3);
103
+ --mobile-send-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
104
+ --mobile-execute-color: #F59E0B;
105
+ --mobile-execute-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
106
+ --mobile-execute-border: rgba(245, 158, 11, 0.35);
107
+ --mobile-execute-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
108
+ --mobile-add-cmd-color: #ECE8DC;
109
+ --mobile-add-cmd-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.12), rgba(236, 232, 220, 0.06));
110
+ --mobile-add-cmd-border: rgba(236, 232, 220, 0.5);
111
+ --mobile-add-cmd-active-bg: linear-gradient(135deg, rgba(236, 232, 220, 0.28), rgba(236, 232, 220, 0.16));
112
+ --mobile-edit-cmd-color: #F59E0B;
113
+ --mobile-edit-cmd-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
114
+ --mobile-edit-cmd-border: rgba(245, 158, 11, 0.35);
115
+ --mobile-edit-cmd-active-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.16));
116
+ --mobile-danger-color: #EF4444;
117
+ --mobile-danger-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
118
+ --mobile-danger-border: rgba(239, 68, 68, 0.5);
119
+ --mobile-danger-solid-bg: rgba(239, 68, 68, 0.9);
120
+ --mobile-confirm-color: #22C55E;
121
+ --mobile-confirm-bg: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
122
+ --mobile-confirm-border: rgba(34, 197, 94, 0.5);
123
+
124
+ /* 输入助手悬浮球 */
125
+ --mobile-input-assist-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
126
+
127
+ /* 分组卡片 */
128
+ --mobile-group-bg: #1D1A15;
129
+ --mobile-group-border: rgba(236, 232, 220, 0.08);
130
+ --mobile-group-divider: rgba(236, 232, 220, 0.06);
131
+ --mobile-group-row-active: rgba(236, 232, 220, 0.05);
132
+
133
+ /* 分组标题(删除 .group-section-title 后暂无消费方;保留给后续分组标题面) */
134
+ --mobile-section-title-color: #8A8270;
135
+
136
+ /* 图标 chip 色调 (12% 透明底) - 状态色与桌面端语义色同源,violet 为移动端分类装饰色 */
137
+ --mobile-chip-cyan: #ECE8DC;
138
+ --mobile-chip-cyan-bg: rgba(236, 232, 220, 0.12);
139
+ --mobile-chip-emerald: #22C55E;
140
+ --mobile-chip-emerald-bg: rgba(34, 197, 94, 0.14);
141
+ --mobile-chip-amber: #F59E0B;
142
+ --mobile-chip-amber-bg: rgba(245, 158, 11, 0.14);
143
+ --mobile-chip-violet: #a78bfa;
144
+ --mobile-chip-violet-bg: rgba(167, 139, 250, 0.12);
145
+ --mobile-chip-red: #EF4444;
146
+ --mobile-chip-red-bg: rgba(239, 68, 68, 0.14);
147
+ --mobile-chip-zinc: #ABA492;
148
+ --mobile-chip-zinc-bg: rgba(236, 232, 220, 0.08);
149
+
150
+ /* badge 状态 */
151
+ --mobile-badge-zinc-color: #ABA492;
152
+ --mobile-badge-zinc-bg: rgba(236, 232, 220, 0.08);
153
+
154
+ /* 行文字 */
155
+ --mobile-row-title: #ECE8DC;
156
+ --mobile-row-sub: #9C9482;
157
+ --mobile-row-value: #ABA492;
158
+ /* 滚动条 - 与桌面端全局 scrollbar 规则同源(track=bg-hover / thumb=text-tertiary / hover=text-secondary) */
159
+ --scrollbar-track-bg: #2A261E;
160
+ --scrollbar-thumb-bg: #6B6455;
161
+ --scrollbar-thumb-hover-bg: #9C9482;
162
+ }
163
+
164
+ /* 浅色模式 - html 没有 .dark 类时**全树**生效
165
+ (与桌面端 warm 色板浅色同源:bg-page #F5F4F0 / bg-sidebar #EFEDE7 / bg-card #FDFCFA / bg-hover #E7E4DC)
166
+
167
+ 作用域口径(2026-10-14 修正):浅色 token 必须挂在 html 上,不能挂在 .mobile-ui / .mobile-app 上。
168
+ 旧写法把浅色值限定在带类元素内,于是所有**不带类的渲染面**都掉回 :root 的深色默认值:
169
+ 设置二级页(SettingsSubPage 自带根节点)、Teleport 到 body 的抽屉(ShellSheet 只带 .shell-ui)
170
+ 在浅色主题下整片变深色(实测:设置子页 5 页 + 应用菜单抽屉)。深色默认值留在 :root,
171
+ 浅色在 html:not(.dark) 上整体覆盖——这样「主题」不再依赖某个祖先类是否写对。
172
+
173
+ `.theme-base` 一并挂上:默认主题的预览块跟着壳的明暗走(深色档在 :root 那份,
174
+ 浅色档在这里)。 */
175
+ html:not(.dark),
176
+ html:not(.dark) .theme-base {
177
+ /* 背景色 - 与桌面端同名 token 对齐(tertiary 取 border-strong 色调,作强内嵌面) */
178
+ --mobile-bg-primary: #F5F4F0;
179
+ --mobile-bg-secondary: #EFEDE7;
180
+ --mobile-bg-tertiary: #D6D2C4;
181
+ --mobile-bg-card: #FDFCFA;
182
+ --mobile-bg-elevated: #E7E4DC;
183
+
184
+ /* 卡片阴影 - 浅色模式阴影更明显以增强层次 */
185
+ --mobile-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
186
+ --mobile-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
187
+ --mobile-card-shadow-connected: 0 2px 8px rgba(5, 150, 105, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
188
+
189
+ /* 文字色 - 与桌面端 warm 浅色 text token 同源(primary 对比度 ~13:1)。
190
+ secondary #7C7565 → #6B6353(对页面 5.40:1);muted #ABA492 → #776F5F
191
+ (对页面 4.52:1)。2026-11-05 unslop 审核:原 muted 只有 2.26:1,
192
+ 12px 级说明文字几乎读不清;三档字色现在都过 4.5:1。 */
193
+ --mobile-text-primary: #26231B;
194
+ --mobile-text-secondary: #6B6353;
195
+ --mobile-text-muted: #776F5F;
196
+ --mobile-text-disabled: #C6BFAE;
197
+
198
+ /* 强调色上的文字 - 与桌面端 warm 色板 primary-contrast 同源 */
199
+ --mobile-text-on-accent: #FDFCFA;
200
+
201
+ /* 边框色 - 墨色基(#26231B)alpha,与桌面端 border 色相同源 */
202
+ --mobile-border: rgba(38, 35, 27, 0.12);
203
+ --mobile-border-hover: rgba(38, 35, 27, 0.2);
204
+ --mobile-border-active: rgba(38, 35, 27, 0.4);
205
+
206
+ /* 强调色 - 与桌面端 warm 色板 primary 同源(墨色) */
207
+ --mobile-accent: #1D1A14;
208
+ --mobile-accent-muted: rgba(29, 26, 20, 0.08);
209
+ --mobile-accent-secondary: rgba(29, 26, 20, 0.16);
210
+
211
+ /* 状态色 */
212
+ --mobile-success: #059669;
213
+ --mobile-success-muted: rgba(5, 150, 105, 0.1);
214
+ --mobile-success-connected-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(6, 95, 70, 0.16));
215
+ --mobile-success-connected-border: rgba(5, 150, 105, 0.25);
216
+ --mobile-warning: #d97706;
217
+ --mobile-warning-muted: rgba(217, 119, 6, 0.1);
218
+ --mobile-error: #dc2626;
219
+ --mobile-error-muted: rgba(220, 38, 38, 0.1);
220
+ --mobile-info: #2563EB;
221
+
222
+ /* 弹窗遮罩 */
223
+ --mobile-overlay: rgba(0, 0, 0, 0.4);
224
+ --mobile-overlay-heavy: rgba(0, 0, 0, 0.6);
225
+ --mobile-overlay-light: rgba(0, 0, 0, 0.2);
226
+
227
+ /* 终端色 - 浅色终端区取暖白 */
228
+ --mobile-terminal-bg: #FAF9F5;
229
+ --mobile-terminal-header: rgba(245, 244, 240, 0.95);
230
+
231
+ /* 导航栏(激活色跟随主色 --mobile-accent:palette 切换时指示条/激活态同步变色) */
232
+ --mobile-nav-bg: rgba(253, 252, 250, 0.9);
233
+ --mobile-nav-border: rgba(38, 35, 27, 0.1);
234
+ --mobile-nav-active: var(--mobile-accent);
235
+ --mobile-nav-inactive: #776F5F;
236
+
237
+ /* 输入框 - 输入面取页面色(桌面端卡片内输入框同规则),聚焦用墨色 accent */
238
+ --mobile-input-bg: #F5F4F0;
239
+ --mobile-input-border: rgba(38, 35, 27, 0.2);
240
+ --mobile-input-focus: rgba(29, 26, 20, 0.45);
241
+ --mobile-input-placeholder: #776F5F;
242
+
243
+ /* 代码查看器 */
244
+ --mobile-code-gutter-bg: rgba(0, 0, 0, 0.04);
245
+ --mobile-code-gutter-border: rgba(0, 0, 0, 0.08);
246
+ --mobile-code-gutter-color: rgba(124, 117, 101, 0.55);
247
+
248
+ /* 快捷键面板功能色 - 浅色模式使用饱和度适中的配色 */
249
+ /* 快捷键/命令 chip:墨纸主题强调色(与 send 同源),Enter/Del 保留 confirm/danger 语义色 */
250
+ --mobile-shortcut-color: #1D1A14;
251
+ --mobile-shortcut-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
252
+ --mobile-shortcut-border: rgba(29, 26, 20, 0.3);
253
+ --mobile-shortcut-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
254
+
255
+ --mobile-custom-cmd-color: #1D1A14;
256
+ --mobile-custom-cmd-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
257
+ --mobile-custom-cmd-border: rgba(29, 26, 20, 0.3);
258
+ --mobile-custom-cmd-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
259
+ --mobile-arrow-color: #a16207;
260
+ --mobile-arrow-bg: linear-gradient(135deg, rgba(161, 98, 7, 0.1), rgba(161, 98, 7, 0.05));
261
+ --mobile-arrow-border: rgba(161, 98, 7, 0.3);
262
+ --mobile-arrow-active-bg: linear-gradient(135deg, rgba(161, 98, 7, 0.2), rgba(161, 98, 7, 0.12));
263
+ --mobile-send-color: #1D1A14;
264
+ --mobile-send-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
265
+ --mobile-send-border: rgba(29, 26, 20, 0.3);
266
+ --mobile-send-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
267
+ --mobile-execute-color: #B45309;
268
+ --mobile-execute-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.1), rgba(180, 83, 9, 0.05));
269
+ --mobile-execute-border: rgba(180, 83, 9, 0.3);
270
+ --mobile-execute-active-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.12));
271
+ --mobile-add-cmd-color: #1D1A14;
272
+ --mobile-add-cmd-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.08), rgba(29, 26, 20, 0.04));
273
+ --mobile-add-cmd-border: rgba(29, 26, 20, 0.4);
274
+ --mobile-add-cmd-active-bg: linear-gradient(135deg, rgba(29, 26, 20, 0.16), rgba(29, 26, 20, 0.1));
275
+ --mobile-edit-cmd-color: #B45309;
276
+ --mobile-edit-cmd-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.1), rgba(180, 83, 9, 0.05));
277
+ --mobile-edit-cmd-border: rgba(180, 83, 9, 0.3);
278
+ --mobile-edit-cmd-active-bg: linear-gradient(135deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.12));
279
+ --mobile-danger-color: #dc2626;
280
+ --mobile-danger-bg: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
281
+ --mobile-danger-border: rgba(220, 38, 38, 0.4);
282
+ --mobile-danger-solid-bg: rgba(220, 38, 38, 0.85);
283
+ --mobile-confirm-color: #059669;
284
+ --mobile-confirm-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(5, 150, 105, 0.08));
285
+ --mobile-confirm-border: rgba(5, 150, 105, 0.4);
286
+
287
+ /* 分组卡片 - 浅色模式 */
288
+ --mobile-group-bg: #FDFCFA;
289
+ --mobile-group-border: rgba(38, 35, 27, 0.08);
290
+ --mobile-group-divider: rgba(38, 35, 27, 0.06);
291
+ --mobile-group-row-active: rgba(38, 35, 27, 0.04);
292
+
293
+ /* 分组标题(删除 .group-section-title 后暂无消费方;保留给后续分组标题面) */
294
+ --mobile-section-title-color: #776F5F;
295
+
296
+ /* 图标 chip 色调 - 浅色模式(状态色用加深变体保证对比度,色相与桌面端语义色同族) */
297
+ --mobile-chip-cyan: #1D1A14;
298
+ --mobile-chip-cyan-bg: rgba(29, 26, 20, 0.1);
299
+ --mobile-chip-emerald: #059669;
300
+ --mobile-chip-emerald-bg: rgba(5, 150, 105, 0.1);
301
+ --mobile-chip-amber: #d97706;
302
+ --mobile-chip-amber-bg: rgba(217, 119, 6, 0.1);
303
+ --mobile-chip-violet: #7c3aed;
304
+ --mobile-chip-violet-bg: rgba(124, 58, 237, 0.1);
305
+ --mobile-chip-red: #dc2626;
306
+ --mobile-chip-red-bg: rgba(220, 38, 38, 0.1);
307
+ --mobile-chip-zinc: #776F5F;
308
+ --mobile-chip-zinc-bg: rgba(38, 35, 27, 0.06);
309
+
310
+ /* badge 状态 */
311
+ --mobile-badge-zinc-color: #6B6353;
312
+ --mobile-badge-zinc-bg: rgba(38, 35, 27, 0.06);
313
+
314
+ /* 行文字 */
315
+ --mobile-row-title: #26231B;
316
+ --mobile-row-sub: #776F5F;
317
+ --mobile-row-value: #6B6353;
318
+
319
+ /* 输入助手悬浮球 */
320
+ --mobile-input-assist-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
321
+
322
+ /* 滚动条 - 与桌面端全局 scrollbar 规则同源 */
323
+ --scrollbar-track-bg: #E7E4DC;
324
+ --scrollbar-thumb-bg: #ABA492;
325
+ --scrollbar-thumb-hover-bg: #7C7565;
326
+ }
327
+
328
+ /* 默认档的中性化:主题专属的三枚 token(环境光 / 图标外框 / 图标投影)不属于默认档,
329
+ 显式归零——否则它们会从当前主题的 <html> 继承下来,默认预览就带上了别人的语汇。
330
+ 图标外框圆角取基础档值 24%(与 .theme-swatch-icon 的兜底一致)。 */
331
+ .theme-base {
332
+ --theme-ambient: none;
333
+ --theme-icon-shadow: none;
334
+ --theme-icon-radius: 24%;
335
+ /* 玻璃材质 token 也归零:默认预览不挂 data-theme,若这些值从当前主题
336
+ 继承下来,任何引用它们的预览规则都会偷偷长成玻璃。 */
337
+ --theme-glass-tint: var(--mobile-bg-card);
338
+ --theme-glass-fill-top: var(--mobile-bg-card);
339
+ --theme-glass-fill-bottom: var(--mobile-bg-card);
340
+ --theme-glass-control: var(--mobile-bg-card);
341
+ --theme-glass-control-hover: var(--mobile-bg-card);
342
+ --theme-glass-rim-hi: transparent;
343
+ --theme-glass-rim-lo: transparent;
344
+ --theme-glass-inner: transparent;
345
+ --theme-glass-edge: var(--mobile-border);
346
+ --theme-glass-sheen: transparent;
347
+ --theme-glass-caustic: transparent;
348
+ --theme-glass-glow: transparent;
349
+ --theme-glass-blur: 0px;
350
+ --theme-glass-sat: 100%;
351
+ --theme-glass-brightness: 1;
352
+ --theme-glass-grain: none;
353
+ --theme-glass-grain-opacity: 0;
354
+ --theme-glass-selected: var(--mobile-bg-card);
355
+ --theme-glass-radius-card: 0.75rem;
356
+ --theme-glass-radius-control: 0.5rem;
357
+ }
358
+
359
+ /* 主题切换过渡动画 */
360
+ .mobile-ui,
361
+ .mobile-app {
362
+ transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
363
+ }
364
+
365
+ /* ==================== 流式字号(自适应文字大小) ==================== */
366
+ /* 所有移动端文字随视口宽度在 320px(小屏) → 1200px(平板) 之间等比缩放:
367
+ 360px 处等于原有固定字号(xs=10 / sm=12 / base=14 / lg=16 / xl=18 / 2xl=24),
368
+ 更窄窗口继续缩小,平板自动放大。style.css 中 .mobile-ui 下的
369
+ h1/p/button/text-* 等规则均引用这些变量,因此全端文字一次生效。 */
370
+
371
+ /* 挂 :root 而非 .mobile-ui/.mobile-app:流式字号只是视口宽度的函数(与主题无关),
372
+ 而 Teleport 到 body 的抽屉(ShellSheet)与旧设置子页并不带那两个类——挂类上会让
373
+ 它们的 text-[var(--font-size-*)] 取不到值(字体尺寸回退为继承值)。 */
374
+ :root {
375
+ --font-size-xs: calc(clamp(0.5625rem, 0.625rem + (100vw - 360px) / 840 * 2, 0.75rem) * var(--mobile-font-scale, 1)); /* 9 / 10 / 12px */
376
+ --font-size-sm: calc(clamp(0.6875rem, 0.75rem + (100vw - 360px) / 840 * 2, 0.875rem) * var(--mobile-font-scale, 1)); /* 11 / 12 / 14px */
377
+ --font-size-base: calc(clamp(0.8125rem, 0.875rem + (100vw - 360px) / 840 * 2, 1rem) * var(--mobile-font-scale, 1)); /* 13 / 14 / 16px */
378
+ --font-size-lg: calc(clamp(0.9375rem, 1rem + (100vw - 360px) / 840 * 2, 1.125rem) * var(--mobile-font-scale, 1)); /* 15 / 16 / 18px */
379
+ --font-size-xl: calc(clamp(1.0625rem, 1.125rem + (100vw - 360px) / 840 * 2, 1.25rem) * var(--mobile-font-scale, 1)); /* 17 / 18 / 20px */
380
+ --font-size-2xl: calc(clamp(1.375rem, 1.5rem + (100vw - 360px) / 840 * 2, 1.625rem) * var(--mobile-font-scale, 1)); /* 22 / 24 / 26px */
381
+ }
382
+
383
+ /* text-2xl:style.css 未映射,补充一条流式规则(用于 emoji 图标等大字号) */
384
+ .mobile-ui .text-2xl {
385
+ font-size: var(--font-size-2xl);
386
+ line-height: 1.3;
387
+ }
388
+
389
+ /* ============================================
390
+ xterm 终端滚动 - 全局禁用 viewport 原生滚动
391
+ 移动端使用外层伪滚动容器 + scrollToLine 方案
392
+ xterm-viewport 的滚动由外层容器接管
393
+ ============================================ */
394
+
395
+ .xterm-viewport {
396
+ overflow-y: hidden !important;
397
+ touch-action: none !important;
398
+ pointer-events: none !important;
399
+ /* 强制隐藏任何残留滚动条 */
400
+ scrollbar-width: none !important;
401
+ }
402
+
403
+ .xterm-viewport::-webkit-scrollbar {
404
+ display: none !important;
405
+ width: 0 !important;
406
+ }
407
+
408
+ /* ============================================
409
+ Shared Loading Overlay
410
+ 多个视图共享的加载遮罩样式
411
+ ============================================ */
412
+
413
+ .mobile-loading-overlay {
414
+ position: fixed;
415
+ inset: 0;
416
+ z-index: 50;
417
+ background: var(--mobile-bg-primary);
418
+ display: flex;
419
+ flex-direction: column;
420
+ align-items: center;
421
+ justify-content: center;
422
+ gap: 1rem;
423
+ }
424
+
425
+ .mobile-loading-spinner {
426
+ width: 32px;
427
+ height: 32px;
428
+ border: 3px solid var(--mobile-border);
429
+ border-top-color: var(--mobile-accent);
430
+ border-radius: 50%;
431
+ animation: mobile-spin 0.8s linear infinite;
432
+ }
433
+
434
+ @keyframes mobile-spin {
435
+ to { transform: rotate(360deg); }
436
+ }
437
+
438
+ .mobile-loading-text {
439
+ font-size: clamp(0.75rem, 0.875rem + (100vw - 360px) / 840, 0.9375rem);
440
+ color: var(--mobile-text-muted);
441
+ margin: 0;
442
+ }
443
+
444
+ /* Loading fade transition */
445
+ .mobile-loading-fade-enter-active,
446
+ .mobile-loading-fade-leave-active {
447
+ transition: opacity 0.3s ease;
448
+ }
449
+
450
+ .mobile-loading-fade-enter-from,
451
+ .mobile-loading-fade-leave-to {
452
+ opacity: 0;
453
+ }
454
+
455
+ /* ==================== 分组卡片通用语言 ==================== */
456
+
457
+ .group-card {
458
+ background: var(--mobile-group-bg);
459
+ border: 1px solid var(--mobile-group-border);
460
+ border-radius: 1rem;
461
+ overflow: hidden;
462
+ }
463
+
464
+ .group-card > .group-row + .group-row {
465
+ border-top: 1px solid var(--mobile-group-divider);
466
+ }
467
+
468
+ .group-row {
469
+ display: flex;
470
+ align-items: center;
471
+ gap: 0.75rem;
472
+ padding: 0.8125rem 1rem;
473
+ min-height: 3.5rem;
474
+ }
475
+
476
+ button.group-row,
477
+ .group-row-btn {
478
+ width: 100%;
479
+ cursor: pointer;
480
+ /* button 默认 text-align:center 会被后代标题继承,导致行内文字居中;统一左对齐 */
481
+ text-align: left;
482
+ transition: background-color 0.15s ease;
483
+ }
484
+
485
+ button.group-row:active,
486
+ .group-row-btn:active {
487
+ background: var(--mobile-group-row-active);
488
+ }
489
+
490
+ /* 分组卡内文字统一取根级流式字号档位,不再各自写裸 clamp()。
491
+ 这么做的两个原因:① 裸 clamp() 不带 --mobile-font-scale,设置里的
492
+ 「字体大小」对分组卡完全无效(用户调了档位看着没反应);② 裸 clamp()
493
+ 与 --font-size-* 是两条并行字阶,档位一旦调整就对不齐。
494
+ 档位取值:标题/标签 = lg,副行 = base,右侧取值 = base。 */
495
+
496
+ .group-row-title {
497
+ font-size: var(--font-size-lg);
498
+ font-weight: 500;
499
+ color: var(--mobile-row-title);
500
+ }
501
+
502
+ .group-row-label {
503
+ font-size: var(--font-size-lg);
504
+ color: var(--mobile-row-title);
505
+ }
506
+
507
+ .group-row-sub {
508
+ font-size: var(--font-size-base);
509
+ color: var(--mobile-row-sub);
510
+ }
511
+
512
+ .group-row-value {
513
+ font-size: var(--font-size-base);
514
+ color: var(--mobile-row-value);
515
+ }
516
+
517
+ /* ==================== 列表行内联状态文字 ==================== */
518
+
519
+ /* 任务状态行内文字:语义色弱标记。宽度不可预测的内容一律 nowrap,
520
+ 宁可与相邻的运行时长争空间也不折行(折行会让整行行高突变)。 */
521
+ .task-state {
522
+ flex-shrink: 0;
523
+ white-space: nowrap;
524
+ font-weight: 600;
525
+ }
526
+
527
+ .task-state--idle { color: var(--mobile-chip-zinc); }
528
+ .task-state--in-progress { color: var(--mobile-chip-amber); }
529
+ .task-state--asking { color: var(--mobile-chip-violet); }
530
+ .task-state--retrying { color: var(--mobile-chip-amber); }
531
+ .task-state--completed { color: var(--mobile-chip-emerald); }
532
+ .task-state--interrupted { color: var(--mobile-chip-red); }
533
+
534
+ /* ==================== 图标 chip ==================== */
535
+
536
+ .icon-chip {
537
+ display: flex;
538
+ align-items: center;
539
+ justify-content: center;
540
+ width: clamp(2rem, 2.25rem + (100vw - 360px) / 800 * 4, 2.5rem);
541
+ height: clamp(2rem, 2.25rem + (100vw - 360px) / 800 * 4, 2.5rem);
542
+ border-radius: 0.625rem;
543
+ flex-shrink: 0;
544
+ }
545
+
546
+ .chip-cyan { color: var(--mobile-chip-cyan); background: var(--mobile-chip-cyan-bg); }
547
+ .chip-emerald { color: var(--mobile-chip-emerald); background: var(--mobile-chip-emerald-bg); }
548
+ .chip-amber { color: var(--mobile-chip-amber); background: var(--mobile-chip-amber-bg); }
549
+ .chip-violet { color: var(--mobile-chip-violet); background: var(--mobile-chip-violet-bg); }
550
+ .chip-red { color: var(--mobile-chip-red); background: var(--mobile-chip-red-bg); }
551
+ .chip-zinc { color: var(--mobile-chip-zinc); background: var(--mobile-chip-zinc-bg); }
552
+
553
+ /* 卡片内的图标 chip:会话配置卡在用(.config-icon / .config-icon-sm)。
554
+ 这两个类此前只被引用、从未定义,卡片图标实际是以裸 SVG 尺寸贴在色块上,
555
+ 与 .icon-chip 的 36px 圆角 chip 视觉不齐。 */
556
+ .config-icon {
557
+ display: flex;
558
+ align-items: center;
559
+ justify-content: center;
560
+ width: clamp(2.25rem, 2.5rem + (100vw - 360px) / 800 * 4, 2.5rem);
561
+ height: clamp(2.25rem, 2.5rem + (100vw - 360px) / 800 * 4, 2.5rem);
562
+ border-radius: 0.75rem;
563
+ flex-shrink: 0;
564
+ }
565
+
566
+ .config-icon-sm {
567
+ display: flex;
568
+ align-items: center;
569
+ justify-content: center;
570
+ width: 1.75rem;
571
+ height: 1.75rem;
572
+ border-radius: 0.5rem;
573
+ flex-shrink: 0;
574
+ }
575
+
576
+ /* ==================== 状态 badge ==================== */
577
+
578
+ .status-badge {
579
+ display: inline-flex;
580
+ align-items: center;
581
+ gap: 0.375rem;
582
+ flex-shrink: 0;
583
+ font-size: var(--font-size-sm);
584
+ font-weight: 600;
585
+ padding: 0.2rem 0.55rem;
586
+ border-radius: 999px;
587
+ }
588
+
589
+ .badge-emerald { color: var(--mobile-chip-emerald); background: var(--mobile-chip-emerald-bg); }
590
+ .badge-amber { color: var(--mobile-chip-amber); background: var(--mobile-chip-amber-bg); }
591
+ .badge-cyan { color: var(--mobile-chip-cyan); background: var(--mobile-chip-cyan-bg); }
592
+ .badge-zinc { color: var(--mobile-badge-zinc-color); background: var(--mobile-badge-zinc-bg); }
593
+
594
+ .status-dot {
595
+ width: 6px;
596
+ height: 6px;
597
+ border-radius: 999px;
598
+ }
599
+
600
+ .dot-emerald {
601
+ background: var(--mobile-chip-emerald);
602
+ }
603
+
604
+ /* ==================== 页面标题 ==================== */
605
+
606
+ .page-title {
607
+ font-size: clamp(1.25rem, 1.375rem + (100vw - 360px) / 800 * 2, 1.5rem);
608
+ font-weight: 600;
609
+ letter-spacing: -0.025em;
610
+ color: var(--mobile-text-primary);
611
+ }
612
+
613
+ .page-subtitle {
614
+ font-size: clamp(0.6875rem, 0.75rem + (100vw - 360px) / 800, 0.8125rem);
615
+ color: var(--mobile-text-muted);
616
+ margin-top: 0.125rem;
617
+ }
618
+
619
+ /* ==================== 页面 header ==================== */
620
+
621
+ .page-header {
622
+ /* 左右 16px 与内容区同边(2026-11-05 unslop 审核:原 20px 会让页标题比首张卡内缩 4px) */
623
+ padding: 1.5rem 1rem 1rem;
624
+ }
625
+
626
+ .page-header-row {
627
+ display: flex;
628
+ align-items: flex-end;
629
+ justify-content: space-between;
630
+ }
631
+
632
+ /* ==================== 设置二级页面 ==================== */
633
+
634
+ /* 分组标题
635
+ 取宿主字阶的最小一档(sm),不写 uppercase:壳内分组头(ShellSection)用
636
+ sentence case,设置页也跟随,不再维护第二套全大写小标签体系。 */
637
+ .settings-section-title {
638
+ font-size: var(--font-size-sm);
639
+ font-weight: 600;
640
+ letter-spacing: 0.02em;
641
+ color: var(--mobile-text-muted);
642
+ padding-left: 0.25rem;
643
+ margin: 0;
644
+ }
645
+
646
+ /* 设置项分组卡片:行与行之间用分隔线 */
647
+ .settings-group {
648
+ background: var(--mobile-bg-card);
649
+ border: 1px solid var(--mobile-border);
650
+ border-radius: 0.75rem;
651
+ overflow: hidden;
652
+ }
653
+
654
+ .settings-row {
655
+ display: flex;
656
+ align-items: center;
657
+ justify-content: space-between;
658
+ gap: 1rem;
659
+ min-height: 3.25rem;
660
+ padding: 0.75rem 1rem;
661
+ }
662
+
663
+ .settings-row + .settings-row {
664
+ border-top: 1px solid var(--mobile-border);
665
+ }
666
+
667
+ button.settings-row {
668
+ width: 100%;
669
+ text-align: left;
670
+ cursor: pointer;
671
+ transition: background-color 0.15s ease;
672
+ }
673
+
674
+ button.settings-row:active {
675
+ background: var(--mobile-bg-elevated);
676
+ }
677
+
678
+ .settings-label {
679
+ /* 行标题走宿主字阶 base(14px),与壳内列表行同尺寸;不再用独立 clamp 字阶
680
+ (那套不接受字号偏好,且与 --font-size-* 是两条并行刻度)。 */
681
+ font-size: var(--font-size-base);
682
+ font-weight: 500;
683
+ color: var(--mobile-text-primary);
684
+ }
685
+
686
+ .settings-desc {
687
+ /* 说明文字:降一档到 sm(12px),保证可读性又不与主标签争重量 */
688
+ font-size: var(--font-size-sm);
689
+ color: var(--mobile-text-muted);
690
+ margin-top: 0.125rem;
691
+ }
692
+
693
+ .settings-value {
694
+ font-size: var(--font-size-sm);
695
+ color: var(--mobile-text-secondary);
696
+ }
697
+
698
+ /* 下拉选择器:隐藏原生箭头,用统一的 chevron */
699
+ .settings-select {
700
+ appearance: none;
701
+ -webkit-appearance: none;
702
+ min-width: 7.5rem;
703
+ padding: 0.4375rem 2rem 0.4375rem 0.75rem;
704
+ font-size: var(--font-size-base);
705
+ color: var(--mobile-text-primary);
706
+ background-color: var(--mobile-input-bg);
707
+ border: 1px solid var(--mobile-input-border);
708
+ border-radius: 0.625rem;
709
+ 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");
710
+ background-repeat: no-repeat;
711
+ background-position: right 0.5rem center;
712
+ background-size: 1rem;
713
+ transition: border-color 0.15s ease;
714
+ }
715
+
716
+ .settings-select:focus {
717
+ outline: none;
718
+ border-color: var(--mobile-accent);
719
+ }
720
+
721
+ /* 数字输入框 */
722
+ .settings-number-input {
723
+ width: 4.5rem;
724
+ padding: 0.4375rem 0.5rem;
725
+ font-size: var(--font-size-base);
726
+ text-align: center;
727
+ color: var(--mobile-text-primary);
728
+ background: var(--mobile-input-bg);
729
+ border: 1px solid var(--mobile-input-border);
730
+ border-radius: 0.625rem;
731
+ transition: border-color 0.15s ease;
732
+ }
733
+
734
+ .settings-number-input:focus {
735
+ outline: none;
736
+ border-color: var(--mobile-accent);
737
+ }
738
+
739
+ /* ==================== 数字步进器(−/+ 按钮包夹输入框,settings 视图共用) ==================== */
740
+
741
+ .settings-stepper {
742
+ display: inline-flex;
743
+ align-items: center;
744
+ gap: 0.125rem;
745
+ background: var(--mobile-bg-elevated);
746
+ border: 1px solid var(--mobile-border);
747
+ border-radius: 0.625rem;
748
+ padding: 0.125rem;
749
+ }
750
+
751
+ .settings-stepper-btn {
752
+ display: flex;
753
+ align-items: center;
754
+ justify-content: center;
755
+ width: 2.75rem;
756
+ height: 2.75rem;
757
+ border-radius: 0.4375rem;
758
+ border: none;
759
+ background: transparent;
760
+ color: var(--mobile-text-secondary);
761
+ cursor: pointer;
762
+ transition: background-color 0.15s ease, color 0.15s ease;
763
+ }
764
+
765
+ .settings-stepper-btn:active {
766
+ background: var(--mobile-accent-muted);
767
+ color: var(--mobile-accent);
768
+ }
769
+
770
+ .settings-stepper-btn:disabled {
771
+ opacity: 0.35;
772
+ cursor: not-allowed;
773
+ }
774
+
775
+ .settings-stepper .settings-number-input {
776
+ width: 3.25rem;
777
+ border: none;
778
+ background: transparent;
779
+ padding: 0.25rem 0;
780
+ }
781
+
782
+ .settings-stepper .settings-number-input:focus {
783
+ border: none;
784
+ }
785
+
786
+ /* ==================== Modal Transitions ==================== */
787
+
788
+ /* Center Modal: scale + fade */
789
+ .center-modal-enter-active,
790
+ .center-modal-leave-active {
791
+ transition: opacity 280ms ease;
792
+ }
793
+ .center-modal-enter-active .modal-panel,
794
+ .center-modal-leave-active .modal-panel {
795
+ transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
796
+ opacity 280ms ease;
797
+ }
798
+ .center-modal-enter-from,
799
+ .center-modal-leave-to {
800
+ opacity: 0;
801
+ }
802
+ .center-modal-enter-from .modal-panel,
803
+ .center-modal-leave-to .modal-panel {
804
+ transform: scale(0.92);
805
+ opacity: 0;
806
+ }
807
+
808
+ /* Bottom Sheet: slide up */
809
+ .bottom-sheet-enter-active,
810
+ .bottom-sheet-leave-active {
811
+ transition: opacity 280ms ease;
812
+ }
813
+ .bottom-sheet-enter-active .modal-panel,
814
+ .bottom-sheet-leave-active .modal-panel {
815
+ transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
816
+ }
817
+ .bottom-sheet-enter-from,
818
+ .bottom-sheet-leave-to {
819
+ opacity: 0;
820
+ }
821
+ .bottom-sheet-enter-from .modal-panel,
822
+ .bottom-sheet-leave-to .modal-panel {
823
+ transform: translateY(100%);
824
+ }
825
+
826
+ /* 减弱动态:弹窗 / 抽屉都 Teleport 到 body,壳根 `.shell-ui` 的统一降级规则
827
+ 够不到这里。保留淡入淡出(可见性),去掉缩放与上滑位移。 */
828
+ @media (prefers-reduced-motion: reduce) {
829
+ /* toast 与桌面同口径:sonner 自带的 reduce 规则会禁用全部过渡;这里只保留
830
+ 200ms 淡入淡出,去掉位移与 height 布局过渡。 */
831
+ [data-sonner-toast],
832
+ [data-sonner-toast] > * {
833
+ transition: opacity 200ms !important;
834
+ }
835
+ .center-modal-enter-active,
836
+ .center-modal-leave-active,
837
+ .bottom-sheet-enter-active,
838
+ .bottom-sheet-leave-active {
839
+ transition: opacity 120ms linear;
840
+ }
841
+ .center-modal-enter-active .modal-panel,
842
+ .center-modal-leave-active .modal-panel,
843
+ .bottom-sheet-enter-active .modal-panel,
844
+ .bottom-sheet-leave-active .modal-panel {
845
+ transition: none;
846
+ }
847
+ .center-modal-enter-from .modal-panel,
848
+ .center-modal-leave-to .modal-panel,
849
+ .bottom-sheet-enter-from .modal-panel,
850
+ .bottom-sheet-leave-to .modal-panel {
851
+ transform: none;
852
+ }
853
+ }
854
+
855
+ /* ==================== 主色色板(与桌面端同名 palette 同源) ====================
856
+ 仅覆盖主色相关 token(--mobile-accent 系 + text-on-accent),色值取自
857
+ wasmnest-desktop/src/style.css 同名 palette(改色需双端同改)。
858
+ 背景/文字/边框等基础 token 的默认值(warm 色板)已与桌面端对齐;
859
+ 其余 palette 仅切换主色,不覆盖背景(与桌面端「色板只换主色调」策略一致)。
860
+
861
+ 归属(2026-10-16):主色是**各 wasm-app 自持的产品外观**,宿主壳不再提供色板
862
+ 选择器(外壳固定用下方 :root 默认主色),故选择器从 `:root[data-palette=…]`
863
+ 放宽为 `[data-palette=…]` —— 属性挂在哪个元素的哪一层子树,那一层子树就用哪套主色。
864
+ bedcode 应用在运行面根节点挂 `data-palette`(见 app/AppRoot.vue),于是应用内主色
865
+ 自成一派,壳的导航 / 卡片 / 对话框保持默认象牙白,互不串色。
866
+
867
+ 生效原理是自定义属性的「直接声明压过继承」,不是选择器权重:主色 token 挂在
868
+ 承载 data-palette 的元素上,本级声明必然压过从 html 继承来的同名 token。 */
869
+
870
+ [data-palette='forest'] {
871
+ --mobile-accent: #86c49b;
872
+ --mobile-accent-muted: rgba(134, 196, 155, 0.12);
873
+ --mobile-accent-secondary: rgba(134, 196, 155, 0.2);
874
+ --mobile-text-on-accent: #101713;
875
+ }
876
+ [data-palette='ocean'] {
877
+ --mobile-accent: #5fd0e8;
878
+ --mobile-accent-muted: rgba(95, 208, 232, 0.12);
879
+ --mobile-accent-secondary: rgba(95, 208, 232, 0.2);
880
+ --mobile-text-on-accent: #0b1620;
881
+ }
882
+ [data-palette='sunset'] {
883
+ --mobile-accent: #f5a383;
884
+ --mobile-accent-muted: rgba(245, 163, 131, 0.12);
885
+ --mobile-accent-secondary: rgba(245, 163, 131, 0.2);
886
+ --mobile-text-on-accent: #1b1210;
887
+ }
888
+ [data-palette='violet'] {
889
+ --mobile-accent: #b9a6f7;
890
+ --mobile-accent-muted: rgba(185, 166, 247, 0.12);
891
+ --mobile-accent-secondary: rgba(185, 166, 247, 0.2);
892
+ --mobile-text-on-accent: #141020;
893
+ }
894
+
895
+ /* 浅色模式:同名 palette 的浅色主色(与桌面端 light 变体同源)。
896
+ 选择器带 `html:not(.dark)` 祖先限定,权重高于上面的深色值;`html:not(.dark)[…]`
897
+ 一路保留是为了承载元素正好是 html 时也不失配(宿主壳已不挂该属性)。 */
898
+ html:not(.dark) [data-palette='forest'],
899
+ html:not(.dark)[data-palette='forest'] {
900
+ --mobile-accent: #3e6b4f;
901
+ --mobile-accent-muted: rgba(62, 107, 79, 0.12);
902
+ --mobile-accent-secondary: rgba(62, 107, 79, 0.2);
903
+ --mobile-text-on-accent: #fdfcf7;
904
+ }
905
+ html:not(.dark) [data-palette='ocean'],
906
+ html:not(.dark)[data-palette='ocean'] {
907
+ --mobile-accent: #0e7490;
908
+ --mobile-accent-muted: rgba(14, 116, 144, 0.12);
909
+ --mobile-accent-secondary: rgba(14, 116, 144, 0.2);
910
+ --mobile-text-on-accent: #ffffff;
911
+ }
912
+ html:not(.dark) [data-palette='sunset'],
913
+ html:not(.dark)[data-palette='sunset'] {
914
+ --mobile-accent: #d9532a;
915
+ --mobile-accent-muted: rgba(217, 83, 42, 0.12);
916
+ --mobile-accent-secondary: rgba(217, 83, 42, 0.2);
917
+ --mobile-text-on-accent: #fefaf5;
918
+ }
919
+ html:not(.dark) [data-palette='violet'],
920
+ html:not(.dark)[data-palette='violet'] {
921
+ --mobile-accent: #6d4fc6;
922
+ --mobile-accent-muted: rgba(109, 79, 198, 0.12);
923
+ --mobile-accent-secondary: rgba(109, 79, 198, 0.2);
924
+ --mobile-text-on-accent: #fcfbfe;
925
+ }
926
+
927
+ /* ==================== 色板选择器色块(wasm-app 设置页「主色色板」展示用) ====================
928
+ 2026-10-16 起选择器 UI 迁到各 wasm-app 自己的设置页(宿主外观页不再提供);
929
+ 色值 token 仍是全局的,应用运行面渲染在壳文档内,取值照旧继承 :root。
930
+ default 跟随当前主题默认主色(深色 = 象牙白 / 浅色 = 近黑),
931
+ 其余与上方同名 palette 主色同源(改色需双端同改)。 */
932
+ :root {
933
+ --mobile-palette-swatch-default: #ECE8DC;
934
+ --mobile-palette-swatch-forest: #86c49b;
935
+ --mobile-palette-swatch-ocean: #5fd0e8;
936
+ --mobile-palette-swatch-sunset: #f5a383;
937
+ --mobile-palette-swatch-violet: #b9a6f7;
938
+ }
939
+ /* 浅色模式下色块使用浅色 palette 主色(与上方 light 变体同源) */
940
+ html:not(.dark) {
941
+ --mobile-palette-swatch-default: #1D1A14;
942
+ --mobile-palette-swatch-forest: #3e6b4f;
943
+ --mobile-palette-swatch-ocean: #0e7490;
944
+ --mobile-palette-swatch-sunset: #d9532a;
945
+ --mobile-palette-swatch-violet: #6d4fc6;
946
+ }
947
+
948
+ /* ==================== 移动端隐藏原生滚动条 ==================== */
949
+ /* 移动端以触摸滚动为主(惯性滚动已由 WebView 提供),原生占位式滚动条
950
+ * (8px 参与布局)既挤窄内容区又无视觉价值:整个移动端统一隐藏。
951
+ *
952
+ * 覆盖规则(与隐藏同源冲突时,显式样式的更高特异性优先):
953
+ * - 代码查看器(bedcode fileExplorer 域 FileViewerModal 的 .viewer-body,随
954
+ * issue #24 迁应用仓;其 DOM 仍在本宿主文档内,本规则继续覆盖)保留 4px 细条滚动条——
955
+ * 其规则只覆盖 width/height,故本规则不用 display:none(display 无竞争对手
956
+ * 会被继承生效、连带把细条也藏掉),只用 width:0/height:0 归零,细条规则
957
+ * 靠更高特异性覆盖回 4px;
958
+ * - 终端(terminal.css)xterm 滚动条已各自显式隐藏;
959
+ * - 终端输入栏(TerminalInputBar)各面板已各自 scrollbar-width: none。
960
+ *
961
+ * 隐藏后原 scrollbar-gutter: stable 预留的 8px 槽位失去载体,会在
962
+ * Chromium 变体间产生不可预测的空白(部分实现仍按占位滚动条厚度预留),
963
+ * 一并复位为 auto——各视图的 scrollbar-gutter-stable 类保留不删,仅作
964
+ * 「该容器曾需要防宽度抖动」的历史标注。
965
+ */
966
+ ::-webkit-scrollbar {
967
+ width: 0;
968
+ height: 0;
969
+ }
970
+
971
+ ::-webkit-scrollbar-track {
972
+ background: transparent;
973
+ }
974
+
975
+ ::-webkit-scrollbar-thumb {
976
+ background: transparent;
977
+ }
978
+
979
+ .scrollbar-gutter-stable {
980
+ scrollbar-gutter: auto;
981
+ }