@co0ontty/wand 1.9.0 → 1.14.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.
@@ -100,6 +100,7 @@
100
100
  /* ===== 布局尺寸 ===== */
101
101
  --sidebar-width: 300px;
102
102
  --file-panel-width: 320px;
103
+ --safe-bottom: 0px;
103
104
 
104
105
  /* ===== 高级缓动函数 ===== */
105
106
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
@@ -122,13 +123,12 @@
122
123
 
123
124
  /* ===== PWA 独立窗口模式 ===== */
124
125
  @media (display-mode: standalone) {
125
- .floating-sidebar-toggle {
126
- top: max(10px, env(safe-area-inset-top, 10px));
126
+ :root {
127
+ --safe-bottom: env(safe-area-inset-bottom, 0px);
127
128
  }
128
129
  .app-container {
129
130
  --pwa-top-inset: env(safe-area-inset-top, 0px);
130
131
  padding-top: env(safe-area-inset-top, 0px);
131
- padding-bottom: env(safe-area-inset-bottom, 0px);
132
132
  }
133
133
  .sidebar-header {
134
134
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
@@ -139,25 +139,18 @@
139
139
  }
140
140
 
141
141
  /* iOS Safari PWA fallback (navigator.standalone adds .is-pwa via JS) */
142
- .is-pwa .floating-sidebar-toggle {
143
- top: max(10px, env(safe-area-inset-top, 10px));
142
+ .is-pwa {
143
+ --safe-bottom: env(safe-area-inset-bottom, 0px);
144
144
  }
145
145
  .is-pwa .app-container {
146
146
  --pwa-top-inset: env(safe-area-inset-top, 0px);
147
147
  padding-top: env(safe-area-inset-top, 0px);
148
- padding-bottom: env(safe-area-inset-bottom, 0px);
149
148
  }
150
149
  .is-pwa .sidebar-header {
151
150
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
152
151
  }
153
152
 
154
153
  /* ===== PWA 窗口控件覆盖模式 (Window Controls Overlay) ===== */
155
- @media (display-mode: window-controls-overlay) {
156
- .floating-sidebar-toggle {
157
- top: max(10px, env(titlebar-area-y, 10px));
158
- left: max(10px, env(titlebar-area-x, 10px));
159
- }
160
- }
161
154
 
162
155
  /* ===== 首帧过渡抑制 ===== */
163
156
  html.no-transition,
@@ -242,18 +235,17 @@
242
235
  overflow: hidden;
243
236
  }
244
237
 
245
- /* ===== 浮动侧栏切换按钮 ===== */
238
+ /* ===== 侧栏切换按钮 ===== */
246
239
  .floating-sidebar-toggle {
247
- position: fixed;
248
- top: max(10px, env(safe-area-inset-top, 10px));
249
- left: 10px;
250
- z-index: 200;
240
+ position: relative;
241
+ z-index: 1;
251
242
  width: 34px;
252
243
  height: 34px;
253
244
  padding: 0;
254
- display: flex;
245
+ display: inline-flex;
255
246
  align-items: center;
256
247
  justify-content: center;
248
+ flex-shrink: 0;
257
249
  background: rgba(255, 251, 245, 0.85);
258
250
  border: 1px solid var(--border-subtle);
259
251
  border-radius: var(--radius-sm);
@@ -263,6 +255,42 @@
263
255
  transition: all var(--transition-fast);
264
256
  }
265
257
 
258
+ .main-header-row .floating-sidebar-toggle {
259
+ margin-right: 2px;
260
+ }
261
+
262
+ .main-header-row .floating-sidebar-toggle.active {
263
+ opacity: 1;
264
+ pointer-events: auto;
265
+ }
266
+
267
+ .main-header-row .floating-sidebar-toggle.active .hamburger-icon span:nth-child(1) {
268
+ transform: translateY(5px) rotate(45deg);
269
+ }
270
+
271
+ .main-header-row .floating-sidebar-toggle.active .hamburger-icon span:nth-child(2) {
272
+ opacity: 0;
273
+ transform: scaleX(0);
274
+ }
275
+
276
+ .main-header-row .floating-sidebar-toggle.active .hamburger-icon span:nth-child(3) {
277
+ transform: translateY(-5px) rotate(-45deg);
278
+ }
279
+
280
+ .main-header-row .floating-sidebar-toggle:hover {
281
+ background: rgba(255, 251, 245, 0.95);
282
+ box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
283
+ }
284
+
285
+ .main-header-row .floating-sidebar-toggle:active {
286
+ transform: scale(0.92);
287
+ }
288
+
289
+ .main-header-row .floating-sidebar-toggle.active:hover .hamburger-icon span,
290
+ .main-header-row .floating-sidebar-toggle:hover .hamburger-icon span {
291
+ background: var(--text-primary);
292
+ }
293
+
266
294
  .floating-sidebar-toggle:hover {
267
295
  background: rgba(255, 251, 245, 0.95);
268
296
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
@@ -1052,6 +1080,46 @@
1052
1080
  padding-right: 64px;
1053
1081
  }
1054
1082
 
1083
+ .session-title-row {
1084
+ display: flex;
1085
+ align-items: flex-start;
1086
+ justify-content: space-between;
1087
+ gap: 8px;
1088
+ }
1089
+
1090
+ .session-title-row .session-title,
1091
+ .session-title-row .session-command {
1092
+ flex: 1;
1093
+ min-width: 0;
1094
+ }
1095
+
1096
+ .session-time {
1097
+ flex-shrink: 0;
1098
+ font-size: 0.6875rem;
1099
+ color: var(--text-muted);
1100
+ white-space: nowrap;
1101
+ line-height: 1.4;
1102
+ padding-top: 1px;
1103
+ }
1104
+
1105
+ .session-activity {
1106
+ font-size: 0.6875rem;
1107
+ color: var(--accent);
1108
+ white-space: nowrap;
1109
+ overflow: hidden;
1110
+ text-overflow: ellipsis;
1111
+ line-height: 1.3;
1112
+ opacity: 0.85;
1113
+ }
1114
+
1115
+ .session-recovery-hint {
1116
+ font-size: 0.625rem;
1117
+ color: var(--text-muted);
1118
+ background: rgba(150, 118, 85, 0.08);
1119
+ padding: 1px 5px;
1120
+ border-radius: 3px;
1121
+ }
1122
+
1055
1123
  /* ===== 会话操作按钮 ===== */
1056
1124
  .session-actions {
1057
1125
  position: absolute;
@@ -1795,6 +1863,12 @@
1795
1863
  .topbar-btn:active {
1796
1864
  transform: scale(0.95);
1797
1865
  }
1866
+ .topbar-btn.active {
1867
+ background: rgba(255, 255, 255, 0.7);
1868
+ color: var(--text-primary);
1869
+ font-weight: 600;
1870
+ box-shadow: 0 1px 4px rgba(89, 58, 32, 0.1);
1871
+ }
1798
1872
 
1799
1873
  /* Square icon variant — exactly 32×32px */
1800
1874
  .topbar-btn.square {
@@ -1998,8 +2072,6 @@
1998
2072
  overflow: hidden;
1999
2073
  background: transparent;
2000
2074
  position: relative;
2001
- padding: 8px 6px 6px;
2002
- gap: 0;
2003
2075
  }
2004
2076
 
2005
2077
  .main-content.file-panel-open {
@@ -2007,173 +2079,20 @@
2007
2079
  transition: margin-right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
2008
2080
  }
2009
2081
 
2010
- .main-content-header {
2011
- display: flex;
2012
- align-items: center;
2013
- justify-content: space-between;
2014
- gap: 12px;
2015
- min-height: 44px;
2016
- padding: 6px 10px 8px;
2017
- border: 1px solid rgba(140, 110, 85, 0.14);
2018
- border-bottom: none;
2019
- border-radius: 16px 16px 0 0;
2020
- background: rgba(255, 252, 248, 0.94);
2021
- backdrop-filter: blur(14px);
2022
- box-shadow:
2023
- 0 8px 20px rgba(89, 58, 32, 0.06),
2024
- inset 0 -1px 0 rgba(255, 255, 255, 0.5);
2025
- flex-shrink: 0;
2026
- position: relative;
2027
- z-index: 2;
2028
- }
2029
-
2030
-
2031
- .main-content-header-left,
2032
- .main-content-header-center,
2033
- .main-content-header-right {
2034
- display: flex;
2035
- align-items: center;
2036
- gap: 8px;
2037
- min-width: 0;
2038
- }
2039
-
2040
- .main-content-header-left,
2041
- .main-content-header-right {
2042
- flex: 1;
2043
- }
2044
-
2045
- .main-content-header-center {
2046
- justify-content: center;
2047
- flex: 0 1 auto;
2048
- }
2049
-
2050
- .main-content-header-right {
2051
- justify-content: flex-end;
2052
- flex-wrap: wrap;
2053
- }
2082
+ .terminal-info { font-size: 0.625rem; color: var(--text-muted); font-weight: 500; }
2054
2083
 
2055
- .main-content-body {
2056
- flex: 1;
2057
- min-height: 0;
2084
+ /* ===== 主内容区顶部行 ===== */
2085
+ .main-header-row {
2058
2086
  display: flex;
2059
- flex-direction: column;
2060
- position: relative;
2061
- overflow: hidden;
2062
- border-radius: 0 0 14px 14px;
2063
- margin-top: -1px;
2064
- }
2065
-
2066
- .main-content-body::before {
2067
- content: "";
2068
- position: absolute;
2069
- top: 0;
2070
- left: 14px;
2071
- right: 14px;
2072
- height: 8px;
2073
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 100%);
2074
- pointer-events: none;
2075
- z-index: 1;
2076
- }
2077
-
2078
- .main-content-body > .terminal-container,
2079
- .main-content-body > .chat-container,
2080
- .main-content-body > .blank-chat {
2081
- border-top-color: transparent;
2082
- }
2083
-
2084
- .main-header-controls {
2085
- display: inline-flex;
2086
2087
  align-items: center;
2087
- gap: 6px;
2088
- min-width: 0;
2089
- flex-wrap: wrap;
2090
- }
2091
-
2092
- .main-header-btn,
2093
- .main-header-label {
2094
- height: 32px;
2095
- border-radius: 10px;
2088
+ justify-content: flex-start;
2089
+ padding: 4px 10px;
2096
2090
  flex-shrink: 0;
2091
+ min-height: 0;
2092
+ gap: 8px;
2097
2093
  }
2098
2094
 
2099
- .main-header-btn {
2100
- display: inline-flex;
2101
- align-items: center;
2102
- justify-content: center;
2103
- gap: 6px;
2104
- padding: 0 10px;
2105
- border: 1px solid rgba(125, 91, 57, 0.12);
2106
- background: rgba(255, 255, 255, 0.7);
2107
- color: var(--text-secondary);
2108
- font-size: 0.75rem;
2109
- font-weight: 500;
2110
- font-family: var(--font-sans);
2111
- cursor: pointer;
2112
- transition: all var(--transition-fast);
2113
- white-space: nowrap;
2114
- }
2115
-
2116
- .main-header-btn:hover {
2117
- background: rgba(255, 255, 255, 0.95);
2118
- border-color: rgba(197, 101, 61, 0.22);
2119
- color: var(--text-primary);
2120
- }
2121
-
2122
- .main-header-btn:active {
2123
- transform: translateY(1px);
2124
- }
2125
-
2126
- .main-header-label {
2127
- display: inline-flex;
2128
- align-items: center;
2129
- justify-content: center;
2130
- padding: 0 10px;
2131
- background: rgba(240, 229, 215, 0.55);
2132
- border: 1px solid rgba(125, 91, 57, 0.08);
2133
- color: var(--text-muted);
2134
- font-size: 0.6875rem;
2135
- font-weight: 600;
2136
- white-space: nowrap;
2137
- }
2138
-
2139
- .menu-toggle-btn {
2140
- padding: 0 12px;
2141
- min-width: 40px;
2142
- }
2143
-
2144
- .menu-toggle-btn.active {
2145
- background: var(--accent-muted);
2146
- border-color: rgba(197, 101, 61, 0.22);
2147
- color: var(--accent);
2148
- }
2149
-
2150
- .jump-latest-btn {
2151
- opacity: 0;
2152
- transform: translateY(4px);
2153
- pointer-events: none;
2154
- }
2155
-
2156
- .jump-latest-btn.visible {
2157
- opacity: 1;
2158
- transform: translateY(0);
2159
- pointer-events: auto;
2160
- }
2161
-
2162
- .main-header-new-session {
2163
- background: rgba(197, 101, 61, 0.12);
2164
- border-color: rgba(197, 101, 61, 0.18);
2165
- color: var(--accent);
2166
- font-weight: 600;
2167
- }
2168
-
2169
- .main-header-new-session:hover {
2170
- background: rgba(197, 101, 61, 0.18);
2171
- border-color: rgba(197, 101, 61, 0.28);
2172
- }
2173
-
2174
- .terminal-info { font-size: 0.625rem; color: var(--text-muted); font-weight: 500; }
2175
-
2176
- /* Current task indicator in terminal header */
2095
+ /* Current task indicator */
2177
2096
  .current-task {
2178
2097
  display: flex;
2179
2098
  align-items: center;
@@ -2186,7 +2105,9 @@
2186
2105
  padding: 2px 8px 2px 5px;
2187
2106
  font-weight: 500;
2188
2107
  max-width: 280px;
2108
+ min-width: 0;
2189
2109
  overflow: hidden;
2110
+ flex-shrink: 1;
2190
2111
  text-overflow: ellipsis;
2191
2112
  white-space: nowrap;
2192
2113
  }
@@ -2221,8 +2142,9 @@
2221
2142
  padding: 10px;
2222
2143
  overflow: hidden;
2223
2144
  min-height: 0;
2224
- margin: 0;
2225
- border-radius: 16px;
2145
+ min-width: 0;
2146
+ margin: 0 6px 6px;
2147
+ border-radius: var(--radius-md);
2226
2148
  border: 1px solid rgba(140, 110, 85, 0.35);
2227
2149
  box-shadow:
2228
2150
  inset 0 1px 0 rgba(255, 255, 255, 0.06),
@@ -2232,34 +2154,21 @@
2232
2154
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
2233
2155
  }
2234
2156
 
2235
- .terminal-container.hidden,
2236
- .chat-container.hidden,
2237
- .blank-chat.hidden,
2238
- .input-panel.hidden {
2239
- display: none !important;
2240
- }
2241
-
2242
2157
  .terminal-container.active {
2243
2158
  display: flex;
2244
2159
  align-items: stretch;
2245
2160
  }
2246
2161
 
2247
- .terminal-container > #output {
2248
- flex: 1;
2249
- min-height: 0;
2250
- position: relative;
2251
- }
2252
-
2253
- .terminal-container > #output .xterm {
2162
+ .terminal-container > .xterm {
2254
2163
  position: absolute;
2255
2164
  top: 0;
2256
2165
  left: 0;
2257
2166
  right: 0;
2258
2167
  bottom: 0;
2259
- }
2260
-
2261
- .terminal-container > #output .xterm-viewport {
2262
- background: transparent !important;
2168
+ width: 100%;
2169
+ height: 100%;
2170
+ padding: 0;
2171
+ overflow: hidden;
2263
2172
  }
