Repository navigation
Expand file tree
/
Copy pathcontrols.css
More file actions
524 lines (491 loc) · 19 KB
/
Copy pathcontrols.css
File metadata and controls
524 lines (491 loc) · 19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
/*
Controls and forms for the shell: buttons, links, badges, inputs, tabs,
the choice cards, progress bars, the d20 spinner, and the motion rules.
Split from style.css so each sheet stays a readable size; both are
linked by every shell page.
*/
/* ---------- controls ---------- */
/* Bare element rules are the shell's alone: inside .game-root the host's
pages style their own forms, labels, inputs and buttons. Without this a
game <label> became a flex column and the composer <form> a flex box, which
let the Hand push the table's layout apart. */
button:where(:not(.game-root *)) {
font: inherit;
border: 0;
cursor: pointer;
color: inherit;
background: none;
padding: 0;
-webkit-tap-highlight-color: transparent;
}
button:where(:not(.game-root *)):disabled { cursor: default; }
button:where(:not(.game-root *)):focus-visible { outline: 2px solid color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 60%, transparent); outline-offset: 2px; }
/* The controller's highlight (src/renderer/gamepad.ts), on whatever it
lands on, the game's own controls included. Script focus after a tap no
longer counts as :focus-visible, so this keys off :focus while a pad is
in use; the title screen's lines, slots and Enter light their own way. */
html.pad-active :focus:not(.tt-menu-item, .tt-slot, .tt-enter) {
outline: 2px solid color-mix(in srgb, var(--theme-night-amber-300, #ecd287) 95%, transparent);
outline-offset: 2px;
}
/* The two doors of the title screen: the gold one lit from within, and the
quiet hairline of gold over the night. */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
height: 44px;
padding: 0 1.2rem;
border-radius: 8px;
font-family: var(--font-display);
font-size: 12px;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
white-space: nowrap;
transition:
transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
box-shadow 180ms var(--ease-snap),
border-color 180ms var(--ease-snap),
background-color 180ms var(--ease-snap),
color 180ms var(--ease-snap),
opacity 180ms var(--ease-snap);
}
.btn svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; transform: none !important; box-shadow: none !important; }
.btn.primary {
background: linear-gradient(180deg, var(--theme-night-amber-100, #f9ecc8), var(--theme-night-amber-400, #e3c15c) 55%, var(--theme-night-amber-600, #b8922a));
border: 1px solid var(--theme-night-amber-200, #f4e0a6);
color: var(--theme-night-amber-950, #2b2008);
font-weight: 700;
letter-spacing: 0.22em;
box-shadow: 0 0 14px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 35%, transparent), 0 0 40px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 12%, transparent), 0 8px 20px rgba(4, 2, 12, 0.6);
}
.btn.primary:hover:not(:disabled),
.btn.primary:focus-visible:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 0 24px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 60%, transparent), 0 0 64px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 22%, transparent), 0 10px 24px rgba(4, 2, 12, 0.6);
}
.btn.primary:active:not(:disabled) { transform: scale(0.97); }
.btn.secondary {
border: 1px solid color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 45%, transparent);
background: color-mix(in srgb, var(--theme-night-stone-900, #151229) 60%, transparent);
color: var(--gold-200);
}
.btn.secondary:hover:not(:disabled) {
border-color: color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 80%, transparent);
background: color-mix(in srgb, var(--theme-night-stone-800, #211b3a) 80%, transparent);
color: var(--gold-100);
box-shadow: 0 0 18px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 20%, transparent);
}
.btn.secondary:active:not(:disabled) { transform: scale(0.97); }
.btn.quiet {
height: 36px;
padding: 0 0.7rem;
font-family: var(--font-sans);
font-size: 0.82rem;
font-weight: 500;
letter-spacing: 0;
text-transform: none;
color: var(--ink-500);
border-radius: 0.5rem;
}
.btn.quiet:hover:not(:disabled) { color: var(--ink-200); background: color-mix(in srgb, var(--theme-night-stone-700, #302853) 40%, transparent); }
.btn.quiet.danger:hover:not(:disabled) { color: var(--danger); }
.link {
color: var(--ink-400);
font-size: 0.9rem;
transition: color 150ms var(--ease-snap);
}
.link:hover { color: var(--gold-200); }
.link.back {
display: inline-flex;
align-items: center;
gap: 0.35rem;
align-self: flex-start;
margin-bottom: 1.25rem;
}
.link.back svg { width: 15px; height: 15px; }
.badge {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
border: 1px solid color-mix(in srgb, color-mix(in srgb, var(--theme-night-stone-500, #8f8aab) 45%, var(--theme-night-stone-600, #575170)) 40%, transparent);
border-radius: 999px;
padding: 0.2rem 0.6rem;
color: var(--ink-400);
}
.badge.live { border-color: color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 40%, transparent); color: var(--gold-300); }
.badge .dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--gold-400);
box-shadow: 0 0 8px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 80%, transparent);
animation: twinkle 2.4s ease-in-out infinite;
}
/* ---------- forms ---------- */
form:where(:not(.game-root *)) { display: flex; flex-direction: column; gap: 0.85rem; }
form:where(:not(.game-root *)) .btn { margin-top: 0.25rem; }
label:where(:not(.game-root *)) { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; color: var(--ink-400); }
input:where(:not(.game-root *)) {
font: inherit;
width: 100%;
color: var(--ink-100);
background: color-mix(in srgb, var(--theme-night-stone-950, #0d0b1c) 80%, transparent);
border: 1px solid color-mix(in srgb, var(--theme-night-stone-700, #302853) 70%, transparent);
border-radius: 0.6rem;
padding: 0.65rem 0.8rem;
box-shadow: 0 2px 6px rgba(4, 2, 12, 0.45) inset;
outline: none;
transition: border-color 150ms, box-shadow 150ms;
}
input:where(:not(.game-root *))::placeholder { color: var(--ink-600); }
input:where(:not(.game-root *)):focus {
border-color: color-mix(in srgb, var(--theme-night-amber-400, #e3c15c) 70%, transparent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 12%, transparent), 0 2px 6px rgba(4, 2, 12, 0.45) inset;
}
@media (max-width: 767px) { input { font-size: 16px; } }
/* A picker styled like the text fields beside it (the agent program's model). */
select:where(:not(.game-root *)) {
font: inherit;
width: 100%;
color: var(--ink-100);
background: color-mix(in srgb, var(--theme-night-stone-950, #0d0b1c) 80%, transparent);
border: 1px solid color-mix(in srgb, var(--theme-night-stone-700, #302853) 70%, transparent);
border-radius: 0.6rem;
padding: 0.6rem 0.75rem;
box-shadow: 0 2px 6px rgba(4, 2, 12, 0.45) inset;
outline: none;
transition: border-color 150ms, box-shadow 150ms;
}
select:where(:not(.game-root *)):focus {
border-color: color-mix(in srgb, var(--theme-night-amber-400, #e3c15c) 70%, transparent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 12%, transparent), 0 2px 6px rgba(4, 2, 12, 0.45) inset;
}
.form-card { padding: 1.5rem; }
.form-card h2 { margin-bottom: 0.25rem; }
.divider {
display: flex;
align-items: center;
gap: 0.75rem;
margin: 1.1rem 0;
color: var(--ink-500);
font-size: 0.72rem;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.divider::before,
.divider::after {
content: "";
flex: 1;
height: 1px;
background: color-mix(in srgb, color-mix(in srgb, var(--theme-night-stone-500, #8f8aab) 45%, var(--theme-night-stone-600, #575170)) 30%, transparent);
}
.tabs {
display: flex;
gap: 0.25rem;
padding: 0.25rem;
margin-bottom: 1.25rem;
border-radius: 0.7rem;
background: color-mix(in srgb, var(--theme-night-stone-950, #0d0b1c) 70%, transparent);
border: 1px solid color-mix(in srgb, var(--theme-night-stone-700, #302853) 60%, transparent);
}
.tabs button {
flex: 1;
height: 36px;
border-radius: 0.5rem;
font-family: var(--font-display);
font-size: 0.75rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--ink-500);
transition: color 150ms, background-color 150ms, box-shadow 150ms;
}
.tabs button:hover { color: var(--ink-200); }
.tabs button.active {
color: var(--theme-night-amber-950, #2b2008);
background: linear-gradient(180deg, var(--theme-night-amber-100, #f9ecc8), var(--theme-night-amber-400, #e3c15c) 55%, var(--theme-night-amber-600, #b8922a));
box-shadow: 0 0 14px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 30%, transparent);
}
.choices { display: flex; flex-direction: column; gap: 0.7rem; }
.choice {
text-align: left;
padding: 1rem 1.1rem;
color: var(--ink-100);
display: flex;
align-items: center;
gap: 0.9rem;
transition:
transform 200ms var(--ease-snap),
border-color 200ms var(--ease-snap),
box-shadow 200ms var(--ease-snap),
opacity 200ms var(--ease-snap);
}
.choice:hover:not(:disabled) {
transform: translateY(-2px);
border-color: color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 40%, transparent);
box-shadow:
0 1px 0 color-mix(in srgb, var(--theme-night-foreground, #e9e6f4) 8%, transparent) inset,
0 8px 28px rgba(4, 2, 12, 0.55),
0 0 24px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 12%, transparent);
}
.choice:active:not(:disabled) { transform: scale(0.99); }
.choice:disabled { opacity: 0.45; cursor: not-allowed; }
.choice .text { min-width: 0; flex: 1; }
.choice .title { font-weight: 600; display: block; }
.choice .desc { color: var(--ink-500); font-size: 0.84rem; display: block; margin-top: 0.15rem; }
/* The chosen card holds its lift and its gold edge, so the choice is carried
by the frame rather than a scale that would soften the text. */
.choice[aria-checked="true"] {
transform: translateY(-2px);
border-color: rgba(244, 212, 122, 0.75);
box-shadow:
0 0 0 1px rgba(244, 212, 122, 0.45),
0 8px 28px rgba(4, 2, 12, 0.55),
0 0 24px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 22%, transparent);
}
/* Status tags on the agent program cards cross-fade when a check lands. */
.choice .tag { transition: color 180ms var(--ease-snap); }
.choice .tag.ok { color: #6ee7b7; }
.choice .tag.warn { color: #fcd34d; }
.choice .tag.off { color: var(--ink-500); }
@media (prefers-reduced-motion: reduce) {
.choice, .choice .tag { transition: none; }
.choice[aria-checked="true"], .choice:hover:not(:disabled) { transform: none; }
}
.choice .tag {
font-size: 0.7rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--gold-300);
margin-left: 0.5rem;
}
.progress {
height: 0.6rem;
border-radius: 999px;
background: color-mix(in srgb, var(--theme-night-stone-950, #0d0b1c) 90%, transparent);
border: 1px solid color-mix(in srgb, var(--theme-night-stone-700, #302853) 70%, transparent);
overflow: hidden;
margin-top: 0.5rem;
}
.progress-fill {
height: 100%;
width: 0%;
border-radius: inherit;
background: linear-gradient(90deg, var(--gold-300), var(--gold-500) 50%, var(--gold-300));
background-size: 200% 100%;
animation: shimmer 2.2s linear infinite;
transition: width 400ms var(--ease-snap);
}
.status-line {
display: flex;
align-items: center;
gap: 0.6rem;
color: var(--ink-400);
font-size: 0.9rem;
}
.spinner {
display: inline-flex;
color: var(--gold-400);
width: 20px;
height: 20px;
}
.spinner svg { width: 100%; height: 100%; overflow: visible; }
.spinner.big { width: 44px; height: 44px; }
.spinner .body { transform-origin: center; transform-box: fill-box; animation: d20-roll 2.4s ease-in-out infinite; }
.spinner .face { animation: d20-face 2.4s linear infinite; }
.loading {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
text-align: center;
padding: 3rem 0;
}
.twinkle { animation: twinkle 3.2s ease-in-out infinite; }
/* ---------- wide screens: tablets, foldables opened, desktop ---------- */
@media (min-width: 720px) {
#app { padding-left: calc(var(--safe-left) + 2rem); padding-right: calc(var(--safe-right) + 2rem); }
.topbar { margin-bottom: 2rem; }
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards .card.wide { grid-column: 1 / -1; }
.hero { padding: 1.9rem 2rem; grid-template-columns: auto 1fr auto; }
.hero .hero-actions { grid-column: auto; justify-content: flex-end; }
.hero .hero-actions.stacked { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (min-width: 1100px) {
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* ---------- motion ---------- */
/* Story AI's Fast choice rises in when a model with the tier is picked. */
.speed-choice.rise { animation: fade-up 320ms var(--ease-snap) both; }
@keyframes fade-up {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes twinkle {
0%, 100% { opacity: 0.7; }
50% { opacity: 1; }
}
@keyframes shimmer {
from { background-position: 150% 0; }
to { background-position: -50% 0; }
}
@keyframes d20-roll {
0%, 13% { transform: rotate(0deg); }
16.6%, 30% { transform: rotate(60deg); }
33.3%, 46.6% { transform: rotate(120deg); }
50%, 63.3% { transform: rotate(180deg); }
66.6%, 80% { transform: rotate(240deg); }
83.3%, 96.6% { transform: rotate(300deg); }
100% { transform: rotate(360deg); }
}
@keyframes d20-face {
0%, 15% { opacity: 1; }
17%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.spinner .face:not(:first-of-type) { opacity: 0; }
.spinner .face:first-of-type { opacity: 1; }
}
/* ---------- the update popup ---------- */
.update-popup-scrim {
position: fixed;
inset: 0;
z-index: 300;
display: flex;
align-items: center;
justify-content: center;
padding: 1.25rem;
background: rgba(4, 2, 12, 0.72);
backdrop-filter: blur(3px);
animation: update-scrim-in 180ms ease-out both;
}
.update-popup {
width: min(27rem, 100%);
padding: 1.5rem;
text-align: left;
box-shadow: 0 24px 64px rgba(4, 2, 12, 0.7), 0 0 0 1px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 35%, transparent), 0 0 42px color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 14%, transparent);
animation: update-card-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.update-popup .eyebrow { color: var(--gold-300, var(--theme-night-amber-300, #ecd287)); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.7rem; margin: 0 0 0.35rem; }
.update-popup h2 { margin: 0 0 0.5rem; }
.update-popup-note { min-height: 1.3rem; margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--gold-300, var(--theme-night-amber-300, #ecd287)); }
.update-popup-note:empty { display: none; }
.update-popup-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.1rem; }
@keyframes update-scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes update-card-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
.update-popup-scrim, .update-popup { animation: none; }
}
/* ---- Story AI (local-ai.ts, harness-ai.ts): optional tuning folded away,
the read-aloud tick, a painter test that waits without a figure, and the
picture it brought back. Shell-only, so never inside .game-root. ---- */
details.tuning:where(:not(.game-root *)) {
margin-top: 0.85rem;
border: 1px solid color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 22%, transparent);
border-radius: 10px;
padding: 0.35rem 0.75rem;
background: color-mix(in srgb, var(--theme-night-background, #0a0817) 35%, transparent);
}
details.tuning:where(:not(.game-root *)) > summary {
cursor: pointer;
padding: 0.3rem 0;
font-size: 0.85rem;
color: var(--ink-300);
list-style: none;
}
details.tuning:where(:not(.game-root *)) > summary::before {
content: "";
display: inline-block;
width: 6px;
height: 6px;
margin-right: 0.55rem;
vertical-align: 2px;
rotate: 45deg;
border: 1px solid var(--gold-500);
transition: rotate var(--dur-move, 220ms) var(--ease-snap, ease), background-color 160ms ease;
}
details.tuning[open]:where(:not(.game-root *)) > summary::before { rotate: 225deg; background: var(--gold-500); }
details.tuning[open]:where(:not(.game-root *)) > :not(summary) { animation: fade-up 260ms var(--ease-snap, ease) both; }
.check-row:where(:not(.game-root *)) {
display: flex;
align-items: flex-start;
gap: 0.6rem;
margin-top: 0.85rem;
font-size: 0.88rem;
color: var(--ink-300);
cursor: pointer;
}
.check-row:where(:not(.game-root *)) > input { margin-top: 0.2rem; accent-color: var(--gold-500); width: 1rem; height: 1rem; }
.progress.indeterminate:where(:not(.game-root *)) .progress-fill {
width: 35% !important;
animation: progress-sweep 1.6s var(--ease-drift, ease-in-out) infinite;
}
@keyframes progress-sweep {
from { transform: translateX(-110%); }
to { transform: translateX(310%); }
}
.agent-test-picture:where(:not(.game-root *)) {
display: block;
width: 100%;
max-height: 46vh;
object-fit: contain;
margin-bottom: 1rem;
border-radius: 10px;
border: 1px solid color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 35%, transparent);
animation: fade-up 420ms var(--ease-snap, ease) both;
}
@media (prefers-reduced-motion: reduce) {
details.tuning:where(:not(.game-root *)) > summary::before { transition: none; }
.progress.indeterminate:where(:not(.game-root *)) .progress-fill { animation: none; width: 100% !important; opacity: 0.6; }
.agent-test-picture:where(:not(.game-root *)) { animation: none; }
}
/* ---- App settings (settings.ts): the row of four jobs at the top and each
job's heading, in the shell's gold-on-night. ---- */
.settings-contents {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0 0 1rem;
}
.settings-jump {
min-height: 2.25rem;
padding: 0.25rem 0.85rem;
border: 1px solid color-mix(in srgb, var(--theme-night-amber-500, #d4ab3a) 35%, transparent);
border-radius: 999px;
font-size: 0.8rem;
color: var(--ink-300);
background: color-mix(in srgb, var(--theme-night-background, #0a0817) 45%, transparent);
transition: border-color 160ms var(--ease-snap, ease), color 160ms var(--ease-snap, ease), transform 220ms var(--ease-spring, ease);
}
.settings-jump:is(:hover, :focus-visible),
.pad-active .settings-jump:focus { border-color: var(--gold-400); color: var(--gold-300); outline: none; }
.settings-jump:active { transform: scale(0.97); }
.settings-group {
scroll-margin-top: 1rem;
margin: 1.6rem 0 0.75rem;
}
.settings-group-title {
font-family: var(--font-display);
font-size: 1rem !important;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--gold-300);
}
@media (prefers-reduced-motion: reduce) {
.settings-jump { transition: none; }
}
/* The address behind a shared world: said after the room code, quieter. */
.status-line.quiet { color: var(--ink-500); font-size: 0.8rem; word-break: break-all; }