@musnows/scriverse 0.7.2 → 0.7.4

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 (82) hide show
  1. package/README.en.md +3 -0
  2. package/README.md +8 -0
  3. package/dist/ai-connectivity-test.js +109 -0
  4. package/dist/ai-connectivity-test.js.map +1 -0
  5. package/dist/ai-conversation-export.js +70 -0
  6. package/dist/ai-conversation-export.js.map +1 -0
  7. package/dist/ai-stream-timeout.js +18 -0
  8. package/dist/ai-stream-timeout.js.map +1 -0
  9. package/dist/ai.js +926 -354
  10. package/dist/ai.js.map +1 -1
  11. package/dist/app.js +498 -80
  12. package/dist/app.js.map +1 -1
  13. package/dist/attachment-storage.js +28 -12
  14. package/dist/attachment-storage.js.map +1 -1
  15. package/dist/backup-encryption.js +129 -0
  16. package/dist/backup-encryption.js.map +1 -0
  17. package/dist/character-extraction.js +133 -0
  18. package/dist/character-extraction.js.map +1 -0
  19. package/dist/cli-core.js +7 -6
  20. package/dist/cli-core.js.map +1 -1
  21. package/dist/collaboration-presence.js +200 -18
  22. package/dist/collaboration-presence.js.map +1 -1
  23. package/dist/database.js +335 -3
  24. package/dist/database.js.map +1 -1
  25. package/dist/docx-export.js +1 -1
  26. package/dist/docx-export.js.map +1 -1
  27. package/dist/domain.js +18 -0
  28. package/dist/domain.js.map +1 -1
  29. package/dist/epub-export.js +319 -0
  30. package/dist/epub-export.js.map +1 -0
  31. package/dist/hybrid-search.js +8 -0
  32. package/dist/hybrid-search.js.map +1 -1
  33. package/dist/image-metadata.js +17 -2
  34. package/dist/image-metadata.js.map +1 -1
  35. package/dist/presence-store.js +160 -0
  36. package/dist/presence-store.js.map +1 -0
  37. package/dist/public/ai-connectivity-test.d.ts +7 -0
  38. package/dist/public/ai-connectivity-test.js +82 -0
  39. package/dist/public/ai-context-meter.js +27 -0
  40. package/dist/public/ai-mentions.js +14 -0
  41. package/dist/public/ai-request-manager.js +99 -0
  42. package/dist/public/ai-stream-protocol.js +51 -0
  43. package/dist/public/app.js +3587 -559
  44. package/dist/public/background-task-center.js +1 -1
  45. package/dist/public/chapter-editor-virtualization.js +52 -0
  46. package/dist/public/chapter-version-diff.d.ts +20 -0
  47. package/dist/public/chapter-version-diff.js +116 -0
  48. package/dist/public/foreshadow-reminder.d.ts +32 -0
  49. package/dist/public/foreshadow-reminder.js +73 -0
  50. package/dist/public/global-replace-refresh.js +60 -0
  51. package/dist/public/index.html +161 -31
  52. package/dist/public/outline-board.d.ts +61 -0
  53. package/dist/public/outline-board.js +137 -0
  54. package/dist/public/page-route.d.ts +1 -0
  55. package/dist/public/page-route.js +8 -0
  56. package/dist/public/presence-client-id.d.ts +10 -0
  57. package/dist/public/presence-client-id.js +31 -0
  58. package/dist/public/reading-preview.d.ts +32 -0
  59. package/dist/public/reading-preview.js +136 -0
  60. package/dist/public/s3-backup-ui.d.ts +10 -0
  61. package/dist/public/s3-backup-ui.js +29 -0
  62. package/dist/public/setting-filters.d.ts +16 -0
  63. package/dist/public/setting-filters.js +19 -0
  64. package/dist/public/styles.css +522 -11
  65. package/dist/public/upload-progress.d.ts +2 -0
  66. package/dist/public/upload-progress.js +10 -0
  67. package/dist/s3-backup.js +197 -12
  68. package/dist/s3-backup.js.map +1 -1
  69. package/dist/security.js +86 -21
  70. package/dist/security.js.map +1 -1
  71. package/dist/server-runtime.js +38 -18
  72. package/dist/server-runtime.js.map +1 -1
  73. package/dist/store.js +899 -104
  74. package/dist/store.js.map +1 -1
  75. package/dist/upload-limits.js +35 -0
  76. package/dist/upload-limits.js.map +1 -0
  77. package/dist/user-auth.js +56 -10
  78. package/dist/user-auth.js.map +1 -1
  79. package/dist/utils.js +3 -0
  80. package/dist/utils.js.map +1 -1
  81. package/dist/version.js +1 -1
  82. package/package.json +4 -2
@@ -65,7 +65,7 @@
65
65
  --font-cjk: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Heiti SC";
66
66
  --ui-font-size: 14px;
67
67
  --ui-font-scale: 1;
68
- --ai-font-size: 14px;
68
+ --ai-font-size: 12px;
69
69
  --ai-font-scale: 1;
70
70
  --editor-font-size: 17px;
71
71
  --editor-line-height: 1.55;
@@ -307,6 +307,10 @@
307
307
  }
308
308
 
309
309
  * { box-sizing: border-box; }
310
+ * { scrollbar-width: none; }
311
+ *::-webkit-scrollbar { width: 0; }
312
+ .is-scrollbar-visible { scrollbar-width: thin; }
313
+ .is-scrollbar-visible::-webkit-scrollbar { width: 8px; }
310
314
 
311
315
  html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
312
316
 
@@ -575,6 +579,7 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
575
579
  .shelf-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; width: 100%; max-width: 1400px; margin: 0 auto 38px; }
576
580
  .shelf-header h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 52px); font-weight: 560; letter-spacing: -.04em; }
577
581
  .shelf-header p { margin: 0; color: var(--muted); }
582
+ .shelf-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
578
583
  .settings-detail-actions, .settings-dialog-header-actions { display: flex; align-items: center; gap: 10px; }
579
584
  .settings-detail-actions { flex: 0 0 auto; }
580
585
  .settings-parent-button { white-space: nowrap; }
@@ -796,6 +801,17 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
796
801
  }
797
802
  .dialog.s3-backup-dialog { width: min(900px, 94vw); }
798
803
  .s3-backup-body { display: grid; gap: 18px; max-height: calc(88vh - 86px); overflow-y: auto; padding: 18px 24px 24px; }
