castle-web-cli 0.4.198 → 0.4.200

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 (46) hide show
  1. package/dist/castle-host/host.js +22 -0
  2. package/dist/init.js +1 -1
  3. package/dist/serve.js +3 -0
  4. package/dist/shell/assets/{index-B9lbHsWz.js → index-DJSLmPmw.js} +3 -3
  5. package/dist/shell/assets/index-uXcYGwQC.css +1 -0
  6. package/dist/shell/index.html +2 -2
  7. package/kits/base/CLAUDE.md +1 -1
  8. package/kits/base/castle.json +1 -1
  9. package/kits/base/package-lock.json +1 -1
  10. package/kits/base/sdk/README.md +48 -18
  11. package/kits/base/sdk/castle.d.ts +2 -0
  12. package/kits/base/sdk/castle.js +1 -0
  13. package/kits/base/sdk/commands.d.ts +10 -0
  14. package/kits/base/sdk/paramsRegistry.d.ts +6 -4
  15. package/kits/base/sdk/paramsRegistry.js +28 -11
  16. package/kits/base/sdk/snapshots.d.ts +12 -0
  17. package/kits/base/sdk/snapshots.js +128 -0
  18. package/kits/base/sdk/transport.js +1 -0
  19. package/kits/multiplayer-2d/castle.json +4 -4
  20. package/kits/multiplayer-2d/code/systems/multiplayer.js +48 -12
  21. package/kits/multiplayer-2d/package-lock.json +1 -1
  22. package/kits/multiplayer-3d/castle.json +5 -5
  23. package/kits/multiplayer-3d/code/systems/multiplayer.js +40 -6
  24. package/kits/multiplayer-3d/package-lock.json +1 -1
  25. package/kits/physics-2d/CLAUDE.md +5 -4
  26. package/kits/physics-2d/behaviors/Collider.jsx +3 -3
  27. package/kits/physics-2d/behaviors/Joints.jsx +2 -2
  28. package/kits/physics-2d/castle.json +2 -2
  29. package/kits/physics-2d/editors/SceneEditor.jsx +5 -5
  30. package/kits/physics-2d/editors/pxArtTimeline.jsx +1 -1
  31. package/kits/physics-2d/editors/pxArtTimeline.module.css +73 -73
  32. package/kits/physics-2d/editors/themeEditor.module.css +17 -17
  33. package/kits/physics-2d/engine/castle-tokens.css +64 -0
  34. package/kits/physics-2d/engine/fields/fields.module.css +43 -37
  35. package/kits/physics-2d/engine/ui.jsx +1 -0
  36. package/kits/physics-2d/engine/ui.module.css +262 -288
  37. package/kits/physics-2d/package-lock.json +6 -1
  38. package/kits/physics-3d/behaviors/Player.jsx +12 -3
  39. package/kits/physics-3d/castle.json +3 -3
  40. package/kits/physics-3d/package-lock.json +1 -1
  41. package/kits/real-time/castle.json +2 -2
  42. package/kits/real-time/package-lock.json +1 -1
  43. package/kits/turn-based/castle.json +3 -3
  44. package/kits/turn-based/package-lock.json +1 -1
  45. package/package.json +1 -1
  46. package/dist/shell/assets/index-p8e-uehb.css +0 -1
@@ -6,54 +6,28 @@
6
6
  }
7
7
 
8
8
  :global(:root) {
9
- --castle-font-body:
10
- baltomobile, Balto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
11
- sans-serif;
12
- --castle-font-display: var(--castle-font-body);
13
- --castle-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
14
- --castle-black: #111;
15
- --castle-tap-highlight: #111;
16
- --castle-panel: #080808;
17
- --castle-panel-raised: #101010;
18
- --castle-panel-sunken: #050505;
19
- --castle-border: #444;
20
- --castle-border-soft: #2a2a2a;
21
- --castle-text: #fff;
22
- --castle-text-dim: #888;
23
- --castle-text-muted: #888;
24
- --castle-inspector-bg: #0d0d0d;
25
- --castle-inspector-text: #e6e6e6;
26
- --castle-inspector-muted: #888;
27
- --castle-inspector-border: #2a2a2a;
28
- --castle-inspector-divider: #2a2a2a;
29
- --castle-inspector-input-bg: #161616;
30
- --castle-inspector-button-bg: #0d0d0d;
31
- --castle-workspace-bg: #0a0a0a;
32
- --castle-stage-workspace-bg: #161616;
33
- --castle-sheet-bg: #0d0d0d;
34
- --castle-card: #121213;
35
- --castle-selected: #e6e6e6;
36
- --castle-selected-ink: #111;
37
- --castle-danger: #ff5d5d;
38
- --castle-ok: #81e69b;
39
- --castle-blue: #8db7ff;
40
- /* Instance-override indicator: label/reset text + a dimmer input border. */
41
- --castle-override: #b388ff;
42
- --castle-override-border: #5b4a80;
43
- --castle-radius: 4px;
9
+ /* Kit-owned semantics with no scale equivalent. --castle-* is the shared
10
+ contract (loaded from castle-tokens.css); these stay kit-local. */
11
+ --kit-selected: #e6e6e6;
12
+ --kit-selected-ink: #111;
13
+ --kit-danger: #ff5d5d;
14
+ --kit-ok: #81e69b;
15
+ --kit-blue: #8db7ff;
16
+ --kit-stage-workspace-bg: #161616;
17
+ --kit-override: #b388ff;
44
18
  /* Tools/hotbar strip height -- aligned to the inspector "+ Add behavior" row
45
19
  (top+bottom pad + 1px borders + select padding + text line). The text line
46
20
  uses `rem` (root-relative), NOT `em`: the hotbar inherits the 16px body font
47
21
  while the inspector sets font-size:14px, so an `em` here resolved to 20px on
48
22
  the hotbar but only 17.5px inside the inspector -- leaving the Add-behavior
49
23
  row ~2.5px short of the hotbar. `rem` resolves to the same value in both. */
50
- --castle-hotbar-row-pad-y: 12px;
51
- --castle-hotbar-row-h: calc(var(--castle-hotbar-row-pad-y) * 2 + 2px + 10px + 1.25rem);
24
+ --kit-hotbar-row-pad-y: 12px;
25
+ --kit-hotbar-row-h: calc(var(--kit-hotbar-row-pad-y) * 2 + 2px + 10px + 1.25rem);
52
26
  /* Full row height shared by the scene hotbar (.sceneTools + its grid track)
53
27
  and the inspector "+ Add behavior" row, so both bottom borders land on the
54
28
  same y. The +2px matches the Add-behavior row's outer box; it also gives the
55
29
  46px hotbar buttons room to sit fully inside the bar (no bottom clipping). */
56
- --castle-hotbar-row-full: calc(var(--castle-hotbar-row-h) + 2px);
30
+ --kit-hotbar-row-full: calc(var(--kit-hotbar-row-h) + 2px);
57
31
  color-scheme: dark;
58
32
  }
59
33
 
@@ -80,8 +54,8 @@
80
54
 
81
55
  :global(body) {
82
56
  overflow: hidden;
83
- background: var(--castle-workspace-bg);
84
- color: var(--castle-inspector-text);
57
+ background: var(--castle-surface-2);
58
+ color: var(--castle-text-primary);
85
59
  font-family: var(--castle-font-body);
86
60
  -webkit-font-smoothing: antialiased;
87
61
  }
@@ -113,8 +87,8 @@
113
87
  height: 100%;
114
88
  display: flex;
115
89
  flex-direction: column;
116
- background: var(--castle-workspace-bg);
117
- color: var(--castle-inspector-text);
90
+ background: var(--castle-surface-2);
91
+ color: var(--castle-text-primary);
118
92
  }
119
93
 
