@musnows/scriverse 0.9.4 → 0.9.6

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 (45) hide show
  1. package/dist/ai-protocol.js +6 -0
  2. package/dist/ai-protocol.js.map +1 -1
  3. package/dist/ai-skills.js +134 -0
  4. package/dist/ai-skills.js.map +1 -0
  5. package/dist/ai-write-plans.js +2279 -0
  6. package/dist/ai-write-plans.js.map +1 -0
  7. package/dist/ai.js +2781 -154
  8. package/dist/ai.js.map +1 -1
  9. package/dist/app.js +328 -17
  10. package/dist/app.js.map +1 -1
  11. package/dist/chapter-annotation-anchor.js +327 -0
  12. package/dist/chapter-annotation-anchor.js.map +1 -0
  13. package/dist/chapter-title-numbering.js +56 -0
  14. package/dist/chapter-title-numbering.js.map +1 -0
  15. package/dist/database.js +478 -3
  16. package/dist/database.js.map +1 -1
  17. package/dist/public/ai-context-meter.js +3 -3
  18. package/dist/public/ai-interactive.js +483 -0
  19. package/dist/public/app.js +1991 -268
  20. package/dist/public/chapter-editor-behavior.js +40 -0
  21. package/dist/public/chapter-line-id-tracker.d.ts +25 -0
  22. package/dist/public/chapter-line-id-tracker.js +151 -0
  23. package/dist/public/index.html +79 -19
  24. package/dist/public/model-config.d.ts +1 -0
  25. package/dist/public/model-config.js +9 -4
  26. package/dist/public/styles.css +337 -57
  27. package/dist/public/theme-init.js +25 -1
  28. package/dist/remote-mcp.js +496 -0
  29. package/dist/remote-mcp.js.map +1 -0
  30. package/dist/roleplay-memory.js +53 -0
  31. package/dist/roleplay-memory.js.map +1 -0
  32. package/dist/security.js +4 -0
  33. package/dist/security.js.map +1 -1
  34. package/dist/semantic-search.js +225 -0
  35. package/dist/semantic-search.js.map +1 -0
  36. package/dist/skills/continue-writing/SKILL.md +23 -0
  37. package/dist/skills/polish-writing/SKILL.md +23 -0
  38. package/dist/store.js +695 -51
  39. package/dist/store.js.map +1 -1
  40. package/dist/ui-module-preload.js +27 -0
  41. package/dist/ui-module-preload.js.map +1 -0
  42. package/dist/user-auth.js +33 -1
  43. package/dist/user-auth.js.map +1 -1
  44. package/dist/version.js +1 -1
  45. package/package.json +6 -1
@@ -99,50 +99,55 @@
99
99
  [data-pending-view="module"] .auth-pending #module-view.hidden { display: block !important; }
100
100
  [data-pending-view="welcome"] .auth-pending #welcome-view.hidden,
101
101
  [data-pending-view="editor"] .auth-pending #editor-view.hidden { display: grid !important; }
102
+ /* 阅读深链在会话和正文恢复完成前直接显示稳定骨架,并隐藏后台工作台的响应式重排。 */
103
+ [data-pending-view="reader"] #reader-view.hidden { display: grid !important; }
104
+ [data-pending-view="reader"] .app-shell { visibility: hidden; }
102
105
  /* 书架/设置/平台 AI 路由的骨架使用整宽布局,与 shelf-mode 一致 */
103
106
  .pending-shelf-mode .auth-pending .app-shell { grid-template-columns: 1fr; }
104
107
  .pending-shelf-mode .auth-pending .topbar { grid-template-columns: 280px 1fr auto; }
105
108
  .pending-shelf-mode .auth-pending .left-panel, .pending-shelf-mode .auth-pending .ai-panel { display: none; }
106
109
  .pending-shelf-mode .auth-pending .main-panel { grid-column: 1 / -1; }
107
- .auth-view { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: minmax(min-content, 1fr) auto; gap: 18px; place-items: center; padding: 24px; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(circle at 18% 16%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%), var(--paper); }
110
+ .auth-view { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: minmax(min-content, 1fr) auto; gap: 12px; place-items: center; padding: 10px; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(circle at 18% 16%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%), var(--paper); }
108
111
  .auth-view.hidden { display: none; }