804
+ .s3-backup-encryption { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
805
+ .s3-backup-encryption legend { padding: 0 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
806
+ .s3-backup-encryption-control { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
807
+ .s3-backup-encryption-control > label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; color: var(--ink); cursor: pointer; }
808
+ .s3-backup-encryption-control input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }
809
+ .s3-backup-encryption-control label > span { display: grid; gap: 4px; min-width: 0; }
810
+ .s3-backup-encryption-control strong { font-size: 12px; font-weight: 600; }
811
+ .s3-backup-encryption-control small { color: var(--muted); font-size: 10px; line-height: 1.55; }
812
+ .s3-backup-encryption-warning { padding: 10px 12px; border: 1px solid color-mix(in srgb, #bf6a35 48%, var(--line)); border-radius: 5px; background: color-mix(in srgb, #bf6a35 10%, var(--surface)); }
813
+ .s3-backup-encryption-warning strong { color: var(--ink); font-size: 11px; }
814
+ .s3-backup-encryption-warning p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
799
815
  .s3-backup-overview { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
800
816
  .s3-backup-overview h3, .s3-backup-history h3 { margin: 0; font-size: 15px; font-weight: 600; }
801
817
  .s3-backup-overview p, .s3-backup-history header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
@@ -841,6 +857,12 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
841
857
  .s3-backup-options span { display: grid; gap: 3px; }
842
858
  .s3-backup-options strong { font-size: 10px; font-weight: 600; }
843
859
  .s3-backup-options small { color: var(--muted); font-size: 9px; line-height: 1.45; }
860
+ .dialog.s3-backup-key-dialog { width: min(620px, 94vw); }
861
+ .s3-backup-key-body { display: grid; gap: 14px; padding: 18px 24px 4px; }
862
+ .s3-backup-key-body > label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
863
+ .s3-backup-key-body textarea { width: 100%; min-height: 82px; resize: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font: 12px/1.6 var(--font-latin), monospace; overflow-wrap: anywhere; }
864
+ .s3-backup-key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
865
+ .s3-backup-key-actions button { min-height: 34px; }
844
866
  .member-permission-form { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
845
867
  .member-person-field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
846
868
  .member-person-field small, .member-permission-help { color: var(--muted); font-size: 10px; line-height: 1.5; }
@@ -1033,6 +1055,8 @@ body.work-viewer-mode .character-editor-actions { display: none !important; }
1033
1055
  .work-access-field strong { color: var(--ink); font-size: 12px; }
1034
1056
  .work-access-field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
1035
1057
  .work-access-field .ghost-button { flex: 0 0 auto; white-space: nowrap; }
1058
+ .work-danger-field { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--surface-soft)); }
1059
+ .work-danger-field .danger-button { flex: 0 0 auto; white-space: nowrap; }
1036
1060
  .work-access-options { display: flex; flex-wrap: wrap; gap: 5px; }
1037
1061
  .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; }
1038
1062
  .account-dialog { width: min(640px, 92vw); overflow: hidden; }
@@ -1117,6 +1141,24 @@ body.work-viewer-mode .character-editor-actions { display: none !important; }
1117
1141
  .avatar-crop-side p { margin: 0; color: var(--muted); font-size: 10px; }
1118
1142
  .avatar-crop-preview { width: 76px; height: 76px; border: 2px solid color-mix(in srgb, var(--line) 72%, transparent); background: var(--surface); }
1119
1143
  .avatar-crop-preview canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
1144
+ .image-upload-placeholder-box { position: relative; display: grid; place-items: center; min-width: 42px; min-height: 42px; overflow: hidden; border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--line)); border-radius: 4px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--muted); font: 9px/1 var(--font-latin), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: .08em; }
1145
+ .image-upload-placeholder-shine { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 18%, color-mix(in srgb, var(--surface) 72%, transparent) 48%, transparent 78%); transform: translateX(-110%); animation: image-upload-placeholder-shimmer 1.45s ease-in-out infinite; }
1146
+ .image-upload-placeholder-icon { position: relative; z-index: 1; opacity: .72; }
1147
+ .image-upload-progress { display: grid; gap: 5px; min-width: 0; color: var(--muted); }
1148
+ .image-upload-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font: 10px/1.35 var(--font-latin), var(--font-cjk), sans-serif; }
1149
+ .image-upload-progress-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1150
+ .image-upload-progress-heading output { flex: 0 0 auto; color: var(--ink); font: 10px/1 var(--font-latin), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
1151
+ .image-upload-progress-track { position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
1152
+ .image-upload-progress-track > span { display: block; width: var(--upload-progress, 0%); height: 100%; border-radius: inherit; background: var(--accent); transition: width .18s ease; }
1153
+ .image-upload-progress.is-indeterminate .image-upload-progress-track > span { width: 38%; animation: image-upload-progress-indeterminate 1.25s ease-in-out infinite; }
1154
+ .image-upload-progress-panel { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 24px 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 5px; background: color-mix(in srgb, var(--accent) 6%, var(--surface-soft)); }
1155
+ .image-upload-progress-panel .image-upload-placeholder-box { width: 42px; height: 42px; }
1156
+ .image-upload-progress-copy { display: grid; gap: 4px; min-width: 0; }
1157
+ .image-upload-progress-copy strong { color: var(--ink); font-size: 11px; }
1158
+ .image-upload-progress-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
1159
+ .image-upload-progress-panel .image-upload-progress { margin-top: 2px; }
1160
+ @keyframes image-upload-placeholder-shimmer { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
1161
+ @keyframes image-upload-progress-indeterminate { from { transform: translateX(-120%); } to { transform: translateX(300%); } }
1120
1162
  .account-settings-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 16px; }
1121
1163
  .account-settings-form label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 11px; }
1122
1164
  .account-settings-form input { width: 100%; min-height: 38px; padding: 9px 10px; background: var(--surface); font-size: 12px; }
@@ -1198,8 +1240,12 @@ body.work-viewer-mode .character-editor-actions { display: none !important; }
1198
1240
  }
1199
1241
  .work-cover-preview.has-cover { border-style: solid; }
1200
1242
  .work-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
1243
+ .work-cover-preview.is-uploading { border-style: solid; border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
1244
+ .work-cover-preview.is-uploading .image-upload-placeholder-box { width: 100%; height: 100%; border: 0; border-radius: 3px; }
1245
+ .work-cover-upload-progress { grid-column: 2; min-width: 0; }
1201
1246
  .work-cover-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
1202
1247
  .work-cover-actions .ghost-button { min-height: 32px; padding: 6px 11px; font-size: 11px; }
1248
+ .work-cover-actions button:disabled { cursor: wait; opacity: .55; }
1203
1249
  .book-add-card { display: grid; place-items: center; align-content: center; aspect-ratio: 3 / 4.25; min-height: 280px; border: 1px dashed #b8ad9c; border-radius: 8px; color: var(--muted); }
1204
1250
  .book-add-card span { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 50%; font-size: 34px; color: var(--accent); }
1205
1251
  .book-add-card strong { color: var(--ink); margin-bottom: 8px; }
@@ -1248,6 +1294,8 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1248
1294
  .volume-toggle::before { content: ""; width: 4px; height: 4px; flex: none; border: solid var(--muted); border-width: 0 1px 1px 0; transform: rotate(45deg); margin-right: 8px; }
1249
1295
  .volume-node.is-collapsed .volume-toggle::before { transform: rotate(-45deg); }
1250
1296
  .volume-toggle span:first-child { flex: 1; }
1297
+ .volume-export-button { flex: none; }
1298
+ .volume-export-button[aria-busy="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-dark); opacity: 1; }
1251
1299
  .chapter-add-button { flex: none; }
1252
1300
  .volume-chapters { display: block; }
1253
1301
  .volume-node.is-collapsed .volume-chapters { display: none; }
@@ -1307,18 +1355,35 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1307
1355
  .welcome-grid span { color: var(--muted); font-size: 11px; line-height: 1.5; }
1308
1356
 
1309
1357
  .hidden { display: none !important; }
1310
- .editor-view { container-name: editor-workspace; container-type: inline-size; display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
1358
+ .editor-view { container-name: editor-workspace; container-type: inline-size; display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; }
1311
1359
  .editor-toolbar { display: grid; grid-template-areas: "path path" "title actions"; grid-template-columns: minmax(0, 1fr) auto; align-items: flex-end; column-gap: 20px; row-gap: 6px; padding: 25px 7% 18px; border-bottom: 1px solid var(--line); }
1312
1360
  #chapter-path { grid-area: path; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1313
1361
  .chapter-title { grid-area: title; display: block; width: 100%; min-width: 0; border: 0; border-radius: 0; background: transparent; font-size: 27px; padding: 0; }
1314
1362
  .chapter-title:focus { box-shadow: none; border-bottom: 1px solid var(--accent); }
1315
1363
  .editor-actions { grid-area: actions; display: flex; align-items: center; gap: 10px; }
1316
1364
  .chapter-stats { color: var(--muted); font-size: 11px; }
1365
+ .chapter-foreshadow-reminder { --reminder-color: #80713d; display: grid; grid-template-areas: "summary actions" "details details"; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px 18px; padding: 10px 7%; border-bottom: 1px solid color-mix(in srgb, var(--reminder-color) 32%, var(--line)); background: color-mix(in srgb, var(--reminder-color) 7%, var(--surface)); }
1366
+ .chapter-foreshadow-reminder[data-role="payoff"] { --reminder-color: #49745c; }
1367
+ .chapter-foreshadow-reminder-summary { grid-area: summary; display: flex; min-width: 0; align-items: center; gap: 10px; }
1368
+ .chapter-foreshadow-reminder-summary > div { display: grid; min-width: 0; gap: 2px; }
1369
+ .chapter-foreshadow-reminder-summary strong { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.45; }
1370
+ .chapter-foreshadow-reminder-summary span:not(.chapter-foreshadow-reminder-role) { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
1371
+ .chapter-foreshadow-reminder-role { flex: 0 0 auto; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--reminder-color) 58%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--reminder-color) 12%, var(--surface)); color: var(--reminder-color); font-size: 9px; font-weight: 700; }
1372
+ .chapter-foreshadow-reminder-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
1373
+ .chapter-foreshadow-reminder-actions button { min-height: 30px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
1374
+ .chapter-foreshadow-reminder-counter { min-width: 32px; color: var(--muted); font-family: var(--font-latin), monospace; font-size: 10px; text-align: center; }
1375
+ .chapter-foreshadow-reminder-details { grid-area: details; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; margin: 0; padding: 9px 0 2px; border-top: 1px solid color-mix(in srgb, var(--reminder-color) 24%, var(--line)); }
1376
+ .chapter-foreshadow-reminder-details > div { display: grid; min-width: 0; grid-template-columns: max-content minmax(0, 1fr); gap: 7px; }
1377
+ .chapter-foreshadow-reminder-details dt { color: var(--reminder-color); font-size: 9px; font-weight: 700; }
1378
+ .chapter-foreshadow-reminder-details dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
1317
1379
  @container editor-workspace (max-width: 720px) {
1318
1380
  .editor-toolbar { grid-template-areas: "path" "title" "actions"; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-inline: 6%; }
1319
1381
  .chapter-title { min-height: 36px; }
1320
1382
  .editor-actions { justify-content: flex-end; flex-wrap: wrap; }
1321
1383
  .chapter-stats { display: none; }
1384
+ .chapter-foreshadow-reminder { grid-template-areas: "summary" "actions" "details"; grid-template-columns: minmax(0, 1fr); padding-inline: 6%; }
1385
+ .chapter-foreshadow-reminder-actions { justify-content: flex-start; flex-wrap: wrap; }
1386
+ .chapter-foreshadow-reminder-details { grid-template-columns: minmax(0, 1fr); }
1322
1387
  }
1323
1388
  .editor-body { display: flex; min-height: 0; flex-direction: column; }
1324
1389
  .chapter-editor-frame { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); flex: 1 1 auto; width: 100%; min-height: 0; margin: 0; overflow: hidden; }
@@ -1415,6 +1480,10 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1415
1480
  .draft-type-filter-field { display: grid; min-width: 0; }
1416
1481
  .draft-type-filter-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1417
1482
  .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; }
1483
+ .setting-filter-toolbar { grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .8fr)) auto; }
1484
+ .setting-filter-field { display: grid; min-width: 0; }
1485
+ .setting-filter-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1486
+ .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; }
1418
1487
  .draft-binding-field { min-width: 0; }