120
94
  /* Portal target for the active editor's header. `display: contents` lets the
@@ -128,8 +102,8 @@
128
102
  min-height: 0;
129
103
  display: grid;
130
104
  grid-template-columns: 200px 1fr;
131
- background: var(--castle-workspace-bg);
132
- color: var(--castle-inspector-text);
105
+ background: var(--castle-surface-2);
106
+ color: var(--castle-text-primary);
133
107
  }
134
108
 
135
109
  /* Desktop: the files toggle collapses the file-list column. (Never set in
@@ -144,8 +118,8 @@
144
118
 
145
119
  .fileBrowser {
146
120
  min-width: 0;
147
- border-right: 1px solid var(--castle-inspector-divider);
148
- background: var(--castle-workspace-bg);
121
+ border-right: 1px solid var(--castle-border-1);
122
+ background: var(--castle-surface-2);
149
123
  display: flex;
150
124
  flex-direction: column;
151
125
  }
@@ -167,19 +141,19 @@
167
141
  align-items: center;
168
142
  gap: 8px;
169
143
  padding: 10px 12px;
170
- border-bottom: 1px solid var(--castle-inspector-divider);
171
- background: var(--castle-workspace-bg);
144
+ border-bottom: 1px solid var(--castle-border-1);
145
+ background: var(--castle-surface-2);
172
146
  }
173
147
 
174
148
  .editorTitle {
175
- font-family: var(--castle-font-display);
149
+ font-family: var(--castle-font-body);
176
150
  letter-spacing: 0.01em;
177
151
  font-size: 14px;
178
152
  line-height: 1;
179
153
  }
180
154
 
181
155
  .muted {
182
- color: var(--castle-inspector-muted);
156
+ color: var(--castle-text-muted);
183
157
  font-size: 12px;
184
158
  }
185
159
 
@@ -205,7 +179,7 @@
205
179
  .fileDirRow {
206
180
  width: 100%;
207
181
  border: 0;
208
- border-radius: var(--castle-radius);
182
+ border-radius: var(--castle-radius-small);
209
183
  background: transparent;
210
184
  /* Plain opaque gray, NOT color-mix(...transparent): Safari fails to paint a
211
185
  semi-transparent color-mix result until a repaint is forced (opening
@@ -231,8 +205,8 @@
231
205
 
232
206
  .fileRow:hover,
233
207
  .fileDirRow:hover {
234
- background: var(--castle-sheet-bg);
235
- color: var(--castle-inspector-text);
208
+ background: var(--castle-surface-2);
209
+ color: var(--castle-text-primary);
236
210
  }
237
211
 
238
212
  /* Compound `.fileRow.fileRowSelected` so the selected look (full text +
@@ -240,8 +214,8 @@
240
214
  order -- the selected row stays put even while hovered. */
241
215
  .fileRow.fileRowSelected,
242
216
  .fileRow.fileRowSelected:hover {
243
- background: var(--castle-panel-raised);
244
- color: var(--castle-inspector-text);
217
+ background: var(--castle-surface-3);
218
+ color: var(--castle-text-primary);
245
219
  }
246
220
 
247
221
  /* The disclosure caret only appears on folder rows; keep it a shade darker than
@@ -282,17 +256,17 @@
282
256
  max-width: 100%;
283
257
  box-sizing: border-box;
284
258
  padding: 1px 4px;
285
- border: 1px solid var(--castle-border);
259
+ border: 1px solid var(--castle-border-3);
286
260
  border-radius: 5px;
287
- background: var(--castle-panel-raised);
288
- color: var(--castle-text);
261
+ background: var(--castle-surface-3);
262
+ color: var(--castle-text-primary);
289
263
  font: inherit;
290
264
  font-size: 13px;
291
265
  }
292
266
 
293
267
  .fileRenameInput:focus {
294
268
  outline: none;
295
- border-color: var(--castle-text-dim);
269
+ border-color: var(--castle-text-muted);
296
270
  }
297
271
 
298
272
  /* Type-based file icon: muted so the file name stays the visual emphasis. */
@@ -302,7 +276,7 @@
302
276
  display: inline-flex;
303
277
  align-items: center;
304
278
  justify-content: center;
305
- color: var(--castle-inspector-muted);
279
+ color: var(--castle-text-muted);
306
280
  font-size: 14px;
307
281
  }
308
282
 
@@ -313,7 +287,7 @@
313
287
  height: 100%;
314
288
  display: flex;
315
289
  flex-direction: column;
316
- background: var(--castle-sheet-bg);
290
+ background: var(--castle-surface-2);
317
291
  }
318
292
 
319
293
  .editorHeader {
@@ -344,19 +318,19 @@
344
318
  min-height: 0;
345
319
  display: grid;
346
320
  grid-template-columns: minmax(0, 1fr) 280px;
347
- grid-template-rows: var(--castle-hotbar-row-full) minmax(0, 1fr);
321
+ grid-template-rows: var(--kit-hotbar-row-full) minmax(0, 1fr);
348
322
  }
349
323
 
350
324
  .sceneTools {
351
325
  grid-column: 1;
352
326
  grid-row: 1;
353
- height: var(--castle-hotbar-row-full);
327
+ height: var(--kit-hotbar-row-full);
354
328
  min-width: 0;
355
329
  display: flex;
356
330
  align-items: center;
357
331
  padding: 0;
358
- border-bottom: 1px solid var(--castle-inspector-divider);
359
- background: var(--castle-workspace-bg);
332
+ border-bottom: 1px solid var(--castle-border-1);
333
+ background: var(--castle-surface-2);
360
334
  }
361
335
 
362
336
  /* Blueprint hotbar -- left-aligned djinn-style stamp palette. Today it holds a
@@ -386,10 +360,10 @@
386
360
  align-items: center;
387
361
  justify-content: center;
388
362
  padding: 0;
389
- border: 1px solid var(--castle-inspector-border);
390
- border-radius: var(--castle-radius);
391
- background: var(--castle-inspector-button-bg);
392
- color: var(--castle-inspector-text);
363
+ border: 1px solid var(--castle-border-1);
364
+ border-radius: var(--castle-radius-small);
365
+ background: var(--castle-surface-2);
366
+ color: var(--castle-text-primary);
393
367
  cursor: pointer;
394
368
  font-size: 14px;
395
369
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
@@ -411,8 +385,8 @@
411
385
  height: 15px;
412
386
  padding: 0 3px;
413
387
  border-radius: 999px;
414
- background: var(--castle-selected);
415
- color: var(--castle-selected-ink);
388
+ background: var(--kit-selected);
389
+ color: var(--kit-selected-ink);
416
390
  font-size: 10px;
417
391
  font-weight: 700;
418
392
  line-height: 15px;
@@ -421,14 +395,14 @@
421
395
 
422
396
  .bpSlot:hover,
423
397
  .bpActionSlot:hover {
424
- background: var(--castle-inspector-input-bg);
398
+ background: var(--castle-surface-3);
425
399
  }
426
400
 
427
401
  .bpSlotSelected,
428
402
  .bpSlotSelected:hover {
429
- border-color: var(--castle-selected);
430
- box-shadow: 0 0 0 1px var(--castle-selected);
431
- background: var(--castle-inspector-input-bg);
403
+ border-color: var(--kit-selected);
404
+ box-shadow: 0 0 0 1px var(--kit-selected);
405
+ background: var(--castle-surface-3);
432
406
  }
433
407
 
434
408
  /* The blueprint of the currently-selected actor: distinct from a direct
@@ -461,7 +435,7 @@
461
435
 
462
436
  .bpSlotThumb {
463
437
  image-rendering: pixelated;
464
- background: var(--castle-card);
438
+ background: var(--castle-surface-3);
465
439
  object-fit: contain;
466
440
  }
467
441
 
@@ -474,7 +448,7 @@
474
448
  display: inline-flex;
475
449
  align-items: center;
476
450
  justify-content: center;
477
- color: var(--castle-inspector-muted);
451
+ color: var(--castle-text-muted);
478
452
  }
479
453
 
480
454
  /* Wraps the canvas + its name fallback so the two can occupy the same 36px
@@ -510,8 +484,8 @@
510
484
  mid-word ("Undraw / n Hero"), which reads as damage rather than wrapping. */
511
485
  padding: 0;
512
486
  border-radius: 3px;