109
- .auth-card { align-self: center; box-sizing: border-box; width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
110
- .auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
112
+ .auth-card { align-self: center; box-sizing: border-box; width: min(400px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
113
+ .auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
114
+ .auth-brand .brand-mark { width: 30px; height: 30px; }
111
115
  .auth-brand div { display: grid; }
112
- .auth-brand small { color: var(--muted); }
113
- .auth-card h1 { margin: 8px 0; font-size: 30px; }
114
- .auth-card > p { color: var(--muted); line-height: 1.6; }
116
+ .auth-brand strong { font-size: 15px; }
117
+ .auth-brand small { color: var(--muted); font-size: 11px; }
118
+ .auth-card h1 { margin: 6px 0; font-size: 26px; }
119
+ .auth-card > p { margin: 10px 0; color: var(--muted); line-height: 1.45; }
115
120
  .auth-tabs {
116
121
  display: grid;
117
122
  grid-template-columns: 1fr 1fr;
118
123
  gap: 0;
119
- margin: 24px 0 18px;
120
- padding: 3px;
124
+ margin: 18px 0 14px;
125
+ padding: 2px;
121
126
  overflow: hidden;
122
127
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
123
- border-radius: 9px;
128
+ border-radius: 7px;
124
129
  background: var(--paper-deep);
125
130
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 65%, transparent);
126
131
  }
127
132
  .auth-tabs button {
128
133
  position: relative;
129
134
  z-index: 0;
130
- min-height: 42px;
135
+ min-height: 38px;
131
136
  border: 0;
132
- border-radius: 6px;
137
+ border-radius: 5px;
133
138
  background: transparent;
134
139
  color: var(--muted);
135
140
  cursor: pointer;
136
- font-size: 14px;
141
+ font-size: 13px;
137
142
  font-weight: 600;
138
143
  letter-spacing: .04em;
139
144
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
140
145
  }
141
146
  .auth-tabs button + button::before {
142
147
  position: absolute;
143
- top: 10px;
144
- bottom: 10px;
145
- left: -3px;
148
+ top: 8px;
149
+ bottom: 8px;
150
+ left: -2px;
146
151
  width: 1px;
147
152
  background: var(--line);
148
153
  content: "";
@@ -163,24 +168,24 @@
163
168
  .auth-tabs button[aria-selected="true"]::after {
164
169
  position: absolute;
165
170
  right: 24%;
166
- bottom: 5px;
171
+ bottom: 4px;
167
172
  left: 24%;
168
- height: 3px;
173
+ height: 2px;
169
174
  border-radius: 999px;
170
175
  background: var(--accent);
171
176
  content: "";
172
177
  }
173
178
  .auth-tabs button:focus-visible { z-index: 2; outline: 2px solid color-mix(in srgb, var(--accent) 82%, white); outline-offset: -2px; }
174
- .auth-form { display: grid; gap: 16px; }
175
- .auth-form label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
179
+ .auth-form { display: grid; gap: 12px; }
180
+ .auth-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
176
181
  .auth-form input {
177
182
  width: 100%;
178
- min-height: 46px;
179
- padding: 12px 14px;
183
+ min-height: 42px;
184
+ padding: 9px 12px;
180
185
  border: 1px solid var(--line);
181
- border-radius: 7px;
186
+ border-radius: 6px;
182
187
  background: var(--paper-deep);
183
- font-size: 15px;
188
+ font-size: 14px;
184
189
  line-height: 1.4;
185
190
  }
186
191
  .auth-form input:focus {
@@ -212,34 +217,34 @@
212
217
  .password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
213
218
  .auth-form .primary-button {
214
219
  width: 100%;
215
- min-height: 46px;
216
- margin-top: 4px;
217
- padding: 12px 16px;
218
- border-radius: 7px;
219
- font-size: 15px;
220
+ min-height: 42px;
221
+ margin-top: 2px;
222
+ padding: 10px 14px;
223
+ border-radius: 6px;
224
+ font-size: 14px;
220
225
  font-weight: 600;
221
226
  }
222
- .auth-form small { color: var(--muted); line-height: 1.5; font-size: 12px; }
223
- .auth-captcha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
227
+ .auth-form small { color: var(--muted); line-height: 1.45; font-size: 11px; }
228
+ .auth-captcha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
224
229
  .auth-captcha label { margin: 0; }
225
230
  .auth-captcha-image {
226
231
  display: inline-flex;
227
232
  align-items: center;
228
233
  justify-content: center;
229
- min-width: 148px;
230
- min-height: 46px;
234
+ min-width: 128px;
235
+ min-height: 42px;
231
236
  padding: 0;
232
237
  border: 1px solid var(--line);
233
- border-radius: 7px;
238
+ border-radius: 6px;
234
239
  background: var(--paper-deep);
235
240
  cursor: pointer;
236
241
  }
237
- .auth-captcha-image img { display: block; width: 148px; height: 48px; border-radius: 6px; }
242
+ .auth-captcha-image img { display: block; width: 128px; height: 42px; border-radius: 5px; }
238
243
  .auth-captcha-image img[hidden], .auth-captcha-placeholder[hidden] { display: none; }
239
- .auth-captcha-placeholder { color: var(--muted); font-size: 13px; padding: 0 14px; white-space: nowrap; }
240
- .auth-captcha-hint { margin: -8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
241
- .auth-security-hint { margin: -8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
242
- .auth-error { min-height: 20px; margin: 14px 0 0 !important; color: var(--accent-dark) !important; }
244
+ .auth-captcha-placeholder { color: var(--muted); font-size: 12px; padding: 0 10px; white-space: nowrap; }
245
+ .auth-captcha-hint { margin: -6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
246
+ .auth-security-hint { margin: -6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
247
+ .auth-error { min-height: 17px; margin: 10px 0 0 !important; color: var(--accent-dark) !important; }
243
248
 
244
249
  :root[data-theme="dark"] {
245
250
  --ink: #e8e2d8;
@@ -791,7 +796,7 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
791
796
  .product-footer-development { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
792
797
  .product-footer .product-footer-update { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent-dark); font-weight: 700; }
793
798
  .product-footer .product-footer-update:hover, .product-footer .product-footer-update:focus-visible { color: var(--accent-dark); }
794
- .auth-product-footer { align-self: end; max-width: 440px; margin: 0; padding-top: 14px; }
799
+ .auth-product-footer { align-self: end; max-width: 400px; margin: 0; padding-top: 8px; }
795
800
  .settings-product-footer { max-width: 1000px; }
796
801
  .access-dialog-body { display: grid; gap: 16px; max-height: calc(88vh - 82px); overflow-y: auto; padding: 18px 24px 22px; }
797
802
  .access-list { display: grid; gap: 8px; max-height: min(34vh, 340px); overflow: auto; padding: 0; }
@@ -977,9 +982,7 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
977
982
  .app-shell.prose-hidden-mode:not(.shelf-mode) .panel-heading,
978
983
  .app-shell.prose-hidden-mode:not(.shelf-mode) #novel-tree { display: none !important; }
979
984
  .app-shell.prose-read-only-mode:not(.shelf-mode) #tidy-blank-lines-button,
980
- .app-shell.prose-read-only-mode:not(.shelf-mode) #save-button,
981
- .app-shell.prose-read-only-mode:not(.shelf-mode) #chapter-delete-button,
982
- .app-shell.prose-read-only-mode:not(.shelf-mode) #chapter-edit-button { display: none !important; }
985
+ .app-shell.prose-read-only-mode:not(.shelf-mode) #save-button { display: none !important; }
983
986
  .app-shell.prose-read-only-mode:not(.shelf-mode) .left-primary-actions { justify-content: flex-end; }
984
987
  .app-shell.prose-read-only-mode:not(.shelf-mode) #chapter-title[readonly],
985
988
  .app-shell.prose-read-only-mode:not(.shelf-mode) #chapter-content[readonly] { cursor: default; }
@@ -987,7 +990,6 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
987
990
  .app-shell.view-only-mode:not(.shelf-mode) [data-work-settings],
988
991
  .app-shell.view-only-mode:not(.shelf-mode) #tidy-blank-lines-button,
989
992
  .app-shell.view-only-mode:not(.shelf-mode) #save-button,
990
- .app-shell.view-only-mode:not(.shelf-mode) #chapter-delete-button,
991
993
  .app-shell.view-only-mode:not(.shelf-mode) #chapter-edit-button { display: none !important; }
992
994
  .app-shell.view-only-mode:not(.shelf-mode) .left-primary-actions { justify-content: flex-end; }
993
995
  .app-shell.view-only-mode:not(.shelf-mode) #chapter-title[readonly],
@@ -1136,6 +1138,11 @@ body.work-viewer-mode .character-editor-actions { display: none !important; }
1136
1138
  .work-danger-field .danger-button { flex: 0 0 auto; white-space: nowrap; }
1137
1139
  .work-access-options { display: flex; flex-wrap: wrap; gap: 5px; }
1138
1140
  .work-access-options span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 10px; line-height: 1.35; }
1141
+ .work-editor-preference-options { display: grid; flex: 0 1 320px; gap: 7px; }
1142
+ .work-editor-preference-option { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; }
1143
+ .work-editor-preference-option input { flex: 0 0 auto; margin: 2px 0 0; }
1144
+ .work-editor-preference-option span { display: grid; gap: 2px; min-width: 0; }
1145
+ .work-editor-preference-option b { color: var(--ink); font-size: 11px; }
1139
1146
  .account-dialog { width: min(640px, 92vw); overflow: hidden; }
1140
1147
  .account-settings-body { display: grid; gap: 16px; max-height: calc(88vh - 86px); overflow-y: auto; padding: 20px 24px 24px; }
1141
1148
  .account-settings-section { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
@@ -1413,6 +1420,10 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1413
1420
  .chapter-batch-controls select:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); }
1414
1421
  .chapter-batch-controls select:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
1415
1422
  .chapter-batch-controls select:disabled { cursor: not-allowed; opacity: .52; }
1423
+ .chapter-batch-controls input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; border-color: color-mix(in srgb, var(--line) 82%, var(--ink)); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 500; }
1424
+ .chapter-batch-controls input:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
1425
+ .chapter-batch-renumber-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
1426
+ .chapter-batch-renumber-note code { color: var(--accent-dark); font-family: var(--font-mono), monospace; }
1416
1427
  @media (max-width: 620px) { .chapter-batch-controls { grid-template-columns: 1fr; } }
1417
1428
 
1418
1429
  .ghost-button, .primary-button { border-radius: 4px; padding: 8px 13px; font-size: 12px; }
@@ -1493,6 +1504,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1493
1504
  .chapter-line-number.is-line-selected { background: rgba(139,61,44,.16); color: var(--accent-dark); font-weight: 700; }
1494
1505
  .chapter-line-number.is-line-selected::after { content: ""; position: absolute; top: 0; left: 100%; width: 100vw; height: 100%; background: rgba(139,61,44,.085); box-shadow: inset 3px 0 rgba(139,61,44,.28); pointer-events: none; }
1495
1506
  .chapter-content { position: relative; z-index: 1; grid-column: 2; grid-row: 1; resize: none; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 32px 36px 72px; border: 0; background: transparent; border-radius: 0; font-size: var(--editor-font-size); line-height: var(--editor-line-height); letter-spacing: .01em; overflow-wrap: break-word; }
1507
+ .app-shell.editor-typewriter-mode .chapter-content { padding-bottom: max(72px, 45dvh); }
1496
1508
  .chapter-content:focus { box-shadow: none; }
1497
1509
  .chapter-whitespace-overlay { position: relative; z-index: 2; grid-column: 2; grid-row: 1; width: 100%; height: 100%; overflow: hidden; opacity: 0; pointer-events: none; }
1498
1510
  .chapter-whitespace-overlay.is-visible { opacity: 1; }
@@ -1558,7 +1570,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1558
1570
  .entity-detail-pin-button:hover, .entity-detail-pin-button:focus-visible { border-color: var(--accent); color: var(--accent-dark); outline: none; }
1559
1571
  .entity-detail-pin-button.is-pinned { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent-dark); }
1560
1572
  .entity-detail-pin-button:disabled { cursor: not-allowed; opacity: .5; }
1561
- .entity-detail-pin-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
1573
+ .entity-detail-pin-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transform: translateY(.5px); }
1562
1574
  .entity-detail-pin-button.is-pinned svg { fill: currentColor; }
1563
1575
  .record-card h3 { font-size: 16px; margin: 5px 0 10px; font-weight: 600; }
1564
1576
  .record-card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; white-space: pre-wrap; }
@@ -1634,6 +1646,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1634
1646
  .draft-type-filter-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1635
1647
  .draft-type-filter-field select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 11px; }
1636
1648
  .setting-filter-toolbar { grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .8fr)) auto; }