1419
1488
  .draft-binding-field > label { display: grid; gap: 7px; }
1420
1489
  .character-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@@ -1615,13 +1684,13 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1615
1684
  }
1616
1685
  .task-status-badge.is-running .task-status-indicator::after { animation: task-status-running-ripple 1.8s ease-out infinite; }
1617
1686
  .task-status-badge.is-review, .task-status-badge.is-completed { --task-status-color: var(--green); }
1618
- .task-status-badge.is-partial { --task-status-color: var(--accent); }
1687
+ .task-status-badge.is-partial, .task-status-badge.is-failed { --task-status-color: var(--accent); }
1619
1688
  .task-status-badge.is-expired { --task-status-color: color-mix(in srgb, var(--muted) 72%, var(--accent)); border-style: dashed; }
1620
1689
  .task-status-badge.is-cancelled, .task-status-badge.is-unknown { --task-status-color: var(--muted); }
1621
1690
  .task-status-badge.is-cancelled .task-status-indicator, .task-status-badge.is-unknown .task-status-indicator { background: transparent; border: 1px solid currentColor; box-shadow: none; }
1622
1691
  .task-status-badge.is-state-change { animation: task-status-enter .42s cubic-bezier(.22, .8, .32, 1) both; }
1623
1692
  .task-status-badge.is-running.is-state-change { animation: task-status-enter .42s cubic-bezier(.22, .8, .32, 1) both, task-status-running-breathe 1.8s ease-in-out .42s infinite; }
1624
- .task-status-badge.is-partial.is-state-change { animation: task-status-attention .46s ease-out both; }
1693
+ .task-status-badge.is-partial.is-state-change, .task-status-badge.is-failed.is-state-change { animation: task-status-attention .46s ease-out both; }
1625
1694
  .task-progress-cell { width: 128px; }
1626
1695
  .task-progress { display: grid; grid-template-columns: 36px minmax(58px, 1fr); align-items: center; gap: 8px; min-width: 102px; }
1627
1696
  .task-progress-value { color: var(--ink); font-family: var(--font-latin), monospace; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; }
@@ -1629,7 +1698,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1629
1698
  .task-progress-fill { position: relative; display: block; width: var(--task-progress); height: 100%; overflow: hidden; border-radius: inherit; background: var(--muted); transition: width .35s ease; }
1630
1699
  .task-progress.is-running .task-progress-fill { background: var(--task-running); }
1631
1700
  .task-progress.is-review .task-progress-fill, .task-progress.is-completed .task-progress-fill { background: var(--green); }
1632
- .task-progress.is-partial .task-progress-fill { background: var(--accent); }
1701
+ .task-progress.is-partial .task-progress-fill, .task-progress.is-failed .task-progress-fill { background: var(--accent); }
1633
1702
  .task-progress.is-running .task-progress-fill::after {
1634
1703
  content: "";
1635
1704
  position: absolute;
@@ -1700,6 +1769,46 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1700
1769
  .relationship-change-preview.is-discarded { color: var(--muted); }
1701
1770
  .relationship-change-preview-warning { padding: 8px 10px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--ink); }
1702
1771
  .relationship-change-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
1772
+ .character-extraction-preview { display: grid; gap: 11px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
1773
+ .character-extraction-preview > div:first-child { display: grid; gap: 3px; }
1774
+ .character-extraction-preview h4 { margin: 0; font-size: 14px; }
1775
+ .character-extraction-preview small { color: var(--muted); }
1776
+ .character-extraction-preview.is-pending { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
1777
+ .character-extraction-preview.is-applied { border-color: color-mix(in srgb, var(--green) 46%, var(--line)); }
1778
+ .character-extraction-preview-actions, .character-extraction-apply-actions, .character-extraction-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
1779
+ .character-extraction-loading, .character-extraction-empty { padding: 10px; border: 1px dashed var(--line); border-radius: 5px; color: var(--muted); }
1780
+ .character-extraction-editor { display: grid; gap: 10px; min-width: 0; padding-top: 2px; }
1781
+ .character-extraction-policy { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; padding: 9px 10px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
1782
+ .character-extraction-policy strong { color: var(--ink); }
1783
+ .character-extraction-policy span { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
1784
+ .character-extraction-editor-toolbar { justify-content: flex-end; }
1785
+ .character-extraction-editor-toolbar > span { margin-right: auto; color: var(--accent-dark); font-weight: 600; }
1786
+ .character-extraction-editor-toolbar button { padding: 6px 9px; font-size: 9px; }
1787
+ .character-extraction-candidate-list { display: grid; gap: 9px; min-width: 0; }
1788
+ .character-extraction-candidate { display: grid; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); transition: opacity .15s ease, border-color .15s ease; }
1789
+ .character-extraction-candidate.is-skipped { opacity: .7; }
1790
+ .character-extraction-candidate > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
1791
+ .character-extraction-candidate > header > div { display: grid; gap: 1px; min-width: 0; }
1792
+ .character-extraction-candidate > header strong { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
1793
+ .character-extraction-candidate > header small { color: var(--muted); }
1794
+ .character-extraction-candidate-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 9px; white-space: nowrap; }
1795
+ .character-extraction-candidate-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
1796
+ .character-extraction-candidate-toggle input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1797
+ .character-extraction-strategy { padding: 3px 7px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-dark); font-size: 9px; white-space: nowrap; }
1798
+ .character-extraction-candidate-note { padding: 7px 8px; border-radius: 4px; background: var(--surface); color: var(--muted); overflow-wrap: anywhere; }
1799
+ .character-extraction-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 11px; min-width: 0; }
1800
+ .character-extraction-fields > label { display: grid; align-content: start; gap: 5px; min-width: 0; color: var(--muted); font-size: 9px; }
1801
+ .character-extraction-fields input, .character-extraction-fields select, .character-extraction-fields textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 11px; }
1802
+ .character-extraction-fields textarea { resize: vertical; line-height: 1.55; }
1803
+ .character-extraction-fields input:focus-visible, .character-extraction-fields select:focus-visible, .character-extraction-fields textarea:focus-visible { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent); outline-offset: 1px; }
1804
+ .character-extraction-fields .character-extraction-wide-field { grid-column: 1 / -1; }
1805
+ .character-extraction-candidate details { border-top: 1px solid var(--line); padding-top: 7px; }
1806
+ .character-extraction-candidate summary { width: fit-content; cursor: pointer; color: var(--accent-dark); font-size: 9px; }
1807
+ .character-extraction-candidate details p { display: grid; gap: 3px; margin-top: 7px; }
1808
+ .character-extraction-candidate details q { color: var(--ink); overflow-wrap: anywhere; }
1809
+ .character-extraction-apply-error { padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 5px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent-dark); overflow-wrap: anywhere; }
1810
+ .character-extraction-apply-actions { padding-top: 2px; }
1811
+ .character-extraction-apply-actions small { flex: 1 1 260px; }
1703
1812
  .task-result-section { display: grid; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
1704
1813
  .task-result-section h4 { margin: 0 0 2px; color: var(--ink); font-size: 13px; }
1705
1814
  .task-result-section code { overflow-wrap: anywhere; }
@@ -1963,7 +2072,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
1963
2072
  .mind-edge-detail { position: absolute; z-index: 5; left: 16px; right: 16px; bottom: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-strong); box-shadow: var(--shadow); font-size: 11px; }
1964
2073
  .mind-edge-detail b { white-space: nowrap; }.mind-edge-detail span { color: var(--muted); line-height: 1.55; }