513
- background: var(--castle-card);
514
- color: var(--castle-inspector-muted);
487
+ background: var(--castle-surface-3);
488
+ color: var(--castle-text-muted);
515
489
  /* Measured, not guessed: at 8px "Undrawn" is 36.7px against a 36px box, so
516
490
  it overflowed by less than a pixel and got broken mid-word ("Undraw / n
517
491
  Hero") even though the name has a space to break at. 7.5px puts a 7-8
@@ -561,7 +535,7 @@
561
535
  display: flex;
562
536
  align-items: center;
563
537
  justify-content: center;
564
- border: 1px dashed var(--castle-text);
538
+ border: 1px dashed var(--castle-text-primary);
565
539
  background: rgb(230 230 230 / 0.08);
566
540
  opacity: 0.7;
567
541
  }
@@ -589,10 +563,10 @@
589
563
  .confirmDialog {
590
564
  width: min(340px, calc(100vw - 32px));
591
565
  padding: 18px;
592
- border: 1px solid var(--castle-border);
566
+ border: 1px solid var(--castle-border-3);
593
567
  border-radius: 10px;
594
- background: var(--castle-panel-raised);
595
- color: var(--castle-text);
568
+ background: var(--castle-surface-3);
569
+ color: var(--castle-text-primary);
596
570
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
597
571
  }
598
572
 
@@ -604,7 +578,7 @@
604
578
 
605
579
  .confirmMessage {
606
580
  font-size: 13px;
607
- color: var(--castle-text-dim);
581
+ color: var(--castle-text-muted);
608
582
  line-height: 1.45;
609
583
  margin-bottom: 16px;
610
584
  }
@@ -623,10 +597,10 @@
623
597
  max-height: min(620px, calc(100vh - 48px));
624
598
  overflow-y: auto;
625
599
  padding: 18px;
626
- border: 1px solid var(--castle-border);
600
+ border: 1px solid var(--castle-border-3);
627
601
  border-radius: 10px;
628
- background: var(--castle-panel-raised);
629
- color: var(--castle-text);
602
+ background: var(--castle-surface-3);
603
+ color: var(--castle-text-primary);
630
604
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
631
605
  }
632
606
 
@@ -637,7 +611,7 @@
637
611
  font-weight: 600;
638
612
  letter-spacing: 0.06em;
639
613
  text-transform: uppercase;
640
- color: var(--castle-inspector-muted);
614
+ color: var(--castle-text-muted);
641
615
  }
642
616
 
643
617
  .newBpInput {
@@ -645,17 +619,17 @@
645
619
  width: 100%;
646
620
  min-width: 0;
647
621
  padding: 7px 9px;
648
- border: 1px solid var(--castle-inspector-border);
622
+ border: 1px solid var(--castle-border-1);
649
623
  border-radius: 5px;
650
- background: var(--castle-inspector-input-bg);
651
- color: var(--castle-text);
624
+ background: var(--castle-surface-3);
625
+ color: var(--castle-text-primary);
652
626
  font-size: 13px;
653
627
  }
654
628
 
655
629
  .newBpInput:focus {
656
630
  outline: none;
657
- border-color: var(--castle-selected);
658
- box-shadow: 0 0 0 1px var(--castle-selected);
631
+ border-color: var(--kit-selected);
632
+ box-shadow: 0 0 0 1px var(--kit-selected);
659
633
  }
660
634
 
661
635
  /* The Art label and its filter share a row: the filter belongs to the strip
@@ -672,17 +646,17 @@
672
646
  min-width: 0;
673
647
  margin-bottom: 6px;
674
648
  padding: 5px 8px;
675
- border: 1px solid var(--castle-inspector-border);
649
+ border: 1px solid var(--castle-border-1);
676
650
  border-radius: 5px;
677
- background: var(--castle-inspector-input-bg);
678
- color: var(--castle-text);
651
+ background: var(--castle-surface-3);
652
+ color: var(--castle-text-primary);
679
653
  font-size: 12px;
680
654
  }
681
655
 
682
656
  .newBpSearch:focus {
683
657
  outline: none;
684
- border-color: var(--castle-selected);
685
- box-shadow: 0 0 0 1px var(--castle-selected);
658
+ border-color: var(--kit-selected);
659
+ box-shadow: 0 0 0 1px var(--kit-selected);
686
660
  }
687
661
 
688
662
  .newBpTemplates {
@@ -696,22 +670,22 @@
696
670
  flex-direction: column;
697
671
  gap: 3px;
698
672
  padding: 9px 10px;
699
- border: 1px solid var(--castle-inspector-border);
673
+ border: 1px solid var(--castle-border-1);
700
674
  border-radius: 6px;
701
- background: var(--castle-inspector-input-bg);
702
- color: var(--castle-text);
675
+ background: var(--castle-surface-3);
676
+ color: var(--castle-text-primary);
703
677
  text-align: left;
704
678
  cursor: pointer;
705
679
  }
706
680
 
707
681
  .newBpTemplate:hover {
708
- border-color: var(--castle-inspector-muted);
682
+ border-color: var(--castle-text-muted);
709
683
  }
710
684
 
711
685
  .newBpTemplateSelected,
712
686
  .newBpTemplateSelected:hover {
713
- border-color: var(--castle-selected);
714
- box-shadow: 0 0 0 1px var(--castle-selected);
687
+ border-color: var(--kit-selected);
688
+ box-shadow: 0 0 0 1px var(--kit-selected);
715
689
  }
716
690
 
717
691
  .newBpTemplateName {
@@ -722,7 +696,7 @@
722
696
  .newBpTemplateHint {
723
697
  font-size: 11px;
724
698
  line-height: 1.35;
725
- color: var(--castle-inspector-muted);
699
+ color: var(--castle-text-muted);
726
700
  }
727
701
 
728
702
  /* A grid, capped and scrolled vertically. The choices are a SET to survey --
@@ -753,21 +727,21 @@
753
727
  gap: 5px;
754
728
  min-width: 0;
755
729
  padding: 8px 4px 6px;
756
- border: 1px solid var(--castle-inspector-border);
730
+ border: 1px solid var(--castle-border-1);
757
731
  border-radius: 6px;
758
- background: var(--castle-inspector-input-bg);
759
- color: var(--castle-text);
732
+ background: var(--castle-surface-3);
733
+ color: var(--castle-text-primary);
760
734
  cursor: pointer;
761
735
  }
762
736
 
763
737
  .newBpArtTile:hover {
764
- border-color: var(--castle-inspector-muted);
738
+ border-color: var(--castle-text-muted);
765
739
  }
766
740
 
767
741
  .newBpArtTileSelected,
768
742
  .newBpArtTileSelected:hover {
769
- border-color: var(--castle-selected);
770
- box-shadow: 0 0 0 1px var(--castle-selected);
743
+ border-color: var(--kit-selected);
744
+ box-shadow: 0 0 0 1px var(--kit-selected);
771
745
  }
772
746
 
773
747
  /* Up to two lines, then ellipsis. One nowrap line truncated "Blank Drawing"
@@ -784,14 +758,14 @@
784
758
  font-size: 10px;
785
759
  line-height: 1.2;
786
760
  text-align: center;
787
- color: var(--castle-inspector-muted);
761
+ color: var(--castle-text-muted);
788
762
  }
789
763
 
790
764
  .newBpNoMatch {
791
765
  align-self: center;
792
766
  padding: 0 6px;
793
767
  font-size: 12px;
794
- color: var(--castle-inspector-muted);
768
+ color: var(--castle-text-muted);
795
769
  }
796
770
 
797
771
  /* Actions mirror the deck-settings overlay in castle-www: a white-to-grey
@@ -804,7 +778,7 @@
804
778
  margin: -4px 0 4px;
805
779
  font-size: 12.5px;
806
780
  line-height: 1.45;
807
- color: var(--castle-inspector-muted);
781
+ color: var(--castle-text-muted);
808
782
  }
809
783
 
810
784
  .newBpActions {
@@ -858,7 +832,7 @@
858
832
  display: inline-flex;
859
833
  align-items: center;
860
834
  justify-content: center;
861
- color: var(--castle-inspector-muted);
835
+ color: var(--castle-text-muted);
862
836
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
863
837
  transition: color 90ms ease-out;
864
838
  }
@@ -896,7 +870,7 @@
896
870
  border: 1px solid rgba(255, 255, 255, 0.14);
897
871
  border-radius: 999px;
898
872
  background: rgba(255, 255, 255, 0.06);
899
- color: var(--castle-text);
873
+ color: var(--castle-text-primary);
900
874
  font-size: 14px;
901
875
  cursor: pointer;
902
876
  }
@@ -910,9 +884,9 @@
910
884
  align-items: center;
911
885
  padding: 2px 7px;
912
886
  border-radius: 999px;
913
- border: 1px solid var(--castle-inspector-border);
914
- background: var(--castle-inspector-input-bg);
915
- color: var(--castle-inspector-muted);
887
+ border: 1px solid var(--castle-border-1);
888
+ background: var(--castle-surface-3);
889
+ color: var(--castle-text-muted);
916
890
  font-size: 11px;
917
891
  font-weight: 600;
918
892
  letter-spacing: 0.02em;
@@ -931,11 +905,11 @@
931
905
  justify-content: space-between;
932
906
  gap: 8px;
933
907
  padding: 10px 16px;
934
- border-bottom: 1px solid var(--castle-inspector-divider);
908
+ border-bottom: 1px solid var(--castle-border-1);
935
909
  }
936
910
 
937
911
  .instanceHintLabel {
938
- color: var(--castle-inspector-muted);
912
+ color: var(--castle-text-muted);
939
913
  font-size: 12px;
940
914
  }
941
915
 
@@ -945,7 +919,7 @@
945
919
  align-items: stretch;
946
920
  gap: 12px;
947
921
  padding: 14px 16px;
948
- border-bottom: 1px solid var(--castle-inspector-divider);
922
+ border-bottom: 1px solid var(--castle-border-1);
949
923
  }
950
924
 
951
925
  .instanceHeaderName {
@@ -960,7 +934,7 @@
960
934
  overflow: hidden;
961
935
  text-overflow: ellipsis;
962
936
  white-space: nowrap;
963
- color: var(--castle-inspector-text);
937
+ color: var(--castle-text-primary);
964
938
  font-size: 14px;
965
939
  font-weight: 400;
966
940
  }
@@ -977,7 +951,7 @@
977
951
  }
978
952
 
979
953
  .instanceHeaderId {
980
- color: var(--castle-inspector-muted);
954
+ color: var(--castle-text-muted);
981
955
  font-size: 12px;
982
956
  overflow: hidden;
983
957
  text-overflow: ellipsis;
@@ -992,17 +966,17 @@
992
966
  width: 100%;
993
967
  padding: 14px 16px;
994
968
  border: 0;
995
- border-bottom: 1px solid var(--castle-inspector-divider);
969
+ border-bottom: 1px solid var(--castle-border-1);
996
970
  background: transparent;
997
- color: var(--castle-inspector-muted);
971
+ color: var(--castle-text-muted);
998
972
  font-size: 13px;
999
973
  text-align: left;
1000
974
  cursor: pointer;
1001
975
  }
1002
976
 
1003
977
  .revealOverridesButton:hover {
1004
- background: var(--castle-inspector-input-bg);
1005
- color: var(--castle-inspector-text);
978
+ background: var(--castle-surface-3);
979
+ color: var(--castle-text-primary);
1006
980
  }
1007
981
 
1008
982
  .instanceForkButton {
@@ -1011,9 +985,9 @@
1011
985
  justify-content: center;
1012
986
  gap: 6px;
1013
987
  align-self: flex-start;
1014
- border: 1px solid var(--castle-inspector-border);
988
+ border: 1px solid var(--castle-border-1);
1015
989
  border-radius: 6px;
1016
- background: var(--castle-inspector-input-bg);
990
+ background: var(--castle-surface-3);
1017
991
  color: inherit;
1018
992
  font-size: 11px;
1019
993
  padding: 5px 9px;
@@ -1022,7 +996,7 @@
1022
996
  }
1023
997
 
1024
998
  .instanceForkButton:hover {
1025
- background: var(--castle-inspector-border);
999
+ background: var(--castle-border-1);
1026
1000
  }
1027
1001
 
1028
1002
  /* Editable blueprint title: reads as a heading until hovered/focused, where a
@@ -1031,9 +1005,9 @@
1031
1005
  flex: 1;
1032
1006
  min-width: 0;
1033
1007
  border: 1px solid transparent;
1034
- border-radius: var(--castle-radius);
1008
+ border-radius: var(--castle-radius-small);
1035
1009
  background: transparent;
1036
- color: var(--castle-inspector-text);
1010
+ color: var(--castle-text-primary);
1037
1011
  font-size: 14px;
1038
1012
  font-weight: 600;
1039
1013
  padding: 4px 6px;
@@ -1042,12 +1016,12 @@
1042
1016
  }
1043
1017
 
1044
1018
  .blueprintNameInput:hover {
1045
- border-color: var(--castle-inspector-border);
1019
+ border-color: var(--castle-border-1);
1046
1020
  }
1047
1021
 
1048
1022
  .blueprintNameInput:focus {
1049
- border-color: var(--castle-inspector-border);
1050
- background: var(--castle-inspector-input-bg);
1023
+ border-color: var(--castle-border-1);
1024
+ background: var(--castle-surface-3);
1051
1025
  }
1052
1026
 
1053
1027
  /* An import's blueprint: still selectable so the name can be read and copied,
@@ -1057,7 +1031,7 @@
1057
1031
  .blueprintNameInputLocked:focus {
1058
1032
  border-color: transparent;
1059
1033
  background: transparent;
1060
- color: var(--castle-text-dim);
1034
+ color: var(--castle-text-muted);
1061
1035
  cursor: default;
1062
1036
  }
1063
1037
 
@@ -1071,18 +1045,18 @@
1071
1045
  align-items: center;
1072
1046
  gap: 6px;
1073
1047
  padding: 8px;
1074
- border-bottom: 1px solid var(--castle-inspector-divider);
1075
- background: var(--castle-inspector-bg);
1076
- color: var(--castle-text-dim);
1048
+ border-bottom: 1px solid var(--castle-border-1);
1049
+ background: var(--castle-surface-2);
1050
+ color: var(--castle-text-muted);
1077
1051
  font-size: 12px;
1078
1052
  }
1079
1053
 
1080
1054
  .blueprintProvenanceChip {
1081
1055
  flex: 0 0 auto;
1082
1056
  padding: 2px 8px;
1083
- border: 1px solid var(--castle-inspector-divider);
1057
+ border: 1px solid var(--castle-border-1);
1084
1058
  border-radius: 999px;
1085
- background: var(--castle-workspace-bg);
1059
+ background: var(--castle-surface-2);
1086
1060
  letter-spacing: 0.02em;
1087
1061
  line-height: 1.4;
1088
1062
  }
@@ -1090,7 +1064,7 @@
1090
1064
  /* A forked blueprint is editable, so its chip should not read like the locked
1091
1065
  one -- same distinction the shell's banner makes. */