2264
2173
 
2265
2174
  .terminal-container .xterm-viewport {
@@ -2270,8 +2179,9 @@
2270
2179
  display: none;
2271
2180
  }
2272
2181
 
2273
- .terminal-container .xterm {
2274
- padding: 0;
2182
+ .terminal-container .xterm-screen {
2183
+ max-width: 100%;
2184
+ overflow: hidden;
2275
2185
  }
2276
2186
 
2277
2187
  /* ===== 自定义终端滚动条 ===== */
@@ -2410,6 +2320,25 @@
2410
2320
  50% { opacity: 1; }
2411
2321
  }
2412
2322
 
2323
+ /* 容器底部渐变 — 为 jump-to-bottom 按钮提供视觉承托 */
2324
+ .terminal-container::after {
2325
+ content: "";
2326
+ position: absolute;
2327
+ bottom: 0;
2328
+ left: 0;
2329
+ right: 0;
2330
+ height: 48px;
2331
+ background: linear-gradient(to top, rgba(26, 22, 19, 0.5), transparent);
2332
+ pointer-events: none;
2333
+ opacity: 0;
2334
+ transition: opacity 0.3s ease;
2335
+ z-index: 12;
2336
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
2337
+ }
2338
+ .terminal-container.has-jump-btn::after {
2339
+ opacity: 1;
2340
+ }
2341
+
2413
2342
  /* Chat View — matches topbar-btn height (32px) */
2414
2343
  .view-toggle {
2415
2344
  display: flex;
@@ -2464,123 +2393,96 @@
2464
2393
  text-align: center;
2465
2394
  padding: 0 2px;
2466
2395
  }