1965
2074
  .relationship-empty-note { margin-top: -12px; padding: 12px 14px; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
1966
- .relationship-map-dialog { position: relative; width: min(1400px, 96vw); max-width: none; height: min(900px, 92vh); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
2075
+ .relationship-map-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: var(--panel); box-shadow: none; }
1967
2076
  .relationship-map-dialog::backdrop { background: rgba(34,30,25,.52); backdrop-filter: blur(3px); }
1968
2077
  .relationship-map-floating-close { position: absolute; z-index: 12; top: 25px; right: 25px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-strong); color: var(--ink); font-size: 20px; }
1969
2078
  .relationship-map-expanded-host { height: 100%; padding: 18px; }
@@ -2187,6 +2296,60 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2187
2296
  .outline-list { display: grid; gap: 8px; }.outline-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(130px, 1fr)) auto; gap: 16px; align-items: start; padding: 15px; border: 1px solid var(--line); background: var(--surface-soft); }
2188
2297
  .outline-row small { color: var(--accent); font-size: 9px; }.outline-row h3 { margin: 4px 0 0; font-size: 14px; }.outline-row b { font-size: 10px; }.outline-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; white-space: pre-wrap; }
2189
2298
  .outline-row.is-complete { opacity: .66; }.outline-actions { display: grid; gap: 7px; justify-items: end; }.outline-actions span { color: var(--accent); font-size: 9px; }.outline-actions button { border: 1px solid var(--line); background: transparent; border-radius: 3px; padding: 5px 8px; font-size: 9px; }
2299
+ .outline-board-filter-toolbar { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); align-items: end; }
2300
+ .outline-board-filter-toolbar .outline-board-search-field { grid-column: span 2; }
2301
+ .outline-board-filter-toolbar .character-filter-toolbar-actions { grid-column: 1 / -1; }
2302
+ .outline-board-filter-toolbar input, .outline-board-filter-toolbar select { min-height: 38px; }
2303
+ .outline-board-result-note { align-self: end; color: var(--muted); font-size: 10px; white-space: nowrap; }
2304
+ .outline-board { display: grid; gap: 28px; min-width: 0; }
2305
+ .outline-board-volume { min-width: 0; }
2306
+ .outline-board-volume > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
2307
+ .outline-board-volume > header h3 { margin: 2px 0 0; color: var(--ink); font-size: 17px; font-weight: 600; }
2308
+ .outline-board-volume > header > span { color: var(--muted); font-family: var(--font-latin), monospace; font-size: 10px; }
2309
+ .outline-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 286px), 1fr)); gap: 12px; min-width: 0; }
2310
+ .outline-board-card { display: grid; min-width: 0; min-height: 300px; grid-template-rows: auto auto 1fr auto auto; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
2311
+ .outline-board-card[role="link"] { cursor: pointer; }
2312
+ .outline-board-card:hover { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: color-mix(in srgb, var(--accent) 3%, var(--surface-soft)); }
2313
+ .outline-board-card:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
2314
+ .outline-board-card.is-empty-outline { border-style: dashed; }
2315
+ .outline-board-card.is-complete { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
2316
+ .outline-board-card > header { display: flex; align-items: start; justify-content: space-between; gap: 10px; min-width: 0; }
2317
+ .outline-board-card > header > div { min-width: 0; }
2318
+ .outline-board-card > header small { color: var(--accent); font-size: 9px; letter-spacing: .08em; }
2319
+ .outline-board-card > header h3 { overflow-wrap: anywhere; margin: 4px 0 0; color: var(--ink); font-size: 15px; line-height: 1.35; }
2320
+ .outline-board-unresolved { flex: 0 0 auto; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent-dark); font-size: 9px; white-space: nowrap; }
2321
+ .outline-board-card-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; min-width: 0; }
2322
+ .outline-board-card-summary section { min-width: 0; padding: 9px; border-left: 2px solid var(--line-strong); background: var(--surface); }
2323
+ .outline-board-card-summary b { color: var(--ink); font-size: 9px; }
2324
+ .outline-board-card-summary p { display: -webkit-box; overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
2325
+ .outline-board-foreshadows { display: flex; align-content: start; flex-wrap: wrap; gap: 6px; min-width: 0; }
2326
+ .outline-board-foreshadow { display: inline-grid; min-width: 0; max-width: 100%; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
2327
+ .outline-board-foreshadow strong { overflow: hidden; color: var(--ink); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
2328
+ .outline-board-foreshadow small { overflow-wrap: anywhere; color: var(--muted); font-size: 8px; line-height: 1.35; }
2329
+ .outline-board-foreshadow[data-status="planned"], .outline-board-foreshadow[data-status="planted"] { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
2330
+ .outline-board-foreshadow[data-status="resolved"] { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
2331
+ .outline-board-no-foreshadow { align-self: start; color: var(--muted); font-size: 9px; }
2332
+ .outline-board-truncated { color: var(--muted); font-size: 8px; }
2333
+ .outline-board-card-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
2334
+ .outline-board-card-actions button { min-height: 30px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; }
2335
+ .outline-board-card-actions button:hover, .outline-board-card-actions button:focus-visible { border-color: var(--accent); color: var(--accent-dark); outline: none; }
2336
+ .outline-board-volume-empty { display: grid; gap: 4px; padding: 22px 16px; border: 1px dashed var(--line); background: var(--surface-soft); text-align: center; }
2337
+ .outline-board-volume-empty b { color: var(--ink); font-size: 11px; }
2338
+ .outline-board-volume-empty span { color: var(--muted); font-size: 9px; }
2339
+ .outline-foreshadow-library { padding-top: 34px; border-top: 1px solid var(--line); }
2340
+ .outline-board-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
2341
+ .outline-board-detail-field { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); }
2342
+ .outline-board-detail-field h3, .outline-board-detail-section h3 { margin: 0; color: var(--ink); font-size: 11px; }
2343
+ .outline-board-detail-field p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
2344
+ .outline-board-detail-section { display: grid; gap: 10px; padding-top: 16px; }
2345
+ .outline-board-detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
2346
+ .outline-board-detail-section > header span { color: var(--muted); font-size: 9px; }
2347
+ .outline-board-detail-foreshadows { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
2348
+ .outline-board-detail-foreshadows li { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-soft); }
2349
+ .outline-board-detail-foreshadows strong { overflow-wrap: anywhere; color: var(--ink); font-size: 10px; }
2350
+ .outline-board-detail-foreshadows span, .outline-board-detail-empty, .outline-board-detail-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
2351
+ .outline-board-detail-note { padding: 8px 10px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
2352
+ .outline-board-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 8px; }
2190
2353
 
2191
2354
  .galaxy-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #05070d; color: #eef6ff; }
2192
2355
  .galaxy-dialog::backdrop { background: #05070d; }.galaxy-shell { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none; background: #05070d; cursor: grab; contain: strict; }
@@ -2245,11 +2408,14 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2245
2408
  .status-dot.is-error { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
2246
2409
  .ai-history-dialog-body { min-height: min(360px, 55vh); max-height: 65vh; overflow-y: auto; padding: 18px 24px 24px; }
2247
2410
  .ai-history-list { display: grid; gap: 8px; }
2411
+ .ai-history-row { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 7px; min-width: 0; }
2248
2412
  .ai-history-item { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); text-align: left; }
2249
2413
  .ai-history-item:hover { border-color: var(--accent); background: var(--paper-deep); }
2250
2414
  .ai-history-item.is-active { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); background: var(--row-active); box-shadow: inset 3px 0 var(--accent); }
2251
2415
  .ai-history-item strong, .ai-history-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2252
2416
  .ai-history-item strong { font-size: 14px; font-weight: 600; }.ai-history-item small { color: var(--muted); font-size: 10px; }
2417
+ .ai-history-more { align-self: stretch; width: 38px; min-width: 38px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--muted); font: 17px/1 var(--font-latin), monospace; letter-spacing: 1px; }
2418
+ .ai-history-more:hover, .ai-history-more:focus-visible, .ai-history-more[aria-expanded="true"] { border-color: var(--accent); background: var(--paper-deep); color: var(--accent-dark); }
2253
2419
  .ai-history-empty { margin: 0; padding: 48px 12px; color: var(--muted); font-size: 12px; text-align: center; }
2254
2420
  .field-label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; margin: 14px 0 10px; }
2255
2421
  .field-label select { padding: 8px; font-size: 12px; }
@@ -2437,7 +2603,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2437
2603
  .prompt-composer { position: relative; }
2438
2604
  .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); }
2439
2605
  .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; }
2440
- .ai-mention-option:hover, .ai-mention-option:focus-visible { background: var(--paper-deep); }
2606
+ .ai-mention-option:hover, .ai-mention-option:focus-visible, .ai-mention-option.is-active { background: var(--paper-deep); }
2441
2607
  .ai-mention-option small { color: var(--accent); font-size: 8px; }