1092
1066
  .blueprintProvenanceForked {
1093
- color: var(--castle-inspector-text);
1067
+ color: var(--castle-text-primary);
1094
1068
  }
1095
1069
 
1096
1070
  .blueprintProvenanceText {
@@ -1118,7 +1092,7 @@
1118
1092
  align-items: center;
1119
1093
  justify-content: center;
1120
1094
  padding: 20px;
1121
- background: var(--castle-stage-workspace-bg);
1095
+ background: var(--kit-stage-workspace-bg);
1122
1096
  overflow: hidden;
1123
1097
  }
1124
1098
 
@@ -1133,7 +1107,7 @@
1133
1107
  .stageCardClip {
1134
1108
  position: absolute;
1135
1109
  inset: 0;
1136
- background: var(--castle-card);
1110
+ background: var(--castle-surface-3);
1137
1111
  border-radius: 12px;
1138
1112
  overflow: hidden;
1139
1113
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
@@ -1250,7 +1224,7 @@
1250
1224
  .selBox {
1251
1225
  position: absolute;
1252
1226
  box-sizing: border-box;
1253
- border: 2px solid var(--castle-text);
1227
+ border: 2px solid var(--castle-text-primary);
1254
1228
  border-radius: 3px;
1255
1229
  opacity: 0.85;
1256
1230
  pointer-events: none;
@@ -1262,7 +1236,7 @@
1262
1236
  .selStem {
1263
1237
  position: absolute;
1264
1238
  height: 2px;
1265
- background: var(--castle-text);
1239
+ background: var(--castle-text-primary);
1266
1240
  opacity: 0.85;
1267
1241
  transform-origin: left center;
1268
1242
  pointer-events: none;
@@ -1272,8 +1246,8 @@
1272
1246
  position: absolute;
1273
1247
  border: 0;
1274
1248
  padding: 0;
1275
- background: var(--castle-text);
1276
- border: 2px solid var(--castle-selected-ink);
1249
+ background: var(--castle-text-primary);
1250
+ border: 2px solid var(--kit-selected-ink);
1277
1251
  transform: translate(-50%, -50%);
1278
1252
  pointer-events: auto;
1279
1253
  touch-action: none;
@@ -1307,7 +1281,7 @@
1307
1281
  width: 13px;
1308
1282
  height: 13px;
1309
1283
  border-radius: 999px;
1310
- border: 2px solid var(--castle-text);
1284
+ border: 2px solid var(--castle-text-primary);
1311
1285
  background: transparent;
1312
1286
  opacity: 0.85;
1313
1287
  transform: translate(-50%, -50%);
@@ -1340,10 +1314,10 @@
1340
1314
  top: calc(100% + 8px);
1341
1315
  min-width: 150px;
1342
1316
  padding: 5px;
1343
- border: 1px solid var(--castle-border);
1317
+ border: 1px solid var(--castle-border-3);
1344
1318
  border-radius: 10px;
1345
- background: var(--castle-panel-raised);
1346
- color: var(--castle-text);
1319
+ background: var(--castle-surface-3);
1320
+ color: var(--castle-text-primary);
1347
1321
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
1348
1322
  transform: translateX(-50%);
1349
1323
  z-index: 2;
@@ -1364,7 +1338,7 @@
1364
1338
  }
1365
1339
 
1366
1340
  .selArrangeItem:hover {
1367
- background: var(--castle-panel);
1341
+ background: var(--castle-surface-2);
1368
1342
  }
1369
1343
 
1370
1344
  .selArrangeItemDisabled,
@@ -1378,9 +1352,9 @@
1378
1352
  width: 32px;
1379
1353
  height: 32px;
1380
1354
  border-radius: 999px;
1381
- border: 1px solid var(--castle-border);
1382
- background: var(--castle-panel-raised);
1383
- color: var(--castle-text);
1355
+ border: 1px solid var(--castle-border-3);
1356
+ background: var(--castle-surface-3);
1357
+ color: var(--castle-text-primary);
1384
1358
  display: inline-flex;
1385
1359
  align-items: center;
1386
1360
  justify-content: center;
@@ -1392,8 +1366,8 @@
1392
1366
  }
1393
1367
 
1394
1368
  .selBtn:hover {
1395
- background: var(--castle-panel);
1396
- border-color: var(--castle-text-dim);
1369
+ background: var(--castle-surface-2);
1370
+ border-color: var(--castle-text-muted);
1397
1371
  }
1398
1372
 
1399
1373
  .selBtn svg {
@@ -1443,9 +1417,9 @@
1443
1417
  grid-column: 2;
1444
1418
  grid-row: 1 / span 2;
1445
1419
  min-width: 0;
1446
- border-left: 1px solid var(--castle-inspector-divider);
1447
- background: var(--castle-workspace-bg);
1448
- color: var(--castle-inspector-text);
1420
+ border-left: 1px solid var(--castle-border-1);
1421
+ background: var(--castle-surface-2);
1422
+ color: var(--castle-text-primary);
1449
1423
  font-size: 14px;
1450
1424
  overflow: auto;
1451
1425
  padding: 0;
@@ -1453,10 +1427,10 @@
1453
1427
 
1454
1428
  .panel {
1455
1429
  border: 0;
1456
- border-bottom: 1px solid var(--castle-inspector-divider);
1430
+ border-bottom: 1px solid var(--castle-border-1);
1457
1431
  border-radius: 0;
1458
- background: var(--castle-inspector-bg);
1459
- color: var(--castle-inspector-text);
1432
+ background: var(--castle-surface-2);
1433
+ color: var(--castle-text-primary);
1460
1434
  font-size: 14px;
1461
1435
  margin: 0;
1462
1436
  overflow: visible;
@@ -1481,7 +1455,7 @@
1481
1455
  Reorder lives on the grip (touch-action: none), not the whole row — that
1482
1456
  split is what lets scroll and reorder both work on phones. */
1483
1457
  touch-action: pan-y;
1484
- color: var(--castle-inspector-text);
1458
+ color: var(--castle-text-primary);
1485
1459
  font-size: 14px;
1486
1460
  font-weight: 650;
1487
1461
  }
@@ -1535,7 +1509,7 @@
1535
1509
  text-overflow: ellipsis;
1536
1510
  white-space: nowrap;
1537
1511
  margin-left: 2px;
1538
- color: var(--castle-inspector-muted);
1512
+ color: var(--castle-text-muted);
1539
1513
  font-size: 12px;
1540
1514
  font-weight: 400;
1541
1515
  }
@@ -1551,7 +1525,7 @@
1551
1525
  padding: 2px;
1552
1526
  border: 0;
1553
1527
  background: none;
1554
- color: var(--castle-inspector-muted);
1528
+ color: var(--castle-text-muted);
1555
1529
  opacity: 0.5;
1556
1530
  cursor: pointer;
1557
1531
  }
