-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.css
More file actions
478 lines (412 loc) · 8.72 KB
/
Copy pathglobal.css
File metadata and controls
478 lines (412 loc) · 8.72 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
/*
* Esku design tokens.
*
* Dark is the default rather than a variant: the app is used with the camera open, often
* in a waiting room or a clinic, and a bright white page behind a video feed is both
* harder to read and more conspicuous to hold up in front of someone.
*/
:root {
--brand: #8b5cf6;
--brand-strong: #7c3aed;
--brand-soft: rgba(139, 92, 246, 0.14);
--bg: #0b0a12;
--surface: #171526;
--surface-raised: #211d38;
--border: rgba(255, 255, 255, 0.09);
--text: #f5f3ff;
--text-muted: #a5a0c0;
--ok: #34d399;
--warn: #fbbf24;
--danger: #f87171;
--radius: 18px;
--radius-lg: 26px;
--gap: 16px;
color-scheme: dark;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #faf9ff;
--surface: #ffffff;
--surface-raised: #f3f0ff;
--border: rgba(24, 20, 45, 0.1);
--text: #191533;
--text-muted: #5d5880;
color-scheme: light;
}
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
min-height: 100%;
}
body {
background: var(--bg);
color: var(--text);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
#app {
max-width: 560px;
margin: 0 auto;
padding: 20px 16px 40px;
/* Keep the transcript clear of the iOS home indicator when installed. */
padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
.masthead {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 24px;
}
.masthead__mark {
width: 44px;
height: 44px;
flex: 0 0 auto;
}
.masthead__title {
font-size: 1.35rem;
font-weight: 650;
letter-spacing: -0.02em;
margin: 0;
}
.masthead__tagline {
color: var(--text-muted);
font-size: 0.85rem;
margin: 0;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 20px;
margin-bottom: var(--gap);
}
.card__title {
font-size: 1rem;
font-weight: 620;
margin: 0 0 6px;
}
.card__body {
color: var(--text-muted);
font-size: 0.9rem;
margin: 0;
}
/* The camera frame. Aspect-ratio rather than a fixed height so it never letterboxes. */
.stage {
position: relative;
aspect-ratio: 3 / 4;
border-radius: var(--radius-lg);
overflow: hidden;
background: var(--surface-raised);
border: 1px solid var(--border);
display: grid;
place-items: center;
margin-bottom: var(--gap);
}
.stage__placeholder {
color: var(--text-muted);
font-size: 0.9rem;
text-align: center;
padding: 0 32px;
}
.stage__video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain;
/* Mirrored so the user sees themselves as in a mirror; raising the right hand must look
like raising the right hand, or aiming a handshape becomes guesswork. */
transform: scaleX(-1);
opacity: 0;
transition: opacity 0.25s ease;
}
.stage__video.is-live {
opacity: 1;
}
/* Skeleton layer. Mirrored exactly like the video beneath it, or the hand and its skeleton
drift apart the moment either moves. */
.stage__overlay {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
transform: scaleX(-1);
pointer-events: none;
opacity: 0;
transition: opacity 0.25s ease;
}
.stage__overlay.is-live {
opacity: 1;
}
/* The live guess, over the video. Big because it is read at arm's length. */
.stage__hint {
position: absolute;
bottom: 14px;
left: 50%;
transform: translateX(-50%);
margin: 0;
padding: 6px 20px;
border-radius: 999px;
background: rgba(11, 10, 18, 0.72);
backdrop-filter: blur(8px);
color: #fff;
font-size: 1.6rem;
font-weight: 700;
letter-spacing: 0.06em;
line-height: 1.2;
}
.status {
color: var(--text-muted);
font-size: 0.85rem;
margin: 12px 0 20px;
min-height: 1.4em;
}
.transcript {
min-height: 96px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 18px 20px;
font-size: 1.15rem;
/* A transcript can run long; it must wrap, never scroll the page sideways. */
overflow-wrap: anywhere;
}
.transcript:empty::before {
content: 'El texto reconocido aparecerá aquí.';
color: var(--text-muted);
font-size: 0.95rem;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: var(--gap);
}
.button {
appearance: none;
border: 1px solid transparent;
border-radius: var(--radius);
padding: 12px 18px;
font: inherit;
font-weight: 600;
cursor: pointer;
background: var(--brand-strong);
color: #fff;
min-height: 48px;
}
.button:hover:not(:disabled) {
background: var(--brand);
}
.button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.button--quiet {
background: transparent;
border-color: var(--border);
color: var(--text);
}
.button:focus-visible {
outline: 2px solid var(--brand);
outline-offset: 2px;
}
.badge {
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--brand-soft);
color: var(--brand);
border-radius: 999px;
padding: 4px 12px;
font-size: 0.75rem;
font-weight: 620;
}
.footnote {
color: var(--text-muted);
font-size: 0.78rem;
margin-top: 28px;
text-align: center;
}
.footnote a {
color: inherit;
}
/* --- Teach-a-sign --- */
.field {
display: block;
margin: 16px 0 12px;
}
.field__label {
display: block;
color: var(--text-muted);
font-size: 0.8rem;
margin-bottom: 6px;
}
.field__input {
width: 100%;
background: var(--surface-raised);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font: inherit;
padding: 12px 14px;
min-height: 48px;
}
.field__input:focus-visible {
outline: 2px solid var(--brand);
outline-offset: 1px;
}
/* One dot per recording, so progress toward the minimum is visible at a glance. */
.takes {
display: flex;
gap: 8px;
margin: 4px 0 4px;
}
.take {
width: 12px;
height: 12px;
border-radius: 999px;
border: 1.5px solid var(--border);
}
.take--done {
background: var(--brand);
border-color: var(--brand);
}
.button--small {
min-height: 36px;
padding: 6px 12px;
font-size: 0.85rem;
}
.signs {
list-style: none;
margin: 0;
padding: 0;
}
.signs__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 0;
border-bottom: 1px solid var(--border);
}
.signs__item:last-child {
border-bottom: none;
}
.signs__empty {
color: var(--text-muted);
font-size: 0.9rem;
}
.storage {
font-size: 1.4rem;
font-weight: 650;
letter-spacing: -0.02em;
margin: 14px 0 4px;
}
.card__body--tight {
font-size: 0.78rem;
margin-top: 10px;
}
/* The rear camera shows the world as it is; only the selfie view gets mirrored. */
.stage__video.is-flipped,
.stage__overlay.is-flipped {
transform: none;
}
/* One chip per tracked body part. Colour identifies the part, fill says whether it is
currently being seen — so "it is not working" becomes "it cannot see your face". */
.parts {
display: flex;
flex-wrap: wrap;
gap: 8px;
list-style: none;
margin: 0 0 var(--gap);
padding: 0;
}
.part {
display: inline-flex;
align-items: center;
gap: 7px;
border: 1px solid var(--border);
border-radius: 999px;
padding: 5px 12px;
font-size: 0.78rem;
font-weight: 600;
color: var(--text-muted);
opacity: 0.55;
transition:
opacity 0.2s ease,
color 0.2s ease,
border-color 0.2s ease;
}
.part__dot {
width: 9px;
height: 9px;
border-radius: 999px;
background: var(--part);
opacity: 0.35;
transition: opacity 0.2s ease;
}
.part--on {
opacity: 1;
color: var(--text);
border-color: color-mix(in srgb, var(--part, currentColor) 55%, transparent);
}
.part--on .part__dot {
opacity: 1;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--part) 25%, transparent);
}
/* Not detected, while the camera is on: the one state worth flagging in red. */
.part--off {
opacity: 1;
color: var(--danger);
border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
.part--off .part__dot {
background: var(--danger);
opacity: 0.8;
}
/* Numbers, not prose: read at a glance on a phone while the camera is running. */
.diagnostics {
margin-top: var(--gap);
display: grid;
gap: 6px;
font-size: 0.9rem;
}
.diagnostics__row {
display: flex;
justify-content: space-between;
gap: 12px;
padding: 6px 10px;
border-radius: 10px;
background: var(--surface-raised);
}
.diagnostics__row dt {
color: var(--text-muted);
}
.diagnostics__row dd {
margin: 0;
text-align: right;
font-variant-numeric: tabular-nums;
}
/* Three concepts and their scores do not fit beside a label on a phone. */
.diagnostics__row--wide {
flex-direction: column;
gap: 4px;
}
.diagnostics__row--wide dd {
text-align: left;
}
/* A block whose numbers are nowhere near training: the one line worth finding fast. */
.diagnostics__off {
color: var(--danger);
font-weight: 600;
}