2442
2608
  .ai-mention-option strong { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
2443
2609
  .ai-mention-empty { margin: 0; padding: 10px; color: var(--muted); font-size: 10px; text-align: center; }
@@ -2487,6 +2653,9 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2487
2653
  .ai-citation-card pre { display: none; grid-column: 1 / -1; max-height: 160px; overflow: auto; margin: 0; padding: 9px; border-top: 1px solid var(--line); background: var(--surface); font: 10px/1.55 var(--font-cjk), sans-serif; white-space: pre-wrap; }
2488
2654
  .ai-citation-card.is-expanded pre { display: block; }
2489
2655
  .message-citations { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }.message-citations span { padding: 3px 6px; border: 1px solid currentColor; border-radius: 10px; font-size: 8px; opacity: .75; }
2656
+ .user-message-mentions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; margin-top: 8px; padding-top: 7px; border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent); font-size: 8px; line-height: 1.4; }
2657
+ .user-message-mentions-label { flex: 0 0 auto; opacity: .72; letter-spacing: .08em; }
2658
+ .user-message-mention { min-width: 0; max-width: 100%; padding: 2px 6px; overflow-wrap: anywhere; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); }
2490
2659
 
2491
2660
  /* Toast 使用 Popover Top Layer;必须覆盖 UA 默认居中/系统边框/Canvas 背景 */
2492
2661
  .toast-region,
@@ -2531,6 +2700,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2531
2700
  background: var(--toast-error-bg);
2532
2701
  color: var(--toast-error-fg);
2533
2702
  }