@@ -1559,7 +1533,7 @@
1559
1533
  .panelSource:hover,
1560
1534
  .panelSource:focus-visible {
1561
1535
  opacity: 1;
1562
- color: var(--castle-text);
1536
+ color: var(--castle-text-primary);
1563
1537
  }
1564
1538
 
1565
1539
  /* The remove button, matched to `.panelSource` beside it: same size, same
@@ -1580,14 +1554,14 @@
1580
1554
  padding: 2px;
1581
1555
  border: 0;
1582
1556
  background: none;
1583
- color: var(--castle-ok);
1557
+ color: var(--kit-ok);
1584
1558
  font-size: 12px;
1585
1559
  opacity: 1;
1586
1560
  cursor: pointer;
1587
1561
  }
1588
1562
 
1589
1563
  .panelPowerOff {
1590
- color: var(--castle-danger);
1564
+ color: var(--kit-danger);
1591
1565
  opacity: 0.6;
1592
1566
  }
1593
1567
 
@@ -1612,7 +1586,7 @@
1612
1586
  padding: 2px;
1613
1587
  border: 0;
1614
1588
  background: none;
1615
- color: var(--castle-inspector-muted);
1589
+ color: var(--castle-text-muted);
1616
1590
  opacity: 0.5;
1617
1591
  line-height: 1;
1618
1592
  cursor: pointer;
@@ -1621,7 +1595,7 @@
1621
1595
  .panelRemove:hover,
1622
1596
  .panelRemove:focus-visible {
1623
1597
  opacity: 1;
1624
- color: var(--castle-text);
1598
+ color: var(--castle-text-primary);
1625
1599
  }
1626
1600
 
1627
1601
  /* Matched to the source glyph beside it. Sized through font-size, not width:
@@ -1653,7 +1627,7 @@
1653
1627
  background: none;
1654
1628
  /* Icon sizes itself in `em` via an inline style. */
1655
1629
  font-size: 11px;
1656
- color: var(--castle-inspector-muted);
1630
+ color: var(--castle-text-muted);
1657
1631
  opacity: 0.55;
1658
1632
  cursor: grab;
1659
1633
  touch-action: none;
@@ -1664,7 +1638,7 @@
1664
1638
  .panelGrip:hover,
1665
1639
  .panelGrip:focus-visible {
1666
1640
  opacity: 1;
1667
- color: var(--castle-text);
1641
+ color: var(--castle-text-primary);
1668
1642
  }
1669
1643
 
1670
1644
  .panelGrip:active {
@@ -1687,9 +1661,9 @@
1687
1661
  /* Fully opaque, not merely raised: at 95% the row underneath bled through the
1688
1662
  title and read as a rendering fault rather than as depth. The shadow and
1689
1663
  the ring carry the lift instead. */
1690
- background: var(--castle-panel-raised);
1664
+ background: var(--castle-surface-3);
1691
1665
  box-shadow:
1692
- 0 0 0 1px var(--castle-selected),
1666
+ 0 0 0 1px var(--kit-selected),
1693
1667
  0 12px 28px rgba(0, 0, 0, 0.6);
1694
1668
  border-radius: 6px;
1695
1669
  border-bottom-color: transparent !important;
@@ -1705,7 +1679,7 @@
1705
1679
  }
1706
1680
 
1707
1681
  .panelTitleOverridden {
1708
- color: var(--castle-override);
1682
+ color: var(--kit-override);
1709
1683
  }
1710
1684
 
1711
1685
  /* Occasional actions for an OPEN panel, under its title. */
@@ -1721,20 +1695,20 @@
1721
1695
  padding: 0;
1722
1696
  border: 0;
1723
1697
  background: none;
1724
- color: var(--castle-inspector-muted);
1698
+ color: var(--castle-text-muted);
1725
1699
  font-size: 11.5px;
1726
1700
  cursor: pointer;
1727
1701
  }
1728
1702
 
1729
1703
  .panelLink:hover,
1730
1704
  .panelLink:focus-visible {
1731
- color: var(--castle-text);
1705
+ color: var(--castle-text-primary);
1732
1706
  text-decoration: underline;
1733
1707
  }
1734
1708
 
1735
1709
  .panelLinkDanger:hover,
1736
1710
  .panelLinkDanger:focus-visible {
1737
- color: var(--castle-danger);
1711
+ color: var(--kit-danger);
1738
1712
  }
1739
1713
 
1740
1714
  .panelBody {
@@ -1744,10 +1718,10 @@
1744
1718
  /* --field-border is set by an overridden FieldRow (fields/fields.module.css). */
1745
1719
  .textarea {
1746
1720
  width: 100%;
1747
- border: 1px solid var(--field-border, var(--castle-inspector-border));
1748
- border-radius: var(--castle-radius);
1749
- background: var(--castle-inspector-input-bg);
1750
- color: var(--castle-inspector-text);
1721
+ border: 1px solid var(--field-border, var(--castle-border-1));
1722
+ border-radius: var(--castle-radius-small);
1723
+ background: var(--castle-surface-3);
1724
+ color: var(--castle-text-primary);
1751
1725
  padding: 5px 8px;
1752
1726
  outline: 0;
1753
1727
  }
@@ -1787,9 +1761,9 @@
1787
1761
  overflow-y: auto;
1788
1762
  overscroll-behavior-y: contain;
1789
1763
  padding: 8px;
1790
- border: 1px solid var(--castle-inspector-border);
1791
- border-radius: var(--castle-radius);
1792
- background: var(--castle-workspace-bg);
1764
+ border: 1px solid var(--castle-border-1);
1765
+ border-radius: var(--castle-radius-small);
1766
+ background: var(--castle-surface-2);
1793
1767
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
1794
1768
  scrollbar-width: thin;
1795
1769
  }