1649
+ .chapter-comment-filter-toolbar { grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr) auto; }
1637
1650
  .setting-filter-field { display: grid; min-width: 0; }
1638
1651
  .setting-filter-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1639
1652
  .setting-filter-field input, .setting-filter-field select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 11px; }
@@ -2125,6 +2138,29 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2125
2138
  .ai-agent-tools strong { color: var(--ink); font-size: 12px; font-weight: 600; }
2126
2139
  .ai-agent-tools small { display: block; margin-top: 2px; font-size: 10px; }
2127
2140
  .ai-agent-tools-section + .empty-state { margin-top: 24px; border-top: 1px solid var(--line); }
2141
+ .remote-mcp-config-field { display: grid; gap: 7px; }
2142
+ .remote-mcp-config-field > span { color: var(--ink); font-size: 11px; font-weight: 600; }
2143
+ .remote-mcp-config-field textarea {
2144
+ width: 100%;
2145
+ min-height: 260px;
2146
+ resize: vertical;
2147
+ overflow: auto;
2148
+ padding: 11px 12px;
2149
+ border: 1px solid var(--line);
2150
+ border-radius: 5px;
2151
+ background: var(--surface-soft);
2152
+ color: var(--ink);
2153
+ font-family: var(--font-latin), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
2154
+ font-size: 11px;
2155
+ line-height: 1.55;
2156
+ tab-size: 2;
2157
+ white-space: pre;
2158
+ }
2159
+ .remote-mcp-config-help { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
2160
+ .remote-mcp-status { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
2161
+ @media (max-width: 700px) {
2162
+ .remote-mcp-config-field textarea { min-height: 220px; font-size: 10px; }
2163
+ }
2128
2164
  .default-model-select { min-width: 260px; padding: 7px 9px; font-size: 11px; }
2129
2165
  .empty-state { padding: 70px 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
2130
2166
  .empty-state b { display: block; color: var(--ink); margin-bottom: 8px; }
@@ -2698,6 +2734,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2698
2734
  .config-inline-save > .config-checkbox-field input[type="checkbox"] { width: 18px; min-width: 18px; height: 18px; }
2699
2735
  .agent-tool-call-global-multiplier-toggle button { width: 32px; min-width: 32px; height: 30px; min-height: 30px; padding: 0; font-family: var(--font-latin), monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
2700
2736
  .relationship-index-summary { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
2737
+ .semantic-index-summary { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
2701
2738
  .relationship-index-state-row { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
2702
2739
  .relationship-index-state-row strong { color: var(--ink); font-family: var(--font-latin), monospace; font-weight: 600; }
2703
2740
  .relationship-index-state { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 650; }
@@ -2705,6 +2742,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2705
2742
  .relationship-index-state.is-building { border-color: color-mix(in srgb, var(--task-running) 45%, var(--line)); background: color-mix(in srgb, var(--task-running) 9%, var(--surface)); color: var(--task-running); }
2706
2743
  .relationship-index-state.is-queued { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent-dark); }
2707
2744
  .relationship-index-state.is-failed { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-dark); }
2745
+ .relationship-index-state.is-paused, .relationship-index-state.is-unconfigured { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-dark); }
2708
2746
  .relationship-index-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
2709
2747
  .relationship-index-metrics > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
2710
2748
  .relationship-index-metrics dt { color: var(--muted); font-size: 9px; }
@@ -2718,6 +2756,18 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2718
2756
  .relationship-index-queue-chip strong { display: inline-grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border-radius: 9px; background: var(--paper-deep); color: var(--ink); font-family: var(--font-latin), monospace; font-size: 9px; }
2719
2757
  .relationship-index-error { margin: 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--accent-dark); font-size: 10px; }
2720
2758
  .relationship-index-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
2759
+ .semantic-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 10px; }
2760
+ .semantic-settings-grid > label { display: grid; align-content: start; gap: 6px; color: var(--muted); font-size: 10px; }
2761
+ .semantic-settings-grid :is(input, select) { width: 100%; min-width: 0; }
2762
+ .semantic-settings-grid :is(input:not([type="checkbox"]), select) { min-height: 36px; padding: 6px 8px; }
2763
+ .semantic-settings-grid .semantic-enabled-field { grid-column: 1 / -1; display: flex; }
2764
+ .semantic-index-progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 4px; accent-color: var(--accent); }
2765
+ .semantic-index-progress::-webkit-progress-bar { background: var(--paper-deep); }
2766
+ .semantic-index-progress::-webkit-progress-value { background: var(--accent); }
2767
+ .usage-call-types { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 8px 0 14px; }
2768
+ .usage-call-type-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); font-size: 9px; }
2769
+ .usage-call-type-chip strong { color: var(--ink); }
2770
+ .usage-call-type-chip span { color: var(--muted); }
2721
2771
  .config-section .config-save-button { min-height: 32px; padding: 5px 11px; font-size: 11px; }
2722
2772
  .config-section .card-actions { margin-top: 12px; }
2723
2773
  .config-section .card-actions .config-save-button { border: 1px solid var(--line); background: transparent; color: var(--ink); }