2703
+ .toast.warning { border-color: color-mix(in srgb, #f0bd78 42%, transparent); background: #65451f; color: #fff7e8; }
2534
2704
  .toast-confirmation {
2535
2705
  display: grid;
2536
2706
  gap: 8px;
@@ -2593,6 +2763,13 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2593
2763
  .manuscript-export-menu button:hover, .manuscript-export-menu button:focus-visible { background: var(--paper-deep); color: var(--accent-dark); outline: 0; }
2594
2764
  .manuscript-export-menu button span { font-size: 11px; font-weight: 600; }
2595
2765
  .manuscript-export-menu button small { color: var(--muted); font-size: 9px; line-height: 1.45; }
2766
+ .ai-history-action-menu { position: fixed; z-index: 90; display: grid; min-width: 230px; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 14px 38px rgba(49,42,32,.22); }
2767
+ .ai-history-action-menu.hidden { display: none; }
2768
+ .ai-history-action-menu button { display: grid; width: 100%; gap: 2px; padding: 8px 9px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; }
2769
+ .ai-history-action-menu button:hover, .ai-history-action-menu button:focus-visible { background: var(--paper-deep); color: var(--accent-dark); outline: 0; }
2770
+ .ai-history-action-menu button:disabled { cursor: wait; opacity: .6; }
2771
+ .ai-history-action-menu button span { font-size: 11px; font-weight: 600; }
2772
+ .ai-history-action-menu button small { color: var(--muted); font-size: 9px; line-height: 1.45; }
2596
2773
  .chapter-annotations-dialog { width: min(820px, 94vw); }
2597
2774
  .chapter-annotations-list { display: grid; gap: 10px; max-height: 62vh; overflow: auto; padding: 18px 24px; }
2598
2775
  .chapter-comment-module-list { display: grid; gap: 10px; }
@@ -2860,6 +3037,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2860
3037
  .character-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
2861
3038
  .character-filter-toolbar-actions { justify-content: flex-start; }
2862
3039
  .draft-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
3040
+ .setting-filter-toolbar { grid-template-columns: minmax(0, 1fr); }
2863
3041
  }
2864
3042
  .entity-editor-open { overflow: hidden; }
2865
3043
  .preview-record-card { cursor: pointer; }
@@ -2916,6 +3094,16 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
2916
3094
  .editor-dialog .markdown-editor-field .vditor-editor-host.vditor { min-height: clamp(420px, 56dvh, 640px) !important; }
2917
3095
  .vditor-editor-host { width: 100%; height: 100%; min-width: 0; min-height: 0; }
2918
3096
  .vditor-editor-host.vditor { height: 100% !important; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
3097
+ .vditor-editor-host.vditor { position: relative; }
3098
+ .vditor-upload-queue { position: fixed; z-index: 60; right: 12px; bottom: 12px; display: grid; gap: 8px; width: min(360px, calc(100% - 24px)); max-height: min(42vh, 260px); overflow-y: auto; pointer-events: none; }
3099
+ .vditor-upload-queue[hidden] { display: none; }
3100
+ .vditor-upload-placeholder { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; align-items: center; padding: 9px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 5px; background: color-mix(in srgb, var(--surface) 94%, var(--accent)); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 16%, transparent); }
3101
+ .vditor-upload-placeholder .image-upload-placeholder-box { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
3102
+ .vditor-upload-placeholder-copy { display: grid; gap: 4px; min-width: 0; }
3103
+ .vditor-upload-placeholder-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
3104
+ .vditor-upload-placeholder-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
3105
+ .vditor-upload-placeholder.is-complete { border-color: color-mix(in srgb, var(--green) 48%, var(--line)); }
3106
+ .vditor-upload-placeholder.is-failed { border-color: color-mix(in srgb, var(--accent) 68%, var(--line)); }
2919
3107
  .vditor-editor-host.vditor:not(.vditor--dark) { --border-color: var(--line); --panel-background-color: var(--surface); --toolbar-background-color: var(--surface-soft); --toolbar-icon-color: var(--muted); --toolbar-icon-hover-color: var(--accent-dark); --textarea-background-color: var(--surface); --textarea-text-color: var(--ink); --heading-border-color: var(--line); --blockquote-color: var(--muted); }
2920
3108
  .vditor-editor-host.vditor--dark { --border-color: var(--line); --panel-background-color: var(--surface); --toolbar-background-color: var(--surface-soft); --toolbar-icon-color: var(--muted); --toolbar-icon-hover-color: var(--accent); --textarea-background-color: var(--surface); --textarea-text-color: var(--ink); --heading-border-color: var(--line); --blockquote-color: var(--muted); }
2921
3109
  .vditor-editor-host .vditor-toolbar { display: flex; align-items: center; flex: 0 0 auto; }
@@ -3093,6 +3281,28 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3093
3281
  .versions-list { padding: 18px 24px 28px; max-height: 65vh; overflow: auto; }
3094
3282
  .version-row { display: grid; grid-template-columns: 75px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
3095
3283
  .version-row p { margin: 0; color: var(--muted); font-size: 11px; white-space: pre-wrap; max-height: 70px; overflow: hidden; }
3284
+ .chapter-version-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; padding: 18px 24px 10px; }
3285
+ .chapter-version-compare label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 10px; }
3286
+ .chapter-version-compare select { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 11px; }
3287
+ .chapter-version-compare select:focus-visible, .chapter-version-compare button:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: 0; }
3288
+ .chapter-version-compare button { min-height: 36px; white-space: nowrap; }
3289
+ .chapter-version-diff-summary { margin: 0; padding: 4px 24px 10px; color: var(--muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
3290
+ .chapter-version-diff { max-height: 36vh; margin: 0 24px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
3291
+ .chapter-diff-row { display: grid; grid-template-columns: 42px 24px minmax(0, 1fr); min-width: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
3292
+ .chapter-diff-row:last-child { border-bottom: 0; }
3293
+ .chapter-diff-row > * { padding: 6px 8px; }
3294
+ .chapter-diff-row code { min-width: 0; color: var(--ink); font: 10px/1.55 var(--font-latin), var(--font-cjk), monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
3295
+ .chapter-diff-line-number { color: var(--muted); font: 9px/1.7 var(--font-latin), monospace; text-align: right; user-select: none; }
3296
+ .chapter-diff-marker { color: var(--muted); font: 10px/1.55 var(--font-latin), monospace; text-align: center; user-select: none; }
3297
+ .chapter-diff-row.is-added { background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
3298
+ .chapter-diff-row.is-added .chapter-diff-marker { color: var(--green); }
3299
+ .chapter-diff-row.is-deleted { background: color-mix(in srgb, var(--toast-error-fg) 9%, var(--surface)); }
3300
+ .chapter-diff-row.is-deleted .chapter-diff-marker { color: var(--toast-error-fg); }
3301
+ .chapter-diff-row.is-modified { grid-template-rows: auto auto; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
3302
+ .chapter-diff-row.is-modified > :nth-child(n + 4) { border-top: 1px dashed color-mix(in srgb, var(--accent) 24%, var(--line)); }
3303
+ .chapter-diff-row.is-modified > :nth-child(2) { color: var(--toast-error-fg); }
3304
+ .chapter-diff-row.is-modified > :nth-child(5) { color: var(--green); }
3305
+ .chapter-diff-empty { color: var(--muted); font-style: italic; }
3096
3306
  .entity-history-list { display: grid; gap: 10px; padding: 18px 24px 28px; max-height: 65vh; overflow: auto; }
3097
3307
  .import-history-body { min-height: 220px; }
3098
3308
  .import-history-note { margin: 0; padding: 16px 24px 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
@@ -3115,6 +3325,14 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3115
3325
  .entity-version-card > button:disabled { cursor: default; opacity: .68; }
3116
3326
  .entity-version-actions { display: flex; justify-self: end; gap: 7px; }
3117
3327
  .entity-version-actions button { min-height: 30px; padding: 6px 9px; font-size: 9px; }
3328
+ .recycle-bin-list { align-content: start; }
3329
+ .recycle-bin-section { display: grid; gap: 9px; min-width: 0; }
3330
+ .recycle-bin-section + .recycle-bin-section { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
3331
+ .recycle-bin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
3332
+ .recycle-bin-section-heading h3 { margin: 0; color: var(--ink); font-size: 13px; }
3333
+ .recycle-bin-section-heading span { color: var(--muted); font-size: 9px; }
3334
+ .recycle-bin-section-list { display: grid; gap: 10px; min-width: 0; }
3335
+ .recycle-bin-card small { line-height: 1.55; }
3118
3336
  .entity-history-empty { margin: 0; padding: 28px 12px; color: var(--muted); font-size: 11px; text-align: center; }
3119
3337
  .relationship-table .relationship-actions { white-space: nowrap; vertical-align: middle; }
3120
3338
  .relationship-table .relationship-actions button { display: inline-block; min-height: 30px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font: inherit; font-size: 10px; line-height: 1.2; vertical-align: middle; appearance: none; transition: border-color .14s ease, background .14s ease, color .14s ease; }
@@ -3212,6 +3430,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3212
3430
  .avatar-crop-body { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px 4px; }
3213
3431
  .avatar-crop-side { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 10px; padding-top: 0; }
3214
3432
  .avatar-crop-preview { width: 64px; height: 64px; }
3433
+ .image-upload-progress-panel { margin-inline: 16px; }
3215
3434
  .account-settings-form .primary-button { width: 100%; }
3216
3435
  .usage-stat-grid { grid-template-columns: minmax(0, 1fr); }
3217
3436
  .usage-stat { min-height: 104px; }
@@ -3320,7 +3539,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3320
3539
 
3321
3540
  .main-panel {
3322
3541
  grid-column: 1;
3323
- grid-row: 2;
3542
+ grid-row: 2 / -1;
3324
3543
  min-width: 0;
3325
3544
  min-height: 0;
3326
3545
  overflow: hidden;
@@ -3329,13 +3548,14 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3329
3548
  .ai-panel {
3330
3549
  position: fixed;
3331
3550
  z-index: 35;
3551
+ top: max(28dvh, calc(100dvh - 620px), var(--mobile-ai-panel-safe-top, 0px));
3332
3552
  right: 0;
3333
3553
  bottom: 0;
3334
3554
  left: 0;
3335
3555
  grid-column: 1;
3336
3556
  grid-row: 4;
3337
3557
  min-width: 0;
3338
- height: min(72dvh, 620px);
3558
+ height: auto;
3339
3559
  min-height: 0;
3340
3560
  padding: 12px var(--mobile-gutter) 18px;
3341
3561
  border-top: 1px solid var(--line);
@@ -3346,7 +3566,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3346
3566
  }
3347
3567
  .app-shell.shelf-mode .ai-panel { display: none; }
3348
3568
  .ai-panel > .panel-resize-handle { display: none; }
3349
- .app-shell.ai-panel-collapsed .ai-panel { height: 58px; padding-block: 8px; transform: translateY(0); }
3569
+ .app-shell.ai-panel-collapsed .ai-panel { top: auto; height: 58px; padding-block: 8px; transform: translateY(0); }
3350
3570
  .app-shell.ai-panel-collapsed .ai-panel > :not(.ai-heading) { display: none; }
3351
3571
  .app-shell.ai-panel-collapsed .ai-heading { display: flex; justify-content: space-between; padding: 0; }
3352
3572
 
@@ -3356,6 +3576,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3356
3576
  .shelf-header, .module-header { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
3357
3577
  .shelf-header h1 { font-size: clamp(24px, 7.5vw, 32px); }
3358
3578
  .shelf-header .primary-button { align-self: flex-start; min-width: 150px; min-height: 40px; padding: 10px 18px; }
3579
+ .shelf-header-actions { align-self: flex-start; flex-wrap: wrap; }
3359
3580
  .settings-detail-actions { align-items: stretch; flex-direction: column; }
3360
3581
  .settings-detail-actions .primary-button, .settings-detail-actions .settings-parent-button { align-self: stretch; width: 100%; }
3361
3582
  .module-header-actions { width: 100%; }
@@ -3368,6 +3589,11 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3368
3589
  .welcome-grid { grid-template-columns: 1fr; margin-top: 34px; }
3369
3590
 
3370
3591
  .editor-toolbar { padding: 18px var(--mobile-gutter) 14px; }
3592
+ .chapter-foreshadow-reminder { padding: 10px var(--mobile-gutter); }
3593
+ .chapter-foreshadow-reminder-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
3594
+ .chapter-foreshadow-reminder-counter { grid-column: 1 / -1; justify-self: start; }
3595
+ .chapter-foreshadow-reminder-actions button { width: 100%; min-width: 0; min-height: 38px; }
3596
+ .chapter-foreshadow-reminder[data-multiple="true"] #chapter-foreshadow-reminder-resolve { grid-column: span 2; }
3371
3597
  .editor-actions { position: fixed; z-index: 34; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); left: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(300px, 84vw); max-width: none; gap: 6px; padding: 10px; border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px; background: var(--panel); box-shadow: -12px 0 36px rgba(36, 30, 24, .2); transform: translateX(0); transition: transform .2s ease; }
3372
3598
  .app-shell.left-panel-collapsed .editor-actions { transform: translateX(0); pointer-events: auto; }
3373
3599
  .editor-actions .chapter-stats { grid-column: 1 / -1; }
@@ -3403,6 +3629,11 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3403
3629
  .dialog-header h2 { font-size: 20px; }
3404
3630
  .settings-dialog-header-actions { gap: 6px; }
3405
3631
  .dialog-fields, .appearance-grid, .access-dialog-body, .account-settings-body, .versions-list, .entity-history-list, .chapter-annotations-list { padding-inline: 16px; }
3632
+ .chapter-version-compare { grid-template-columns: minmax(0, 1fr); padding-inline: 16px; }
3633
+ .chapter-version-compare button { width: 100%; }
3634
+ .chapter-version-diff-summary { padding-inline: 16px; }
3635
+ .chapter-version-diff { max-height: 32vh; margin-inline: 16px; }
3636
+ .chapter-diff-row { grid-template-columns: 34px 22px minmax(0, 1fr); }
3406
3637
  .replace-dialog-body { padding-inline: 16px; }
3407
3638
  .replace-dialog { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
3408
3639
  .replace-scope-fieldset { grid-template-columns: minmax(0, 1fr); }
@@ -3412,6 +3643,16 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3412
3643
  .task-result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
3413
3644
  .task-result-item-details, .task-result-json-loader { grid-template-columns: minmax(0, 1fr); }
3414
3645
  .task-result-json-loader button { justify-self: start; }
3646
+ .character-extraction-policy, .character-extraction-fields { grid-template-columns: minmax(0, 1fr); }
3647
+ .character-extraction-fields .character-extraction-wide-field { grid-column: 1; }
3648
+ .character-extraction-candidate > header { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
3649
+ .character-extraction-strategy { grid-column: 2; justify-self: start; }
3650
+ .character-extraction-editor-toolbar { align-items: stretch; }
3651
+ .character-extraction-editor-toolbar > span { width: 100%; margin-right: 0; }
3652
+ .character-extraction-editor-toolbar button { flex: 1 1 auto; min-height: 36px; }
3653
+ .character-extraction-apply-actions { align-items: stretch; flex-direction: column; }
3654
+ .character-extraction-apply-actions button { width: 100%; min-height: 40px; }
3655
+ .character-extraction-apply-actions small { flex: 0 0 auto; }
3415
3656
  .task-trace-heading { align-items: start; flex-direction: column; gap: 5px; }
3416
3657
  .task-trace-heading p { text-align: left; }
3417
3658
  .task-trace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@@ -3441,6 +3682,12 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
3441
3682
  .access-row { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
3442
3683
  .access-row select, .access-row button, .work-access-field .ghost-button { width: 100%; }
3443
3684
  .work-access-field { align-items: stretch; flex-direction: column; }
3685
+ .work-access-field .danger-button { width: 100%; }
3686
+
3687
+ .recycle-bin-card { grid-template-columns: minmax(0, 1fr); gap: 7px; }
3688
+ .recycle-bin-card time, .recycle-bin-card p, .recycle-bin-card small, .recycle-bin-card .entity-version-actions { grid-column: 1; justify-self: stretch; }
3689
+ .recycle-bin-card time { justify-self: start; }
3690
+ .recycle-bin-card .entity-version-actions button { flex: 1 1 0; min-height: 40px; }
3444
3691
 
3445
3692
  .entity-editor-view { min-width: 0; }
3446
3693
  .entity-editor-header, .character-editor-header { grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 12px var(--mobile-gutter); }
@@ -3527,7 +3774,7 @@ body { font-size: var(--ui-font-size); }
3527
3774
  .ai-context-distribution-label small, .ai-context-distribution-label strong { font-size: calc(9px * var(--ai-font-scale)); }
3528
3775
  .ai-send-button { font-size: calc(10px * var(--ai-font-scale)); }
3529
3776
  .ai-citation-main strong { font-size: calc(10px * var(--ai-font-scale)); }
3530
- .ai-citation-main small, .ai-citation-main span, .message-citations span { font-size: calc(9px * var(--ai-font-scale)); }
3777
+ .ai-citation-main small, .ai-citation-main span, .message-citations span, .user-message-mentions { font-size: calc(9px * var(--ai-font-scale)); }
3531
3778
  .ai-history-item strong { font-size: calc(14px * var(--ai-font-scale)); }
3532
3779
  .ai-history-item small { font-size: calc(10px * var(--ai-font-scale)); }
3533
3780
  .ai-tool-call-info dt, .ai-tool-call-detail h3 { font-size: calc(9px * var(--ai-font-scale)); }
@@ -3541,6 +3788,8 @@ body { font-size: var(--ui-font-size); }
3541
3788
 
3542
3789
  @media (max-width: 640px) {
3543
3790
  .s3-backup-body { gap: 14px; padding: 14px 16px 18px; }
3791
+ .s3-backup-encryption-control { align-items: stretch; flex-direction: column; }
3792
+ .s3-backup-encryption-control > .s3-backup-status { width: fit-content; }
3544
3793
  .s3-backup-overview, .s3-backup-history > header { align-items: stretch; flex-direction: column; }
3545
3794
  .s3-backup-overview-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
3546
3795
  .s3-backup-overview-actions button { width: 100%; }
@@ -3553,4 +3802,266 @@ body { font-size: var(--ui-font-size); }
3553
3802
  .s3-backup-run-card details { grid-column: 1 / -1; }
3554
3803
  .s3-backup-target-fields { grid-template-columns: minmax(0, 1fr) !important; padding-inline: 16px !important; }
3555
3804
  .s3-backup-target-fields > * { grid-column: 1 !important; }
3805
+ .s3-backup-key-body { padding-inline: 16px; }
3806
+ .s3-backup-key-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
3807
+ }
3808
+
3809
+ /* 沉浸式阅读预览沿用全屏资料页的遮罩层级,并将显示偏好限制在阅读视图内。 */
3810
+ .reader-open { overflow: hidden; }
3811
+ .reader-view {
3812
+ --reader-bg: #f2eadc;
3813
+ --reader-surface: #fbf6eb;
3814
+ --reader-surface-soft: rgba(255, 252, 244, .9);
3815
+ --reader-ink: #2e2922;
3816
+ --reader-muted: #766d60;
3817
+ --reader-line: #d8cbb9;
3818
+ --reader-accent: #7c3d2d;
3819
+ --reader-page-gap: clamp(32px, 5vw, 72px);
3820
+ position: fixed;
3821
+ z-index: 760;
3822
+ inset: 0;
3823
+ display: grid;
3824
+ grid-template-rows: auto minmax(0, 1fr) auto;
3825
+ min-width: 0;
3826
+ min-height: 0;
3827
+ overflow: hidden;
3828
+ background: var(--reader-bg);
3829
+ color: var(--reader-ink);
3830
+ }
3831
+ .reader-view[data-reader-theme="light"] {
3832
+ --reader-bg: #f8f8f6;
3833
+ --reader-surface: #fff;
3834
+ --reader-surface-soft: rgba(255, 255, 255, .94);
3835
+ --reader-ink: #242424;
3836
+ --reader-muted: #6a6a66;
3837
+ --reader-line: #d8d8d3;
3838
+ --reader-accent: #71392b;
3839
+ }
3840
+ .reader-view[data-reader-theme="dark"] {
3841
+ --reader-bg: #17191c;
3842
+ --reader-surface: #202328;
3843
+ --reader-surface-soft: rgba(32, 35, 40, .95);
3844
+ --reader-ink: #e7e3db;
3845
+ --reader-muted: #aaa49a;
3846
+ --reader-line: #3a3e45;
3847
+ --reader-accent: #d49a85;
3848
+ color-scheme: dark;
3556
3849
  }
3850
+ .reader-view.hidden { display: none; }
3851
+ .reader-view .eyebrow { color: var(--reader-accent); }
3852
+ .reader-view button,
3853
+ .reader-view select {
3854
+ border-color: var(--reader-line);
3855
+ background: transparent;
3856
+ color: var(--reader-ink);
3857
+ }
3858
+ .reader-view button:hover,
3859
+ .reader-view button:focus-visible,
3860
+ .reader-view select:focus-visible,
3861
+ .reader-settings > summary:focus-visible {
3862
+ border-color: var(--reader-accent);
3863
+ outline: 2px solid color-mix(in srgb, var(--reader-accent) 35%, transparent);
3864
+ outline-offset: 2px;
3865
+ }
3866
+ .reader-view .primary-button { border-color: var(--reader-accent); background: var(--reader-accent); color: var(--reader-surface); }
3867
+ .reader-header {
3868
+ position: relative;
3869
+ z-index: 3;
3870
+ display: grid;
3871
+ grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr) minmax(150px, 1fr);
3872
+ align-items: center;
3873
+ gap: 12px 24px;
3874
+ padding: 13px clamp(16px, 3vw, 42px) 12px;
3875
+ border-bottom: 1px solid var(--reader-line);
3876
+ background: var(--reader-surface-soft);
3877
+ backdrop-filter: blur(16px);
3878
+ }
3879
+ .reader-header > .entity-editor-back { color: var(--reader-muted); }
3880
+ .reader-heading { min-width: 0; text-align: center; }
3881
+ .reader-heading .eyebrow { margin-bottom: 3px; }
3882
+ .reader-heading h1 { overflow: hidden; margin: 0; font-size: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
3883
+ .reader-settings { position: relative; justify-self: end; }
3884
+ .reader-settings > summary {
3885
+ min-height: 36px;
3886
+ padding: 8px 12px;
3887
+ border: 1px solid var(--reader-line);
3888
+ border-radius: 4px;
3889
+ color: var(--reader-muted);
3890
+ font-size: 11px;
3891
+ list-style: none;
3892
+ cursor: pointer;
3893
+ }
3894
+ .reader-settings > summary::-webkit-details-marker { display: none; }
3895
+ .reader-settings[open] > summary { border-color: var(--reader-accent); color: var(--reader-accent); }
3896
+ .reader-settings-panel {
3897
+ position: absolute;
3898
+ top: calc(100% + 9px);
3899
+ right: 0;
3900
+ display: grid;
3901
+ width: 240px;
3902
+ gap: 10px;
3903
+ padding: 14px;
3904
+ border: 1px solid var(--reader-line);
3905
+ border-radius: 7px;
3906
+ background: var(--reader-surface);
3907
+ box-shadow: 0 18px 44px rgba(20, 18, 15, .2);
3908
+ }
3909
+ .reader-settings-panel label,
3910
+ .reader-jump-controls label { display: grid; min-width: 0; gap: 4px; color: var(--reader-muted); font-size: 9px; }
3911
+ .reader-settings-panel select,
3912
+ .reader-jump-controls select {
3913
+ width: 100%;
3914
+ min-width: 0;
3915
+ min-height: 34px;
3916
+ padding: 6px 28px 6px 9px;
3917
+ border: 1px solid var(--reader-line);
3918
+ border-radius: 4px;
3919
+ background-color: var(--reader-surface);
3920
+ font-size: 11px;
3921
+ text-overflow: ellipsis;
3922
+ }
3923
+ .reader-jump-controls {
3924
+ grid-column: 1 / -1;
3925
+ display: grid;
3926
+ grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.7fr) minmax(130px, .7fr);
3927
+ gap: 10px;
3928
+ width: min(920px, 100%);
3929
+ margin: 0 auto;
3930
+ }
3931
+ .reader-viewport {
3932
+ position: relative;
3933
+ min-width: 0;
3934
+ min-height: 0;
3935
+ overflow-x: hidden;
3936
+ overflow-y: auto;
3937
+ overscroll-behavior: contain;
3938
+ scroll-behavior: smooth;
3939
+ scrollbar-gutter: stable;
3940
+ }
3941
+ .reader-viewport:focus { outline: none; }
3942
+ .reader-viewport:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--reader-accent) 55%, transparent); }
3943
+ .reader-document {
3944
+ box-sizing: border-box;
3945
+ width: min(820px, calc(100% - 32px));
3946
+ min-height: 100%;
3947
+ margin: 0 auto;
3948
+ padding: clamp(42px, 7vh, 76px) clamp(18px, 5vw, 64px) 72px;
3949
+ background: var(--reader-surface);
3950
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--reader-line) 78%, transparent);
3951
+ contain: layout paint style;
3952
+ }
3953
+ .reader-chapter-header { margin: 0 0 clamp(34px, 5vh, 54px); text-align: center; }
3954
+ .reader-chapter-header h2 { margin: 0; color: var(--reader-ink); font-size: clamp(24px, 3vw, 34px); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
3955
+ .reader-chapter-header p { margin: 10px 0 0; color: var(--reader-muted); font-size: 10px; }
3956
+ .reader-page-shell { min-width: 0; }
3957
+ .reader-content {
3958
+ color: var(--reader-ink);
3959
+ font-family: var(--font-cjk), var(--font-latin), sans-serif;
3960
+ font-size: var(--reader-font-size, 20px);
3961
+ line-height: var(--reader-line-height, 1.9);
3962
+ letter-spacing: .025em;
3963
+ overflow-wrap: anywhere;
3964
+ text-align: justify;
3965
+ text-justify: inter-ideograph;
3966
+ }
3967
+ .reader-content p { margin: 0 0 1em; text-indent: 2em; }
3968
+ .reader-content p:last-child { margin-bottom: 0; }
3969
+ .reader-content .reader-empty,
3970
+ .reader-content .reader-loading,
3971
+ .reader-content .reader-error { text-align: center; text-indent: 0; }
3972
+ .reader-content .reader-empty,
3973
+ .reader-content .reader-loading { color: var(--reader-muted); }
3974
+ .reader-content .reader-error { display: grid; justify-items: center; gap: 12px; color: var(--reader-accent); }
3975
+ .reader-content .reader-error button { min-height: 36px; padding: 8px 13px; border: 1px solid var(--reader-line); border-radius: 4px; }
3976
+ .reader-continuation { display: flex; justify-content: center; margin-top: 54px; }
3977
+ .reader-continuation button { min-width: 150px; color: var(--reader-muted); }
3978
+ .reader-viewport.is-paged { overflow: hidden; scroll-behavior: auto; }
3979
+ .reader-viewport.is-paged .reader-document {
3980
+ display: grid;
3981
+ grid-template-rows: auto minmax(0, 1fr);
3982
+ width: min(1120px, calc(100% - 32px));
3983
+ height: 100%;
3984
+ min-height: 0;
3985
+ padding: clamp(26px, 4vh, 44px) clamp(18px, 5vw, 62px) clamp(24px, 4vh, 42px);
3986
+ overflow: hidden;
3987
+ }
3988
+ .reader-viewport.is-paged .reader-chapter-header { margin-bottom: clamp(18px, 3vh, 30px); }
3989
+ .reader-viewport.is-paged .reader-chapter-header h2 { font-size: clamp(22px, 2.6vw, 30px); }
3990
+ .reader-viewport.is-paged .reader-page-shell { min-height: 0; overflow: hidden; }
3991
+ .reader-viewport.is-paged .reader-content {
3992
+ width: var(--reader-page-width, 600px);
3993
+ height: var(--reader-page-height, 400px);
3994
+ column-gap: var(--reader-page-gap);
3995
+ column-width: var(--reader-page-width, 600px);
3996
+ column-fill: auto;
3997
+ will-change: transform;
3998
+ transition: transform .18s ease;
3999
+ }
4000
+ .reader-viewport.is-paged .reader-continuation { display: none; }
4001
+ .reader-footer {
4002
+ position: relative;
4003
+ z-index: 2;
4004
+ display: grid;
4005
+ grid-template-columns: minmax(110px, 1fr) minmax(180px, 2fr) minmax(110px, 1fr);
4006
+ align-items: center;
4007
+ gap: 16px;
4008
+ min-height: 66px;
4009
+ padding: 10px clamp(16px, 3vw, 42px) calc(10px + env(safe-area-inset-bottom));
4010
+ border-top: 1px solid var(--reader-line);
4011
+ background: var(--reader-surface-soft);
4012
+ }
4013
+ .reader-footer > button:first-child { justify-self: start; }
4014
+ .reader-footer > button:last-child { justify-self: end; }
4015
+ .reader-footer-status { display: grid; gap: 3px; color: var(--reader-muted); text-align: center; }
4016
+ .reader-page-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
4017
+ .reader-page-actions button { display: grid; min-width: 30px; min-height: 28px; padding: 0; place-items: center; border: 1px solid var(--reader-line); border-radius: 50%; font-size: 18px; line-height: 1; }
4018
+ .reader-footer strong { color: var(--reader-ink); font-size: 11px; font-weight: 600; white-space: nowrap; }
4019
+ .reader-footer small { font-size: 9px; }
4020
+ .reader-footer > button { min-width: 104px; min-height: 38px; }
4021
+
4022
+ @media (max-width: 700px) {
4023
+ .reader-view { grid-template-rows: auto minmax(0, 1fr) auto; }
4024
+ .reader-header {
4025
+ grid-template-columns: minmax(0, 1fr) auto;
4026
+ gap: 10px;
4027
+ padding: 10px 12px;
4028
+ }
4029
+ .reader-header > .entity-editor-back { grid-column: 1; grid-row: 1; min-width: 0; width: fit-content; min-height: 40px; padding: 6px 9px; }
4030
+ .reader-heading { grid-column: 1 / -1; grid-row: 2; }
4031
+ .reader-heading .eyebrow { display: none; }
4032
+ .reader-heading h1 { font-size: 17px; }
4033
+ .reader-settings { grid-column: 2; grid-row: 1; }
4034
+ .reader-settings > summary { min-height: 40px; }
4035
+ .reader-settings > summary { padding: 7px 10px; }
4036
+ .reader-settings-panel { width: min(250px, calc(100vw - 24px)); }
4037
+ .reader-jump-controls { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 7px; }
4038
+ .reader-jump-controls label:last-child { grid-column: 1 / -1; }
4039
+ .reader-settings-panel select, .reader-jump-controls select { min-height: 40px; font-size: 10px; }
4040
+ .reader-document { width: 100%; padding: 34px 20px 58px; border: 0; box-shadow: none; }
4041
+ .reader-chapter-header { margin-bottom: 30px; }
4042
+ .reader-chapter-header h2 { font-size: 24px; }
4043
+ .reader-content { text-align: left; }
4044
+ .reader-viewport.is-paged .reader-document { width: 100%; padding: 22px 20px 20px; }
4045
+ .reader-viewport.is-paged .reader-chapter-header { margin-bottom: 14px; }
4046
+ .reader-viewport.is-paged .reader-chapter-header h2 { font-size: 21px; }
4047
+ .reader-footer { grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; min-height: 66px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); }
4048
+ .reader-footer-status, .reader-page-actions { min-width: 0; }
4049
+ .reader-page-actions { gap: 4px; }
4050
+ .reader-page-actions button { flex: 0 0 40px; min-width: 40px; min-height: 40px; }
4051
+ .reader-footer strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
4052
+ .reader-footer > button { min-width: 0; min-height: 40px; padding-inline: 8px; }
4053
+ .reader-footer small { display: none; }
4054
+ }
4055
+
4056
+ @media (max-width: 850px) {
4057
+ .module-header-actions > [data-module-header-action="outline-board-filter-toggle"] { flex: 0 0 36px; }
4058
+ .outline-board-card { min-height: 0; }
4059
+ }
4060
+
4061
+ @media (max-width: 560px) {
4062
+ .outline-board-filter-toolbar .outline-board-search-field { grid-column: auto; }
4063
+ .outline-summary { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
4064
+ .outline-board-card-summary, .outline-board-detail-grid { grid-template-columns: minmax(0, 1fr); }
4065
+ .outline-board-volume > header, #outline-board-results .section-title { align-items: flex-start; flex-direction: column; }
4066
+ .outline-board-result-note { align-self: start; }
4067
+ .outline-board-card-actions button, .outline-board-detail-actions button { flex: 1 1 120px; min-height: 38px; }