@@ -1802,21 +1776,21 @@
1802
1776
  min-width: 0;
1803
1777
  aspect-ratio: 1;
1804
1778
  padding: 4px;
1805
- border: 1px solid var(--castle-inspector-border);
1779
+ border: 1px solid var(--castle-border-1);
1806
1780
  border-radius: 6px;
1807
- background: var(--castle-inspector-input-bg);
1808
- color: var(--castle-text);
1781
+ background: var(--castle-surface-3);
1782
+ color: var(--castle-text-primary);
1809
1783
  cursor: pointer;
1810
1784
  }
1811
1785
 
1812
1786
  .spritePickerTile:hover {
1813
- border-color: var(--castle-inspector-muted);
1787
+ border-color: var(--castle-text-muted);
1814
1788
  }
1815
1789
 
1816
1790
  .spritePickerTileSelected,
1817
1791
  .spritePickerTileSelected:hover {
1818
- border-color: var(--castle-selected);
1819
- box-shadow: 0 0 0 1px var(--castle-selected);
1792
+ border-color: var(--kit-selected);
1793
+ box-shadow: 0 0 0 1px var(--kit-selected);
1820
1794
  }
1821
1795
 
1822
1796
  /* Name without extension — hover only, so the grid stays pictures.
@@ -1832,7 +1806,7 @@
1832
1806
  padding: 3px 4px;
1833
1807
  border-radius: 0 0 5px 5px;
1834
1808
  background: rgba(0, 0, 0, 0.72);
1835
- color: var(--castle-text);
1809
+ color: var(--castle-text-primary);
1836
1810
  font-size: 10px;
1837
1811
  line-height: 1.2;
1838
1812
  text-align: center;
@@ -1902,10 +1876,10 @@
1902
1876
  border, sunken fill, text-colored glyph, and a subtle drop line. */
1903
1877
  .button,
1904
1878
  .iconButton {
1905
- border: 1px solid var(--castle-inspector-border);
1906
- border-radius: var(--castle-radius);
1907
- background: var(--castle-inspector-button-bg);
1908
- color: var(--castle-inspector-text);
1879
+ border: 1px solid var(--castle-border-1);
1880
+ border-radius: var(--castle-radius-small);
1881
+ background: var(--castle-surface-2);
1882
+ color: var(--castle-text-primary);
1909
1883
  cursor: pointer;
1910
1884
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
1911
1885
  }
@@ -1935,11 +1909,11 @@
1935
1909
 
1936
1910
  .button:hover,
1937
1911
  .iconButton:hover {
1938
- background: var(--castle-inspector-input-bg);
1912
+ background: var(--castle-surface-3);
1939
1913
  }
1940
1914
 
1941
1915
  .buttonDanger {
1942
- color: var(--castle-danger);
1916
+ color: var(--kit-danger);
1943
1917
  }
1944
1918
 
1945
1919
  .button:disabled,
@@ -1950,7 +1924,7 @@
1950
1924
 
1951
1925
  .button:disabled:hover,
1952
1926
  .iconButton:disabled:hover {
1953
- background: var(--castle-inspector-button-bg);
1927
+ background: var(--castle-surface-2);
1954
1928
  }
1955
1929
 
1956
1930
  .actorList {
@@ -1962,17 +1936,17 @@
1962
1936
  width: 100%;
1963
1937
  border: 1px solid transparent;
1964
1938
  background: transparent;
1965
- color: var(--castle-inspector-text);
1966
- border-radius: var(--castle-radius);
1939
+ color: var(--castle-text-primary);
1940
+ border-radius: var(--castle-radius-small);
1967
1941
  padding: 7px 8px;
1968
1942
  text-align: left;
1969
1943
  cursor: pointer;
1970
1944
  }
1971
1945
 
1972
1946
  .actorRowSelected {
1973
- background: var(--castle-black);
1974
- border-color: var(--castle-black);
1975
- color: var(--castle-text);
1947
+ background: var(--castle-text-dark);
1948
+ border-color: var(--castle-text-dark);
1949
+ color: var(--castle-text-primary);
1976
1950
  }
1977
1951
 
1978
1952
  .drawingEditor,
@@ -1982,7 +1956,7 @@
1982
1956
  min-height: 0;
1983
1957
  display: grid;
1984
1958
  grid-template-columns: minmax(320px, 1fr) 280px;
1985
- background: var(--castle-workspace-bg);
1959
+ background: var(--castle-surface-2);
1986
1960
  }
1987
1961
 
1988
1962
  .drawingEditor {
@@ -2004,7 +1978,7 @@
2004
1978
  height: 100%;
2005
1979
  padding: 8px;
2006
1980
  box-sizing: border-box;
2007
- background: var(--castle-workspace-bg);
1981
+ background: var(--castle-surface-2);
2008
1982
  }
2009
1983
 
2010
1984
  .paintColumn {
@@ -2036,7 +2010,7 @@
2036
2010
  height: 100%;
2037
2011
  padding: 8px;
2038
2012
  box-sizing: border-box;
2039
- background: var(--castle-workspace-bg);
2013
+ background: var(--castle-surface-2);
2040
2014
  }
2041
2015
 
2042
2016
  .drawingCanvasWrap {
@@ -2078,7 +2052,7 @@
2078
2052
  gap: 6px;
2079
2053
  flex: 0 0 auto;
2080
2054
  font-size: 12px;
2081
- color: var(--castle-inspector-muted);
2055
+ color: var(--castle-text-muted);
2082
2056
  }
2083
2057
 
2084
2058
  .finishBar {
@@ -2087,20 +2061,20 @@
2087
2061
  gap: 6px;
2088
2062
  flex: 0 0 auto;
2089
2063
  font-size: 12px;
2090
- color: var(--castle-inspector-muted);
2064
+ color: var(--castle-text-muted);
2091
2065
  }
2092
2066
 
2093
2067
  /* Finish segmented control (square / ¼ / ½ / circle) — bordered row of
2094
2068
  short text + icon segments. */
2095
2069
  .finishSegments {
2096
2070
  display: flex;
2097
- border: 1px solid var(--castle-inspector-border);
2098
- border-radius: var(--castle-radius);
2071
+ border: 1px solid var(--castle-border-1);
2072
+ border-radius: var(--castle-radius-small);
2099
2073
  overflow: hidden;
2100
2074
  }
2101
2075
 
2102
2076
  .finishSegments > * + * {
2103
- border-left: 1px solid var(--castle-inspector-border);
2077
+ border-left: 1px solid var(--castle-border-1);
2104
2078
  }
2105
2079
 
2106
2080
  .finishSegment {
@@ -2110,8 +2084,8 @@
2110
2084
  min-width: 28px;
2111
2085
  padding: 3px 8px;
2112
2086
  border: 0;
2113
- background: var(--castle-inspector-button-bg);
2114
- color: var(--castle-inspector-text);
2087
+ background: var(--castle-surface-2);
2088
+ color: var(--castle-text-primary);
2115
2089
  cursor: pointer;
2116
2090
  font-size: 12px;
2117
2091
  font-variant-numeric: tabular-nums;
@@ -2119,7 +2093,7 @@
2119
2093
  }
2120
2094
 
2121
2095
  .finishSegment:hover {
2122
- background: var(--castle-inspector-input-bg);
2096
+ background: var(--castle-surface-3);
2123
2097
  }
2124
2098
 
2125
2099
  /* Compound selector (not a bare `.finishSegmentOn`) for the same reason
@@ -2127,8 +2101,8 @@
2127
2101
  `.finishSegment:hover` on specificity no matter source order. */
2128
2102
  .finishSegment.finishSegmentOn,
2129
2103
  .finishSegment.finishSegmentOn:hover {
2130
- background: var(--castle-selected);
2131
- color: var(--castle-selected-ink);
2104
+ background: var(--kit-selected);
2105
+ color: var(--kit-selected-ink);
2132
2106
  }
2133
2107
 
2134
2108
  .finishSegment:disabled {
@@ -2137,27 +2111,27 @@
2137
2111
  }
2138
2112
 
2139
2113
  .finishSegment:disabled:hover {
2140
- background: var(--castle-inspector-button-bg);
2114
+ background: var(--castle-surface-2);
2141
2115
  }