@@ -2735,6 +2785,9 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2735
2785
  @media (max-width: 640px) {
2736
2786
  .config-inline-save .book-summary-context-percent-field,
2737
2787
  .config-inline-save .context-compact-threshold-field { grid-template-columns: minmax(0, 1fr); row-gap: 6px; width: 100%; }
2788
+ .semantic-settings-grid { grid-template-columns: minmax(0, 1fr); }
2789
+ .semantic-settings-grid .semantic-enabled-field { grid-column: auto; }
2790
+ .semantic-index-summary .relationship-index-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
2738
2791
  }
2739
2792
  .field-label textarea {
2740
2793
  width: 100%;
@@ -2808,7 +2861,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2808
2861
  .message-body .markdown-image img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
2809
2862
  .message-body .markdown-image small { color: var(--muted); font-size: 9px; line-height: 1.45; text-align: center; }
2810
2863
  .message-meta { margin-top: 8px; color: var(--muted); font-size: 9px; }
2811
- .message-meta .ai-stream-character-count { display: inline-block; min-width: 6ch; font-variant-numeric: tabular-nums; text-align: right; }
2864
+ .message-meta .ai-stream-character-count { display: inline-block; min-width: 7ch; font-variant-numeric: tabular-nums; text-align: right; }
2812
2865
  .message-meta .ai-stream-connection-seconds { display: inline-block; min-width: 3ch; font-variant-numeric: tabular-nums; text-align: right; }
2813
2866
  .ai-process-details { margin: 0 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: color-mix(in srgb, var(--surface-soft) 82%, transparent); }
2814
2867
  .ai-process-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 10px; color: var(--muted); cursor: pointer; font-size: 10px; list-style: none; }
@@ -2851,12 +2904,163 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2851
2904
  #ai-tool-call-arguments { min-height: 0; max-height: 26vh; }
2852
2905
  .ai-tool-call-detail section:last-child pre { min-height: 180px; }
