chesspal 0.1.0 → 0.2.0

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 (209) hide show
  1. package/README.md +45 -82
  2. package/dist/cli/chat-hook.js +1 -1
  3. package/dist/cli/command-line.d.ts +1 -2
  4. package/dist/cli/command-line.js +2 -3
  5. package/dist/commands/agents.d.ts +26 -0
  6. package/dist/commands/agents.js +72 -0
  7. package/dist/commands/ai-move.d.ts +5 -14
  8. package/dist/commands/ai-move.js +28 -35
  9. package/dist/commands/ai-say.d.ts +3 -1
  10. package/dist/commands/ai-say.js +24 -6
  11. package/dist/commands/analyse-game.d.ts +4 -0
  12. package/dist/commands/analyse-game.js +43 -16
  13. package/dist/commands/annotate-game.d.ts +4 -0
  14. package/dist/commands/annotate-game.js +65 -12
  15. package/dist/commands/answer-lines.d.ts +28 -0
  16. package/dist/commands/answer-lines.js +144 -0
  17. package/dist/commands/coach.d.ts +45 -0
  18. package/dist/commands/coach.js +344 -0
  19. package/dist/commands/context.d.ts +16 -5
  20. package/dist/commands/context.js +1 -0
  21. package/dist/commands/delete-game.d.ts +7 -0
  22. package/dist/commands/delete-game.js +30 -0
  23. package/dist/commands/delete-review.d.ts +8 -0
  24. package/dist/commands/delete-review.js +34 -0
  25. package/dist/commands/drawings.d.ts +0 -2
  26. package/dist/commands/drawings.js +5 -3
  27. package/dist/commands/end-game.js +5 -2
  28. package/dist/commands/export-game.d.ts +1 -1
  29. package/dist/commands/export-game.js +4 -3
  30. package/dist/commands/game-summary.d.ts +21 -38
  31. package/dist/commands/game-summary.js +30 -167
  32. package/dist/commands/index.d.ts +15 -0
  33. package/dist/commands/index.js +47 -2
  34. package/dist/commands/init.d.ts +3 -3
  35. package/dist/commands/init.js +4 -4
  36. package/dist/commands/lead-input.d.ts +8 -0
  37. package/dist/commands/lead-input.js +21 -0
  38. package/dist/commands/look.js +4 -1
  39. package/dist/commands/new-game.d.ts +2 -3
  40. package/dist/commands/new-game.js +7 -4
  41. package/dist/commands/play-move.d.ts +8 -15
  42. package/dist/commands/play-move.js +5 -13
  43. package/dist/commands/player-move.d.ts +2 -6
  44. package/dist/commands/player-move.js +13 -6
  45. package/dist/commands/player-say.d.ts +1 -1
  46. package/dist/commands/player-say.js +1 -1
  47. package/dist/commands/ponder.d.ts +10 -0
  48. package/dist/commands/ponder.js +33 -21
  49. package/dist/commands/position.d.ts +1 -1
  50. package/dist/commands/position.js +3 -1
  51. package/dist/commands/profiles.d.ts +13 -4
  52. package/dist/commands/profiles.js +49 -15
  53. package/dist/commands/registry.d.ts +8 -3
  54. package/dist/commands/registry.js +12 -11
  55. package/dist/commands/say.d.ts +1 -1
  56. package/dist/commands/say.js +16 -16
  57. package/dist/commands/speech.d.ts +8 -0
  58. package/dist/commands/speech.js +20 -0
  59. package/dist/commands/status.d.ts +9 -3
  60. package/dist/commands/status.js +40 -15
  61. package/dist/commands/study-games.js +1 -1
  62. package/dist/commands/study.js +3 -19
  63. package/dist/core/facts.js +15 -15
  64. package/dist/core/game.d.ts +3 -1
  65. package/dist/core/game.js +8 -4
  66. package/dist/core/illegal.js +1 -1
  67. package/dist/core/index.d.ts +5 -4
  68. package/dist/core/index.js +5 -4
  69. package/dist/core/lead.d.ts +15 -0
  70. package/dist/core/lead.js +40 -0
  71. package/dist/core/levels.d.ts +1 -1
  72. package/dist/core/levels.js +1 -1
  73. package/dist/core/moods.d.ts +0 -2
  74. package/dist/core/moods.js +2 -2
  75. package/dist/core/openings.d.ts +0 -2
  76. package/dist/core/openings.js +1 -1
  77. package/dist/core/profile.js +1 -1
  78. package/dist/core/record.d.ts +1 -1
  79. package/dist/core/record.js +1 -1
  80. package/dist/core/review.d.ts +9 -3
  81. package/dist/core/review.js +29 -9
  82. package/dist/games/analysis.d.ts +1 -1
  83. package/dist/games/archive.d.ts +24 -3
  84. package/dist/games/archive.js +96 -22
  85. package/dist/games/coach.d.ts +57 -0
  86. package/dist/games/coach.js +144 -0
  87. package/dist/games/current-game.d.ts +2 -0
  88. package/dist/games/current-game.js +7 -1
  89. package/dist/games/files.js +1 -0
  90. package/dist/games/index.d.ts +4 -3
  91. package/dist/games/index.js +4 -3
  92. package/dist/games/talk.d.ts +1 -5
  93. package/dist/games/talk.js +14 -14
  94. package/dist/home/open-folder.js +1 -1
  95. package/dist/host-files/{ponder-agents.d.ts → agents.d.ts} +10 -2
  96. package/dist/host-files/agents.js +53 -0
  97. package/dist/host-files/host-files.d.ts +7 -2
  98. package/dist/host-files/host-files.js +27 -12
  99. package/dist/host-files/index.d.ts +2 -2
  100. package/dist/host-files/index.js +3 -3
  101. package/dist/index.d.ts +1 -3
  102. package/dist/index.js +1 -0
  103. package/dist/page/app/anchor.js +88 -0
  104. package/dist/page/{app.js → app/app.js} +112 -230
  105. package/dist/page/app/keys.js +94 -0
  106. package/dist/page/app/phase.js +30 -0
  107. package/dist/page/app/served.js +73 -0
  108. package/dist/page/avatars/avatars.js +19 -0
  109. package/dist/page/avatars/thought.js +10 -0
  110. package/dist/page/base.css +160 -0
  111. package/dist/page/board/board.css +959 -0
  112. package/dist/page/board/board.js +125 -0
  113. package/dist/page/{explain.js → board/explain.js} +1 -1
  114. package/dist/page/board/marks.js +160 -0
  115. package/dist/page/board/motion.js +71 -0
  116. package/dist/page/board/pointer.js +239 -0
  117. package/dist/page/board/squares.js +26 -0
  118. package/dist/page/dialogs/analyses.js +195 -0
  119. package/dist/page/{dialog.js → dialogs/dialog.js} +1 -1
  120. package/dist/page/dialogs/dialogs.css +1228 -0
  121. package/dist/page/{new-game-dialog.js → dialogs/new-game.js} +3 -3
  122. package/dist/page/{profile-dialogs.js → dialogs/profiles.js} +40 -11
  123. package/dist/page/dialogs/search.js +31 -0
  124. package/dist/page/dialogs/settings.js +42 -0
  125. package/dist/page/dialogs/studied.js +39 -0
  126. package/dist/page/dialogs/study.js +51 -0
  127. package/dist/page/{badges.js → game/badges.js} +1 -1
  128. package/dist/page/{browse.js → game/browse.js} +1 -1
  129. package/dist/page/game/card-fold.js +40 -0
  130. package/dist/page/game/column.js +51 -0
  131. package/dist/page/{ending.js → game/ending.js} +2 -2
  132. package/dist/page/game/game.css +577 -0
  133. package/dist/page/{move-list.js → game/move-list.js} +10 -6
  134. package/dist/page/{plies.js → game/plies.js} +30 -10
  135. package/dist/page/game/result-tile.js +14 -0
  136. package/dist/page/helps/helps.css +689 -0
  137. package/dist/page/helps/helps.js +220 -0
  138. package/dist/page/helps/view.js +127 -0
  139. package/dist/page/layout/fold-tab.js +11 -0
  140. package/dist/page/{folds.js → layout/folds.js} +1 -1
  141. package/dist/page/{header.js → layout/header.js} +5 -4
  142. package/dist/page/layout/layout.css +834 -0
  143. package/dist/page/lead/lead.js +82 -0
  144. package/dist/page/lead/view.js +38 -0
  145. package/dist/page/main.js +2 -2
  146. package/dist/page/pieces/CREDITS.md +12 -29
  147. package/dist/page/pieces/capablanca-small.svg +20 -0
  148. package/dist/page/pieces/capablanca.svg +22 -0
  149. package/dist/page/pieces/nitida-small.svg +3 -2
  150. package/dist/page/pieces/nitida.svg +3 -2
  151. package/dist/page/{pieces.js → pieces/pieces.js} +2 -2
  152. package/dist/page/pieces/torretta-small.svg +15 -14
  153. package/dist/page/pieces/torretta.svg +17 -15
  154. package/dist/page/{player-card.js → players/card.js} +2 -6
  155. package/dist/page/{clock-time.js → players/clock-time.js} +2 -2
  156. package/dist/page/{profile.js → profile/profile.js} +9 -5
  157. package/dist/page/{settings.js → profile/settings.js} +5 -4
  158. package/dist/page/style.css +9 -4398
  159. package/dist/page/talk/talk.css +958 -0
  160. package/dist/page/{talk.js → talk/talk.js} +39 -46
  161. package/dist/page/text.js +137 -19
  162. package/dist/page/theme.css +292 -0
  163. package/dist/profiles/index.d.ts +1 -1
  164. package/dist/profiles/profiles.d.ts +15 -4
  165. package/dist/profiles/profiles.js +24 -7
  166. package/dist/server/bell.d.ts +10 -2
  167. package/dist/server/bell.js +28 -12
  168. package/dist/server/caller.d.ts +14 -3
  169. package/dist/server/caller.js +44 -11
  170. package/dist/server/mcp.d.ts +1 -2
  171. package/dist/server/mcp.js +42 -14
  172. package/dist/server/page/analyses.d.ts +23 -0
  173. package/dist/server/page/analyses.js +65 -0
  174. package/dist/server/page/files.d.ts +5 -0
  175. package/dist/server/page/files.js +92 -0
  176. package/dist/server/page/game.d.ts +6 -0
  177. package/dist/server/page/game.js +381 -0
  178. package/dist/server/{http.d.ts → page/http.d.ts} +13 -0
  179. package/dist/server/{http.js → page/http.js} +11 -0
  180. package/dist/server/{page.d.ts → page/page.d.ts} +8 -13
  181. package/dist/server/page/page.js +229 -0
  182. package/dist/server/{profile-routes.d.ts → page/profiles.d.ts} +2 -2
  183. package/dist/server/{profile-routes.js → page/profiles.js} +47 -18
  184. package/instructions/analysis.md +4 -0
  185. package/instructions/analyst-agent.md +8 -0
  186. package/instructions/analyst.md +3 -7
  187. package/instructions/coach.md +11 -0
  188. package/instructions/opponent.md +4 -4
  189. package/package.json +1 -1
  190. package/dist/host-files/ponder-agents.js +0 -40
  191. package/dist/page/avatars.js +0 -16
  192. package/dist/page/board.js +0 -566
  193. package/dist/page/fold-tab.js +0 -9
  194. package/dist/page/game-column.js +0 -44
  195. package/dist/page/helps-view.js +0 -51
  196. package/dist/page/helps.js +0 -90
  197. package/dist/page/pieces/cburnett-small.svg +0 -20
  198. package/dist/page/pieces/cburnett.svg +0 -20
  199. package/dist/page/settings-panel.js +0 -32
  200. package/dist/page/studied.js +0 -14
  201. package/dist/page/study-dialog.js +0 -58
  202. package/dist/server/analyses.d.ts +0 -17
  203. package/dist/server/analyses.js +0 -46
  204. package/dist/server/page.js +0 -657
  205. /package/dist/page/{torretta.js → avatars/torretta.js} +0 -0
  206. /package/dist/page/{opening-book.js → game/opening-book.js} +0 -0
  207. /package/dist/page/{model-name.js → players/model-name.js} +0 -0
  208. /package/dist/page/{sounds.js → sounds/sounds.js} +0 -0
  209. /package/dist/page/{voice.js → talk/voice.js} +0 -0
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
2
+ // The result of a game as a little board: the winner's king standing over the loser's, laid down, or both standing in a draw; the game's card and the
3
+ // list of the analyses show it.
4
+ import { Piece } from "../pieces/pieces.js";
5
+ /** The tile of a game's result, 1-0, 0-1 or 1/2-1/2; a star for a game without one. */
6
+ export function ResultTile({ result }) {
7
+ const winner = result === "1-0" ? "white" : result === "0-1" ? "black" : undefined;
8
+ if (winner !== undefined) {
9
+ return (_jsxs("span", { class: "tile over win", "aria-hidden": "true", children: [_jsx("span", { class: "down", children: _jsx(Piece, { letter: winner === "white" ? "k" : "K" }) }), _jsx("span", { class: "up", children: _jsx(Piece, { letter: winner === "white" ? "K" : "k" }) })] }));
10
+ }
11
+ return result === "1/2-1/2"
12
+ ? (_jsxs("span", { class: "tile over draw", "aria-hidden": "true", children: [_jsx(Piece, { letter: "K" }), _jsx(Piece, { letter: "k" })] }))
13
+ : _jsx("span", { class: "tile open", "aria-hidden": "true", children: "*" });
14
+ }
@@ -0,0 +1,689 @@
1
+ /* The helps (D-78): their signs on the board, their card, the coach and the strategy's table */
2
+
3
+ /* A piece at risk: a corner folded, bottom left, the square's free corner; in ink, or in the player's red and green (D-91) */
4
+ .help-notch {
5
+ position: absolute;
6
+ left: 0;
7
+ bottom: 0;
8
+ z-index: 2;
9
+ display: block;
10
+ width: clamp(14px, 6.5cqw, 44px);
11
+ height: clamp(14px, 6.5cqw, 44px);
12
+ pointer-events: none;
13
+ }
14
+
15
+ .help-notch svg {
16
+ display: block;
17
+ width: 100%;
18
+ height: 100%;
19
+ }
20
+
21
+ .help-notch path {
22
+ fill: var(--help-ink);
23
+ stroke: var(--help-halo);
24
+ stroke-width: 0.9;
25
+ stroke-linejoin: round;
26
+ }
27
+
28
+ .help-notch circle {
29
+ fill: var(--help-on);
30
+ }
31
+
32
+ /* From the player's side (D-91): red on their pieces at risk, green on the other side's, edged in ink inside a wider halo (Zoe) */
33
+ .help-notch.threat path {
34
+ fill: var(--badge-blunder);
35
+ }
36
+
37
+ .help-notch.chance path {
38
+ fill: var(--badge-best);
39
+ }
40
+
41
+ .help-notch.threat path,
42
+ .help-notch.chance path {
43
+ stroke-width: 1.6;
44
+ }
45
+
46
+ .help-notch path.edge {
47
+ fill: none;
48
+ stroke: var(--help-ink);
49
+ stroke-width: 0.5;
50
+ }
51
+
52
+ /* A pin: a thin dashed ink line from the pinner to what stands behind, under the arrows; without a head, never an arrow */
53
+ .helps-layer {
54
+ position: absolute;
55
+ left: 0;
56
+ top: 0;
57
+ width: 100%;
58
+ aspect-ratio: 1;
59
+ z-index: 1;
60
+ pointer-events: none;
61
+ }
62
+
63
+ /* A pin's line: a pale halo under the dashes, so they read on the dark squares as on the light */
64
+ .helps-layer line.halo {
65
+ stroke: rgba(255, 255, 255, 0.35);
66
+ stroke-width: 0.13;
67
+ }
68
+
69
+ .helps-layer line:not(.halo) {
70
+ stroke: var(--help-line);
71
+ stroke-width: 0.065;
72
+ stroke-dasharray: 0.16 0.12;
73
+ stroke-linecap: round;
74
+ }
75
+
76
+ /* The map (Zoe, after the round): every square on one neutral ground, then light where only White reaches, dark where only Black does, half and half
77
+ when both do; the two counts together in the middle, as a domino. The drawings and the pieces step back */
78
+ .board.mapping ~ .arrows,
79
+ .board.mapping .move-badge {
80
+ opacity: 0.12;
81
+ }
82
+
83
+ .board.mapping .square.noted::after {
84
+ opacity: 0.15;
85
+ }
86
+
87
+ .board.mapping .piece {
88
+ opacity: 0.45;
89
+ }
90
+
91
+ .control-ground {
92
+ position: absolute;
93
+ inset: 0;
94
+ pointer-events: none;
95
+ background: #8d96a1;
96
+ }
97
+
98
+ .control-ground.white {
99
+ background: #eef1f4;
100
+ }
101
+
102
+ .control-ground.black {
103
+ background: #2b323c;
104
+ }
105
+
106
+ .control-ground.both {
107
+ background: linear-gradient(135deg, #eef1f4 50%, #2b323c 50%);
108
+ }
109
+
110
+ .control-count {
111
+ position: absolute;
112
+ left: 50%;
113
+ top: 50%;
114
+ z-index: 1;
115
+ display: flex;
116
+ translate: -50% -50%;
117
+ border-radius: 4px;
118
+ overflow: hidden;
119
+ box-shadow: 0 0 0 1px rgba(17, 22, 29, 0.55);
120
+ pointer-events: none;
121
+ /* A font of its own, heavy and sized by the board, not the page's: the counts must read on any square at any width */
122
+ font: 800 clamp(10px, 2.2cqw, 17px) / 1 "Segoe UI", system-ui, sans-serif;
123
+ }
124
+
125
+ .control-count b {
126
+ min-width: 1.35em;
127
+ padding: 0.2em 0.25em;
128
+ text-align: center;
129
+ }
130
+
131
+ .control-count .white {
132
+ background: #fff;
133
+ color: var(--help-ink);
134
+ }
135
+
136
+ .control-count .black {
137
+ background: var(--help-ink);
138
+ color: #fff;
139
+ }
140
+
141
+ /* The helps' card in the game's column */
142
+ .helps-card {
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 8px;
146
+ font-size: 13px;
147
+ min-height: 0;
148
+ flex: 0 1 auto;
149
+ /* No scrollbar in the page (Stefano): the card fits its column's width, and a column too short for it scrolls it under the wheel or the finger */
150
+ overflow: hidden auto;
151
+ scrollbar-width: none;
152
+ }
153
+
154
+ /* The card's title, and on its right the icons held: the map and the board without its drawings */
155
+ .helps-head {
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: space-between;
159
+ gap: 8px;
160
+ }
161
+
162
+ .helps-tools {
163
+ display: flex;
164
+ gap: 4px;
165
+ }
166
+
167
+ .helps-head .hold-button {
168
+ padding: 3px 6px;
169
+ }
170
+
171
+ /* The coach's words at the top of the card (D-88): its judgment of the player's last move, then its hint, folded until they open it */
172
+ .helps-card .coach {
173
+ display: flex;
174
+ flex-direction: column;
175
+ gap: 6px;
176
+ font-size: 14px;
177
+ }
178
+
179
+ .coach-hint summary {
180
+ cursor: pointer;
181
+ list-style: none;
182
+ color: var(--accent);
183
+ font-weight: 600;
184
+ }
185
+
186
+ .coach-hint summary::-webkit-details-marker {
187
+ display: none;
188
+ }
189
+
190
+ /* The same sign on both, so that on a phone, with no pointer, they read as lines that open (Zoe) */
191
+ .helps-card .coach summary::after,
192
+ .board-map .coach-hint summary::after {
193
+ content: "▸";
194
+ margin-left: 6px;
195
+ color: var(--soft);
196
+ }
197
+
198
+ .helps-card .coach details[open] > summary::after,
199
+ .board-map .coach-hint[open] > summary::after {
200
+ content: "▾";
201
+ }
202
+
203
+ .coach-hint .note {
204
+ display: block;
205
+ margin-top: 4px;
206
+ color: var(--say-ink);
207
+ font-size: 14.5px;
208
+ }
209
+
210
+ /* The squares and moves in the coach's words in the accent, as in the AI's, to find on the board; the move it judged with its number, which may be the one before */
211
+ .helps-card .coach .on-board,
212
+ .board-map .coach-hint .on-board {
213
+ color: var(--accent);
214
+ }
215
+
216
+ .helps-card .coach .move-number {
217
+ display: inline;
218
+ }
219
+
220
+ .help-rows {
221
+ list-style: none;
222
+ margin: 0;
223
+ padding: 0;
224
+ display: flex;
225
+ flex-direction: column;
226
+ gap: 3px;
227
+ color: var(--soft);
228
+ }
229
+
230
+ /* Each line in its colour, on its icon and as a light tint (Stefano): nothing at risk green, the strategy's notes in the accent */
231
+ .help-rows li {
232
+ --row: var(--soft);
233
+ position: relative;
234
+ padding: 3px 6px 3px 26px;
235
+ border-radius: 6px;
236
+ line-height: 1.35;
237
+ background: color-mix(in srgb, var(--row) 10%, transparent);
238
+ }
239
+
240
+ .help-rows li.safe {
241
+ --row: var(--badge-best);
242
+ color: var(--ink);
243
+ }
244
+
245
+ .help-rows li.info {
246
+ --row: var(--accent);
247
+ }
248
+
249
+ /* A line of the tactics (D-91): red when it threatens the player, green when it is their chance, in the accent when no side is theirs; its icon says the kind */
250
+ .help-rows li.help-line {
251
+ --row: var(--accent);
252
+ padding: 0;
253
+ }
254
+
255
+ /* A threat also has a bar on its left, so that its shape says it where red and green look alike (Zoe) */
256
+ .help-rows li.threat {
257
+ --row: var(--badge-blunder);
258
+ box-shadow: inset 3px 0 var(--row);
259
+ }
260
+
261
+ .help-rows li.chance {
262
+ --row: var(--badge-best);
263
+ }
264
+
265
+ .help-rows li.loose {
266
+ --row: var(--soft);
267
+ }
268
+
269
+ /* Its head, a button that opens it: the name in ink, then the count on the right and the sign of a line that opens, as the coach's (Zoe) */
270
+ .help-rows .line-head {
271
+ position: relative;
272
+ display: flex;
273
+ align-items: baseline;
274
+ gap: 8px;
275
+ width: 100%;
276
+ padding: 3px 8px 3px 26px;
277
+ border: 0;
278
+ border-radius: 6px;
279
+ background: none;
280
+ color: var(--ink);
281
+ font: inherit;
282
+ text-align: left;
283
+ cursor: pointer;
284
+ }
285
+
286
+ .help-rows .line-head::after {
287
+ content: "▸";
288
+ color: var(--soft);
289
+ }
290
+
291
+ .help-rows .line-head[aria-expanded="true"]::after {
292
+ content: "▾";
293
+ }
294
+
295
+ /* A finger needs a taller line, and the whole of a strategy's name (Zoe) */
296
+ @media (pointer: coarse) {
297
+ .help-rows .line-head {
298
+ padding-block: 7px;
299
+ }
300
+
301
+ .strategy-table .term {
302
+ display: block;
303
+ width: 100%;
304
+ padding: 6px 0;
305
+ }
306
+ }
307
+
308
+ .help-rows .line-head:hover,
309
+ .help-rows li.open .line-head {
310
+ background: color-mix(in srgb, var(--row) 16%, transparent);
311
+ }
312
+
313
+ .help-rows .line-name {
314
+ flex: 1;
315
+ }
316
+
317
+ .help-rows .count {
318
+ color: var(--ink);
319
+ font-variant-numeric: tabular-nums;
320
+ }
321
+
322
+ /* The loose pieces' counts, each after its side's pawn (Zoe) */
323
+ .help-rows .counts {
324
+ display: flex;
325
+ gap: 10px;
326
+ font-size: 12px;
327
+ }
328
+
329
+ .help-rows .counts .figurine {
330
+ margin-right: 2px;
331
+ }
332
+
333
+ /* An opened line: its pieces, each lighting its squares under the pointer */
334
+ .help-rows .line-details {
335
+ list-style: none;
336
+ margin: 0;
337
+ padding: 2px 8px 5px 26px;
338
+ font-size: 12.5px;
339
+ }
340
+
341
+ .help-rows .line-details li {
342
+ padding: 2px 4px;
343
+ background: none;
344
+ }
345
+
346
+ .help-rows .line-details li:hover {
347
+ background: color-mix(in srgb, var(--row) 16%, transparent);
348
+ color: var(--ink);
349
+ }
350
+
351
+ .help-rows .square-name {
352
+ color: var(--ink);
353
+ }
354
+
355
+ /* The checks and the loose pieces in figures, as the move list draws them; the loose ones White's first, then Black's. */
356
+ .help-rows .help-move {
357
+ margin-right: 0.5em;
358
+ color: var(--ink);
359
+ font-weight: 600;
360
+ white-space: nowrap;
361
+ }
362
+
363
+ .help-rows .help-pieces + .help-pieces {
364
+ margin-left: 0.4em;
365
+ padding-left: 0.6em;
366
+ border-left: 1px solid var(--line);
367
+ }
368
+
369
+ .help-rows .help-notch {
370
+ left: 6px;
371
+ top: 4px;
372
+ bottom: auto;
373
+ width: 14px;
374
+ height: 14px;
375
+ }
376
+
377
+ .help-rows .help-notch path {
378
+ fill: var(--row);
379
+ stroke: none;
380
+ }
381
+
382
+ .help-rows .help-notch circle {
383
+ fill: var(--card);
384
+ }
385
+
386
+ .help-rows .row-icon {
387
+ position: absolute;
388
+ left: 6px;
389
+ top: 3px;
390
+ width: 14px;
391
+ height: 16px;
392
+ display: grid;
393
+ place-items: center;
394
+ color: var(--row);
395
+ }
396
+
397
+ .help-rows .row-icon svg {
398
+ width: 14px;
399
+ height: 14px;
400
+ fill: none;
401
+ stroke: currentColor;
402
+ stroke-width: 1.7;
403
+ stroke-linecap: round;
404
+ stroke-linejoin: round;
405
+ }
406
+
407
+ .helps-card .tabs {
408
+ display: flex;
409
+ gap: 4px;
410
+ border-bottom: 1px solid var(--line);
411
+ }
412
+
413
+ .helps-card .tabs [role="tab"] {
414
+ border: 0;
415
+ background: none;
416
+ color: var(--soft);
417
+ font: inherit;
418
+ font-weight: 600;
419
+ padding: 4px 8px 6px;
420
+ border-bottom: 2px solid transparent;
421
+ margin-bottom: -1px;
422
+ cursor: pointer;
423
+ }
424
+
425
+ .helps-card .tabs [role="tab"][aria-selected="true"] {
426
+ color: var(--ink);
427
+ border-bottom-color: var(--accent);
428
+ }
429
+
430
+ /* The icons held, the map's and the one that hides the drawings: in the card's title, or under the board on a phone */
431
+ .hold-button {
432
+ display: flex;
433
+ align-items: center;
434
+ border: 1px solid var(--line);
435
+ border-radius: 6px;
436
+ padding: 2px 8px;
437
+ background: var(--card);
438
+ color: var(--soft);
439
+ cursor: pointer;
440
+ touch-action: none;
441
+ user-select: none;
442
+ }
443
+
444
+ .board-map .hold-button {
445
+ padding: 7px 12px;
446
+ }
447
+
448
+ .hold-button svg {
449
+ width: 14px;
450
+ height: 14px;
451
+ fill: currentColor;
452
+ }
453
+
454
+ /* The eye shut, drawn in lines */
455
+ .hold-button.bare-button svg {
456
+ width: 15px;
457
+ height: 15px;
458
+ fill: none;
459
+ stroke: currentColor;
460
+ stroke-width: 1.4;
461
+ stroke-linecap: round;
462
+ stroke-linejoin: round;
463
+ }
464
+
465
+ .hold-button[aria-pressed="true"] {
466
+ background: var(--accent);
467
+ color: var(--on-accent);
468
+ border-color: var(--accent);
469
+ }
470
+
471
+ .strategy-table {
472
+ width: 100%;
473
+ border-collapse: collapse;
474
+ font-size: 12.5px;
475
+ color: var(--soft);
476
+ }
477
+
478
+ .strategy-table th,
479
+ .strategy-table td {
480
+ padding: 2px 4px;
481
+ text-align: left;
482
+ font-weight: 400;
483
+ }
484
+
485
+ .strategy-table thead th {
486
+ color: var(--ink);
487
+ font-weight: 700;
488
+ }
489
+
490
+ .strategy-table tbody tr + tr {
491
+ border-top: 1px solid var(--line);
492
+ }
493
+
494
+ /* A term with its meaning under the pointer, and under its line at a click or a tap (Rosa). */
495
+ .strategy-table .term {
496
+ padding: 0;
497
+ border: 0;
498
+ background: none;
499
+ color: inherit;
500
+ font: inherit;
501
+ text-align: left;
502
+ text-decoration: underline dotted color-mix(in srgb, var(--soft) 60%, transparent);
503
+ text-underline-offset: 3px;
504
+ cursor: help;
505
+ }
506
+
507
+ .strategy-table tbody tr.meaning {
508
+ border-top: 0;
509
+ }
510
+
511
+ .strategy-table tr.meaning td {
512
+ padding-bottom: 4px;
513
+ font-size: 12px;
514
+ font-style: italic;
515
+ }
516
+
517
+ /* Under the meaning, each side's squares or files (Stefano) */
518
+ .strategy-table tr.meaning .listed {
519
+ display: block;
520
+ margin-top: 3px;
521
+ font-style: normal;
522
+ }
523
+
524
+ /* The table's groups under their figure, in the accent; the sides' heads with their pawn */
525
+ .strategy-table tr.group th {
526
+ padding-top: 7px;
527
+ color: var(--accent);
528
+ font-size: 12px;
529
+ font-weight: 700;
530
+ }
531
+
532
+ .strategy-table tbody tr.group + tr {
533
+ border-top: 0;
534
+ }
535
+
536
+ /* The strategy (Stefano): the phase in a pill and the open files on top, then the bar of the squares controlled, the table in groups, the notes */
537
+ .strategy {
538
+ display: flex;
539
+ flex-direction: column;
540
+ gap: 8px;
541
+ }
542
+
543
+ .strategy-head {
544
+ display: flex;
545
+ flex-wrap: wrap;
546
+ align-items: center;
547
+ gap: 4px 10px;
548
+ margin: 0;
549
+ font-size: 12px;
550
+ color: var(--soft);
551
+ }
552
+
553
+ .strategy .phase {
554
+ padding: 1px 9px;
555
+ border-radius: 999px;
556
+ background: color-mix(in srgb, var(--accent) 20%, transparent);
557
+ color: var(--ink);
558
+ font-weight: 700;
559
+ }
560
+
561
+ /* Squares and files in chips, a count in bold, a yes as a green tick, nothing as a faint dash, no more as a faint cross */
562
+ .strategy .chip {
563
+ display: inline-block;
564
+ margin: 1px 3px 1px 0;
565
+ padding: 0 5px;
566
+ border-radius: 4px;
567
+ background: color-mix(in srgb, var(--ink) 10%, transparent);
568
+ color: var(--ink);
569
+ font-weight: 700;
570
+ }
571
+
572
+ .strategy .count {
573
+ color: var(--ink);
574
+ font-size: 12px;
575
+ font-variant-numeric: tabular-nums;
576
+ }
577
+
578
+ .strategy .none {
579
+ opacity: 0.5;
580
+ }
581
+
582
+ .strategy .yes,
583
+ .strategy .no {
584
+ display: inline-grid;
585
+ vertical-align: -3px;
586
+ }
587
+
588
+ .strategy .no svg {
589
+ width: 14px;
590
+ height: 14px;
591
+ fill: none;
592
+ stroke: var(--soft);
593
+ stroke-width: 2;
594
+ stroke-linecap: round;
595
+ }
596
+
597
+ .strategy .yes svg {
598
+ width: 16px;
599
+ height: 16px;
600
+ fill: none;
601
+ stroke: var(--badge-best);
602
+ stroke-width: 2.2;
603
+ stroke-linecap: round;
604
+ stroke-linejoin: round;
605
+ }
606
+
607
+ /* The squares each side controls: White's in white, both in grey, Black's in black, each as long as its count */
608
+ .control {
609
+ display: grid;
610
+ gap: 3px;
611
+ font-size: 11px;
612
+ color: var(--soft);
613
+ }
614
+
615
+ .control-title {
616
+ font-size: 12px;
617
+ }
618
+
619
+ .control-bar {
620
+ display: flex;
621
+ height: 18px;
622
+ border: 1px solid var(--line);
623
+ border-radius: 5px;
624
+ overflow: hidden;
625
+ font-weight: 700;
626
+ }
627
+
628
+ .control-bar span {
629
+ flex-basis: 0;
630
+ display: grid;
631
+ place-items: center;
632
+ min-width: 20px;
633
+ }
634
+
635
+ .control-bar .white {
636
+ background: #f4f6f8;
637
+ color: var(--fixed-ink);
638
+ }
639
+
640
+ .control-bar .both {
641
+ background: #8d98a7;
642
+ color: #fff;
643
+ }
644
+
645
+ .control-bar .black {
646
+ background: var(--fixed-ink);
647
+ color: #f4f6f8;
648
+ }
649
+
650
+ .control-legend {
651
+ display: flex;
652
+ justify-content: space-between;
653
+ }
654
+
655
+ .strategy-table .figurine {
656
+ margin-right: 3px;
657
+ }
658
+
659
+ /* On a phone, or in a narrow window, the map of the squares and the coach's hint go under the board, out of the helps' card */
660
+ @media (max-width: 840px) {
661
+ .board-map {
662
+ display: flow-root;
663
+ grid-area: map;
664
+ font-size: 14px;
665
+ }
666
+
667
+ .board-map .hold-button {
668
+ float: right;
669
+ margin-left: 8px;
670
+ }
671
+
672
+ .helps-card .hold-button {
673
+ display: none;
674
+ }
675
+
676
+ /* The coach's hint under the board, its words under its line, the map on its right; the card keeps the judgments (Zoe) */
677
+ .board-map .coach-hint summary {
678
+ padding: 6px 0;
679
+ }
680
+
681
+ .board-map .coach-hint .note {
682
+ clear: right;
683
+ }
684
+
685
+ .helps-card .coach-hint,
686
+ .helps-card .coach.hint-only {
687
+ display: none;
688
+ }
689
+ }