2142
2116
 
2143
2117
  .finishSegment.finishSegmentOn:disabled,
2144
2118
  .finishSegment.finishSegmentOn:disabled:hover {
2145
2119
  opacity: 0.85;
2146
- background: var(--castle-selected);
2147
- color: var(--castle-selected-ink);
2120
+ background: var(--kit-selected);
2121
+ color: var(--kit-selected-ink);
2148
2122
  }
2149
2123
 
2150
2124
  .canvasSizeSep {
2151
- color: var(--castle-inspector-muted);
2125
+ color: var(--castle-text-muted);
2152
2126
  user-select: none;
2153
2127
  }
2154
2128
 
2155
2129
  .canvasSizeSelect {
2156
2130
  width: 52px;
2157
- border: 1px solid var(--castle-inspector-border);
2158
- border-radius: var(--castle-radius);
2159
- background: var(--castle-inspector-input-bg);
2160
- color: var(--castle-inspector-text);
2131
+ border: 1px solid var(--castle-border-1);
2132
+ border-radius: var(--castle-radius-small);
2133
+ background: var(--castle-surface-3);
2134
+ color: var(--castle-text-primary);
2161
2135
  padding: 3px 22px 3px 6px;
2162
2136
  font-size: 12px;
2163
2137
  text-align: center;
@@ -2171,14 +2145,14 @@
2171
2145
  .canvasSizeSelect:disabled {
2172
2146
  opacity: 0.55;
2173
2147
  cursor: default;
2174
- color: var(--castle-inspector-muted);
2148
+ color: var(--castle-text-muted);
2175
2149
  }
2176
2150
 
2177
2151
  .pxArtInspector {
2178
2152
  min-width: 0;
2179
- border-left: 1px solid var(--castle-inspector-divider);
2180
- background: var(--castle-workspace-bg);
2181
- color: var(--castle-inspector-text);
2153
+ border-left: 1px solid var(--castle-border-1);
2154
+ background: var(--castle-surface-2);
2155
+ color: var(--castle-text-primary);
2182
2156
  font-size: 14px;
2183
2157
  overflow: hidden;
2184
2158
  display: flex;
@@ -2199,13 +2173,13 @@
2199
2173
  .paintStripSection {
2200
2174
  display: flex;
2201
2175
  flex-direction: column;
2202
- border: 1px solid var(--castle-inspector-border);
2203
- border-radius: var(--castle-radius);
2176
+ border: 1px solid var(--castle-border-1);
2177
+ border-radius: var(--castle-radius-small);
2204
2178
  overflow: hidden;
2205
2179
  }
2206
2180
 
2207
2181
  .paintStripSection > * + * {
2208
- border-top: 1px solid var(--castle-inspector-border);
2182
+ border-top: 1px solid var(--castle-border-1);
2209
2183
  }
2210
2184
 
2211
2185
  .paintStripColor {
@@ -2236,8 +2210,8 @@
2236
2210
  justify-content: center;
2237
2211
  border: 0;
2238
2212
  border-radius: 0;
2239
- background: var(--castle-inspector-button-bg);
2240
- color: var(--castle-inspector-text);
2213
+ background: var(--castle-surface-2);
2214
+ color: var(--castle-text-primary);
2241
2215
  cursor: pointer;
2242
2216
  font-size: 14px;
2243
2217
  line-height: 1;
@@ -2249,7 +2223,7 @@
2249
2223
  }
2250
2224
 
2251
2225
  .paintStripModeButton:hover {
2252
- background: var(--castle-inspector-input-bg);
2226
+ background: var(--castle-surface-3);
2253
2227
  }
2254
2228
 
2255
2229
  .paintStripModeButton:disabled {
@@ -2312,9 +2286,9 @@
2312
2286
  box-sizing: border-box;
2313
2287
  overflow: auto;
2314
2288
  padding: 12px 16px 14px;
2315
- border: 1px solid var(--castle-inspector-border);
2316
- border-radius: var(--castle-radius);
2317
- background: var(--castle-workspace-bg);
2289
+ border: 1px solid var(--castle-border-1);
2290
+ border-radius: var(--castle-radius-small);
2291
+ background: var(--castle-surface-2);
2318
2292
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
2319
2293
  }
2320
2294
 
@@ -2370,7 +2344,7 @@
2370
2344
  0 calc(var(--checker-size) / 2),
2371
2345
  calc(var(--checker-size) / 2) calc(var(--checker-size) / -2),
2372
2346
  calc(var(--checker-size) / -2) 0;
2373
- border: 1px solid var(--castle-inspector-border);
2347
+ border: 1px solid var(--castle-border-1);
2374
2348
  }
2375
2349
 
2376
2350
  .drawingOverlay {
@@ -2460,7 +2434,7 @@
2460
2434
  min-width: 0;
2461
2435
  font-size: 12px;
2462
2436
  font-weight: 600;
2463
- color: var(--castle-inspector-text);
2437
+ color: var(--castle-text-primary);
2464
2438
  overflow: hidden;
2465
2439
  text-overflow: ellipsis;
2466
2440
  white-space: nowrap;
@@ -2500,7 +2474,7 @@
2500
2474
  border-color: transparent;
2501
2475
  box-shadow:
2502
2476
  inset 0 0 0 2px #fff,
2503
- 0 0 0 1px var(--castle-black);
2477
+ 0 0 0 1px var(--castle-text-dark);
2504
2478
  }
2505
2479
 
2506
2480
  .drawingToolStrip {
@@ -2510,12 +2484,12 @@
2510
2484
  flex: 0 0 auto;
2511
2485
  max-height: 100%;
2512
2486
  overflow: auto;
2513
- border: 1px solid var(--castle-inspector-border);
2514
- border-radius: var(--castle-radius);
2487
+ border: 1px solid var(--castle-border-1);
2488
+ border-radius: var(--castle-radius-small);
2515
2489
  }
2516
2490
 
2517
2491
  .drawingToolStrip > * + * {
2518
- border-top: 1px solid var(--castle-inspector-border);
2492
+ border-top: 1px solid var(--castle-border-1);
2519
2493
  }
2520
2494
 
2521
2495
  .drawingToolsPanel {
@@ -2539,8 +2513,8 @@
2539
2513
 
2540
2514
  .drawingToolButton,
2541
2515
  .drawingSizeButton {
2542
- background: var(--castle-inspector-button-bg);
2543
- color: var(--castle-inspector-text);
2516
+ background: var(--castle-surface-2);
2517
+ color: var(--castle-text-primary);
2544
2518
  cursor: pointer;
2545
2519
  }
2546
2520
 
@@ -2563,7 +2537,7 @@
2563
2537
  }
2564
2538
 
2565
2539
  .drawingToolButton:hover {
2566
- background: var(--castle-inspector-input-bg);
2540
+ background: var(--castle-surface-3);
2567
2541
  }
2568
2542
 
2569
2543
  .drawingToolButton:disabled {
@@ -2576,7 +2550,7 @@
2576
2550
  }
2577
2551
 
2578
2552
  .drawingToolButton:disabled:hover {
2579
- background: var(--castle-inspector-button-bg);
2553
+ background: var(--castle-surface-2);
2580
2554
  }
2581
2555
 
2582
2556
  /* Active / selected square icon button -- the eyedropper reference: a light
@@ -2596,17 +2570,17 @@
2596
2570
  .button.buttonActive,
2597
2571
  .drawingToolButton.drawingToolSelected,
2598
2572
  .paintStripModeButton.drawingToolSelected {
2599
- background: var(--castle-selected);
2600
- border-color: var(--castle-selected);
2601
- color: var(--castle-selected-ink);
2573
+ background: var(--kit-selected);
2574
+ border-color: var(--kit-selected);
2575
+ color: var(--kit-selected-ink);
2602
2576
  }
2603
2577
 
2604
2578
  .button.buttonActive:hover,
2605
2579
  .drawingToolButton.drawingToolSelected:hover,
2606
2580
  .paintStripModeButton.drawingToolSelected:hover {
2607
- background: var(--castle-selected);
2608
- border-color: var(--castle-selected);
2609
- color: var(--castle-selected-ink);
2581
+ background: var(--kit-selected);
2582
+ border-color: var(--kit-selected);
2583
+ color: var(--kit-selected-ink);
2610
2584
  }
2611
2585
 
2612
2586
  /* Groups of shape-action rows (fill/stroke · transform · punch/delete). */
@@ -2622,17 +2596,17 @@
2622
2596
  .drawingShapeModeRow {
2623
2597
  display: flex;
2624
2598
  width: max-content;
2625
- border: 1px solid var(--castle-inspector-border);
2626
- border-radius: var(--castle-radius);
2599
+ border: 1px solid var(--castle-border-1);
2600
+ border-radius: var(--castle-radius-small);
2627
2601
  overflow: hidden;
2628
2602
  }
2629
2603
 
2630
2604
  .drawingShapeModeRow > * + * {
2631
- border-left: 1px solid var(--castle-inspector-border);
2605
+ border-left: 1px solid var(--castle-border-1);
2632
2606
  }
2633
2607
 
2634
2608
  .drawingToolHint {
2635
- color: var(--castle-inspector-muted);
2609
+ color: var(--castle-text-muted);
2636
2610
  font-size: 14px;
2637
2611
  line-height: 1.35;
2638
2612
  padding-bottom: 8px;
@@ -2653,13 +2627,13 @@
2653
2627
  align-items: baseline;
2654
2628
  justify-content: space-between;
2655
2629
  gap: 10px;
2656
- color: var(--castle-inspector-muted);
2630
+ color: var(--castle-text-muted);
2657
2631
  font-size: 14px;
2658
2632
  line-height: 1.35;
2659
2633
  }
2660
2634
 
2661
2635
  .drawingSizeLabel span:last-child {
2662
- color: var(--castle-inspector-text);
2636
+ color: var(--castle-text-primary);
2663
2637
  font-variant-numeric: tabular-nums;
2664
2638
  }
2665
2639
 
@@ -2703,18 +2677,18 @@
2703
2677
  .drawingFillToggle {
2704
2678
  min-height: 28px;
2705
2679
  padding: 4px 9px;
2706
- border: 1px solid var(--castle-inspector-border);
2707
- border-radius: var(--castle-radius);
2708
- background: var(--castle-inspector-button-bg);
2709
- color: var(--castle-inspector-text);
2680
+ border: 1px solid var(--castle-border-1);
2681
+ border-radius: var(--castle-radius-small);
2682
+ background: var(--castle-surface-2);
2683
+ color: var(--castle-text-primary);
2710
2684
  cursor: pointer;
2711
2685
  font-size: 14px;
2712
2686
  }
2713
2687
 
2714
2688
  .drawingFillToggleOn {
2715
- background: var(--castle-selected);
2716
- border-color: var(--castle-selected);
2717
- color: var(--castle-selected-ink);
2689
+ background: var(--kit-selected);
2690
+ border-color: var(--kit-selected);
2691
+ color: var(--kit-selected-ink);
2718
2692
  }
2719
2693
 
2720
2694
  .drawingModeRow {
@@ -2722,7 +2696,7 @@
2722
2696
  align-items: center;
2723
2697
  justify-content: space-between;
2724
2698
  gap: 12px;
2725
- color: var(--castle-inspector-muted);
2699
+ color: var(--castle-text-muted);
2726
2700
  font-size: 14px;
2727
2701
  line-height: 1.35;
2728
2702
  }
@@ -2732,15 +2706,15 @@
2732
2706
  width: 34px;
2733
2707
  height: 20px;
2734
2708
  padding: 0;
2735
- border: 1px solid var(--castle-inspector-border);
2709
+ border: 1px solid var(--castle-border-1);
2736
2710
  border-radius: 999px;
2737
2711
  background: #343434;
2738
2712
  cursor: pointer;
2739
2713
  }