2853
2906
  @media (max-width: 680px) { .ai-tool-call-info { grid-template-columns: minmax(0, 1fr); }.ai-tool-call-detail pre { min-height: 100px; max-height: 26vh; }#ai-tool-call-arguments { min-height: 0; max-height: 20vh; }.ai-tool-call-detail section:last-child pre { min-height: 140px; } }
2907
+
2908
+ /* --- AI 可写工具:审批卡片 / 修改计划明细 / 用户提问 / 审批中心 --- */
2909
+ .ai-interactive-card { display: grid; gap: 8px; margin-top: 10px; padding: 11px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 5px; background: color-mix(in srgb, var(--surface-soft) 88%, transparent); }
2910
+ .ai-question-card { border-left-color: var(--task-running); }
2911
+ .ai-interactive-failure-card { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
2912
+ .ai-interactive-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
2913
+ .ai-interactive-card-head strong { color: var(--ink); font-size: 11px; }
2914
+ .ai-status-chip { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; color: #fff; font-size: 9px; font-weight: 600; letter-spacing: .05em; white-space: nowrap; }
2915
+ .ai-status-chip[data-tone="pending"] { background: var(--accent); }
2916
+ .ai-status-chip[data-tone="running"] { background: var(--task-running); }
2917
+ .ai-status-chip[data-tone="success"] { background: var(--green); }
2918
+ .ai-status-chip[data-tone="danger"] { color: var(--accent-dark); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
2919
+ .ai-status-chip[data-tone="muted"] { color: var(--muted); border-color: var(--line); background: var(--paper-deep); }
2920
+ .ai-interactive-summary { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
2921
+ .ai-interactive-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
2922
+ .ai-interactive-meta > div { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
2923
+ .ai-interactive-meta dt { color: var(--muted); font-size: 9px; }
2924
+ .ai-interactive-meta dd { margin: 0; color: var(--ink); font-size: 10px; font-family: var(--font-latin), monospace; overflow-wrap: anywhere; }
2925
+ .ai-interactive-warn { margin: 0; padding: 6px 8px; border-radius: 4px; background: color-mix(in srgb, #c07b31 12%, var(--surface)); color: color-mix(in srgb, #c07b31 70%, black); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
2926
+ .ai-question-option-preview { display: grid; gap: 3px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.5; }
2927
+ .ai-question-option-preview li.is-recommended { color: var(--accent-dark); }
2928
+ .ai-interactive-actions { display: flex; flex-wrap: wrap; gap: 5px; }
2929
+ .ai-interactive-actions button { border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--muted); }
2930
+ .ai-interactive-actions :is(button.ghost-button, button.primary-button) { min-width: 0; min-height: 24px; padding: 3px 7px; font-size: calc(9px * var(--ai-font-scale)); line-height: 1.35; }
2931
+ .ai-interactive-actions button:hover, .ai-interactive-actions button:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--ink); }
2932
+ .ai-interactive-actions .ai-card-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
2933
+ .ai-interactive-actions .ai-card-primary:hover, .ai-interactive-actions .ai-card-primary:focus-visible { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
2934
+ .ai-interactive-actions .ai-card-danger:hover, .ai-interactive-actions .ai-card-danger:focus-visible { border-color: var(--accent); color: var(--accent-dark); }
2935
+ .ai-interactive-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
2936
+ .ai-write-plan-dialog { width: min(880px, 94vw); }
2937
+ .ai-write-plan-body { display: grid; gap: 12px; max-height: 64vh; padding: 18px 24px 20px; overflow-y: auto; }
2938
+ .ai-plan-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
2939
+ .ai-plan-detail-head .eyebrow { margin: 0; letter-spacing: .08em; text-transform: none; color: var(--muted); font-size: 10px; }
2940
+ .ai-plan-summary-title { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
2941
+ .ai-plan-summary-text { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
2942
+ .ai-plan-banner { margin: 0; padding: 9px 11px; border-radius: 4px; font-size: 10px; line-height: 1.55; }
2943
+ .ai-plan-banner.is-invalidated { background: color-mix(in srgb, #c07b31 14%, var(--surface)); color: color-mix(in srgb, #c07b31 70%, black); }
2944
+ .ai-plan-banner.is-failed { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent-dark); }
2945
+ .ai-operation-list { display: grid; gap: 10px; }
2946
+ .ai-operation-item { display: grid; gap: 8px; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
2947
+ .ai-operation-item.is-restricted { border-style: dashed; background: var(--paper-deep); }
2948
+ .ai-operation-item header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
2949
+ .ai-operation-item h4 { margin: 0; color: var(--ink); font-size: 11px; }
2950
+ .ai-operation-item h5 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
2951
+ .ai-op-required { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 9px; }
2952
+ .ai-op-required span { padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-deep); color: var(--muted); }
2953
+ .ai-op-annotation { display: grid; gap: 6px; padding: 9px 10px; border-radius: 4px; background: var(--paper-deep); }
2954
+ .ai-op-annotation > div { display: flex; align-items: baseline; gap: 8px; }
2955
+ .ai-op-annotation span { color: var(--muted); font-size: 9px; }
2956
+ .ai-op-annotation strong { color: var(--ink); font-size: 10px; }
2957
+ .ai-op-quote { margin: 0; padding: 7px 9px; border-left: 3px solid var(--task-running); border-radius: 3px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
2958
+ .ai-op-note { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.55; }
2959
+ .ai-op-task { display: grid; gap: 5px; padding: 9px 10px; border-radius: 4px; background: var(--paper-deep); }
2960
+ .ai-op-task div { display: flex; align-items: baseline; gap: 8px; }
2961
+ .ai-op-task span { color: var(--muted); font-size: 9px; }
2962
+ .ai-op-task strong { color: var(--ink); font-size: 10px; }
2963
+ .ai-op-task code { font-family: var(--font-latin), monospace; font-size: 10px; color: var(--ink); }
2964
+ .ai-field-diff-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
2965
+ .ai-field-diff-table th { padding: 4px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 600; text-align: left; }
2966
+ .ai-field-diff-table td { vertical-align: top; padding: 8px 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 11px; line-height: 1.55; color: var(--ink); }
2967
+ .ai-field-diff-table tr:last-child td { border-bottom: 0; }
2968
+ .ai-field-diff-table td:first-child { width: 26%; }
2969
+ .ai-field-diff-table td strong { display: block; color: var(--ink); font-size: 10px; }
2970
+ .ai-field-diff-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-family: var(--font-latin), monospace; }
2971
+ .diff-value { white-space: pre-wrap; overflow-wrap: anywhere; }
2972
+ .diff-empty { color: var(--muted); font-size: 10px; }
2973
+ .diff-preview { margin: 6px 0 0; padding: 6px 8px; border-radius: 4px; font: 9px/1.5 var(--font-latin), monospace; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
2974
+ .diff-preview.diff-remove { background: color-mix(in srgb, var(--accent) 10%, transparent); }
2975
+ .diff-preview.diff-add { background: color-mix(in srgb, var(--green) 14%, transparent); }
2976
+ .ai-op-result { display: grid; gap: 3px; padding-top: 8px; border-top: 1px dashed var(--line); }
2977
+ .ai-op-result strong { color: var(--green); font-size: 10px; }
2978
+ .ai-op-result p { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
2979
+ .ai-op-result small { color: var(--muted); font-size: 9px; font-family: var(--font-latin), monospace; }
2980
+ .ai-op-audits { display: grid; gap: 5px; margin: 0; padding: 8px 0 0; list-style: none; border-top: 1px dashed var(--line); }
2981
+ .ai-op-audits li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
2982
+ .ai-op-audits strong { color: var(--ink); }
2983
+ .ai-plan-audit-note { margin: 0; }
2984
+ .card-actions:is(.ai-plan-actions, .ai-question-actions) { flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 0; padding: 14px 24px 20px; }
2985
+ .card-actions:is(.ai-plan-actions, .ai-question-actions) > button { flex: 0 0 auto; }
2986
+ .ai-question-dialog { width: min(540px, 92vw); }
2987
+ .ai-question-body { display: grid; gap: 12px; padding: 18px 22px 8px; }
2988
+ .ai-question-text { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
2989
+ .ai-question-options { display: grid; gap: 6px; }
2990
+ .ai-question-option-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 11px; line-height: 1.5; cursor: pointer; }
2991
+ .ai-question-option-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
2992
+ .ai-question-option-item.is-recommended { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
2993
+ .ai-question-option-item.is-selected { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
2994
+ .ai-question-option-item input[type="radio"] { margin-top: 2px; accent-color: var(--accent); }
2995
+ .ai-question-custom-field { display: grid; gap: 5px; }
2996
+ .ai-question-custom-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
2997
+ .ai-question-custom-heading output { flex: 0 0 auto; color: var(--muted); font: 9px/1.4 var(--font-latin), monospace; font-variant-numeric: tabular-nums; }
2998
+ .ai-question-custom-field input[type="text"] { padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 11px; }
2999
+ .ai-question-custom-field input[type="text"]:disabled { background: var(--paper-deep); color: var(--muted); }
3000
+ #ai-question-expiry { margin: 4px 0 0; }
3001
+ .ai-approval-center-dialog { width: min(780px, 94vw); }
3002
+ .ai-approval-center-body { display: grid; gap: 12px; padding: 16px 22px 22px; }
3003
+ .ai-approval-filters { display: flex; flex-wrap: wrap; gap: 6px; }
3004
+ .ai-approval-filters button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 10px; }
3005
+ .ai-approval-filters button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
3006
+ .ai-approval-list-host { min-height: 60px; }
3007
+ .ai-approval-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
3008
+ .ai-approval-row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); text-align: left; cursor: pointer; }
3009
+ .ai-approval-row:hover, .ai-approval-row:focus-visible { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
3010
+ .ai-approval-row-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
3011
+ .ai-approval-row-main strong { color: var(--ink); font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3012
+ .ai-approval-row-main small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3013
+ .ai-approval-row-open { flex: 0 0 auto; color: var(--accent-dark); font-size: 9px; }
3014
+ .ai-approval-empty { margin: 18px 0; }
3015
+ @media (max-width: 680px) {
3016
+ .ai-write-plan-body { padding: 14px 14px 16px; }
3017
+ :is(.ai-write-plan-dialog .ai-plan-actions, .ai-question-dialog .ai-question-actions) { padding: 12px 16px 16px; }
3018
+ .ai-approval-center-body, .ai-question-body { padding: 12px 14px 14px; }
3019
+ .ai-field-diff-table { table-layout: auto; }
3020
+ .ai-field-diff-table th:nth-child(2), .ai-field-diff-table th:nth-child(3) { font-size: 8px; }
3021
+ }
3022
+
2854
3023
  .guard-card { margin-top: 10px; padding: 9px 10px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 4px; background: var(--surface-soft); }
3024
+ .writing-suggestion-ui { display: contents; }
2855
3025
  .guard-card.warning { border-left-color: #c07b31; }.guard-card.failed { border-left-color: var(--accent); }
2856
3026
  .guard-card strong { display: block; margin-bottom: 5px; font-size: 10px; }.guard-card p { margin: 4px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }.guard-card p b { color: var(--ink); }
2857
3027
  .message-actions { display: flex; gap: 7px; margin-top: 10px; }
2858
3028
  .message-actions button { border: 1px solid rgba(139,61,44,.25); background: var(--surface); color: var(--accent-dark); font-size: 10px; padding: 5px 8px; border-radius: 3px; }
2859
3029
  .prompt-box { border-top: 1px solid var(--line); padding-top: 12px; }
3030
+ .ai-semantic-search-panel { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; min-height: 0; height: min(520px, 58vh); max-height: min(520px, 58vh); margin-bottom: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 30px rgba(49,42,32,.12); }
3031
+ .ai-semantic-search-panel > header, .ai-semantic-search-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
3032
+ .ai-semantic-search-panel > header > div { display: grid; min-width: 0; gap: 2px; }
3033
+ .ai-semantic-search-panel > header strong { font-size: 11px; }
3034
+ .ai-semantic-search-panel > header small, .ai-semantic-search-panel > footer span { color: var(--muted); font-size: 9px; }
3035
+ .ai-semantic-search-panel > header button { width: 25px; min-width: 25px; height: 25px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 17px; }
3036
+ .ai-semantic-search-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(108px, .45fr); gap: 7px; padding: 10px; }
3037
+ .ai-semantic-search-form label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
3038
+ .ai-semantic-search-form button { grid-column: 1 / -1; }
3039
+ #ai-semantic-search-status { margin: 0; padding: 0 10px 8px; }
3040
+ .ai-semantic-search-results { display: grid; align-content: start; gap: 6px; min-height: 0; padding: 0 10px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
3041
+ .ai-semantic-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
3042
+ .ai-semantic-result > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 7px; min-width: 0; cursor: pointer; }
3043
+ .ai-semantic-result-copy { display: grid; min-width: 0; gap: 4px; }
3044
+ .ai-semantic-result-copy strong { font-size: 10px; line-height: 1.4; }
3045
+ .ai-semantic-result-copy > small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: 8px; }
3046
+ .ai-semantic-result-copy > span { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
3047
+ .ai-semantic-result > button { min-height: 25px; padding: 4px 7px; font-size: 8px; }
3048
+ .ai-semantic-view-only { padding: 2px 5px; border-radius: 3px; background: var(--paper-deep); color: var(--muted); font-size: 8px; white-space: nowrap; }
3049
+ .ai-semantic-empty { margin: 0; padding: 14px; color: var(--muted); font-size: 9px; text-align: center; }
3050
+ .ai-semantic-search-panel > footer { position: relative; z-index: 1; min-width: 0; border-top: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
3051
+ .ai-semantic-injection { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 7px 8px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 5px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
3052
+ .ai-semantic-injection > div { display: grid; min-width: 0; gap: 2px; }
3053
+ .ai-semantic-injection strong { color: var(--accent-dark); font-size: 9px; }
3054
+ .ai-semantic-injection span, .ai-semantic-injection small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
3055
+ .ai-semantic-injection button { width: 23px; min-width: 23px; height: 23px; padding: 0; }
3056
+ @container (max-width: 460px) {
3057
+ .ai-semantic-search-panel { height: 40vh; max-height: 40vh; }
3058
+ .ai-semantic-search-form { grid-template-columns: minmax(0, 1fr) minmax(112px, .48fr); }
3059
+ .ai-semantic-search-form label:first-child { grid-column: 1 / -1; }
3060
+ .ai-semantic-search-form button { grid-column: 2; align-self: end; }
3061
+ .ai-semantic-result { grid-template-columns: minmax(0, 1fr); }
3062
+ .ai-semantic-result > button { justify-self: end; }
3063
+ }
2860
3064
  .ai-context-warning { display: grid; gap: 9px; margin-bottom: 9px; padding: 10px; border: 1px solid color-mix(in srgb, #bf6a35 58%, var(--line)); border-radius: 5px; background: color-mix(in srgb, #bf6a35 10%, var(--surface)); }
2861
3065
  .ai-context-warning.hidden { display: none; }
2862
3066
  .ai-context-warning strong { display: block; color: var(--ink); font-size: 11px; }
@@ -2902,6 +3106,51 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2902
3106
  .ai-attachment-button:disabled, .ai-scene-button:disabled { cursor: wait; opacity: .56; }
2903
3107
  .ai-scene-button.hidden { display: none; }
2904
3108
  .ai-image-button-icon, .ai-scene-button-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
3109
+
3110
+ .character-roleplay-memory-surface { display: grid; grid-column: 1 / -1; gap: 14px; min-width: 0; }
3111
+ .roleplay-memory-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
3112
+ .roleplay-memory-toolbar button { min-height: 34px; }
3113
+ .roleplay-memory-filter-panel { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(120px, .45fr) minmax(120px, .45fr) auto; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
3114
+ .roleplay-memory-filter-panel.hidden { display: none; }
3115
+ .roleplay-memory-filter-panel label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
3116
+ .roleplay-memory-filter-panel input, .roleplay-memory-filter-panel select, .roleplay-memory-filter-panel button { min-width: 0; min-height: 34px; padding: 6px 9px; font-size: 10px; }
3117
+ .roleplay-memory-list { display: grid; gap: 9px; }
3118
+ .roleplay-memory-empty { display: grid; place-items: center; min-height: 160px; margin: 0; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; text-align: center; }
3119
+ .roleplay-memory-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
3120
+ .roleplay-memory-card.is-archived { opacity: .72; }
3121
+ .roleplay-memory-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
3122
+ .roleplay-memory-card-badges { display: flex; flex-wrap: wrap; gap: 5px; }
3123
+ .roleplay-memory-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 8px; }
3124
+ .roleplay-memory-badge.is-noncanonical { border-color: color-mix(in srgb, #bf6a35 48%, var(--line)); color: #a34f20; }
3125
+ .roleplay-memory-badge.is-pinned { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); color: var(--accent-dark); }
3126
+ .roleplay-memory-card time { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
3127
+ .roleplay-memory-content { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
3128
+ .roleplay-memory-card-meta { margin: 0; color: var(--muted); font-size: 9px; }
3129
+ .roleplay-memory-sources { border-top: 1px solid var(--line); padding-top: 7px; }
3130
+ .roleplay-memory-sources summary { color: var(--muted); font-size: 9px; cursor: pointer; }
3131
+ .roleplay-memory-source-list { display: grid; gap: 6px; margin-top: 7px; }
3132
+ .roleplay-memory-source { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; padding: 7px; border-radius: 4px; background: var(--paper); }
3133
+ .roleplay-memory-source p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
3134
+ .roleplay-memory-source button { min-height: 29px; padding: 4px 7px; font-size: 9px; }
3135
+ .roleplay-memory-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
3136
+ .roleplay-memory-card-actions button { min-height: 30px; padding: 5px 8px; font-size: 9px; }
3137
+ .roleplay-memory-card-actions .roleplay-memory-icon-action { display: inline-grid; place-items: center; width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; }
3138
+ .roleplay-memory-icon-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
3139
+ .roleplay-memory-card-actions .danger-button.roleplay-memory-icon-action { border-color: color-mix(in srgb, #d9363e 62%, var(--line)); color: #d9363e; }
3140
+ .roleplay-memory-card-actions .danger-button.roleplay-memory-icon-action:hover, .roleplay-memory-card-actions .danger-button.roleplay-memory-icon-action:focus-visible { border-color: #d9363e; background: color-mix(in srgb, #d9363e 11%, transparent); }
3141
+ .roleplay-memory-icon-action.is-pinned { border-width: 1px; border-style: solid; border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent-dark); }
3142
+ .roleplay-memory-pagination { margin-top: 2px; }
3143
+
3144
+ @media (max-width: 640px) {
3145
+ .roleplay-memory-filter-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
3146
+ .roleplay-memory-filter-panel label:first-child { grid-column: 1 / -1; }
3147
+ .roleplay-memory-filter-panel button { width: 100%; }
3148
+ .roleplay-memory-card-header { display: grid; }
3149
+ .roleplay-memory-source { grid-template-columns: minmax(0, 1fr); }
3150
+ .roleplay-memory-source button { justify-self: start; }
3151
+ .roleplay-memory-card-actions button { min-height: 34px; }
3152
+ .roleplay-memory-card-actions .roleplay-memory-icon-action { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
3153
+ }
2905
3154
  .ai-mention-menu { position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(100% + 6px); max-height: 230px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 12px 34px rgba(49,42,32,.18); }
2906
3155
  .ai-mention-option { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
2907
3156
  .ai-mention-option:hover, .ai-mention-option:focus-visible, .ai-mention-option.is-active { background: var(--paper-deep); }
@@ -3129,6 +3378,16 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3129
3378
  .chapter-annotations-dialog { width: min(820px, 94vw); }
3130
3379
  .chapter-annotations-list { display: grid; gap: 10px; max-height: 62vh; overflow: auto; padding: 18px 24px; }
3131
3380
  .chapter-comment-module-list { display: grid; gap: 10px; }
3381
+ .chapter-comment-completed-group { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
3382
+ .chapter-comment-completed-group > summary { display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 9px 13px; color: var(--muted); cursor: pointer; list-style: none; }
3383
+ .chapter-comment-completed-group > summary::-webkit-details-marker { display: none; }
3384
+ .chapter-comment-completed-group > summary::before { content: "›"; color: var(--accent-dark); font-family: var(--font-latin), monospace; font-size: 16px; line-height: 1; transition: transform .15s ease; }
3385
+ .chapter-comment-completed-group[open] > summary::before { transform: rotate(90deg); }
3386
+ .chapter-comment-completed-group > summary span { color: var(--ink); font-size: 11px; font-weight: 600; }
3387
+ .chapter-comment-completed-group > summary strong { display: inline-grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--accent-dark); font-family: var(--font-latin), monospace; font-size: 9px; }
3388
+ .chapter-comment-completed-group > summary small { margin-left: auto; font-size: 9px; }
3389
+ .chapter-comment-completed-group[open] > summary { border-bottom: 1px solid var(--line); }
3390
+ .chapter-comment-completed-list { display: grid; gap: 10px; padding: 10px; }
3132
3391
  .chapter-annotation-card { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
3133
3392
  .chapter-annotation-card.is-resolved { opacity: .65; }
3134
3393
  .chapter-annotation-card header { display: flex; align-items: center; gap: 8px; }
@@ -3230,7 +3489,8 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3230
3489
  .provider-token-quota-toggle { color: var(--ink) !important; font-size: 10px !important; }
3231
3490
  .provider-token-quota-input { display: grid; gap: 5px; min-width: 0; }
3232
3491
  .provider-token-quota-input input:disabled { opacity: .58; }
3233
- .model-multimodal-fields { gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
3492
+ .model-multimodal-fields, .model-kind-fields { gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
3493
+ .model-kind-fields .model-capability-option { display: grid !important; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink) !important; }
3234
3494
  .model-multimodal-heading { color: var(--ink); font-size: 12px; font-weight: 600; }
3235
3495
  .model-multimodal-fields .model-capability-option { display: grid !important; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink) !important; transition: border-color .15s ease, background-color .15s ease; }
3236
3496
  .model-multimodal-fields .model-capability-option[hidden], .model-multimodal-fields .model-capability-option.hidden { display: none !important; }
@@ -3376,11 +3636,13 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3376
3636
  .item-list-row button { padding: 0 10px; }
3377
3637
  .item-list-add { justify-self: start; padding: 7px 11px; }
3378
3638
  .keyword-chip-field > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
3379
- .keyword-chip-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
3639
+ .keyword-chip-field { min-width: 0; }
3640
+ .keyword-chip-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 42px; padding: 6px 8px; overflow-x: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
3380
3641
  .keyword-chip-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
3381
- .keyword-chip-editor > input[data-keyword-input] { flex: 1 1 160px; width: auto; min-width: 140px; padding: 6px 3px; border: 0; background: transparent; color: var(--ink); outline: none; }
3642
+ .keyword-chip-editor > input[data-keyword-input] { flex: 1 1 160px; width: auto; min-width: min(140px, 100%); max-width: 100%; box-sizing: border-box; padding: 6px 3px; border: 0; background: transparent; color: var(--ink); outline: none; }
3382
3643
  .keyword-chip-editor > input[data-keyword-input]:focus { border: 0; box-shadow: none; }
3383
- .keyword-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 5px 3px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px; background: var(--paper-deep); color: var(--ink); font-size: 11px; line-height: 1.3; }
3644
+ .keyword-chip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 28px; padding: 3px 5px 3px 10px; overflow-wrap: anywhere; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 16px; background: var(--paper-deep); color: var(--ink); font-size: 11px; line-height: 1.3; }
3645
+ .keyword-chip > span { min-width: 0; overflow-wrap: anywhere; }
3384
3646
  .keyword-chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
3385
3647
  .keyword-chip:hover button, .keyword-chip:focus-within button { opacity: 1; pointer-events: auto; }
3386
3648
  .keyword-chip button:hover, .keyword-chip button:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-dark); outline: none; }
@@ -3491,6 +3753,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3491
3753
  .character-filter-toolbar-actions { justify-content: flex-start; }
3492
3754
  .draft-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
3493
3755
  .setting-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
3756
+ .chapter-comment-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
3494
3757
  }
3495
3758
  .entity-editor-open { overflow: hidden; }
3496
3759
  .preview-record-card { cursor: pointer; }
@@ -3512,6 +3775,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3512
3775
  #character-editor-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
3513
3776
  #knowledge-editor-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
3514
3777
  .entity-editor-header, .character-editor-header { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) minmax(160px, 1fr); align-items: center; gap: 24px; min-height: 78px; padding: 14px clamp(18px, 3vw, 44px); border-bottom: 1px solid var(--line); background: var(--panel); }
3778
+ .character-editor-header { grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) auto; }
3515
3779
  .entity-editor-heading { min-width: 0; text-align: center; }
3516
3780
  .entity-editor-heading h1 { overflow: hidden; margin: 2px 0 0; font-size: 24px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
3517
3781
  .entity-editor-readonly-badge { display: inline-block; width: fit-content; margin: 0 auto; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--muted) 55%, var(--line)); border-radius: 999px; color: var(--muted); font-size: 10px; line-height: 1.2; }
@@ -3522,9 +3786,9 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3522
3786
  .entity-editor-back:hover { border-color: var(--accent); color: var(--accent-dark); }
3523
3787
  #setting-editor-form { display: grid; grid-template-rows: auto minmax(0, 1fr); }
3524
3788
  .setting-editor-header { min-height: 112px; }
3525
- .setting-editor-heading { display: grid; align-content: center; gap: 8px; }
3526
- .setting-editor-title-input { width: min(100%, 520px); margin: 0 auto; padding: 0 0 4px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.2; text-align: center; }
3527
- .setting-editor-title-input::placeholder { color: var(--ink); opacity: .92; }
3789
+ .setting-editor-header .entity-editor-heading { display: grid; align-content: center; justify-items: center; gap: 8px; text-align: center; }
3790
+ .setting-editor-title-input { display: block; width: min(100%, 520px); margin: 0 auto; padding: 0 0 4px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.2; text-align: center; }
3791
+ .setting-editor-title-input::placeholder { color: var(--muted); opacity: 1; }
3528
3792
  .setting-editor-title-input:focus { border-color: var(--accent); box-shadow: none; }
3529
3793
  .setting-editor-header-fields { display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 0; }
3530
3794
  .setting-editor-header-fields > label:not(.setting-editor-lock) { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
@@ -3588,12 +3852,17 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3588
3852
  .knowledge-markdown-block .message-body { overflow-wrap: anywhere; font-size: 12px; line-height: 1.65; }
3589
3853
  .character-editor-header > div:nth-child(2) { min-width: 0; text-align: center; }
3590
3854
  .character-editor-header h1, .character-editor-header h3 { margin: 0; }
3591
- .character-editor-title-row { display: flex; align-items: center; gap: 10px; margin-top: 3px; }
3592
- .character-editor-title-row { justify-content: center; }
3855
+ .character-editor-title-row { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 10px; margin-top: 3px; }
3593
3856
  .character-editor-title-row h1 { overflow: hidden; font-size: 24px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
3857
+ .character-editor-title-input { flex: 0 1 520px; width: min(100%, 520px); min-width: 0; padding: 0 0 4px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.2; text-align: center; }
3858
+ .character-editor-title-input::placeholder { color: var(--muted); opacity: 1; }
3859
+ .character-editor-title-input:focus { border-color: var(--accent); box-shadow: none; }
3860
+ .character-editor-title-input[readonly] { cursor: default; }
3861
+ .character-editor-title-input[readonly]:focus { border-color: transparent; }
3594
3862
  .knowledge-editor-header-note { color: var(--muted); font-size: 10px; text-align: right; }
3595
3863
  .character-version-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-deep); color: var(--accent-dark); font: 10px/1 var(--font-latin), monospace; }
3596
3864
  .character-editor-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
3865
+ .character-editor-header-actions > .primary-button, .character-editor-header-actions > .ghost-button { flex: 0 0 auto; white-space: nowrap; }
3597
3866
  .character-editor-header-actions .ghost-button { min-height: 34px; }
3598
3867
  .character-editor-header-actions .ghost-button:disabled { cursor: not-allowed; opacity: .46; }
3599
3868
  .character-editor-workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; }
@@ -3608,11 +3877,16 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3608
3877
  .character-editor-section > header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
3609
3878
  .character-editor-section > header h3 { margin: 2px 0 0; font-size: 21px; }
3610
3879
  .character-editor-section > header p { max-width: 430px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; text-align: right; }
3880
+ .character-editor-section.has-header-actions > header { align-items: center; }
3881
+ .character-editor-section.has-header-actions > header > .character-editor-section-header-copy { display: grid; gap: 4px; min-width: 0; }
3882
+ .character-editor-section.has-header-actions > header > .character-editor-section-header-copy > p { max-width: 620px; text-align: left; }
3883
+ .character-editor-section.has-header-actions > header .roleplay-memory-toolbar { flex: 0 0 auto; }
3611
3884
  .character-editor-section-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
3612
3885
  .character-editor-section-fields > label, .character-editor-section-fields > .form-field { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 11px; }
3613
- .character-editor-section-fields > label:has(textarea), .character-editor-section-fields > .form-field:has(textarea), .character-editor-section-fields > .structured-list-field, .character-editor-section-fields > .chip-field, .character-editor-section-fields > .markdown-editor-field, .character-editor-field-help { grid-column: 1 / -1; }
3886
+ .character-editor-section-fields > label:has(textarea), .character-editor-section-fields > .form-field:has(textarea), .character-editor-section-fields > .keyword-chip-field, .character-editor-section-fields > .structured-list-field, .character-editor-section-fields > .chip-field, .character-editor-section-fields > .markdown-editor-field, .character-editor-field-help { grid-column: 1 / -1; }
3614
3887
  .character-editor-section-fields input, .character-editor-section-fields textarea, .character-editor-section-fields select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 13px; }
3615
3888
  .character-editor-section-fields textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
3889
+ .character-editor-section-fields .key-value-list-value { min-height: 42px; max-height: 240px; overflow-y: auto; resize: none; field-sizing: content; overflow-wrap: anywhere; }
3616
3890
  .character-editor-section-fields .section-list-row textarea { min-height: 180px; }
3617
3891
  .character-editor-section-fields .member-chip { position: relative; display: inline-flex; width: auto; cursor: pointer; }
3618
3892
  .character-editor-section-fields .member-chip input[type="checkbox"] { position: absolute; width: 1px !important; min-width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
@@ -3849,12 +4123,12 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3849
4123
  .setting-row, .module-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
3850
4124
  .setting-row .card-actions, .module-row .card-actions { justify-content: flex-start; }
3851
4125
  .entity-editor-header, .character-editor-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding-inline: 12px; }
3852
- .entity-editor-heading h1, .character-editor-title-row h1 { font-size: 18px; }
4126
+ .entity-editor-heading h1, .character-editor-title-row h1, .character-editor-title-input { font-size: 18px; }
3853
4127
  .entity-editor-back { overflow: hidden; width: 40px; min-width: 40px; padding-inline: 11px; white-space: nowrap; }
3854
4128
  .entity-editor-back::before { margin-right: 18px; }
3855
4129
  .setting-editor-header { min-height: 102px; }
3856
4130
  .setting-editor-header-fields { flex-wrap: wrap; gap: 8px 12px; }
3857
- .setting-editor-title-input { font-size: 18px; }
4131
+ .setting-editor-title-input { font-size: 16px; }
3858
4132
  .setting-editor-workspace { overflow-y: auto; }
3859
4133
  .setting-editor-content { height: auto; min-height: 70dvh; padding: 16px; }
3860
4134
  .setting-markdown-field { height: 70dvh; }
@@ -3870,6 +4144,8 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3870
4144
  .character-editor-section-fields > label, .character-editor-section-fields > .form-field, .character-editor-field-help { grid-column: 1; }
3871
4145
  .character-editor-section > header { align-items: flex-start; flex-direction: column; gap: 7px; }
3872
4146
  .character-editor-section > header p { text-align: left; }
4147
+ .character-editor-section.has-header-actions > header { align-items: flex-end; flex-direction: row; }
4148
+ .character-editor-section.has-header-actions > header > .character-editor-section-header-copy { min-width: 0; }
3873
4149
  .character-markdown-editor { overflow: hidden; }
3874
4150
  .character-markdown-editor > .vditor-editor-host { min-height: 42dvh; }
3875
4151
  .character-markdown-editor-meta { grid-template-columns: minmax(0, 1fr); }
@@ -4094,6 +4370,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
4094
4370
  .editor-view .editor-actions > button { min-width: 0; min-height: 34px; padding-inline: 6px; font-size: 11px; }
4095
4371
  .chapter-title { font-size: 21px; }
4096
4372
  .chapter-content { padding: 22px 16px 64px 12px; font-size: max(16px, var(--editor-font-size)); }
4373
+ .app-shell.editor-typewriter-mode .chapter-content { padding-bottom: max(64px, 45dvh); }
4097
4374
  .chapter-line-numbers { width: 32px; font-size: 11px; }
4098
4375
  .chapter-editor-frame { grid-template-columns: 32px minmax(0, 1fr); }
4099
4376
  .chapter-line-measure { left: 32px; }
@@ -4181,6 +4458,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
4181
4458
  .access-row { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
4182
4459
  .access-row select, .access-row button, .work-access-field .ghost-button { width: 100%; }
4183
4460
  .work-access-field { align-items: stretch; flex-direction: column; }
4461
+ .work-editor-preference-options { flex-basis: auto; width: 100%; }
4184
4462
  .work-access-field .danger-button { width: 100%; }
4185
4463
 
4186
4464
  .recycle-bin-card { grid-template-columns: minmax(0, 1fr); gap: 7px; }
@@ -4190,6 +4468,8 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
4190
4468
 
4191
4469
  .entity-editor-view { min-width: 0; }
4192
4470
  .entity-editor-header, .character-editor-header { grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 12px var(--mobile-gutter); }
4471
+ .setting-editor-header .entity-editor-heading { grid-column: 1 / -1; grid-row: 1; padding-inline: 48px; }
4472
+ .setting-editor-header > .entity-editor-back { z-index: 1; grid-column: 1; grid-row: 1; }
4193
4473
  .entity-editor-mode-actions, .character-editor-header-actions { grid-column: 1 / -1; justify-content: stretch; flex-wrap: wrap; }
4194
4474
  .entity-editor-mode-actions > button, .character-editor-header-actions > button { flex: 1 1 auto; }
4195
4475
  .entity-editor-mode-actions > .entity-detail-favorite-button, .entity-editor-mode-actions > .entity-detail-pin-button, .character-editor-header-actions > .entity-detail-favorite-button, .character-editor-header-actions > .entity-detail-pin-button { flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px; }