2467
- .terminal-jump-bottom {
2468
- background: rgba(24, 20, 17, 0.82);
2469
- color: rgba(255, 247, 239, 0.92);
2470
- border-color: rgba(255, 255, 255, 0.12);
2471
- box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
2472
- transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
2396
+ .terminal-scale-overlay {
2397
+ position: absolute;
2398
+ top: 8px;
2399
+ right: 8px;
2400
+ display: inline-flex;
2401
+ align-items: center;
2402
+ gap: 1px;
2403
+ padding: 2px;
2404
+ border-radius: 7px;
2405
+ border: 1px solid rgba(255, 255, 255, 0.06);
2406
+ background: rgba(24, 20, 17, 0.38);
2407
+ backdrop-filter: blur(8px);
2408
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
2409
+ opacity: 0.72;
2410
+ transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
2411
+ z-index: 12;
2412
+ pointer-events: auto;
2473
2413
  }
2474
- .terminal-jump-bottom:hover {
2475
- background: rgba(38, 30, 24, 0.9);
2476
- border-color: rgba(214, 123, 82, 0.28);
2414
+ .terminal-container:hover .terminal-scale-overlay,
2415
+ .terminal-scale-overlay:focus-within {
2416
+ opacity: 1;
2417
+ background: rgba(24, 20, 17, 0.56);
2418
+ border-color: rgba(255, 255, 255, 0.1);
2477
2419
  }
2478
- .terminal-jump-bottom:active {
2479
- transform: translateY(1px);
2420
+ .terminal-scale-overlay-btn {
2421
+ min-width: 22px;
2422
+ height: 22px;
2423
+ padding: 0 3px;
2424
+ color: rgba(245, 234, 220, 0.88);
2425
+ background: transparent;
2426
+ border: none;
2427
+ border-radius: 5px;
2428
+ transition: background 0.18s ease, color 0.18s ease;
2480
2429
  }
2481
-
2482
- .terminal-scale-btn {
2483
- min-width: 32px;
2484
- padding: 0 8px;
2485
- }
2486
-
2487
- .terminal-scale-label {
2488
- min-width: 46px;
2489
- }
2490
-
2491
- #terminal-header-controls .main-header-btn,
2492
- #terminal-header-controls .main-header-label {
2493
- background: rgba(36, 28, 22, 0.88);
2494
- color: rgba(245, 234, 220, 0.9);
2495
- border-color: rgba(255, 255, 255, 0.1);
2496
- }
2497
-
2498
- #terminal-header-controls .main-header-btn:hover {
2499
- background: rgba(46, 35, 28, 0.94);
2500
- border-color: rgba(214, 123, 82, 0.28);
2501
- }
2502
-
2503
- #terminal-header-controls .terminal-scale-label {
2504
- color: rgba(245, 234, 220, 0.72);
2505
- }
2506
-
2507
- #terminal-header-controls .jump-latest-btn:not(.visible) {
2508
- display: none;
2509
- }
2510
-
2511
- #chat-header-controls .jump-latest-btn:not(.visible) {
2512
- display: none;
2513
- }
2514
-
2515
- #chat-header-controls .chat-follow-toggle {
2516
- min-width: 60px;
2517
- }
2518
-
2519
- #chat-header-controls .chat-follow-toggle:hover {
2520
- background: rgba(255, 255, 255, 0.92);
2521
- }
2522
-
2523
- #chat-header-controls .chat-follow-toggle.active:hover {
2524
- background: rgba(197, 101, 61, 0.18);
2525
- }
2526
-
2527
- #chat-header-controls .chat-jump-bottom {
2528
- background: rgba(255, 250, 242, 0.92);
2529
- color: var(--text-primary);
2530
- border-color: rgba(125, 91, 57, 0.16);
2531
- box-shadow: 0 8px 18px rgba(89, 58, 32, 0.12);
2532
- transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
2533
- }
2534
-
2535
- #chat-header-controls .chat-jump-bottom:hover {
2536
- background: rgba(255, 255, 255, 0.98);
2537
- border-color: rgba(197, 101, 61, 0.24);
2430
+ .terminal-scale-overlay-btn:hover {
2431
+ background: rgba(214, 123, 82, 0.18);
2432
+ color: rgba(255, 247, 239, 0.96);
2538
2433
  }
2539
-
2540
- #chat-header-controls .chat-jump-bottom:active {
2541
- transform: translateY(1px);
2434
+ .terminal-scale-overlay-label {
2435
+ font-size: 0.625rem;
2436
+ color: rgba(245, 234, 220, 0.66);
2437
+ min-width: 34px;
2438
+ text-align: center;
2439
+ padding: 0 3px;
2542
2440
  }
2543
2441
 
