@fest-lib/veela 0.1.1

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 (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +533 -0
  3. package/dist/veela.js +878 -0
  4. package/package.json +83 -0
  5. package/src/scss/_layers.scss +16 -0
  6. package/src/scss/advanced/_index.scss +0 -0
  7. package/src/scss/advanced/animation/_motion.scss +317 -0
  8. package/src/scss/advanced/color/_color.scss +328 -0
  9. package/src/scss/advanced/color/_colorize.scss +325 -0
  10. package/src/scss/advanced/design/_design-tokens.scss +118 -0
  11. package/src/scss/advanced/design/_effects.scss +275 -0
  12. package/src/scss/advanced/design/_shadow.scss +359 -0
  13. package/src/scss/advanced/design/_surfaces.scss +76 -0
  14. package/src/scss/advanced/effects/_animations.scss +124 -0
  15. package/src/scss/advanced/effects/_shadows.scss +50 -0
  16. package/src/scss/advanced/font/_typography.scss +600 -0
  17. package/src/scss/advanced/index.scss +11 -0
  18. package/src/scss/advanced/index.ts +35 -0
  19. package/src/scss/advanced/layout/_content.scss +170 -0
  20. package/src/scss/advanced/layout/_index.scss +5 -0
  21. package/src/scss/advanced/layout/_normalize.scss +541 -0
  22. package/src/scss/advanced/layout/_shared-overlays.scss +162 -0
  23. package/src/scss/advanced/md3/_md3.scss +596 -0
  24. package/src/scss/advanced/md3/_utils.scss +114 -0
  25. package/src/scss/advanced/misc/_config.scss +119 -0
  26. package/src/scss/advanced/misc/_initials.scss +298 -0
  27. package/src/scss/advanced/misc/_mixins.scss +179 -0
  28. package/src/scss/advanced/misc/_queries.scss +34 -0
  29. package/src/scss/advanced/misc/_rendering.scss +82 -0
  30. package/src/scss/advanced/misc/_tokens.scss +74 -0
  31. package/src/scss/advanced/theme/_shared.scss +232 -0
  32. package/src/scss/advanced/theme/_states.scss +332 -0
  33. package/src/scss/advanced/theme/_variants.scss +354 -0
  34. package/src/scss/advanced/tokens/_material-color.scss +120 -0
  35. package/src/scss/advanced/tokens/_variables.scss +171 -0
  36. package/src/scss/basic/_layers.scss +0 -0
  37. package/src/scss/basic/design/_index.scss +3 -0
  38. package/src/scss/basic/design/_keyframes.scss +163 -0
  39. package/src/scss/basic/design/_shapes.scss +266 -0
  40. package/src/scss/basic/design/_wavy-runtime.scss +50 -0
  41. package/src/scss/basic/index.scss +19 -0
  42. package/src/scss/basic/index.ts +29 -0
  43. package/src/scss/basic/misc/_core-layout.scss +272 -0
  44. package/src/scss/basic/misc/_index.scss +18 -0
  45. package/src/scss/basic/misc/_layout.scss +1040 -0
  46. package/src/scss/basic/misc/_mixins.scss +179 -0
  47. package/src/scss/basic/misc/_motion.scss +28 -0
  48. package/src/scss/basic/misc/_normalize.scss +765 -0
  49. package/src/scss/basic/misc/_queries.scss +34 -0
  50. package/src/scss/basic/misc/_shared.scss +232 -0
  51. package/src/scss/basic/misc/_states.scss +135 -0
  52. package/src/scss/basic/misc/_tokens.scss +78 -0
  53. package/src/scss/basic/misc/_veela.scss +12 -0
  54. package/src/scss/core/index.scss +1 -0
  55. package/src/scss/core/interact/_draggable.scss +32 -0
  56. package/src/scss/core/interact/_position.scss +45 -0
  57. package/src/scss/core/interact/_ps-anchor.scss +28 -0
  58. package/src/scss/core/interact/_ps-centered.scss +28 -0
  59. package/src/scss/core/interact/_ps-cursor.scss +18 -0
  60. package/src/scss/core/interact/_ps-draggable.scss +25 -0
  61. package/src/scss/core/interact/_ps-mechanic.scss +0 -0
  62. package/src/scss/core/interact/_ps-properties.scss +54 -0
  63. package/src/scss/core/interact/_ps-resizable.scss +61 -0
  64. package/src/scss/core/interact/_resizable.scss +69 -0
  65. package/src/scss/core/interact/_viewport.scss +469 -0
  66. package/src/scss/core/misc/_color-properties.scss +64 -0
  67. package/src/scss/core/misc/_config.scss +110 -0
  68. package/src/scss/core/misc/_functions.scss +530 -0
  69. package/src/scss/core/misc/_icons.scss +109 -0
  70. package/src/scss/core/misc/_index.scss +6 -0
  71. package/src/scss/core/misc/_layout.scss +49 -0
  72. package/src/scss/core/misc/_mixins.scss +744 -0
  73. package/src/scss/core/misc/_properties.scss +245 -0
  74. package/src/scss/core/misc/_tokens.scss +947 -0
  75. package/src/scss/core/misc/_utilities.scss +941 -0
  76. package/src/scss/core/misc/_utils.scss +17 -0
  77. package/src/scss/index.scss +18 -0
  78. package/src/scss/index.ts +105 -0
@@ -0,0 +1,765 @@
1
+ /*
2
+ * Filename: _normalize.scss
3
+ * FullPath: modules/projects/fl.ui/src/styles/runtime/basic/misc/_normalize.scss
4
+ * Change date and time: 16.25.00_31.07.2026
5
+ * Reason for changes: vl-basic palette via --u2-color-mod (token names kept).
6
+ */
7
+ @use "./shared" as *;
8
+
9
+ // COMPAT: vl-basic may load without veela _tokens.scss — keep function local.
10
+ @#{"function --u2-color-mod(--base-color <color>, --index <number> : 550) returns <color>"} {
11
+ --i: clamp(0, var(--index), 1000);
12
+ --pivot: 550;
13
+ --white-distance: clamp(0, calc((var(--pivot) - var(--i)) / var(--pivot)), 1);
14
+ --black-distance: clamp(0, calc((var(--i) - var(--pivot)) / (1000 - var(--pivot))), 1);
15
+ --to-white: pow(var(--white-distance), 1.15);
16
+ --to-black: pow(var(--black-distance), 1.08);
17
+ --center-left: clamp(0, calc(var(--i) / var(--pivot)), 1);
18
+ --center-right: clamp(0, calc((1000 - var(--i)) / (1000 - var(--pivot))), 1);
19
+ --chroma-shape: sqrt(min(var(--center-left), var(--center-right)));
20
+ --chroma-scale: calc(0.08 + 0.92 * var(--chroma-shape));
21
+ result: oklch(
22
+ from var(--base-color)
23
+ calc(l + (0.985 - l) * var(--to-white) + (0.16 - l) * var(--to-black))
24
+ calc(c * var(--chroma-scale))
25
+ h
26
+ );
27
+ }
28
+
29
+ @layer tokens, base, layout, utilities, shells, shell, views, view, viewer, components, ux-layer, markdown, essentials, print, print-breaks, overrides;
30
+
31
+ @layer tokens {
32
+ :where(:root, html) {
33
+ color-scheme: light dark;
34
+ dynamic-range-limit: no-limit;
35
+ /*
36
+ * WHY: vl-basic loads only this runtime sheet; advanced MD3 tokens are not bundled.
37
+ * Body/normalize use var(--color-bg) etc. — without defaults, backgrounds stay transparent
38
+ * and light-dark() in views never resolves meaningfully.
39
+ * Native CSS light-dark() follows the used color-scheme (Theme.ts sets html.style.colorScheme).
40
+ */
41
+ --color-primary: light-dark(#91b6e3, #2e3a64);
42
+ --base-color: var(--color-primary);
43
+ --color-bg: light-dark(
44
+ --u2-color-mod(var(--base-color), 70),
45
+ --u2-color-mod(var(--base-color), 940)
46
+ );
47
+ --color-text: light-dark(
48
+ --u2-color-mod(var(--base-color), 900),
49
+ --u2-color-mod(var(--base-color), 100)
50
+ );
51
+ --color-fg: var(--color-text);
52
+ --color-bg-secondary: light-dark(
53
+ --u2-color-mod(var(--base-color), 160),
54
+ --u2-color-mod(var(--base-color), 840)
55
+ );
56
+ --color-bg-alt: light-dark(
57
+ --u2-color-mod(var(--base-color), 200),
58
+ --u2-color-mod(var(--base-color), 880)
59
+ );
60
+ --color-text-secondary: light-dark(
61
+ --u2-color-mod(var(--base-color), 700),
62
+ --u2-color-mod(var(--base-color), 280)
63
+ );
64
+ --color-border: light-dark(
65
+ --u2-color-mod(var(--base-color), 300),
66
+ --u2-color-mod(var(--base-color), 640)
67
+ );
68
+ --color-table: light-dark(
69
+ --u2-color-mod(var(--base-color), 120),
70
+ --u2-color-mod(var(--base-color), 860)
71
+ );
72
+ --color-link: var(--color-primary);
73
+ --color-primary-hover: light-dark(
74
+ --u2-color-mod(var(--base-color), 620),
75
+ --u2-color-mod(var(--base-color), 480)
76
+ );
77
+ --color-secondary: light-dark(
78
+ --u2-color-mod(var(--base-color), 420),
79
+ --u2-color-mod(var(--base-color), 680)
80
+ );
81
+ --color-outline: light-dark(
82
+ --u2-color-mod(var(--base-color), 100),
83
+ --u2-color-mod(var(--base-color), 900)
84
+ );
85
+ --color-outline-variant: light-dark(
86
+ --u2-color-mod(var(--base-color), 100),
87
+ --u2-color-mod(var(--base-color), 900)
88
+ );
89
+ --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
90
+ --line-height: 1.5;
91
+ --border-radius: 0.5rem;
92
+ tab-size: 4;
93
+ text-size-adjust: 100%;
94
+ interpolate-size: allow-keywords;
95
+ font-size-adjust: from-font;
96
+ font-optical-sizing: auto;
97
+ font-size: 16px;
98
+ line-height: 1.5;
99
+ min-block-size: 0;
100
+ min-inline-size: 0;
101
+ padding: 0;
102
+ margin: 0;
103
+ border: none;
104
+ contain: strict;
105
+ overflow: hidden;
106
+ font-family: var(--font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
107
+ @include stretch-viewport;
108
+ }
109
+ }
110
+
111
+ @layer base {
112
+ @keyframes bottom-to-top {
113
+ 0% {
114
+ opacity: 0;
115
+ transform: translateY(10%);
116
+ }
117
+
118
+ 100% {
119
+ opacity: 1;
120
+ transform: translateY(0);
121
+ }
122
+ }
123
+
124
+ @media screen {
125
+ *,
126
+ *::before,
127
+ *::after {
128
+ @include reset-box-model;
129
+ box-sizing: border-box;
130
+ dynamic-range-limit: no-limit;
131
+ }
132
+
133
+ :where(html) {
134
+ -webkit-text-size-adjust: 100%;
135
+ font-size-adjust: from-font;
136
+ font-optical-sizing: auto;
137
+ -webkit-font-smoothing: antialiased;
138
+ -moz-osx-font-smoothing: grayscale;
139
+ text-rendering: optimizeLegibility;
140
+ font-family: var(--font-sans);
141
+ font-size: 16px;
142
+ line-height: 1.5;
143
+ dynamic-range-limit: no-limit;
144
+ }
145
+
146
+ :where(body) {
147
+ inset: 0;
148
+ margin: 0;
149
+ padding: 0;
150
+ border: none;
151
+ min-block-size: min(100dvb, 100cqb);
152
+ block-size: fit-content;
153
+ background: var(--color-bg);
154
+ color: var(--color-text);
155
+ line-height: var(--line-height);
156
+ -webkit-font-smoothing: antialiased;
157
+ text-rendering: optimizeLegibility;
158
+ dynamic-range-limit: no-limit;
159
+ }
160
+
161
+ :where(ul, ol) {
162
+ list-style: none;
163
+ margin: 0;
164
+ padding: 0;
165
+ }
166
+
167
+ :where(blockquote, q) {
168
+ quotes: none;
169
+
170
+ &::before,
171
+ &::after {
172
+ content: "";
173
+ content: none;
174
+ }
175
+ }
176
+
177
+ :where(article, main, aside, section, header, footer, nav) {
178
+ border: none 0px transparent;
179
+ outline: none 0px transparent;
180
+ box-shadow: none 0px transparent;
181
+ }
182
+
183
+ :where(table) {
184
+ border-collapse: collapse;
185
+ border-spacing: 0;
186
+ display: block;
187
+ overflow-x: auto;
188
+ inline-size: max-content;
189
+ max-inline-size: 100%;
190
+ margin-block: 1rem;
191
+ border: 1px solid var(--color-border);
192
+ border-radius: var(--border-radius);
193
+
194
+ :where(th, td) {
195
+ padding: 0.5rem 1rem;
196
+ border-block-end: 1px solid var(--color-border);
197
+ text-align: start;
198
+ }
199
+
200
+ :where(th) {
201
+ background-color: var(--color-table);
202
+ color: var(--color-text);
203
+ font-weight: bold;
204
+ }
205
+
206
+ :where(tr:last-child td) {
207
+ border-block-end: none;
208
+ }
209
+
210
+ :where(tr:nth-child(even)) {
211
+ background-color: var(--color-bg-secondary);
212
+ }
213
+ }
214
+
215
+ :focus-visible {
216
+ @include focus-ring();
217
+ }
218
+
219
+ :focus:not(:focus-visible) {
220
+ outline: none;
221
+ }
222
+
223
+ :where(button, input, optgroup, select, textarea) {
224
+ @include reset-form-appearance;
225
+ line-height: 1.15;
226
+ border: none 0px transparent;
227
+ outline: none 0px transparent;
228
+ box-shadow: none 0px transparent;
229
+ }
230
+
231
+ :where(button) {
232
+ min-block-size: fit-content;
233
+ min-inline-size: fit-content;
234
+ padding-inline: 1rem;
235
+ padding-block: 0.5rem;
236
+ gap: 0.25rem;
237
+ text-transform: none;
238
+ user-select: none;
239
+ pointer-events: auto;
240
+ cursor: pointer;
241
+ appearance: none;
242
+ border: none;
243
+ background: transparent;
244
+
245
+ &:has(> ui-icon:only-child) {
246
+ place-content: center;
247
+ place-items: center;
248
+ aspect-ratio: 1 / 1;
249
+ }
250
+
251
+ &:disabled {
252
+ pointer-events: none;
253
+ cursor: not-allowed;
254
+ }
255
+ }
256
+
257
+ :where(select) {
258
+ text-transform: none;
259
+ }
260
+
261
+ :where(button, [type="button"], [type="reset"], [type="submit"]) {
262
+ -webkit-appearance: button;
263
+ cursor: pointer;
264
+
265
+ &::-moz-focus-inner {
266
+ border-style: none;
267
+ padding: 0;
268
+ }
269
+ }
270
+
271
+ :where(fieldset, dialog) {
272
+ border: none;
273
+ padding: 0;
274
+ margin: 0;
275
+ }
276
+
277
+ :where(legend) {
278
+ padding: 0;
279
+ }
280
+
281
+ :where(progress) {
282
+ vertical-align: baseline;
283
+ }
284
+
285
+ :where(textarea) {
286
+ overflow: auto;
287
+ resize: vertical;
288
+ }
289
+
290
+ :where([type="search"]) {
291
+ -webkit-appearance: textfield;
292
+ outline-offset: -2px;
293
+
294
+ &::-webkit-search-decoration {
295
+ -webkit-appearance: none;
296
+ }
297
+ }
298
+
299
+ :where([type="range"]) {
300
+ -webkit-appearance: none;
301
+ }
302
+
303
+ :where(details > summary),
304
+ :where(summary) {
305
+ cursor: pointer;
306
+ }
307
+
308
+ :where(mark) {
309
+ background-color: transparent;
310
+ color: inherit;
311
+ }
312
+
313
+ :where(sub, sup) {
314
+ font-size: 75%;
315
+ line-height: 0;
316
+ position: relative;
317
+ vertical-align: baseline;
318
+ }
319
+
320
+ :where(sup) {
321
+ top: -0.5em;
322
+ }
323
+
324
+ :where(sub) {
325
+ bottom: -0.25em;
326
+ }
327
+
328
+ :where(a) {
329
+ color: var(--color-link, inherit);
330
+ text-decoration: inherit;
331
+ text-underline-offset: 0.2em;
332
+ pointer-events: auto;
333
+ cursor: pointer;
334
+ transition: color var(--transition-fast);
335
+
336
+ &:hover {
337
+ color: var(--color-primary-hover);
338
+ }
339
+ }
340
+
341
+ :where(img, canvas, svg, video, iframe, picture) {
342
+ max-inline-size: 100%;
343
+ block-size: auto;
344
+ border: none 0px transparent;
345
+ outline: none 0px transparent;
346
+ box-shadow: none 0px transparent;
347
+ dynamic-range-limit: no-limit;
348
+ }
349
+
350
+ :where(img, video, canvas, svg, picture) {
351
+ @include media-sizing;
352
+ }
353
+
354
+ :where(img, video) {
355
+ object-fit: contain;
356
+ object-position: center;
357
+ }
358
+
359
+ :where(picture) {
360
+ display: contents;
361
+ }
362
+
363
+ :where(iframe) {
364
+ max-inline-size: 100%;
365
+ block-size: auto;
366
+ }
367
+
368
+ :where(em, i) {
369
+ font-style: normal;
370
+ }
371
+
372
+ :where(strong, b) {
373
+ font-weight: normal;
374
+ }
375
+
376
+ :where(code, kbd, samp, pre) {
377
+ font-family: var(--font-family-mono, "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace);
378
+ font-size: 1em;
379
+ }
380
+
381
+ :where(code, pre) {
382
+ font-family: var(--font-mono);
383
+ font-size: 0.875em;
384
+ }
385
+
386
+ :where(code, samp, kbd) {
387
+ @include code-styling();
388
+ }
389
+
390
+ :where(code) {
391
+ background: var(--color-bg-alt);
392
+ padding: 0.125em 0.25em;
393
+ border-radius: var(--radius-sm);
394
+ }
395
+
396
+ :where(pre) {
397
+ background: var(--color-bg-alt);
398
+ padding: var(--space-md);
399
+ border-radius: var(--radius-md);
400
+ overflow-x: auto;
401
+
402
+ :where(code) {
403
+ background: transparent;
404
+ padding: 0;
405
+ border-radius: 0;
406
+ }
407
+ }
408
+
409
+ :where(input, textarea, select, button, option) {
410
+ @include reset-borders;
411
+ accent-color: var(--color-link, currentColor);
412
+ font-variant-emoji: text;
413
+ border: none 0px transparent;
414
+ outline: none 0px transparent;
415
+ box-shadow: none 0px transparent;
416
+ }
417
+
418
+ :where(span) {
419
+ font-variant-emoji: text;
420
+ }
421
+
422
+ :where(hr) {
423
+ border: none;
424
+ border-block-start: 1px solid var(--color-border);
425
+ margin-block: var(--space-lg);
426
+ }
427
+
428
+ ::-webkit-scrollbar {
429
+ inline-size: 8px;
430
+ block-size: 8px;
431
+ }
432
+
433
+ ::-webkit-scrollbar-track {
434
+ background: transparent;
435
+ }
436
+
437
+ ::-webkit-scrollbar-thumb {
438
+ background: var(--color-outline-variant, #d1d5db);
439
+ border-radius: 4px;
440
+
441
+ &:hover {
442
+ background: var(--color-outline, #9ca3af);
443
+ }
444
+ }
445
+
446
+ * {
447
+ scrollbar-width: thin;
448
+ scrollbar-color: var(--color-outline-variant, #d1d5db) transparent;
449
+ }
450
+
451
+ :where(input, textarea, select) {
452
+ inline-size: 100%;
453
+ padding: 0.5rem;
454
+ font-size: var(--font-size-base);
455
+ background-color: var(--color-bg-alt);
456
+ color: var(--color-fg);
457
+ border: 0px solid var(--color-border);
458
+ border-radius: var(--border-radius);
459
+
460
+ &:focus {
461
+ outline: none;
462
+ border-color: var(--color-primary);
463
+ }
464
+
465
+ &::placeholder {
466
+ color: var(--color-text-secondary);
467
+ opacity: 0.7;
468
+ }
469
+
470
+ &:disabled {
471
+ background-color: var(--color-bg-secondary);
472
+ cursor: not-allowed;
473
+ opacity: 0.5;
474
+ }
475
+ }
476
+
477
+ :where(input) {
478
+ &:-webkit-autofill::first-line,
479
+ &:autofill::first-line {
480
+ font-size: 1em;
481
+ text-size-adjust: 100%;
482
+ }
483
+
484
+ &:-internal-autofill-previewed {
485
+ letter-spacing: #{"calc(1em / 10)"} !important;
486
+ }
487
+ }
488
+
489
+ :where(input):is([type="radio"], [type="checkbox"]) {
490
+ inline-size: 1rem;
491
+ block-size: 1rem;
492
+ accent-color: var(--color-primary);
493
+ aspect-ratio: 1 / 1;
494
+ }
495
+
496
+ :where(label) {
497
+ font-weight: 600;
498
+ user-select: none;
499
+ pointer-events: none;
500
+ margin-block-end: 0.25rem;
501
+ }
502
+
503
+ :where(h1, h2, h3, h4, h5, h6) {
504
+ font-weight: 600;
505
+ line-height: 1.2;
506
+ margin-block: 0.5em;
507
+ text-wrap: balance;
508
+ }
509
+
510
+ :where(h1) {
511
+ font-size: 2rem;
512
+ }
513
+
514
+ :where(h2) {
515
+ font-size: 1.5rem;
516
+ }
517
+
518
+ :where(h3) {
519
+ font-size: 1.25rem;
520
+ }
521
+
522
+ :where(h4) {
523
+ font-size: 1.125rem;
524
+ }
525
+
526
+ :where(h5) {
527
+ font-size: 1rem;
528
+ }
529
+
530
+ :where(h6) {
531
+ font-size: 0.875rem;
532
+ }
533
+
534
+ :where(p) {
535
+ text-wrap: pretty;
536
+ margin-block: 1em;
537
+ }
538
+
539
+ :where(article, .content) {
540
+ ul,
541
+ ol {
542
+ margin-block: var(--space-md);
543
+ padding-inline-start: var(--space-lg);
544
+ }
545
+
546
+ ul {
547
+ list-style: disc;
548
+ }
549
+
550
+ ol {
551
+ list-style: decimal;
552
+ }
553
+ }
554
+
555
+ :where(blockquote) {
556
+ margin-inline: 1rem;
557
+ padding-inline: 1rem;
558
+ border-inline-start: 0.25rem solid var(--color-secondary);
559
+ color: var(--color-text-secondary);
560
+ font-style: italic;
561
+ }
562
+
563
+ :where(body, main, aside, pre, code, textarea, [data-scrollable], .scrollable) {
564
+ @include scrollbar-styling();
565
+ }
566
+
567
+ //:not(:defined),
568
+ :where(link, head, script, style, meta),
569
+ [hidden] {
570
+ display: none !important;
571
+ }
572
+
573
+ /*:not(:defined) {
574
+ opacity: 0;
575
+ visibility: collapse;
576
+ pointer-events: none;
577
+ }*/
578
+
579
+ :where(link, head, script, style, meta) {
580
+ pointer-events: none !important;
581
+ }
582
+
583
+ [aria-hidden="true"] {
584
+ visibility: collapse;
585
+ pointer-events: none;
586
+ opacity: 0;
587
+ }
588
+
589
+ [data-dragging] {
590
+ will-change: transform;
591
+ cursor: grabbing;
592
+ }
593
+
594
+ :where(a, button, [role="button"]) {
595
+ -webkit-tap-highlight-color: transparent;
596
+ }
597
+
598
+ @media (prefers-reduced-motion: reduce) {
599
+ *,
600
+ *::after,
601
+ *::before {
602
+ animation-duration: 0.01ms !important;
603
+ animation-iteration-count: 1 !important;
604
+ transition-duration: 0.01ms !important;
605
+ scroll-behavior: auto !important;
606
+ }
607
+ }
608
+ }
609
+ }
610
+
611
+ @layer layout {
612
+ @media screen {
613
+ :where(footer, header, main) {
614
+ margin-inline: auto;
615
+ padding: 0;
616
+ }
617
+
618
+ :where(header) {
619
+ text-align: center;
620
+ }
621
+
622
+ :where(nav) {
623
+ @include flex-row-wrap();
624
+ margin-block-end: 0;
625
+
626
+ ul {
627
+ display: flex;
628
+ list-style: none;
629
+ padding: 0;
630
+ gap: 1rem;
631
+ margin: 0;
632
+
633
+ li {
634
+ position: relative;
635
+ }
636
+ }
637
+
638
+ a {
639
+ font-weight: bold;
640
+ color: var(--color-link);
641
+ text-decoration: none;
642
+ }
643
+ }
644
+
645
+ :where(section) {
646
+ display: flex;
647
+ flex-wrap: wrap;
648
+ justify-content: var(--justify-important, center);
649
+ gap: 1rem;
650
+
651
+ :where(aside) {
652
+ border: 1px solid var(--color-bg-secondary);
653
+ border-radius: var(--border-radius);
654
+ box-shadow: var(--box-shadow);
655
+ padding: 1.25rem;
656
+ inline-size: var(--width-card);
657
+ flex: 1 1 var(--width-card);
658
+ }
659
+ }
660
+ }
661
+ }
662
+
663
+ @layer components {
664
+ @media screen {
665
+ :where(dialog) {
666
+ margin: auto;
667
+ padding: 1rem;
668
+ background: var(--color-bg);
669
+ color: var(--color-text);
670
+ border: 1px solid var(--color-border);
671
+ border-radius: var(--border-radius);
672
+ box-shadow: var(--box-shadow);
673
+ max-inline-size: min(90vw, 600px);
674
+ max-block-size: 85vh;
675
+
676
+ &::backdrop {
677
+ background-color: rgb(0 0 0 / 0.5);
678
+ }
679
+
680
+ &[open] {
681
+ animation: bottom-to-top 0.25s ease-out;
682
+ }
683
+ }
684
+
685
+ :where(button, input[type="submit"], input[type="button"]) {
686
+ display: inline-flex;
687
+ align-items: center;
688
+ justify-content: center;
689
+ background-color: var(--color-link);
690
+ border: 0px solid transparent;
691
+ border-radius: var(--border-radius);
692
+ padding: 0.5rem 1rem;
693
+ font-weight: 600;
694
+ cursor: pointer;
695
+ transition: filter 0.2s ease, transform 0.1s ease;
696
+
697
+ &:disabled {
698
+ opacity: 0.6;
699
+ cursor: not-allowed;
700
+ filter: none;
701
+ background-color: var(--color-secondary);
702
+ }
703
+ }
704
+
705
+ :where(canvas):is([is="ui-canvas"]) {
706
+ position: absolute;
707
+ inset: 0;
708
+ pointer-events: none;
709
+ z-index: 0;
710
+ padding: 0;
711
+ margin: 0;
712
+ border: none;
713
+ inline-size: stretch;
714
+ block-size: stretch;
715
+ max-inline-size: min(100%, min(100cqi, 100dvi)) !important;
716
+ max-block-size: min(100%, min(100cqb, 100dvb)) !important;
717
+ box-sizing: border-box !important;
718
+ min-inline-size: 0;
719
+ min-block-size: 0;
720
+ object-fit: cover;
721
+ object-position: center;
722
+ }
723
+
724
+ }
725
+ }
726
+
727
+ //
728
+ @layer overrides {
729
+ @media screen {
730
+ [data-scheme="dark"],
731
+ [data-theme="dark"] {
732
+ color-scheme: dark only;
733
+
734
+ & * {
735
+ color-scheme: dark;
736
+ }
737
+ }
738
+
739
+ [data-scheme="light"],
740
+ [data-theme="light"] {
741
+ color-scheme: light only;
742
+
743
+ & * {
744
+ color-scheme: light;
745
+ }
746
+ }
747
+
748
+ [data-scheme="system"],
749
+ [data-theme="system"] {
750
+ color-scheme: light dark;
751
+ }
752
+
753
+ /* Scheme Overrides — align with Theme.ts data-scheme / data-theme */
754
+ [data-scheme="dark"], [data-theme="dark"] { color-scheme: dark only; & * { color-scheme: dark; } }
755
+ [data-scheme="light"], [data-theme="light"] { color-scheme: light only; & * { color-scheme: light; } }
756
+ /*
757
+ * WHY: When QS/Theme pins data-theme=light|dark, do NOT let stale data-scheme=auto
758
+ * win (same specificity, later rule used to force `light dark` and keep OS dark).
759
+ */
760
+ [data-scheme="auto"]:not([data-theme="light"]):not([data-theme="dark"]),
761
+ [data-theme="auto"],
762
+ [data-scheme="system"]:not([data-theme="light"]):not([data-theme="dark"]),
763
+ [data-theme="system"] { color-scheme: light dark; }
764
+ }
765
+ }