2740
2714
 
2741
2715
  .drawingSwitchOn {
2742
- border-color: var(--castle-selected);
2743
- background: var(--castle-selected);
2716
+ border-color: var(--kit-selected);
2717
+ background: var(--kit-selected);
2744
2718
  }
2745
2719
 
2746
2720
  .drawingSwitchKnob {
@@ -2865,7 +2839,7 @@
2865
2839
  blueprints later). Drawing playback lives in the header instead. */
2866
2840
  .sceneWorkspace {
2867
2841
  grid-template-columns: 1fr;
2868
- grid-template-rows: var(--castle-hotbar-row-full) minmax(0, 1fr);
2842
+ grid-template-rows: var(--kit-hotbar-row-full) minmax(0, 1fr);
2869
2843
  }
2870
2844
 
2871
2845
  .drawingEditor {
@@ -2878,7 +2852,7 @@
2878
2852
  grid-row: 2;
2879
2853
  align-items: flex-start;
2880
2854
  padding: 10px 12px 12px;
2881
- background: var(--castle-stage-workspace-bg);
2855
+ background: var(--kit-stage-workspace-bg);
2882
2856
  }
2883
2857
 
2884
2858
  /* One-column layout: the card MUST keep a definite width. Its clip/canvas
@@ -2919,7 +2893,7 @@
2919
2893
  transition:
2920
2894
  transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
2921
2895
  height 0.28s cubic-bezier(0.32, 0.72, 0, 1);
2922
- border-top: 1px solid var(--castle-inspector-divider);
2896
+ border-top: 1px solid var(--castle-border-1);
2923
2897
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
2924
2898
  overflow: hidden;
2925
2899
  display: flex;
@@ -2930,7 +2904,7 @@
2930
2904
  .fileBrowser {
2931
2905
  z-index: 50;
2932
2906
  border-right: 0;
2933
- background: var(--castle-sheet-bg);
2907
+ background: var(--castle-surface-2);
2934
2908
  }
2935
2909
 
2936
2910
  .fileBrowser[data-sheet-snap='high'] {
@@ -2947,7 +2921,7 @@
2947
2921
  .inspector {
2948
2922
  z-index: 45;
2949
2923
  border-left: 0;
2950
- background: var(--castle-workspace-bg);
2924
+ background: var(--castle-surface-2);
2951
2925
  padding: 0;
2952
2926
  }
2953
2927
 
@@ -2976,12 +2950,12 @@
2976
2950
  cursor: grab;
2977
2951
  user-select: none;
2978
2952
  touch-action: none;
2979
- background: var(--castle-sheet-bg);
2980
- border-bottom: 1px solid var(--castle-inspector-divider);
2953
+ background: var(--castle-surface-2);
2954
+ border-bottom: 1px solid var(--castle-border-1);
2981
2955
  }
2982
2956
 
2983
2957
  .inspector .sheetGrab {
2984
- background: var(--castle-workspace-bg);
2958
+ background: var(--castle-surface-2);
2985
2959
  }
2986
2960
 
2987
2961
  .sheetGrabBar {
@@ -2989,7 +2963,7 @@
2989
2963
  width: 36px;
2990
2964
  height: 4px;
2991
2965
  border-radius: 999px;
2992
- background: var(--castle-inspector-divider);
2966
+ background: var(--castle-border-1);
2993
2967
  margin: 0 auto;
2994
2968
  flex: 0 0 4px;
2995
2969
  }
@@ -3001,7 +2975,7 @@
3001
2975
  }
3002
2976
 
3003
2977
  .inspectorBody {
3004
- background: var(--castle-workspace-bg);
2978
+ background: var(--castle-surface-2);
3005
2979
  }
3006
2980
 
3007
2981
  .codeInspectorInfo {
@@ -3010,7 +2984,7 @@
3010
2984
  gap: 6px 12px;
3011
2985
  padding: 14px 16px;
3012
2986
  font-size: 14px;
3013
- color: var(--castle-inspector-text);
2987
+ color: var(--castle-text-primary);
3014
2988
  word-break: break-all;
3015
2989
  }
3016
2990
  }
@@ -3026,11 +3000,11 @@
3026
3000
  height: 100%;
3027
3001
  min-width: 0;
3028
3002
  min-height: 0;
3029
- background: var(--castle-workspace-bg);
3003
+ background: var(--castle-surface-2);
3030
3004
  }
3031
3005
  /* In a panel the scene editor's tools row must stay visible even below 860px --
3032
3006
  it normally moves into the mobile header, which bare mode removes. Restore the
3033
- full-height tools row (--castle-hotbar-row-full, same as the desktop track) and
3007
+ full-height tools row (--kit-hotbar-row-full, same as the desktop track) and
3034
3008
  put the stage back in row 2 (the narrow layout moves it up into row 1). The row
3035
3009
  must use the full height -- a shorter hardcoded track left the centered 46px
3036
3010
  hotbar buttons overhanging the stage, which clipped their bottoms.
@@ -3042,7 +3016,7 @@
3042
3016
  is driven by the @container editor (max-width: 620px) rule on .editorBody. */
3043
3017
  @media (max-width: 860px) {
3044
3018
  .panelBare .sceneWorkspace {
3045
- grid-template-rows: var(--castle-hotbar-row-full) minmax(0, 1fr);
3019
+ grid-template-rows: var(--kit-hotbar-row-full) minmax(0, 1fr);
3046
3020
  }
3047
3021
  .panelBare .sceneTools {
3048
3022
  display: grid;