2544
- .terminal-scale-overlay,
2545
- .terminal-scale-overlay-btn,
2546
- .terminal-scale-overlay-label,
2547
- .terminal-scale-overlay-divider,
2548
- .chat-overlay-controls {
2549
- display: none !important;
2442
+ .terminal-scale-overlay-divider {
2443
+ width: 1px;
2444
+ height: 14px;
2445
+ background: rgba(245, 234, 220, 0.2);
2446
+ margin: 0 2px;
2550
2447
  }
2551
2448
 
2552
- .terminal-jump-bottom,
2553
- .chat-jump-bottom {
2554
- position: static;
2555
- right: auto;
2556
- bottom: auto;
2449
+ .terminal-jump-bottom {
2450
+ position: absolute;
2451
+ right: 14px;
2452
+ bottom: 18px;
2453
+ display: inline-flex;
2454
+ align-items: center;
2455
+ justify-content: center;
2456
+ gap: 6px;
2557
2457
  min-width: 78px;
2558
2458
  height: 32px;
2559
2459
  padding: 0 12px;
2460
+ border: 1px solid rgba(255, 255, 255, 0.15);
2560
2461
  border-radius: 999px;
2462
+ background: rgba(24, 20, 17, 0.72);
2463
+ color: rgba(255, 247, 239, 0.92);
2464
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
2465
+ backdrop-filter: blur(10px);
2561
2466
  cursor: pointer;
2562
- z-index: auto;
2467
+ z-index: 13;
2468
+ opacity: 0;
2469
+ transform: translateY(12px) scale(0.92);
2470
+ pointer-events: none;
2471
+ transition: opacity 0.28s var(--ease-out-expo), transform 0.28s var(--ease-out-expo), background 0.18s ease, border-color 0.18s ease;
2563
2472
  }
2564
-
2565
- .chat-jump-bottom.visible,
2566
2473
  .terminal-jump-bottom.visible {
2567
2474
  opacity: 1;
2568
- transform: translateY(0);
2475
+ transform: translateY(0) scale(1);
2569
2476
  pointer-events: auto;
2570
2477
  }
2571
-
2572
- .chat-jump-bottom {
2573
- opacity: 0;
2574
- transform: translateY(4px);
2575
- pointer-events: none;
2478
+ .terminal-jump-bottom:hover {
2479
+ background: rgba(38, 30, 24, 0.84);
2480
+ border-color: rgba(214, 123, 82, 0.28);
2576
2481
  }
2577
-
2578
- .chat-jump-bottom.visible {
2579
- opacity: 1;
2482
+ .terminal-jump-bottom:active {
2483
+ transform: translateY(1px) scale(0.97);
2580
2484
  }
2581
2485
 
2582
- .chat-container.active { display: flex; }
2583
-
2584
2486
  /* Terminal interactive mode indicator */
2585
2487
  .terminal-container.interactive {
2586
2488
  border-color: rgba(79, 122, 88, 0.5);
@@ -2859,7 +2761,32 @@
2859
2761
  overflow: hidden;
2860
2762
  padding: 0 20px 16px;
2861
2763
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.5) 0%, transparent 100%);
2862
- border-radius: 16px;
2764
+ }
2765
+
2766
+ .chat-overlay-controls {
2767
+ position: absolute;
2768
+ top: 8px;
2769
+ right: 8px;
2770
+ display: inline-flex;
2771
+ align-items: center;
2772
+ gap: 6px;
2773
+ padding: 2px;
2774
+ border-radius: 7px;
2775
+ border: 1px solid rgba(125, 91, 57, 0.12);
2776
+ background: rgba(255, 250, 242, 0.72);
2777
+ backdrop-filter: blur(8px);
2778
+ box-shadow: 0 6px 18px rgba(89, 58, 32, 0.12);
2779
+ opacity: 0.84;
2780
+ transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
2781
+ z-index: 12;
2782
+ pointer-events: auto;
2783
+ }
2784
+
2785
+ .chat-container:hover .chat-overlay-controls,
2786
+ .chat-overlay-controls:focus-within {
2787
+ opacity: 1;
2788
+ background: rgba(255, 250, 242, 0.88);
2789
+ border-color: rgba(197, 101, 61, 0.16);
2863
2790
  }
2864
2791
 
2865
2792
  .chat-follow-toggle {
@@ -2885,6 +2812,64 @@
2885
2812
  background: rgba(197, 101, 61, 0.18);
2886
2813
  }
2887
2814
 
2815
+ .chat-jump-bottom {
2816
+ position: absolute;
2817
+ right: 14px;
2818
+ bottom: 18px;
2819
+ display: inline-flex;
2820
+ align-items: center;
2821
+ justify-content: center;
2822
+ gap: 6px;
2823
+ min-width: 78px;
2824
+ height: 32px;
2825
+ padding: 0 12px;
2826
+ border: 1px solid rgba(125, 91, 57, 0.16);
2827
+ border-radius: 999px;
2828
+ background: rgba(255, 250, 242, 0.9);
2829
+ color: var(--text-primary);
2830
+ box-shadow: 0 4px 12px rgba(89, 58, 32, 0.10);
2831
+ backdrop-filter: blur(10px);
2832
+ cursor: pointer;
2833
+ z-index: 13;
2834
+ opacity: 0;
2835
+ transform: translateY(12px) scale(0.92);
2836
+ pointer-events: none;
2837
+ transition: opacity 0.28s var(--ease-out-expo), transform 0.28s var(--ease-out-expo), background 0.18s ease, border-color 0.18s ease;
2838
+ }
2839
+
2840
+ .chat-jump-bottom.visible {
2841
+ opacity: 1;
2842
+ transform: translateY(0) scale(1);
2843
+ pointer-events: auto;
2844
+ }
2845
+
2846
+ .chat-jump-bottom:hover {
2847
+ background: rgba(255, 255, 255, 0.98);
2848
+ border-color: rgba(197, 101, 61, 0.24);
2849
+ }
2850
+
2851
+ .chat-jump-bottom:active {
2852
+ transform: translateY(1px);
2853
+ }
2854
+
2855
+ .chat-container.active { display: flex; }
2856
+
2857
+ .chat-container::after {
2858
+ content: "";
2859
+ position: absolute;
2860
+ bottom: 0;
2861
+ left: 0;
2862
+ right: 0;
2863
+ height: 48px;
2864
+ background: linear-gradient(to top, rgba(255, 252, 248, 0.6), transparent);
2865
+ pointer-events: none;
2866
+ opacity: 0;
2867
+ transition: opacity 0.3s ease;
2868
+ z-index: 12;
2869
+ }
2870
+ .chat-container.has-jump-btn::after {
2871
+ opacity: 1;
2872
+ }
2888
2873
 
2889
2874
  /* ===== 聊天消息列表 ===== */
2890
2875
  .chat-messages {
@@ -2898,6 +2883,28 @@
2898
2883
  scrollbar-gutter: stable;
2899
2884
  }
2900
2885
 
2886
+ /* ===== 历史消息懒加载 ===== */
2887
+ .chat-load-more {
2888
+ display: flex;
2889
+ justify-content: center;
2890
+ padding: 8px 0;
2891
+ }
2892
+ .chat-load-more-btn {
2893
+ background: var(--bg-hover);
2894
+ border: 1px solid var(--border-subtle);
2895
+ border-radius: var(--radius-md);
2896
+ color: var(--text-secondary);
2897
+ font-size: 0.75rem;
2898
+ padding: 6px 16px;
2899
+ cursor: pointer;
2900
+ transition: all 0.2s ease;
2901
+ }
2902
+ .chat-load-more-btn:hover {
2903
+ background: var(--accent-muted);
2904
+ color: var(--accent);
2905
+ border-color: var(--accent);
2906
+ }
2907
+
2901
2908
  /* ===== 消息动画 ===== */
2902
2909
  @keyframes messageSlide {
2903
2910
  from {
@@ -3509,8 +3516,8 @@
3509
3516
  }
3510
3517
  .ask-user-option {
3511
3518
  display: flex;
3512
- align-items: flex-start;
3513
- gap: 8px;
3519
+ align-items: center;
3520
+ gap: 10px;
3514
3521
  padding: 8px 12px;
3515
3522
  border: 1px solid var(--border-default);
3516
3523
  border-radius: var(--radius-sm);
@@ -3519,15 +3526,119 @@
3519
3526
  transition: all var(--transition-fast);
3520
3527
  text-align: left;
3521
3528
  }
3522
- .ask-user-option:hover {
3529
+ .ask-user-option:hover:not(:disabled) {
3523
3530
  border-color: var(--accent);
3524
3531
  background: rgba(197, 101, 61, 0.06);
3525
3532
  }
3533
+ .ask-user-option:disabled {
3534
+ opacity: 0.5;
3535
+ cursor: not-allowed;
3536
+ }
3537
+ .ask-user-option.selected {
3538
+ border-color: var(--accent);
3539
+ background: rgba(197, 101, 61, 0.08);
3540
+ }
3541
+ /* Radio / Checkbox indicator */
3542
+ .ask-user-indicator {
3543
+ width: 16px;
3544
+ height: 16px;
3545
+ flex-shrink: 0;
3546
+ border: 2px solid var(--border-default);
3547
+ border-radius: 50%;
3548
+ transition: all var(--transition-fast);
3549
+ position: relative;
3550
+ display: flex;
3551
+ align-items: center;
3552
+ justify-content: center;
3553
+ }
3554
+ .ask-user-options[data-multi-select="true"] .ask-user-indicator {
3555
+ border-radius: 3px;
3556
+ }
3557
+ .ask-user-option.selected .ask-user-indicator {
3558
+ border-color: var(--accent);
3559
+ background: var(--accent);
3560
+ }
3561
+ .ask-user-option.selected .ask-user-indicator::after {
3562
+ content: "";
3563
+ width: 6px;
3564
+ height: 6px;
3565
+ background: white;
3566
+ border-radius: 50%;
3567
+ }
3568
+ .ask-user-options[data-multi-select="true"] .ask-user-option.selected .ask-user-indicator::after {
3569
+ width: 4px;
3570
+ height: 8px;
3571
+ border: solid white;
3572
+ border-width: 0 2px 2px 0;
3573
+ border-radius: 0;
3574
+ background: none;
3575
+ transform: rotate(45deg);
3576
+ margin-bottom: 2px;
3577
+ }
3578
+ /* Option content: label + description */
3579
+ .ask-user-option-content {
3580
+ flex: 1;
3581
+ min-width: 0;
3582
+ }
3526
3583
  .ask-user-option-label {
3527
3584
  font-size: 0.8125rem;
3528
3585
  font-weight: 500;
3529
3586
  color: var(--text-primary);
3530
3587
  }
3588
+ .ask-user-option-desc {
3589
+ font-size: 0.75rem;
3590
+ color: var(--text-secondary);
3591
+ margin-top: 2px;
3592
+ line-height: 1.4;
3593
+ }
3594
+ /* Submit button */
3595
+ .ask-user-actions {
3596
+ margin-top: 10px;
3597
+ display: flex;
3598
+ justify-content: flex-end;
3599
+ }
3600
+ .ask-user-submit {
3601
+ padding: 6px 16px;
3602
+ border: 1px solid var(--accent);
3603
+ border-radius: var(--radius-sm);
3604
+ background: var(--accent);
3605
+ color: white;
3606
+ font-size: 0.8125rem;
3607
+ font-weight: 500;
3608
+ cursor: pointer;
3609
+ transition: all var(--transition-fast);
3610
+ }
3611
+ .ask-user-submit:hover:not(:disabled) {
3612
+ filter: brightness(1.1);
3613
+ }
3614
+ .ask-user-submit:disabled {
3615
+ opacity: 0.4;
3616
+ cursor: not-allowed;
3617
+ }
3618
+ .ask-user-submit.ask-user-submitted {
3619
+ background: var(--bg-secondary);
3620
+ border-color: var(--border-default);
3621
+ color: var(--text-muted);
3622
+ pointer-events: none;
3623
+ }
3624
+ /* Answered (read-only) state */
3625
+ .ask-user-answered .ask-user-option {
3626
+ cursor: default;
3627
+ pointer-events: none;
3628
+ opacity: 0.6;
3629
+ }
3630
+ .ask-user-answered .ask-user-option.ask-user-option-chosen {
3631
+ opacity: 1;
3632
+ border-color: var(--success);
3633
+ background: rgba(79, 122, 88, 0.06);
3634
+ }
3635
+ .ask-user-answered .ask-user-option.ask-user-option-chosen .ask-user-indicator {
3636
+ border-color: var(--success);
3637
+ background: var(--success);
3638
+ }
3639
+ .ask-user-option-readonly {
3640
+ pointer-events: none;
3641
+ }
3531
3642
  .ask-user-answer-sent {
3532
3643
  padding: 8px 12px;
3533
3644
  background: rgba(79, 122, 88, 0.08);
@@ -3825,6 +3936,38 @@
3825
3936
  font-style: italic;
3826
3937
  }
3827
3938
 
3939
+ /* ── Tool content lazy-load states ── */
3940
+ .tool-content-loading {
3941
+ font-size: 0.75rem;
3942
+ color: var(--text-muted);
3943
+ font-style: italic;
3944
+ padding: 8px 0;
3945
+ }
3946
+ .tool-content-loading::before {
3947
+ content: "";
3948
+ display: inline-block;
3949
+ width: 12px;
3950
+ height: 12px;
3951
+ border: 2px solid var(--text-muted);
3952
+ border-top-color: transparent;
3953
+ border-radius: 50%;
3954
+ animation: tool-content-spin 0.6s linear infinite;
3955
+ vertical-align: middle;
3956
+ margin-right: 6px;
3957
+ }
3958
+ @keyframes tool-content-spin {
3959
+ to { transform: rotate(360deg); }
3960
+ }
3961
+ .tool-content-error {
3962
+ font-size: 0.75rem;
3963
+ color: var(--error);
3964
+ padding: 8px 0;
3965
+ cursor: pointer;
3966
+ }
3967
+ .tool-content-error:hover {
3968
+ text-decoration: underline;
3969
+ }
3970
+
3828
3971
  /* ── Inline Terminal Display (Bash) ── */
3829
3972
  .inline-terminal {
3830
3973
  margin: 3px 0;
@@ -4222,11 +4365,12 @@
4222
4365
 
4223
4366
  .input-panel {
4224
4367
  padding: 6px 10px;
4368
+ padding-bottom: calc(6px + var(--safe-bottom, 0px));
4225
4369
  flex-shrink: 0;
4226
4370
  z-index: 26;
4227
4371
  overscroll-behavior: contain;
4228
4372
  touch-action: pan-y;
4229
- border-radius: 14px;
4373
+ border-top: 1px solid var(--border-subtle);
4230
4374
  }
4231
4375
 
4232
4376
  .input-composer {
@@ -5452,9 +5596,19 @@
5452
5596
  }
5453
5597
  .session-modal .modal-body {
5454
5598
  padding-top: 16px;
5599
+ padding-bottom: 8px;
5455
5600
  }
5456
5601
  .session-modal .field:last-of-type {
5457
- margin-bottom: 14px;
5602
+ margin-bottom: 6px;
5603
+ }
5604
+ .session-modal .modal-footer {
5605
+ flex-shrink: 0;
5606
+ padding: 12px 22px 18px;
5607
+ border-top: 1px solid var(--border-subtle);
5608
+ }
5609
+ .session-modal .modal-footer .error-message {
5610
+ margin-top: 8px;
5611
+ margin-bottom: 0;
5458
5612
  }
5459
5613
  .mode-cards {
5460
5614
  display: flex;
@@ -5902,6 +6056,16 @@
5902
6056
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
5903
6057
  button:focus-visible { outline-offset: 0; }
5904
6058
 
6059
+ /*
6060
+ * ===== 响应式断点级联 =====
6061
+ * max-width: 768px → 平板: 触摸优化, 侧栏覆盖
6062
+ * max-width: 640px → 手机: 紧凑布局, safe-area 底部, 欢迎页适配
6063
+ * ├─ 391-420px → iPhone 14/15: 微调 padding (继承 640px)
6064
+ * └─ max-width: 390px → iPhone SE: 超紧凑 (继承 640px)
6065
+ * 641-768px → iPad Mini: 触摸目标加大 (继承 768px)
6066
+ * max-height: 420px → 横屏: 水平布局
6067
+ */
6068
+
5905
6069
  /* 平板适配 */
5906
6070
  @media (max-width: 768px) {
5907
6071
  .app-container {
@@ -5963,134 +6127,15 @@
5963
6127
  overflow: hidden;
5964
6128
  }
5965
6129
 
5966
- .sidebar { top: 0; }
5967
-
5968
- .main-content {
5969
- padding: 6px;
5970
- gap: 0;
5971
- }
5972
-
5973
- .main-content-header {
5974
- min-height: 40px;
5975
- padding: 6px 8px 7px;
5976
- gap: 8px;
5977
- }
5978
-
5979
- .main-content-header::before,
5980
- .main-content-header::after {
5981
- width: 14px;
5982
- height: 14px;
5983
- }
5984
-
5985
- .main-content-header::before {
5986
- box-shadow: 5px 5px 0 0 rgba(255, 252, 248, 0.94);
5987
- }
5988
-
5989
- .main-content-header::after {
5990
- box-shadow: -5px 5px 0 0 rgba(255, 252, 248, 0.94);
5991
- }
5992
-
5993
- .main-content-body::before {
5994
- left: 10px;
5995
- right: 10px;
5996
- height: 6px;
5997
- }
5998
-
5999
- .main-content-header-left,
6000
- .main-content-header-center,
6001
- .main-content-header-right {
6002
- gap: 6px;
6003
- }
6004
-
6005
- .main-content-header-right {
6006
- flex-wrap: nowrap;
6007
- overflow-x: auto;
6008
- scrollbar-width: none;
6009
- }
6010
-
6011
- .main-content-header-right::-webkit-scrollbar {
6012
- display: none;
6013
- }
6014
-
6015
- .main-header-controls {
6016
- gap: 4px;
6017
- flex-wrap: nowrap;
6018
- }
6019
-
6020
- .main-header-btn,
6021
- .main-header-label,
6022
- .topbar-btn {
6023
- height: 28px;
6024
- min-height: 28px;
6025
- font-size: 0.6875rem;
6026
- border-radius: 8px;
6027
- }
6028
-
6029
- .menu-toggle-btn {
6030
- min-width: 34px;
6031
- padding: 0 10px;
6032
- }
6033
-
6034
- .menu-toggle-btn .hamburger-icon {
6035
- width: 13px;
6036
- height: 9px;
6037
- }
6038
-
6039
- .main-header-label {
6040
- padding: 0 8px;
6041
- }
6042
-
6043
- .main-header-new-session {
6044
- padding: 0 10px;
6045
- }
6046
-
6047
- .main-content-header-left,
6048
- .main-content-header-center,
6049
- .main-content-header-right {
6050
- gap: 6px;
6051
- }
6052
-
6053
- .main-content-header-right {
6054
- flex-wrap: nowrap;
6055
- overflow-x: auto;
6056
- scrollbar-width: none;
6057
- }
6058
-
6059
- .main-content-header-right::-webkit-scrollbar {
6060
- display: none;
6061
- }
6062
-
6063
- .main-header-controls {
6064
- gap: 4px;
6065
- flex-wrap: nowrap;
6066
- }
6067
-
6068
- .main-header-btn,
6069
- .main-header-label,
6070
- .topbar-btn {
6071
- height: 28px;
6072
- min-height: 28px;
6073
- font-size: 0.6875rem;
6074
- border-radius: 8px;
6075
- }
6076
-
6077
- .menu-toggle-btn {
6078
- min-width: 34px;
6079
- padding: 0 10px;
6080
- }
6081
-
6082
- .menu-toggle-btn .hamburger-icon {
6083
- width: 13px;
6084
- height: 9px;
6085
- }
6086
-
6087
- .main-header-label {
6088
- padding: 0 8px;
6130
+ /* 移动端浮动按钮 */
6131
+ .floating-sidebar-toggle {
6132
+ width: 30px;
6133
+ height: 30px;
6134
+ border-radius: 6px;
6089
6135
  }
6136
+ .floating-sidebar-toggle .hamburger-icon { width: 13px; height: 9px; }
6090
6137
 
6091
- .main-header-new-session {
6092
- padding: 0 10px;
6093
- }
6138
+ .sidebar { top: 0; }
6094
6139
 
6095
6140
  /* 移动端终端顶栏 - 紧凑 */
6096
6141
  .terminal-header { padding: 5px 8px; min-height: 32px; }
@@ -6109,19 +6154,28 @@
6109
6154
  .terminal-info { font-size: 0.5625rem; }
6110
6155
  .current-task { font-size: 0.5625rem; padding: 1px 6px 1px 4px; gap: 3px; }
6111
6156
 
6157
+ .main-header-row { padding: 2px 6px; gap: 4px; }
6158
+
6112
6159
  /* 视图切换按钮 - 紧凑 */
6113
6160
  .view-toggle { height: 28px; padding: 2px; gap: 1px; }
6114
6161
  .view-toggle-btn { height: 24px; min-height: 24px; padding: 0 6px; font-size: 0.625rem; gap: 2px; border-radius: 4px; }
6115
6162
 
6116
- #terminal-header-controls .terminal-scale-btn {
6117
- min-width: 28px;
6118
- padding: 0 6px;
6163
+ /* 移动端终端内缩放浮层 */
6164
+ .terminal-scale-overlay {
6165
+ top: 6px;
6166
+ right: 6px;
6167
+ padding: 2px;
6168
+ gap: 1px;
6169
+ }
6170
+ .terminal-scale-overlay-btn {
6171
+ min-width: 26px;
6172
+ height: 26px;
6119
6173
  font-size: 0.75rem;
6120
6174
  }
6121
-
6122
- #terminal-header-controls .terminal-scale-label {
6123
- min-width: 38px;
6124
- font-size: 0.625rem;
6175
+ .terminal-scale-overlay-label {
6176
+ min-width: 28px;
6177
+ font-size: 0.5625rem;
6178
+ padding: 0 2px;
6125
6179
  }
6126
6180
 
6127
6181
  /* 移动端简化交互模式按钮 */
@@ -6199,10 +6253,10 @@
6199
6253
  .input-panel {
6200
6254
  z-index: 30;
6201
6255
  padding: 4px 6px;
6202
- padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px) + var(--keyboard-offset, 0px));
6256
+ padding-bottom: calc(6px + var(--safe-bottom, 0px) + var(--keyboard-offset, 0px));
6203
6257
  flex: 0 0 auto;
6204
6258
  margin-top: auto;
6205
- background: linear-gradient(180deg, rgba(246, 241, 232, 0) 0%, rgba(246, 241, 232, 0.82) 20%, rgba(246, 241, 232, 0.94) 100%);
6259
+ background: linear-gradient(180deg, rgba(246, 241, 232, 0.5) 0%, rgba(246, 241, 232, 0.88) 30%, rgba(246, 241, 232, 0.96) 100%);
6206
6260
  backdrop-filter: blur(12px);
6207
6261
  }
6208
6262
 
@@ -6211,8 +6265,7 @@
6211
6265
  }
6212
6266
 
6213
6267
  .input-session-info-bar {
6214
- padding: 2px 6px;
6215
- padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px));
6268
+ padding: 2px 6px 3px;
6216
6269
  font-size: 0.625rem;
6217
6270
  }
6218
6271
 
@@ -6315,8 +6368,8 @@
6315
6368
  display: inline-flex;
6316
6369
  align-items: center;
6317
6370
  justify-content: center;
6318
- width: 22px;
6319
- height: 22px;
6371
+ width: 28px;
6372
+ height: 28px;
6320
6373
  border: none;
6321
6374
  border-radius: 50%;
6322
6375
  background: transparent;
@@ -6350,14 +6403,25 @@
6350
6403
  display: none;
6351
6404
  }
6352
6405
  .inline-shortcuts-expanded-row .shortcut-key {
6353
- height: 22px;
6354
- min-width: 22px;
6406
+ height: 28px;
6407
+ min-width: 28px;
6355
6408
  font-size: 0.5625rem;
6356
6409
  padding: 0 4px;
6357
6410
  flex: 0 0 auto;
6358
6411
  }
6359
6412
  .inline-shortcuts-expanded-row .shortcut-key.shortcut-dir {
6360
- min-width: 20px;
6413
+ min-width: 24px;
6414
+ }
6415
+
6416
+ /* 回到底部按钮 - 紧凑 */
6417
+ .terminal-jump-bottom,
6418
+ .chat-jump-bottom {
6419
+ height: 28px;
6420
+ min-width: 64px;
6421
+ padding: 0 10px;
6422
+ font-size: 0.6875rem;
6423
+ right: 10px;
6424
+ bottom: 14px;
6361
6425
  }
6362
6426
 
6363
6427
  /* 小键盘 FAB */
@@ -6378,7 +6442,7 @@
6378
6442
  .mini-keyboard-header { padding: 6px 10px 4px; }
6379
6443
  .mini-keyboard-body { padding: 6px; gap: 4px; }
6380
6444
  .mk-row { gap: 3px; }
6381
- .mk-key { min-width: 36px; height: 32px; font-size: 0.625rem; border-radius: 6px; }
6445
+ .mk-key { min-width: 38px; height: 34px; font-size: 0.625rem; border-radius: 6px; }
6382
6446
 
6383
6447
  .floating-pad {
6384
6448
  right: 0;
@@ -6487,7 +6551,7 @@
6487
6551
  .login-container {
6488
6552
  min-height: 100dvh;
6489
6553
  align-items: flex-start;
6490
- padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
6554
+ padding: 8px 8px calc(8px + var(--safe-bottom, 0px));
6491
6555
  }
6492
6556
 
6493
6557
  .login-card {
@@ -6512,12 +6576,13 @@
6512
6576
  max-width: 100%;
6513
6577
  max-height: 85vh;
6514
6578
  border-radius: var(--radius-md) var(--radius-md) 0 0;
6515
- margin-bottom: env(safe-area-inset-bottom, 0px);
6579
+ margin-bottom: var(--safe-bottom, 0px);
6516
6580
  }
6517
6581
 
6518
6582
  .modal-header { padding: 10px 12px; min-height: 40px; }
6519
6583
  .modal-body { padding: 10px 12px; }
6520
6584
  .modal-footer { padding: 8px 12px; }
6585
+ .session-modal .modal-footer { padding: 10px 12px 14px; }
6521
6586
 
6522
6587
  .tool-card {
6523
6588
  padding: 10px;
@@ -6532,6 +6597,26 @@
6532
6597
  .file-search-box { padding: 4px; }
6533
6598
  .file-search-input { min-height: 32px; font-size: 14px; }
6534
6599
  .file-item { padding: 6px 8px; min-height: 32px; }
6600
+
6601
+ /* 欢迎页移动端 */
6602
+ .blank-chat { padding: 16px 12px; align-items: flex-start; }
6603
+ .blank-chat-inner { max-width: 100%; }
6604
+ .blank-chat-logo { width: 48px; height: 48px; font-size: 24px; border-radius: 12px; margin-bottom: 10px; }
6605
+ .blank-chat-title { font-size: 1.125rem; }
6606
+ .blank-chat-subtitle { font-size: 0.75rem; margin-bottom: 16px; }
6607
+ .blank-chat-input-wrap { margin-bottom: 12px; }
6608
+ .blank-chat-input { padding: 10px 60px 10px 12px; font-size: 16px; border-radius: 10px; }
6609
+ .blank-chat-send-btn { padding: 6px 12px; font-size: 0.75rem; right: 5px; }
6610
+ .blank-chat-tools { gap: 4px; margin-bottom: 8px; }
6611
+ .blank-chat-tool-btn { padding: 6px 10px; font-size: 0.75rem; min-height: 44px; }
6612
+ .blank-chat-hint { font-size: 0.6875rem; }
6613
+ .mode-btn-group { gap: 4px; margin-top: 8px; }
6614
+ .mode-btn { padding: 5px 10px; font-size: 0.6875rem; min-height: 36px; }
6615
+
6616
+ /* 防止小屏溢出 */
6617
+ .notification-bubble { max-width: calc(100vw - 24px); }
6618
+ .blank-chat-cwd-dropdown { min-width: 0; width: calc(100vw - 32px); max-width: 320px; }
6619
+ .toast-message { max-width: calc(100vw - 32px); }
6535
6620
  }
6536
6621
 
6537
6622
  /* iPhone 14/15 等标准屏幕 (390px - 420px) - 使用基础移动端样式,略微调整 */
@@ -6539,69 +6624,24 @@
6539
6624
  /* 继承 max-width: 640px 的样式,此处仅做微调 */
6540
6625
 
6541
6626
  .terminal-container {
6542
- margin: 0;
6627
+ margin: 0 6px 6px;
6543
6628
  padding: 6px;
6544
6629
  }
6545
6630
 
6546
6631
  .input-panel {
6547
6632
  padding: 6px 10px;
6548
- padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
6633
+ padding-bottom: calc(8px + var(--safe-bottom, 0px));
6549
6634
  }
6550
6635
  }
6551
6636
 
6552
6637
  /* iPhone SE 等小屏幕 (<= 390px) */
6553
6638
  @media (max-width: 390px) {
6554
6639
  /* 继承 max-width: 640px 的样式,此处仅做小屏微调 */
6555
- .main-content {
6556
- padding: 4px 4px 4px;
6557
- gap: 0;
6558
- }
6559
-
6560
- .main-content-header {
6561
- min-height: 36px;
6562
- padding: 5px 6px 6px;
6563
- gap: 6px;
6564
- }
6565
-
6566
- .main-content-header::before,
6567
- .main-content-header::after {
6568
- width: 12px;
6569
- height: 12px;
6570
- }
6571
-
6572
- .main-content-header::before {
6573
- box-shadow: 4px 4px 0 0 rgba(255, 252, 248, 0.94);
6574
- }
6575
-
6576
- .main-content-header::after {
6577
- box-shadow: -4px 4px 0 0 rgba(255, 252, 248, 0.94);
6578
- }
6579
-
6580
- .main-content-body::before {
6581
- left: 8px;
6582
- right: 8px;
6583
- height: 5px;
6584
- }
6585
-
6586
- .main-content-header-left,
6587
- .main-content-header-center,
6588
- .main-content-header-right {
6589
- gap: 4px;
6590
- }
6591
-
6592
- .main-header-btn,
6593
- .main-header-label,
6594
- .topbar-btn {
6595
- font-size: 0.625rem;
6596
- padding: 0 8px;
6597
- }
6598
-
6599
- .menu-toggle-btn {
6600
- min-width: 30px;
6601
- padding: 0 8px;
6640
+ .floating-sidebar-toggle {
6641
+ width: 28px;
6642
+ height: 28px;
6602
6643
  }
6603
-
6604
- .menu-toggle-btn .hamburger-icon { width: 11px; height: 8px; }
6644
+ .floating-sidebar-toggle .hamburger-icon { width: 11px; height: 8px; }
6605
6645
 
6606
6646
  .terminal-header { padding: 4px 6px; min-height: 28px; }
6607
6647
  .terminal-title-text { font-size: 0.6875rem; }
@@ -6617,25 +6657,26 @@
6617
6657
 
6618
6658
  .input-panel {
6619
6659
  padding: 5px 6px;
6620
- padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
6660
+ padding-bottom: calc(6px + var(--safe-bottom, 0px));
6621
6661
  }
6622
6662
 
6623
6663
  .input-composer { border-radius: 8px; }
6624
- .input-textarea { min-height: 28px; padding: 5px 6px 2px; font-size: 15px; }
6664
+ .input-textarea { min-height: 28px; padding: 5px 6px 2px; font-size: 16px; }
6625
6665
 
6626
- .btn-circle { width: 24px; height: 24px; min-width: 24px; }
6666
+ .btn-circle { width: 28px; height: 28px; min-width: 28px; }
6627
6667
 
6628
6668
  .session-item {
6629
6669
  padding: 6px 8px;
6630
6670
  min-height: 40px;
6631
6671
  }
6632
- .session-action-btn { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
6672
+ .session-action-btn { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
6633
6673
 
6634
6674
  .sidebar { top: 0; width: min(240px, calc(100vw - 10px)); }
6635
6675
 
6636
6676
  .modal { max-height: 80vh; }
6637
6677
  .modal-header { padding: 8px 10px; min-height: 36px; }
6638
6678
  .modal-body { padding: 8px 10px; }
6679
+ .session-modal .modal-footer { padding: 8px 10px 12px; }
6639
6680
  .field-row { grid-template-columns: 1fr; gap: 0; }
6640
6681
 
6641
6682
  .btn { min-height: 36px; padding: 8px 12px; }
@@ -6667,8 +6708,6 @@
6667
6708
  .floating-sidebar-toggle {
6668
6709
  width: 28px;
6669
6710
  height: 28px;
6670
- top: 6px;
6671
- left: 6px;
6672
6711
  }
6673
6712
 
6674
6713
  .sidebar { top: 0; }
@@ -6685,7 +6724,7 @@
6685
6724
 
6686
6725
  .input-panel {
6687
6726
  padding: 8px;
6688
- padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
6727
+ padding-bottom: calc(8px + var(--safe-bottom, 0px));
6689
6728
  }
6690
6729
 
6691
6730
  .input-row { flex-direction: row; gap: 8px; }
@@ -6698,76 +6737,6 @@
6698
6737
  }
6699
6738
 
6700
6739
  /* Blank chat mobile optimization */
6701
- @media (max-width: 640px) {
6702
- .blank-chat {
6703
- padding: 16px 12px;
6704
- align-items: flex-start;
6705
- }
6706
-
6707
- .blank-chat-inner {
6708
- max-width: 100%;
6709
- }
6710
-
6711
- .blank-chat-logo {
6712
- width: 48px;
6713
- height: 48px;
6714
- font-size: 24px;
6715
- border-radius: 12px;
6716
- margin-bottom: 10px;
6717
- }
6718
-
6719
- .blank-chat-title {
6720
- font-size: 1.125rem;
6721
- }
6722
-
6723
- .blank-chat-subtitle {
6724
- font-size: 0.75rem;
6725
- margin-bottom: 16px;
6726
- }
6727
-
6728
- .blank-chat-input-wrap {
6729
- margin-bottom: 12px;
6730
- }
6731
-
6732
- .blank-chat-input {
6733
- padding: 10px 60px 10px 12px;
6734
- font-size: 16px; /* Prevent iOS zoom */
6735
- border-radius: 10px;
6736
- }
6737
-
6738
- .blank-chat-send-btn {
6739
- padding: 6px 12px;
6740
- font-size: 0.75rem;
6741
- right: 5px;
6742
- }
6743
-
6744
- .blank-chat-tools {
6745
- gap: 4px;
6746
- margin-bottom: 8px;
6747
- }
6748
-
6749
- .blank-chat-tool-btn {
6750
- padding: 6px 10px;
6751
- font-size: 0.75rem;
6752
- min-height: 44px;
6753
- }
6754
-
6755
- .blank-chat-hint {
6756
- font-size: 0.6875rem;
6757
- }
6758
-
6759
- .mode-btn-group {
6760
- gap: 4px;
6761
- margin-top: 8px;
6762
- }
6763
-
6764
- .mode-btn {
6765
- padding: 5px 10px;
6766
- font-size: 0.6875rem;
6767
- min-height: 36px;
6768
- }
6769
- }
6770
-
6771
6740
  .session-kind-badge {
6772
6741
  display: inline-flex;
6773
6742
  align-items: center;
@@ -7109,13 +7078,13 @@
7109
7078
  left: 50%;
7110
7079
  transform: translateX(-50%);
7111
7080
  z-index: 10000;
7112
- min-width: 280px;
7113
- max-width: 380px;
7081
+ min-width: 220px;
7082
+ max-width: 320px;
7114
7083
  background: var(--bg-primary);
7115
7084
  border: 1px solid var(--border);
7116
- border-radius: var(--radius-lg);
7085
+ border-radius: var(--radius);
7117
7086
  box-shadow: var(--shadow-lg);
7118
- padding: 14px 16px;
7087
+ padding: 8px 12px;
7119
7088
  animation: notification-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
7120
7089
  transition: top 0.25s ease, opacity 0.25s ease;
7121
7090
  }
@@ -7126,24 +7095,24 @@
7126
7095
  .notification-bubble-header {
7127
7096
  display: flex;
7128
7097
  align-items: center;
7129
- gap: 8px;
7130
- margin-bottom: 6px;
7098
+ gap: 6px;
7099
+ margin-bottom: 2px;
7131
7100
  }
7132
7101
  .notification-bubble-icon {
7133
- width: 20px;
7134
- height: 20px;
7102
+ width: 16px;
7103
+ height: 16px;
7135
7104
  flex-shrink: 0;
7136
7105
  display: flex;
7137
7106
  align-items: center;
7138
7107
  justify-content: center;
7139
7108
  border-radius: var(--radius-sm);
7140
- font-size: 12px;
7109
+ font-size: 10px;
7141
7110
  }
7142
7111
  .notification-bubble-icon.info { background: var(--accent); color: white; }
7143
7112
  .notification-bubble-icon.warning { background: var(--warning); color: white; }
7144
7113
  .notification-bubble-icon.success { background: var(--success); color: white; }
7145
7114
  .notification-bubble-title {
7146
- font-size: 0.875rem;
7115
+ font-size: 0.75rem;
7147
7116
  font-weight: 600;
7148
7117
  color: var(--fg-primary);
7149
7118
  flex: 1;
@@ -7154,9 +7123,9 @@
7154
7123
  border: none;
7155
7124
  color: var(--fg-muted);
7156
7125
  cursor: pointer;
7157
- font-size: 16px;
7126
+ font-size: 14px;
7158
7127
  line-height: 1;
7159
- padding: 2px 4px;
7128
+ padding: 1px 3px;
7160
7129
  border-radius: var(--radius-sm);
7161
7130
  flex-shrink: 0;
7162
7131
  }
@@ -7165,20 +7134,25 @@
7165
7134
  color: var(--fg-primary);
7166
7135
  }
7167
7136
  .notification-bubble-body {
7168
- font-size: 0.8125rem;
7137
+ font-size: 0.7rem;
7169
7138
  color: var(--fg-secondary);
7170
- line-height: 1.45;
7139
+ line-height: 1.4;
7171
7140
  margin-bottom: 0;
7141
+ max-height: 4.2em;
7142
+ overflow: hidden;
7143
+ display: -webkit-box;
7144
+ -webkit-line-clamp: 3;
7145
+ -webkit-box-orient: vertical;
7172
7146
  }
7173
7147
  .notification-bubble-actions {
7174
- margin-top: 10px;
7148
+ margin-top: 6px;
7175
7149
  display: flex;
7176
- gap: 8px;
7150
+ gap: 6px;
7177
7151
  justify-content: flex-end;
7178
7152
  }
7179
7153
  .notification-bubble-actions button {
7180
- font-size: 0.8125rem;
7181
- padding: 4px 12px;
7154
+ font-size: 0.7rem;
7155
+ padding: 2px 10px;
7182
7156
  border-radius: var(--radius-sm);
7183
7157
  cursor: pointer;
7184
7158
  border: 1px solid var(--border);
@@ -7206,6 +7180,73 @@
7206
7180
  to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
7207
7181
  }
7208
7182
 
7183
+ /* Notification bubble button states */
7184
+ .notification-bubble-actions button:disabled {
7185
+ opacity: 0.6;
7186
+ cursor: not-allowed;
7187
+ filter: none;
7188
+ }
7189
+ .notification-bubble-actions button.success {
7190
+ background: var(--success);
7191
+ color: white;
7192
+ border-color: var(--success);
7193
+ }
7194
+ .notification-bubble-actions button.success:hover:not(:disabled) {
7195
+ filter: brightness(1.1);
7196
+ }
7197
+
7198
+ /* Settings restart button */
7199
+ .btn-success {
7200
+ background: var(--success);
7201
+ color: white;
7202
+ border-color: var(--success);
7203
+ }
7204
+ .btn-success:hover:not(:disabled) {
7205
+ filter: brightness(1.1);
7206
+ }
7207
+
7208
+ /* Restart overlay */
7209
+ .restart-overlay {
7210
+ position: fixed;
7211
+ inset: 0;
7212
+ z-index: 99999;
7213
+ background: rgba(0, 0, 0, 0.65);
7214
+ display: flex;
7215
+ align-items: center;
7216
+ justify-content: center;
7217
+ backdrop-filter: blur(4px);
7218
+ animation: restart-fade-in 0.3s ease;
7219
+ }
7220
+ .restart-overlay-content {
7221
+ text-align: center;
7222
+ color: white;
7223
+ }
7224
+ .restart-title {
7225
+ font-size: 1.25rem;
7226
+ font-weight: 600;
7227
+ margin-bottom: 8px;
7228
+ }
7229
+ .restart-subtitle {
7230
+ font-size: 0.9rem;
7231
+ opacity: 0.8;
7232
+ }
7233
+ .restart-spinner {
7234
+ width: 36px;
7235
+ height: 36px;
7236
+ margin: 0 auto 16px;
7237
+ border: 3px solid rgba(255, 255, 255, 0.25);
7238
+ border-top-color: white;
7239
+ border-radius: 50%;
7240
+ animation: restart-spin 0.8s linear infinite;
7241
+ }
7242
+ @keyframes restart-spin {
7243
+ to { transform: rotate(360deg); }
7244
+ }
7245
+ @keyframes restart-fade-in {
7246
+ from { opacity: 0; }
7247
+ to { opacity: 1; }
7248
+ }
7249
+
7209
7250
  /* File Preview Modal */
7210
7251
  .file-preview-overlay {
7211
7252
  position: fixed;
@@ -7226,160 +7267,41 @@
7226
7267
  /* ── Settings modal ── */
7227
7268
 
7228
7269
  .settings-modal {
7229
- max-width: 860px;
7230
- max-height: 82vh;
7270
+ max-width: 520px;
7271
+ max-height: 80vh;
7231
7272
  }
7232
7273
 
7233
- .settings-layout {
7234
- display: grid;
7235
- grid-template-columns: 180px minmax(0, 1fr);
7236
- gap: 18px;
7237
- min-height: 0;
7238
- }
7239
-
7240
- .settings-nav {
7274
+ .settings-tabs {
7241
7275
  display: flex;
7242
- flex-direction: column;
7243
- gap: 8px;
7244
- padding-right: 8px;
7245
- border-right: 1px solid var(--border-subtle);
7246
- }
7247
-
7248
- .settings-content {
7249
- min-width: 0;
7250
- overflow-y: auto;
7251
- padding-right: 4px;
7276
+ gap: 2px;
7277
+ border-bottom: 1px solid var(--border-subtle);
7278
+ margin-bottom: 16px;
7279
+ padding-bottom: 0;
7252
7280
  }
7253
7281
 
7254
7282
  .settings-tab {
7255
- padding: 10px 12px;
7256
- font-size: 0.84rem;
7257
- font-weight: 600;
7283
+ padding: 8px 14px;
7284
+ font-size: 0.8125rem;
7285
+ font-weight: 500;
7258
7286
  color: var(--text-secondary);
7259
- background: transparent;
7260
- border: 1px solid transparent;
7261
- border-radius: 12px;
7287
+ background: none;
7288
+ border: none;
7289
+ border-bottom: 2px solid transparent;
7290
+ border-radius: var(--radius-sm) var(--radius-sm) 0 0;
7262
7291
  cursor: pointer;
7263
- transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
7292
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
7264
7293
  white-space: nowrap;
7265
- text-align: left;
7266
7294
  }
7267
7295
 
7268
7296
  .settings-tab:hover {
7269
7297
  color: var(--text-primary);
7270
7298
  background: rgba(197, 101, 61, 0.06);
7271
- border-color: rgba(197, 101, 61, 0.12);
7272
- transform: translateX(1px);
7273
7299
  }
7274
7300
 
7275
7301
  .settings-tab.active {
7276
7302
  color: var(--accent);
7277
- border-color: rgba(197, 101, 61, 0.18);
7278
- background: linear-gradient(180deg, rgba(197, 101, 61, 0.12), rgba(197, 101, 61, 0.06));
7279
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
7280
- }
7281
-
7282
- .settings-card-header {
7283
- display: flex;
7284
- justify-content: space-between;
7285
- align-items: flex-start;
7286
- gap: 12px;
7287
- margin-bottom: 12px;
7288
- }
7289
-
7290
- .settings-card-accent {
7291
- border: 1px solid rgba(197, 101, 61, 0.12);
7292
- box-shadow: 0 10px 24px rgba(89, 58, 32, 0.04);
7293
- }
7294
-
7295
- .settings-toggle-list {
7296
- display: flex;
7297
- flex-direction: column;
7298
- gap: 10px;
7299
- }
7300
-
7301
- .settings-toggle-item {
7302
- display: flex;
7303
- justify-content: space-between;
7304
- align-items: center;
7305
- gap: 16px;
7306
- padding: 12px 14px;
7307
- border-radius: 12px;
7308
- background: rgba(255, 255, 255, 0.72);
7309
- border: 1px solid rgba(140, 110, 85, 0.08);
7310
- cursor: pointer;
7311
- }
7312
-
7313
- .settings-toggle-title {
7314
- display: block;
7315
- font-size: 0.84rem;
7316
- font-weight: 600;
7317
- color: var(--text-primary);
7318
- margin-bottom: 4px;
7319
- }
7320
-
7321
- .settings-toggle-desc {
7322
- display: block;
7323
- font-size: 0.78rem;
7324
- color: var(--text-secondary);
7325
- line-height: 1.45;
7326
- }
7327
-
7328
- .settings-inline-hint {
7329
- margin-top: -4px;
7330
- }
7331
-
7332
- .settings-tab.active + .settings-tab {
7333
- margin-top: 0;
7334
- }
7335
-
7336
- .settings-tabs {
7337
- display: none;
7338
- }
7339
-
7340
- .settings-panel {
7341
- display: none;
7342
- }
7343
-
7344
- .settings-panel.active {
7345
- display: block;
7346
- }
7347
-
7348
- @media (max-width: 840px) {
7349
- .settings-layout {
7350
- grid-template-columns: 1fr;
7351
- }
7352
-
7353
- .settings-nav {
7354
- flex-direction: row;
7355
- overflow-x: auto;
7356
- padding-right: 0;
7357
- padding-bottom: 10px;
7358
- border-right: none;
7359
- border-bottom: 1px solid var(--border-subtle);
7360
- }
7361
-
7362
- .settings-tab {
7363
- flex: 0 0 auto;
7364
- }
7365
- }
7366
-
7367
- @media (max-width: 640px) {
7368
- .settings-modal {
7369
- max-width: min(96vw, 680px);
7370
- }
7371
-
7372
- .settings-toggle-item {
7373
- align-items: flex-start;
7374
- }
7375
- }
7376
-
7377
- .settings-panel {
7378
- display: none;
7379
- }
7380
-
7381
- .settings-panel.active {
7382
- display: block;
7303
+ border-bottom-color: var(--accent);
7304
+ background: var(--accent-muted);
7383
7305
  }
7384
7306
 
7385
7307
  .settings-panel {
@@ -7457,6 +7379,27 @@
7457
7379
  margin-top: 10px;
7458
7380
  }
7459
7381
 
7382
+ .settings-connect-url-box {
7383
+ display: flex;
7384
+ align-items: center;
7385
+ gap: 8px;
7386
+ background: var(--bg-primary);
7387
+ border: 1px solid var(--border-subtle);
7388
+ border-radius: 6px;
7389
+ padding: 6px 10px;
7390
+ margin-top: 6px;
7391
+ }
7392
+
7393
+ .settings-connect-url-text {
7394
+ flex: 1;
7395
+ font-family: var(--font-mono, monospace);
7396
+ font-size: 13px;
7397
+ color: var(--text-primary);
7398
+ word-break: break-all;
7399
+ user-select: all;
7400
+ -webkit-user-select: all;
7401
+ }
7402
+
7460
7403
  .settings-divider {
7461
7404
  border: none;
7462
7405
  border-top: 1px solid var(--border-subtle);
@@ -8701,9 +8644,9 @@
8701
8644
  line-height: inherit !important;
8702
8645
  }
8703
8646
 
8704
- /* 统一 header 中的跳转按钮沿用显隐动画 */
8647
+ /* 确保按钮在 DOM 视图之上 */
8705
8648
  .terminal-jump-bottom {
8706
- z-index: auto;
8649
+ z-index: 20;
8707
8650
  }
8708
8651
 
8709
8652
  /* ── 结构化会话状态条 ── */