@lec-space/liquidglass 0.0.0-stage → 1.0.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 (90) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +58 -2
  3. package/dist/button-BCSOcrTI.cjs +1 -0
  4. package/dist/button-SXD_7EGY.js +970 -0
  5. package/dist/index.cjs +2 -0
  6. package/dist/index.js +4440 -0
  7. package/dist/styles.css +3804 -0
  8. package/dist/types/activity-calendar.d.ts +18 -0
  9. package/dist/types/alert.d.ts +18 -0
  10. package/dist/types/avatar.d.ts +12 -0
  11. package/dist/types/badge.d.ts +13 -0
  12. package/dist/types/button.d.ts +16 -0
  13. package/dist/types/card.d.ts +10 -0
  14. package/dist/types/checkbox.d.ts +9 -0
  15. package/dist/types/command-palette.d.ts +22 -0
  16. package/dist/types/config-provider.d.ts +62 -0
  17. package/dist/types/context-menu.d.ts +17 -0
  18. package/dist/types/data-table.d.ts +32 -0
  19. package/dist/types/date-range-picker.d.ts +23 -0
  20. package/dist/types/descriptions.d.ts +13 -0
  21. package/dist/types/dialog.d.ts +19 -0
  22. package/dist/types/drawer.d.ts +7 -0
  23. package/dist/types/empty.d.ts +8 -0
  24. package/dist/types/filter-bar.d.ts +9 -0
  25. package/dist/types/form-field.d.ts +19 -0
  26. package/dist/types/glass-group.d.ts +10 -0
  27. package/dist/types/glass.d.ts +3 -0
  28. package/dist/types/import-wizard.d.ts +11 -0
  29. package/dist/types/index.d.ts +53 -0
  30. package/dist/types/input.d.ts +11 -0
  31. package/dist/types/internal/bend.d.ts +15 -0
  32. package/dist/types/internal/calendar-day.d.ts +13 -0
  33. package/dist/types/internal/chevron.d.ts +6 -0
  34. package/dist/types/internal/contour.d.ts +10 -0
  35. package/dist/types/internal/controllable.d.ts +1 -0
  36. package/dist/types/internal/cx.d.ts +1 -0
  37. package/dist/types/internal/date-only.d.ts +4 -0
  38. package/dist/types/internal/field-error.d.ts +6 -0
  39. package/dist/types/internal/floating.d.ts +15 -0
  40. package/dist/types/internal/form-reset.d.ts +3 -0
  41. package/dist/types/internal/hold.d.ts +8 -0
  42. package/dist/types/internal/href.d.ts +7 -0
  43. package/dist/types/internal/jelly.d.ts +22 -0
  44. package/dist/types/internal/modal.d.ts +11 -0
  45. package/dist/types/internal/placement.d.ts +33 -0
  46. package/dist/types/internal/press.d.ts +2 -0
  47. package/dist/types/internal/range-calendar-navigation.d.ts +6 -0
  48. package/dist/types/internal/range-calendar.d.ts +11 -0
  49. package/dist/types/internal/refraction.d.ts +20 -0
  50. package/dist/types/internal/scroller.d.ts +2 -0
  51. package/dist/types/internal/sheet-drag.d.ts +17 -0
  52. package/dist/types/internal/spring.d.ts +13 -0
  53. package/dist/types/internal/styles.d.ts +5 -0
  54. package/dist/types/internal/tab-motion.d.ts +2 -0
  55. package/dist/types/internal/tree-branch.d.ts +13 -0
  56. package/dist/types/member-picker.d.ts +15 -0
  57. package/dist/types/menu.d.ts +61 -0
  58. package/dist/types/message.d.ts +12 -0
  59. package/dist/types/multi-select.d.ts +25 -0
  60. package/dist/types/navigation-bar.d.ts +25 -0
  61. package/dist/types/page-control.d.ts +13 -0
  62. package/dist/types/pagination.d.ts +12 -0
  63. package/dist/types/popover.d.ts +20 -0
  64. package/dist/types/progress.d.ts +10 -0
  65. package/dist/types/radio.d.ts +8 -0
  66. package/dist/types/search-field.d.ts +5 -0
  67. package/dist/types/segmented-control.d.ts +14 -0
  68. package/dist/types/select.d.ts +20 -0
  69. package/dist/types/sheet.d.ts +14 -0
  70. package/dist/types/skeleton.d.ts +9 -0
  71. package/dist/types/slider.d.ts +10 -0
  72. package/dist/types/statistic.d.ts +11 -0
  73. package/dist/types/stepper.d.ts +12 -0
  74. package/dist/types/style-entry.d.ts +1 -0
  75. package/dist/types/switch.d.ts +7 -0
  76. package/dist/types/tab-bar.d.ts +23 -0
  77. package/dist/types/table.d.ts +22 -0
  78. package/dist/types/tabs.d.ts +19 -0
  79. package/dist/types/tag.d.ts +10 -0
  80. package/dist/types/text-area.d.ts +13 -0
  81. package/dist/types/toast.d.ts +35 -0
  82. package/dist/types/toolbar.d.ts +13 -0
  83. package/dist/types/tooltip.d.ts +16 -0
  84. package/dist/types/tree.d.ts +18 -0
  85. package/dist/types/typography.d.ts +11 -0
  86. package/dist/types/upload.d.ts +15 -0
  87. package/dist/types/workspace.d.ts +22 -0
  88. package/dist/workspace.cjs +1 -0
  89. package/dist/workspace.js +42 -0
  90. package/package.json +65 -3
@@ -0,0 +1,3804 @@
1
+ :where(:root, [data-theme="light"]) {
2
+ /* 统一的尺寸、字阶和层级;宿主可通过 ConfigProvider 局部覆盖。 */
3
+ --lg-space-1: 4px;
4
+ --lg-space-2: 8px;
5
+ --lg-space-3: 12px;
6
+ --lg-space-4: 16px;
7
+ --lg-space-5: 24px;
8
+ --lg-space-6: 32px;
9
+ --lg-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
10
+ --lg-font-size: 14px;
11
+ --lg-font-size-small: 12px;
12
+ --lg-control-height-small: 32px;
13
+ --lg-control-height-regular: 40px;
14
+ --lg-control-height-large: 48px;
15
+ --lg-control-height: var(--lg-control-height-regular);
16
+ --lg-radius-control: 999px;
17
+ --lg-radius-item: 12px;
18
+ --lg-radius-panel: 20px;
19
+ --lg-disabled-opacity: 0.45;
20
+ --lg-focus-color: var(--lg-tab-accent);
21
+ --lg-duration-fast: 140ms;
22
+ --lg-duration: 200ms;
23
+ --lg-success-ink: #147d4a;
24
+ --lg-warning-ink: #956000;
25
+ --lg-foreground: rgb(0 0 0);
26
+ --lg-muted: rgb(45 48 55 / 0.72);
27
+ /* On glass, ink is black at an opacity, so it takes up the colour behind it as iOS's does. */
28
+ --lg-secondary: rgb(0 0 0 / 0.66);
29
+ --lg-grabber: rgb(0 0 0 / 0.33);
30
+ --lg-press-ink: rgb(0 0 0 / 0.77);
31
+ --lg-transparency: 0.5;
32
+ /* How strong the rim's lines are. */
33
+ --lg-shine: 1;
34
+ /* What regular glass does to its backdrop, fitted to iOS 27 (see parity/):
35
+ glass 120 points tall or more, and glass 60 or less. */
36
+ --lg-contrast: 0.307;
37
+ --lg-brightness: 1.554;
38
+ --lg-saturate: 2.081;
39
+ --lg-contrast-small: 0.314;
40
+ --lg-brightness-small: 1.511;
41
+ --lg-saturate-small: 2;
42
+ --lg-dark: initial;
43
+ --lg-drop-strength: 1;
44
+ --lg-tab-accent: #005fc9;
45
+ --lg-fill-subtle: rgb(118 118 128 / 0.12);
46
+ --lg-stepper: rgb(0 0 0 / 0.05);
47
+ --lg-thumb: #fff;
48
+ --lg-scrim: rgb(0 0 0 / 0.2);
49
+ --lg-action: rgb(0 0 0 / 0.15);
50
+ --lg-sheet-opaque: #fff;
51
+ --lg-fill-shade: 11%;
52
+ --lg-fill-alpha: 100%;
53
+ --lg-glass-tinted: rgb(247 247 249 / 0.96);
54
+ --lg-glass-active: rgb(255 255 255 / 0.34);
55
+ --lg-edge: transparent;
56
+ --lg-drop: rgb(0 0 0 / 0.03);
57
+ --lg-selection: transparent;
58
+ /* The selected tab keeps the colour of what's behind it: deeper, not greyer. */
59
+ --lg-selection-filter: saturate(1.39) brightness(0.89);
60
+ --lg-lens: transparent;
61
+ --lg-surface: rgb(250 250 252 / 0.86);
62
+ --lg-surface-edge: rgb(0 0 0 / 0.08);
63
+ --lg-shadow: rgb(25 25 35 / 0.12);
64
+ --lg-highlight: rgb(60 60 67 / 0.09);
65
+ --lg-separator: rgb(0 0 0 / 0.1);
66
+ --lg-fill-edge: 62%, #000;
67
+ --lg-destructive: #c62938;
68
+ --lg-destructive-ink: #dc1e30;
69
+ --lg-menu-destructive: #dc1e30;
70
+ --lg-track: rgb(59 59 66 / 0.3);
71
+ --lg-rail: rgb(0 0 0 / 0.1);
72
+ --lg-on: #34c759;
73
+ --lg-fill: #005fc9;
74
+ --lg-ring: var(--lg-focus-color);
75
+ --lg-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
76
+ }
77
+
78
+ :where([data-theme="dark"]) {
79
+ --lg-success-ink: #7ee2ac;
80
+ --lg-warning-ink: #ffd071;
81
+ --lg-foreground: rgb(255 255 255);
82
+ --lg-muted: rgb(235 235 245 / 0.76);
83
+ --lg-secondary: rgb(255 255 255 / 0.72);
84
+ --lg-grabber: rgb(255 255 255 / 0.3);
85
+ --lg-press-ink: rgb(255 255 255);
86
+ --lg-glass-tinted: rgb(30 30 32 / 0.95);
87
+ --lg-glass-active: rgb(255 255 255 / 0.3);
88
+ --lg-edge: transparent;
89
+ --lg-drop: rgb(0 0 0 / 0.05);
90
+ --lg-contrast: 0.66;
91
+ --lg-brightness: 0.83;
92
+ --lg-saturate: 1.7;
93
+ --lg-contrast-small: 0.68;
94
+ --lg-brightness-small: 0.98;
95
+ --lg-saturate-small: 1.6;
96
+ /* Chromium can run the real curve; everywhere else falls back to the tone. */
97
+ --lg-dark: opacity(1);
98
+ --lg-drop-strength: 1.6;
99
+ --lg-tab-accent: #62dcff;
100
+ --lg-fill-subtle: rgb(118 118 128 / 0.24);
101
+ --lg-stepper: rgb(255 255 255 / 0.1);
102
+ --lg-thumb: rgb(255 255 255 / 0.25);
103
+ --lg-scrim: rgb(0 0 0 / 0.48);
104
+ --lg-action: rgb(255 255 255 / 0.1);
105
+ --lg-sheet-opaque: #1c1c1e;
106
+ --lg-fill-shade: 0%;
107
+ --lg-fill-alpha: 95%;
108
+ --lg-selection: transparent;
109
+ --lg-selection-filter: brightness(0.75) saturate(1.7);
110
+ --lg-lens: rgb(255 255 255 / 0.055);
111
+ --lg-surface: rgb(28 28 31 / 0.86);
112
+ --lg-surface-edge: rgb(255 255 255 / 0.13);
113
+ --lg-shadow: rgb(0 0 0 / 0.38);
114
+ --lg-highlight: rgb(235 235 245 / 0.13);
115
+ --lg-separator: rgb(235 235 245 / 0.16);
116
+ --lg-destructive: #c62938;
117
+ --lg-destructive-ink: #ff8498;
118
+ --lg-menu-destructive: #ff5254;
119
+ --lg-fill-edge: 70%, #fff;
120
+ --lg-track: rgb(235 235 245 / 0.3);
121
+ --lg-rail: rgb(255 255 255 / 0.1);
122
+ --lg-on: #30d158;
123
+ --lg-fill: #005fc9;
124
+ --lg-ring: var(--lg-focus-color);
125
+ }
126
+
127
+ @media (prefers-color-scheme: dark) {
128
+ :where(:root:not([data-theme="light"])) {
129
+ --lg-success-ink: #7ee2ac;
130
+ --lg-warning-ink: #ffd071;
131
+ --lg-foreground: rgb(255 255 255);
132
+ --lg-muted: rgb(235 235 245 / 0.76);
133
+ --lg-secondary: rgb(255 255 255 / 0.72);
134
+ --lg-grabber: rgb(255 255 255 / 0.3);
135
+ --lg-press-ink: rgb(255 255 255);
136
+ --lg-glass-tinted: rgb(30 30 32 / 0.95);
137
+ --lg-glass-active: rgb(255 255 255 / 0.3);
138
+ --lg-edge: transparent;
139
+ --lg-drop: rgb(0 0 0 / 0.05);
140
+ --lg-contrast: 0.66;
141
+ --lg-brightness: 0.83;
142
+ --lg-saturate: 1.7;
143
+ --lg-contrast-small: 0.68;
144
+ --lg-brightness-small: 0.98;
145
+ --lg-saturate-small: 1.6;
146
+ /* Chromium can run the real curve; everywhere else falls back to the tone. */
147
+ --lg-dark: opacity(1);
148
+ --lg-drop-strength: 1.6;
149
+ /* Chromium can run the real curve; everywhere else falls back to the tone. */
150
+ --lg-curve: var(--lg-svg-dark);
151
+ --lg-tab-accent: #62dcff;
152
+ --lg-fill-subtle: rgb(118 118 128 / 0.24);
153
+ --lg-stepper: rgb(255 255 255 / 0.1);
154
+ --lg-stepper: rgb(255 255 255 / 0.1);
155
+ --lg-thumb: rgb(255 255 255 / 0.25);
156
+ --lg-scrim: rgb(0 0 0 / 0.48);
157
+ --lg-action: rgb(255 255 255 / 0.1);
158
+ --lg-sheet-opaque: #1c1c1e;
159
+ --lg-fill-subtle: rgb(118 118 128 / 0.24);
160
+ --lg-stepper: rgb(255 255 255 / 0.1);
161
+ --lg-thumb: rgb(255 255 255 / 0.25);
162
+ --lg-scrim: rgb(0 0 0 / 0.48);
163
+ --lg-action: rgb(255 255 255 / 0.1);
164
+ --lg-sheet-opaque: #1c1c1e;
165
+ --lg-fill-shade: 0%;
166
+ --lg-fill-alpha: 95%;
167
+ --lg-selection: transparent;
168
+ --lg-selection-filter: brightness(0.75) saturate(1.7);
169
+ --lg-lens: rgb(255 255 255 / 0.055);
170
+ --lg-surface: rgb(28 28 31 / 0.86);
171
+ --lg-surface-edge: rgb(255 255 255 / 0.13);
172
+ --lg-shadow: rgb(0 0 0 / 0.38);
173
+ --lg-highlight: rgb(235 235 245 / 0.13);
174
+ --lg-separator: rgb(235 235 245 / 0.16);
175
+ --lg-destructive: #c62938;
176
+ --lg-destructive-ink: #ff8498;
177
+ --lg-menu-destructive: #ff5254;
178
+ --lg-fill-edge: 70%, #fff;
179
+ --lg-track: rgb(235 235 245 / 0.3);
180
+ --lg-rail: rgb(255 255 255 / 0.1);
181
+ --lg-on: #30d158;
182
+ --lg-fill: #005fc9;
183
+ --lg-ring: var(--lg-focus-color);
184
+ }
185
+ }
186
+
187
+ /* Glass */
188
+
189
+ /* `--lg-transparency` runs from 0, fully tinted, through 0.5, regular glass, to
190
+ 1, clear glass, like the iOS 27 setting. It's worked out on each glass so it
191
+ can be set anywhere above.
192
+
193
+ iOS lifts the backdrop and then saturates it, so colours stay vivid. A tint
194
+ painted on top couldn't do that, so glass has no tint until it's asked to be
195
+ more opaque than regular. */
196
+ .lg-glass {
197
+ --lg-clearness: clamp(0, (var(--lg-transparency) - 0.5) * 2, 1);
198
+ /* From 0 for glass 60 points tall or less to 1 for 120 or more. Set by the glass when it's measured. */
199
+ --lg-size: 1;
200
+ --lg-glass: color-mix(
201
+ in srgb,
202
+ var(--lg-glass-tinted) calc(clamp(0, (0.5 - var(--lg-transparency)) * 2, 1) * 100%),
203
+ transparent
204
+ );
205
+ --lg-blur: calc(15.3px - 14px * var(--lg-clearness));
206
+ --lg-regular-contrast: calc(var(--lg-contrast-small) + (var(--lg-contrast) - var(--lg-contrast-small)) * var(--lg-size));
207
+ --lg-regular-brightness: calc(var(--lg-brightness-small) + (var(--lg-brightness) - var(--lg-brightness-small)) * var(--lg-size));
208
+ --lg-regular-saturate: calc(var(--lg-saturate-small) + (var(--lg-saturate) - var(--lg-saturate-small)) * var(--lg-size));
209
+ --lg-tone:
210
+ contrast(calc(var(--lg-regular-contrast) + (0.793 - var(--lg-regular-contrast)) * var(--lg-clearness)))
211
+ brightness(calc(var(--lg-regular-brightness) + (1.205 - var(--lg-regular-brightness)) * var(--lg-clearness)))
212
+ saturate(calc(var(--lg-regular-saturate) + (1.117 - var(--lg-regular-saturate)) * var(--lg-clearness)));
213
+ /* The exact curve, in dark mode where the browser can run it. */
214
+ --lg-curve: var(--lg-dark) var(--lg-size-curve);
215
+ position: relative;
216
+ background-color: var(--lg-glass);
217
+ /* Trims the circular corners to continuous ones, once they're measured. */
218
+ -webkit-mask-box-image: var(--lg-mask, none);
219
+ mask-border: var(--lg-mask, none);
220
+ /* Where the lens runs, it does the blur too, so the two line up. */
221
+ -webkit-backdrop-filter: blur(var(--lg-lens-blur, var(--lg-blur))) var(--lg-filter,) var(--lg-curve, var(--lg-tone));
222
+ backdrop-filter: blur(var(--lg-lens-blur, var(--lg-blur))) var(--lg-filter,) var(--lg-curve, var(--lg-tone));
223
+ box-shadow:
224
+ inset 0 0 0 0.5px var(--lg-edge),
225
+ 0 calc(4px + 4px * var(--lg-size)) calc(8px + 13px * var(--lg-size))
226
+ rgb(0 0 0 / calc((0.016 + 0.054 * var(--lg-size)) * var(--lg-drop-strength)));
227
+ }
228
+
229
+ /* The rim reaches just past the shape, for the hairline iOS draws outside it. */
230
+ .lg-glass::before {
231
+ content: "";
232
+ position: absolute;
233
+ inset: -1px;
234
+ box-sizing: border-box;
235
+ /* Nine pieces: the corners and a sliver of each edge. It costs almost nothing to
236
+ draw, and its corners keep their shape at any size. */
237
+ border: solid transparent;
238
+ border-width: var(--lg-rim-y, 0) var(--lg-rim-x, 0);
239
+ border-image: var(--lg-rim-image, none);
240
+ pointer-events: none;
241
+ }
242
+
243
+ .lg-glass::after {
244
+ content: "";
245
+ position: absolute;
246
+ inset: 0;
247
+ border-radius: inherit;
248
+ pointer-events: none;
249
+ background: radial-gradient(
250
+ circle 240px at var(--lg-x, 50%) var(--lg-y, 50%),
251
+ rgb(255 255 255 / 0.035),
252
+ rgb(255 255 255 / 0.025) 50%,
253
+ transparent
254
+ );
255
+ opacity: 0;
256
+ transition: opacity 220ms ease-in-out;
257
+ }
258
+
259
+ .lg-glass[data-pressed]::after {
260
+ opacity: 1;
261
+ transition-duration: 0s;
262
+ }
263
+
264
+ /* Glass refracting a copy of its backdrop, where the live one can't be filtered */
265
+
266
+ .lg-glass[data-copy] {
267
+ -webkit-backdrop-filter: none;
268
+ backdrop-filter: none;
269
+ }
270
+
271
+ .lg-glass-copy {
272
+ position: absolute;
273
+ top: 0;
274
+ left: 0;
275
+ margin: 0;
276
+ overflow: hidden;
277
+ transform-origin: 0 0;
278
+ pointer-events: none;
279
+ }
280
+
281
+ .lg-glass-copy > div {
282
+ position: absolute;
283
+ top: 0;
284
+ left: 0;
285
+ transform-origin: 0 0;
286
+ }
287
+
288
+ /* Message */
289
+
290
+ .lg-message {
291
+ --lg-message-accent: var(--lg-tab-accent);
292
+ --lg-edge: color-mix(in srgb, var(--lg-message-accent) 25%, transparent);
293
+ --lg-glass-tinted: color-mix(in srgb, var(--lg-surface), var(--lg-message-accent) 8%);
294
+ --lg-transparency: 0.25;
295
+ display: flex;
296
+ align-items: center;
297
+ gap: 12px;
298
+ min-width: 0;
299
+ padding: 9px 12px;
300
+ border-radius: 12px;
301
+ color: var(--lg-foreground);
302
+ font-size: 13px;
303
+ line-height: 1.45;
304
+ text-align: start;
305
+ }
306
+
307
+ .lg-message[data-tone="error"] {
308
+ --lg-message-accent: var(--lg-destructive-ink);
309
+ }
310
+
311
+ .lg-message-body {
312
+ display: flex;
313
+ align-items: flex-start;
314
+ flex: 1;
315
+ gap: 8px;
316
+ min-width: 0;
317
+ overflow-wrap: anywhere;
318
+ }
319
+
320
+ .lg-message-body > svg {
321
+ flex: none;
322
+ margin-block-start: 1px;
323
+ color: var(--lg-message-accent);
324
+ }
325
+
326
+ .lg-message > .lg-button {
327
+ flex: none;
328
+ font-size: inherit;
329
+ }
330
+
331
+ /* Button */
332
+
333
+ .lg-button {
334
+ box-sizing: border-box;
335
+ display: inline-flex;
336
+ align-items: center;
337
+ justify-content: center;
338
+ gap: 8px;
339
+ height: var(--lg-control-height);
340
+ padding: 0 var(--lg-space-4);
341
+ border: 0;
342
+ border-radius: var(--lg-radius-control);
343
+ color: var(--lg-foreground);
344
+ font: inherit;
345
+ font-size: var(--lg-font-size);
346
+ font-weight: 500;
347
+ line-height: 20px;
348
+ white-space: nowrap;
349
+ cursor: pointer;
350
+ /* A long press keeps pressing, as on iOS, rather than selecting the label. */
351
+ touch-action: manipulation;
352
+ -webkit-tap-highlight-color: transparent;
353
+ -webkit-touch-callout: none;
354
+ user-select: none;
355
+ -webkit-user-select: none;
356
+ transition:
357
+ background-color 200ms ease,
358
+ color 200ms ease;
359
+ }
360
+
361
+ .lg-button[data-size="small"] {
362
+ height: var(--lg-control-height-small);
363
+ padding: 0 var(--lg-space-3);
364
+ }
365
+
366
+ .lg-button[data-size="large"] {
367
+ height: var(--lg-control-height-large);
368
+ padding: 0 var(--lg-space-5);
369
+ }
370
+
371
+ .lg-button[data-icon] {
372
+ padding-left: 10px;
373
+ }
374
+
375
+ /* Wider than it's tall: on iOS an icon sits lower in a glass capsule than a label does. */
376
+ .lg-button[data-icon="only"] {
377
+ width: var(--lg-control-height);
378
+ height: var(--lg-control-height);
379
+ padding: 0;
380
+ border-radius: var(--lg-radius-control);
381
+ }
382
+
383
+ .lg-button[data-icon="only"][data-size="small"] {
384
+ width: var(--lg-control-height-small);
385
+ height: var(--lg-control-height-small);
386
+ }
387
+
388
+ .lg-button[data-icon="only"][data-size="large"] {
389
+ width: var(--lg-control-height-large);
390
+ height: var(--lg-control-height-large);
391
+ }
392
+
393
+ .lg-button > svg {
394
+ flex: none;
395
+ width: 20px;
396
+ height: 20px;
397
+ }
398
+
399
+ /* Lights up at once when pressed, as on iOS, and fades on release. */
400
+ .lg-button:is(:active, [data-pressed]) {
401
+ color: var(--lg-press-ink);
402
+ background-color: var(--lg-glass-active);
403
+ transition-duration: 0s;
404
+ }
405
+
406
+ .lg-button:is([data-tint], [data-destructive]):is(:active, [data-pressed]) {
407
+ color: color-mix(in srgb, var(--lg-tint) 77%, transparent);
408
+ }
409
+
410
+ @media (hover: hover) and (pointer: fine) {
411
+ .lg-button:hover {
412
+ background-color: var(--lg-glass-active);
413
+ }
414
+ }
415
+
416
+ .lg-button:disabled {
417
+ background-color: var(--lg-glass);
418
+ opacity: var(--lg-disabled-opacity);
419
+ cursor: not-allowed;
420
+ }
421
+
422
+ .lg-button[data-destructive]:not([data-tint]) {
423
+ --lg-tint: var(--lg-destructive-ink);
424
+ }
425
+
426
+ .lg-button[data-variant="filled"][data-destructive]:not([data-tint]) {
427
+ --lg-tint: var(--lg-destructive);
428
+ }
429
+
430
+ .lg-button:is([data-tint], [data-destructive]) {
431
+ color: var(--lg-tint);
432
+ }
433
+
434
+ /* Opaque, with its own edge in its own colour rather than the glass's rim. */
435
+ .lg-button[data-variant="filled"] {
436
+ --lg-button-fill: var(--lg-tint, var(--lg-fill));
437
+ --lg-tone: none;
438
+ --lg-curve: initial;
439
+ color: #fff;
440
+ box-shadow:
441
+ inset 0 1px 0 rgb(255 255 255 / 0.22),
442
+ inset 0 -1px 0 rgb(255 255 255 / 0.14),
443
+ 0 0 0 0.67px color-mix(in srgb, var(--lg-button-fill) var(--lg-fill-edge));
444
+ }
445
+
446
+ .lg-button[data-variant="filled"]::before {
447
+ display: none;
448
+ }
449
+
450
+ .lg-button[data-variant="filled"]:is(:active, [data-pressed]) {
451
+ color: #fff;
452
+ }
453
+
454
+ .lg-button[data-variant="filled"],
455
+ .lg-button[data-variant="filled"]:disabled {
456
+ background-color: color-mix(
457
+ in srgb,
458
+ color-mix(in srgb, var(--lg-button-fill) calc(100% - var(--lg-fill-shade)), #000) var(--lg-fill-alpha),
459
+ transparent
460
+ );
461
+ }
462
+
463
+ /* It lights up under a finger. */
464
+ .lg-button[data-variant="filled"]:is(:active, [data-pressed]) {
465
+ background-color: color-mix(in srgb, var(--lg-button-fill) 88%, #fff);
466
+ }
467
+
468
+ @media (hover: hover) and (pointer: fine) {
469
+ .lg-button[data-variant="filled"]:hover {
470
+ background-color: color-mix(in srgb, var(--lg-button-fill) 88%, #fff);
471
+ }
472
+
473
+ .lg-button[data-variant="filled"]:hover:is(:active, [data-pressed]) {
474
+ background-color: color-mix(in srgb, var(--lg-button-fill) 88%, #fff);
475
+ }
476
+ }
477
+
478
+ .lg-button:focus-visible,
479
+ .lg-tab:focus-visible,
480
+ .lg-switch:focus-visible,
481
+ .lg-menu-item:focus-visible {
482
+ outline: 2px solid var(--lg-ring);
483
+ outline-offset: 2px;
484
+ }
485
+
486
+ /* Tab bar */
487
+
488
+ .lg-tab-bar {
489
+ --lg-tab-width: 84px;
490
+ --lg-tab-height: 32px;
491
+ --lg-lens-grow-x: 27px;
492
+ --lg-lens-grow-y: 20px;
493
+ position: relative;
494
+ display: inline-flex;
495
+ padding: 4px;
496
+ border-radius: calc(var(--lg-tab-height) / 2 + 4px);
497
+ touch-action: pan-y;
498
+ -webkit-tap-highlight-color: transparent;
499
+ user-select: none;
500
+ -webkit-user-select: none;
501
+ }
502
+
503
+ /* With icons it's the iOS tab bar: 62 points tall, and the selection is a little
504
+ wider than its tab, so it runs close to the bar's ends. */
505
+ .lg-tab-bar[data-icons] {
506
+ --lg-tab-width: 86px;
507
+ --lg-tab-height: 54px;
508
+ --lg-lens-grow-x: 21px;
509
+ padding: 4px 8.5px;
510
+ }
511
+
512
+ .lg-tab-face {
513
+ display: flex;
514
+ flex: 1;
515
+ align-items: center;
516
+ justify-content: center;
517
+ width: 100%;
518
+ height: 100%;
519
+ }
520
+
521
+ .lg-tab-bar[data-icons] :is(.lg-tab-face, .lg-tab-copy) {
522
+ flex-direction: column;
523
+ gap: 4px;
524
+ font-size: 11px;
525
+ font-weight: 500;
526
+ }
527
+ .lg-tab-label { display: block; line-height: 20px; white-space: nowrap; }
528
+ .lg-tab-bar[data-icons] .lg-tab-label { line-height: 14px; }
529
+ .lg-tab-bar[data-icons] .lg-tab-icon { width: 24px; height: 24px; flex: none; }
530
+
531
+ .lg-tab-bar[data-icons] .lg-tab {
532
+ color: var(--lg-foreground);
533
+ }
534
+
535
+ /* The same shape as the lens, so blue ends and black begins exactly at its edge. */
536
+ .lg-tab-bar[data-icons] .lg-tab-tint {
537
+ left: 4.5px;
538
+ width: calc(var(--lg-tab-width) + 8px);
539
+ color: var(--lg-tab-accent);
540
+ }
541
+
542
+ .lg-tab-bar[data-icons] .lg-tab-row {
543
+ margin-left: 4px;
544
+ }
545
+
546
+ /* At rest the selection sits under the tab's content, so it doesn't dim it. */
547
+ .lg-tab-bar:not([data-lifted]) .lg-tab-tint {
548
+ z-index: 3;
549
+ }
550
+
551
+ .lg-tab-bar[data-icons] .lg-tab-lens {
552
+ left: 4.5px;
553
+ width: calc(var(--lg-tab-width) + 8px);
554
+ }
555
+
556
+ .lg-tab-icon {
557
+ display: flex;
558
+ align-items: center;
559
+ justify-content: center;
560
+ width: 28px;
561
+ height: 28px;
562
+ }
563
+
564
+ .lg-tab-icon > svg {
565
+ width: 100%;
566
+ height: 100%;
567
+ }
568
+
569
+ .lg-tab-bar-glass {
570
+ position: absolute;
571
+ inset: 0;
572
+ border-radius: inherit;
573
+ pointer-events: none;
574
+ transition:
575
+ width 420ms cubic-bezier(0.3, 1.25, 0.4, 1),
576
+ height 420ms cubic-bezier(0.3, 1.25, 0.4, 1),
577
+ top 420ms cubic-bezier(0.3, 1.25, 0.4, 1);
578
+ }
579
+
580
+ /* Minimised, as when a page scrolls down: only the current tab's icon stays. */
581
+ .lg-tab-bar[data-minimized] .lg-tab-bar-glass {
582
+ top: calc(100% - 39px);
583
+ right: auto;
584
+ bottom: auto;
585
+ width: 49px;
586
+ height: 39px;
587
+ border-radius: 20px;
588
+ }
589
+
590
+ .lg-tab-bar :is(.lg-tab, .lg-tab-tint, .lg-tab-lens) {
591
+ transition-property: opacity, color;
592
+ transition-duration: 200ms;
593
+ }
594
+
595
+ .lg-tab-bar[data-minimized] :is(.lg-tab, .lg-tab-tint, .lg-tab-lens) {
596
+ opacity: 0 !important;
597
+ pointer-events: none;
598
+ }
599
+
600
+ .lg-tab-mini {
601
+ position: absolute;
602
+ bottom: 0;
603
+ left: 0;
604
+ z-index: 3;
605
+ display: grid;
606
+ place-items: center;
607
+ width: 49px;
608
+ height: 39px;
609
+ padding: 0;
610
+ border: 0;
611
+ color: var(--lg-tab-accent);
612
+ background: none;
613
+ cursor: pointer;
614
+ opacity: 0;
615
+ pointer-events: none;
616
+ transition: opacity 200ms ease;
617
+ }
618
+
619
+ .lg-tab-mini > .lg-tab-icon {
620
+ width: 24px;
621
+ height: 24px;
622
+ }
623
+
624
+ .lg-tab-bar[data-minimized] .lg-tab-mini {
625
+ opacity: 1;
626
+ pointer-events: auto;
627
+ }
628
+
629
+ .lg-tab-bar-glass::after {
630
+ background: radial-gradient(
631
+ circle 260px at var(--lg-x, 20%) 50%,
632
+ rgb(255 255 255 / 0.09),
633
+ rgb(255 255 255 / 0.045) 60%,
634
+ transparent
635
+ );
636
+ opacity: 0;
637
+ transition: opacity 160ms ease;
638
+ }
639
+
640
+ .lg-tab,
641
+ .lg-tab-copy {
642
+ display: flex;
643
+ flex: none;
644
+ align-items: center;
645
+ justify-content: center;
646
+ width: var(--lg-tab-width);
647
+ height: var(--lg-tab-height);
648
+ font: inherit;
649
+ font-size: 14px;
650
+ }
651
+
652
+ .lg-tab {
653
+ position: relative;
654
+ z-index: 1;
655
+ padding: 0;
656
+ border: 0;
657
+ border-radius: calc(var(--lg-tab-height) / 2);
658
+ color: var(--lg-muted);
659
+ background: none;
660
+ text-decoration: none;
661
+ cursor: pointer;
662
+ -webkit-touch-callout: none;
663
+ transition: color 200ms ease;
664
+ }
665
+
666
+ .lg-tab:focus-visible {
667
+ outline-offset: -2px;
668
+ }
669
+
670
+ @media (hover: hover) and (pointer: fine) {
671
+ .lg-tab:hover {
672
+ color: var(--lg-foreground);
673
+ }
674
+ }
675
+
676
+ .lg-tab-lens,
677
+ .lg-tab-tint {
678
+ position: absolute;
679
+ top: 4px;
680
+ left: 4px;
681
+ width: var(--lg-tab-width);
682
+ height: var(--lg-tab-height);
683
+ border-radius: calc(var(--lg-tab-height) / 2);
684
+ pointer-events: none;
685
+ transform: translateX(calc(var(--lg-tab-width) * var(--lg-index, 0)));
686
+ transition: opacity 140ms ease;
687
+ will-change: transform;
688
+ }
689
+
690
+ .lg-tab-tint {
691
+ z-index: 1;
692
+ overflow: hidden;
693
+ color: var(--lg-foreground);
694
+ }
695
+
696
+ /* The lens's copy of the labels, bent at the lens's rim while it's held. */
697
+ .lg-tab-bend,
698
+ .lg-tab-clip {
699
+ position: absolute;
700
+ inset: 0;
701
+ display: block;
702
+ }
703
+
704
+ /* WebKit sizes a filter in bounding-box units by everything inside, even what overflow hides,
705
+ so the labels' row is cut to the lens by a clip-path, which it does take into account. */
706
+ .lg-tab-clip {
707
+ clip-path: inset(0);
708
+ }
709
+
710
+ .lg-tab-row {
711
+ display: flex;
712
+ height: 100%;
713
+ transform: translateX(calc(var(--lg-tab-width) * var(--lg-index, 0) * -1));
714
+ transform-origin: 0 0;
715
+ /* No layer of its own: WebKit draws a layer past its parent's filter, so the rim wouldn't bend it. */
716
+ }
717
+
718
+ .lg-tab-lens.lg-glass {
719
+ z-index: 2;
720
+ background-color: transparent;
721
+ background-image: none;
722
+ -webkit-backdrop-filter: var(--lg-selection-filter, none);
723
+ backdrop-filter: var(--lg-selection-filter, none);
724
+ box-shadow: none;
725
+ transition:
726
+ opacity 140ms ease,
727
+ background-color 140ms ease;
728
+ }
729
+
730
+ .lg-tab-bar[data-lifted] .lg-tab-lens.lg-glass {
731
+ background-color: var(--lg-lens);
732
+ background-image: var(--lg-rim, none);
733
+ background-size: 100% 100%;
734
+ -webkit-backdrop-filter: none;
735
+ backdrop-filter: none;
736
+ transition-duration: 100ms;
737
+ }
738
+
739
+ .lg-tab-lens::before {
740
+ content: "";
741
+ position: absolute;
742
+ inset: 0;
743
+ border-radius: inherit;
744
+ background: var(--lg-selection);
745
+ transition: opacity 140ms ease;
746
+ }
747
+
748
+ .lg-tab-lens[data-pressed]::after {
749
+ opacity: 0.2;
750
+ }
751
+
752
+ .lg-tab-bar[data-lifted] .lg-tab-lens::before {
753
+ opacity: 0;
754
+ transition-duration: 100ms;
755
+ }
756
+
757
+ .lg-tab-bar[data-refracting] .lg-tab-lens.lg-glass {
758
+ background-image: var(--lg-rim, none);
759
+ background-size: 100% 100%;
760
+ -webkit-backdrop-filter: var(--lg-filter, none);
761
+ backdrop-filter: var(--lg-filter, none);
762
+ }
763
+
764
+ .lg-tab-bar[data-hidden] :is(.lg-tab-lens, .lg-tab-tint),
765
+ .lg-tab-bar:not([data-ready]):not(:has([data-selected])) :is(.lg-tab-lens, .lg-tab-tint) {
766
+ opacity: 0;
767
+ }
768
+
769
+ /* Input */
770
+
771
+ .lg-input {
772
+ display: flex;
773
+ align-items: center;
774
+ gap: var(--lg-space-2);
775
+ box-sizing: border-box;
776
+ width: 100%;
777
+ max-width: 360px;
778
+ height: var(--lg-control-height);
779
+ padding: 0 var(--lg-space-4);
780
+ border-radius: var(--lg-radius-control);
781
+ color: var(--lg-foreground);
782
+ font-size: var(--lg-font-size);
783
+ transition: background-color 200ms ease;
784
+ }
785
+
786
+ .lg-input:focus-within {
787
+ background-color: var(--lg-glass-active);
788
+ }
789
+
790
+ /* A plain fill, as iOS gives a search field under a large title. */
791
+ .lg-input[data-variant="fill"] {
792
+ background: var(--lg-fill-subtle);
793
+ -webkit-backdrop-filter: none;
794
+ backdrop-filter: none;
795
+ box-shadow: none;
796
+ }
797
+
798
+ .lg-input[data-variant="fill"]::before {
799
+ display: none;
800
+ }
801
+
802
+ .lg-input input {
803
+ flex: 1;
804
+ min-width: 0;
805
+ height: 100%;
806
+ padding: 0;
807
+ border: 0;
808
+ outline: 0;
809
+ color: inherit;
810
+ background: none;
811
+ font: inherit;
812
+ font-size: var(--lg-font-size);
813
+ }
814
+
815
+ .lg-input input::placeholder {
816
+ color: var(--lg-muted);
817
+ }
818
+
819
+ .lg-input input::-webkit-search-cancel-button {
820
+ display: none;
821
+ }
822
+
823
+ .lg-input-icon {
824
+ flex: none;
825
+ width: 16px;
826
+ height: 16px;
827
+ color: var(--lg-muted);
828
+ }
829
+
830
+ .lg-input-icon {
831
+ display: grid;
832
+ place-items: center;
833
+ }
834
+
835
+ .lg-input-icon > svg {
836
+ width: 100%;
837
+ height: 100%;
838
+ }
839
+
840
+ .lg-input-clear {
841
+ display: grid;
842
+ flex: none;
843
+ place-items: center;
844
+ width: 32px;
845
+ height: 32px;
846
+ margin-right: -8px;
847
+ padding: 0;
848
+ border: 0;
849
+ border-radius: 50%;
850
+ color: var(--lg-muted);
851
+ background: none;
852
+ cursor: pointer;
853
+ }
854
+
855
+ .lg-input-clear svg {
856
+ width: 14px;
857
+ height: 14px;
858
+ }
859
+
860
+ .lg-input:has(input:disabled) {
861
+ opacity: var(--lg-disabled-opacity);
862
+ cursor: not-allowed;
863
+ }
864
+
865
+ /* Switch and slider thumbs */
866
+
867
+ /* Under a finger a thumb is a clear lens: sharp, neither blurred nor lifted, with a
868
+ dark outline. At rest its white face covers that, and the rim and shadow go. */
869
+ .lg-switch-thumb,
870
+ .lg-slider-thumb {
871
+ --lg-transparency: 1;
872
+ --lg-blur: 0px;
873
+ /* Not `none`: in a list of filters that would throw away the whole list, lens and all. */
874
+ --lg-tone: saturate(1);
875
+ --lg-shine: 0.6;
876
+ position: absolute;
877
+ border-radius: 999px;
878
+ pointer-events: none;
879
+ box-shadow:
880
+ 0 0 0 0.5px rgb(0 0 0 / calc(0.3 * var(--lg-lift, 0))),
881
+ 0 4px 14px rgb(0 0 0 / calc(0.16 * var(--lg-lift, 0)));
882
+ }
883
+
884
+ /* Held, a thumb is a lens, as the tab bar's is: its rim bends what's behind it, and its edge
885
+ is drawn as one picture over that. */
886
+ .lg-switch-thumb::before,
887
+ .lg-slider-thumb::before,
888
+ .lg-segmented-lens::before {
889
+ inset: -1px;
890
+ border: 0;
891
+ background: var(--lg-rim, none) 0 0 / 100% 100%;
892
+ opacity: var(--lg-lift, 0);
893
+ }
894
+
895
+ .lg-slider-thumb {
896
+ box-shadow:
897
+ 0 0 0 0.5px rgb(0 0 0 / calc(0.3 * var(--lg-lift, 0))),
898
+ 0 4px 14px rgb(0 0 0 / 0.14);
899
+ }
900
+
901
+ .lg-thumb-face {
902
+ position: absolute;
903
+ inset: 0;
904
+ border-radius: inherit;
905
+ background: #fff;
906
+ }
907
+
908
+ /* Switch */
909
+
910
+ .lg-switch {
911
+ --lg-scale: 0.375;
912
+ position: relative;
913
+ flex: none;
914
+ width: calc(168px * var(--lg-scale));
915
+ height: calc(74.67px * var(--lg-scale));
916
+ padding: 0;
917
+ border: 0;
918
+ border-radius: 999px;
919
+ background: var(--lg-track);
920
+ cursor: pointer;
921
+ touch-action: pan-y;
922
+ -webkit-tap-highlight-color: transparent;
923
+ /* A held control shouldn't bring up iOS's text magnifier or callout. */
924
+ user-select: none;
925
+ -webkit-user-select: none;
926
+ -webkit-touch-callout: none;
927
+ }
928
+
929
+
930
+ .lg-switch::before {
931
+ content: "";
932
+ position: absolute;
933
+ inset: min(0px, calc((74.67px * var(--lg-scale) - 44px) / 2)) -8px;
934
+ }
935
+
936
+ .lg-switch-fill {
937
+ position: absolute;
938
+ inset: 0;
939
+ border-radius: inherit;
940
+ background: var(--lg-on);
941
+ opacity: 0;
942
+ }
943
+
944
+ .lg-switch-thumb {
945
+ top: 50%;
946
+ left: -9px;
947
+ width: 59px;
948
+ height: 38.3px;
949
+ transform: translate(0, -50%) scale(0.627);
950
+ }
951
+
952
+ .lg-switch[aria-checked="true"] .lg-switch-fill {
953
+ opacity: 1;
954
+ }
955
+
956
+ .lg-switch[aria-checked="true"] .lg-switch-thumb {
957
+ transform: translate(22px, -50%) scale(0.627);
958
+ }
959
+
960
+ .lg-switch:disabled {
961
+ opacity: 0.35;
962
+ cursor: default;
963
+ }
964
+
965
+ /* Slider */
966
+
967
+ .lg-slider {
968
+ position: relative;
969
+ width: 100%;
970
+ height: 40px;
971
+ user-select: none;
972
+ -webkit-user-select: none;
973
+ -webkit-touch-callout: none;
974
+ }
975
+
976
+ .lg-slider-track {
977
+ position: absolute;
978
+ inset: 17px 0 auto;
979
+ height: 6px;
980
+ overflow: hidden;
981
+ border-radius: 3px;
982
+ background: var(--lg-rail);
983
+ pointer-events: none;
984
+ }
985
+
986
+ .lg-slider-fill {
987
+ display: block;
988
+ height: 100%;
989
+ width: calc(var(--lg-progress) * 100%);
990
+ border-radius: 3px;
991
+ background: var(--lg-fill);
992
+ }
993
+
994
+ .lg-slider-thumb {
995
+ top: 1.5px;
996
+ left: calc((100% - 37px) * var(--lg-progress) - 11px);
997
+ width: 59px;
998
+ height: 38.3px;
999
+ scale: 0.627;
1000
+ }
1001
+
1002
+ .lg-slider input {
1003
+ position: relative;
1004
+ z-index: 1;
1005
+ display: block;
1006
+ width: 100%;
1007
+ height: 40px;
1008
+ margin: 0;
1009
+ background: transparent;
1010
+ outline: none;
1011
+ cursor: pointer;
1012
+ appearance: none;
1013
+ -webkit-appearance: none;
1014
+ touch-action: pan-y;
1015
+ -webkit-tap-highlight-color: transparent;
1016
+ }
1017
+
1018
+ /* Under a finger the slider follows the thumb itself: a tap on the track does nothing,
1019
+ and a drag moves it by as much as the finger moves, as on iOS. */
1020
+ @media (pointer: coarse) {
1021
+ .lg-slider {
1022
+ touch-action: pan-y;
1023
+ }
1024
+
1025
+ .lg-slider input {
1026
+ pointer-events: none;
1027
+ }
1028
+ }
1029
+
1030
+ .lg-slider input::-webkit-slider-runnable-track {
1031
+ height: 6px;
1032
+ background: transparent;
1033
+ }
1034
+
1035
+ /* The native thumb only takes the touch; the glass thumb is drawn beneath.
1036
+ iOS shades the native one even without its appearance, so hide it. */
1037
+ .lg-slider input::-webkit-slider-thumb {
1038
+ width: 37px;
1039
+ height: 40px;
1040
+ margin-top: -17px;
1041
+ border: 0;
1042
+ background: transparent;
1043
+ box-shadow: none;
1044
+ opacity: 0;
1045
+ /* A touch on the thumb drags it rather than scrolling the page; the rest of
1046
+ the track still scrolls. Blocking touchmove instead would stop Safari's
1047
+ own drag. */
1048
+ touch-action: none;
1049
+ appearance: none;
1050
+ -webkit-appearance: none;
1051
+ }
1052
+
1053
+ .lg-slider input::-moz-range-track {
1054
+ height: 6px;
1055
+ background: transparent;
1056
+ }
1057
+
1058
+ .lg-slider input::-moz-range-thumb {
1059
+ width: 37px;
1060
+ height: 40px;
1061
+ border: 0;
1062
+ background: transparent;
1063
+ box-shadow: none;
1064
+ opacity: 0;
1065
+ }
1066
+
1067
+ .lg-slider:has(input:focus-visible) .lg-slider-thumb {
1068
+ outline: 2px solid var(--lg-ring);
1069
+ outline-offset: 3px;
1070
+ }
1071
+
1072
+ .lg-slider:has(input:disabled) {
1073
+ opacity: 0.35;
1074
+ }
1075
+
1076
+ .lg-slider input:disabled {
1077
+ cursor: default;
1078
+ }
1079
+
1080
+ /* Menu */
1081
+
1082
+ .lg-menu {
1083
+ position: relative;
1084
+ display: inline-flex;
1085
+ }
1086
+
1087
+ /* A menu's destructive row is a truer red than a button's. No specificity, so setting
1088
+ --lg-destructive-ink on a menu still works. */
1089
+ :where(.lg-menu-card) {
1090
+ --lg-destructive-ink: var(--lg-menu-destructive);
1091
+ }
1092
+
1093
+ /* In the top layer, set over its trigger by the menu itself. Its own resets
1094
+ come first, because a popover has the browser's frame and inset. */
1095
+ .lg-menu-card {
1096
+ position: fixed;
1097
+ inset: auto;
1098
+ z-index: 1000;
1099
+ box-sizing: border-box;
1100
+ /* As wide as its longest row, and never narrower than a labelled
1101
+ trigger, so its pill only ever grows. */
1102
+ width: max-content;
1103
+ height: auto;
1104
+ min-width: max(250px, var(--lg-menu-min-width, 0px));
1105
+ max-width: calc(100vw - 16px);
1106
+ margin: 0;
1107
+ padding: 0;
1108
+ overflow: visible;
1109
+ border: 0;
1110
+ border-radius: 33px;
1111
+ color: var(--lg-foreground);
1112
+ background: none;
1113
+ font-size: 17px;
1114
+ touch-action: none;
1115
+ user-select: none;
1116
+ -webkit-user-select: none;
1117
+ }
1118
+
1119
+ /* A menu taller than the room there is scrolls, and a finger can scroll it. */
1120
+ .lg-menu-card[data-scrolls] {
1121
+ touch-action: pan-y;
1122
+ }
1123
+
1124
+ .lg-menu-card:focus {
1125
+ outline: none;
1126
+ }
1127
+
1128
+ .lg-menu-card[data-phase="leaving"] {
1129
+ pointer-events: none;
1130
+ }
1131
+
1132
+ /* While its shape runs through the morph the rim can't follow it, so a plain edge does. */
1133
+ .lg-menu-card[data-morphing] .lg-menu-surface {
1134
+ -webkit-mask-box-image: none;
1135
+ mask-border: none;
1136
+ box-shadow:
1137
+ inset 0 1px 0 rgb(255 255 255 / 0.35),
1138
+ inset 0 -1px 0 rgb(255 255 255 / 0.25),
1139
+ 0 0 0 0.5px rgb(0 0 0 / 0.14),
1140
+ 0 12px 40px var(--lg-shadow);
1141
+ }
1142
+
1143
+ .lg-menu-card[data-morphing] .lg-menu-surface::before {
1144
+ display: none;
1145
+ }
1146
+
1147
+ .lg-menu-surface {
1148
+ --lg-size: 1;
1149
+ position: absolute;
1150
+ top: 0;
1151
+ left: 0;
1152
+ width: 100%;
1153
+ height: 100%;
1154
+ border-radius: inherit;
1155
+ box-shadow:
1156
+ inset 0 0 0 0.5px var(--lg-edge),
1157
+ 0 12px 40px var(--lg-shadow);
1158
+ pointer-events: none;
1159
+ }
1160
+
1161
+ /* Laid over the trigger by the menu, which knows where that is. */
1162
+ .lg-menu-glyph {
1163
+ position: absolute;
1164
+ top: 0;
1165
+ left: 0;
1166
+ box-sizing: border-box;
1167
+ display: grid;
1168
+ place-items: center;
1169
+ width: 40px;
1170
+ height: 40px;
1171
+ pointer-events: none;
1172
+ }
1173
+
1174
+ .lg-menu-glyph > svg {
1175
+ width: 20px;
1176
+ height: 20px;
1177
+ }
1178
+
1179
+ /* A labelled trigger's face, laid out as the button lays it out. */
1180
+ .lg-menu > .lg-button,
1181
+ .lg-menu-card[data-label] .lg-menu-glyph {
1182
+ white-space: nowrap;
1183
+ }
1184
+
1185
+ .lg-menu-card[data-label] .lg-menu-glyph {
1186
+ display: flex;
1187
+ justify-content: center;
1188
+ gap: 8px;
1189
+ }
1190
+
1191
+ .lg-button > .lg-menu-chevron,
1192
+ .lg-menu-glyph > .lg-menu-chevron {
1193
+ width: 12px;
1194
+ height: 12px;
1195
+ margin-left: -2px;
1196
+ opacity: 0.6;
1197
+ }
1198
+
1199
+ .lg-menu-content {
1200
+ position: relative;
1201
+ box-sizing: border-box;
1202
+ display: flex;
1203
+ flex-direction: column;
1204
+ padding: 10px 8px;
1205
+ }
1206
+
1207
+ .lg-menu-card[data-scrolls] .lg-menu-content {
1208
+ overflow-x: hidden;
1209
+ overflow-y: auto;
1210
+ overscroll-behavior: contain;
1211
+ }
1212
+
1213
+ .lg-menu-card::after {
1214
+ content: "";
1215
+ position: absolute;
1216
+ inset: 0;
1217
+ border-radius: inherit;
1218
+ pointer-events: none;
1219
+ background: linear-gradient(135deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.025));
1220
+ opacity: 0;
1221
+ transition: opacity 120ms ease-out;
1222
+ }
1223
+
1224
+ .lg-menu-card[data-pressed]::after {
1225
+ opacity: 1;
1226
+ }
1227
+
1228
+ .lg-menu-plate {
1229
+ position: absolute;
1230
+ top: 0;
1231
+ left: 0;
1232
+ border-radius: 21px;
1233
+ background: var(--lg-highlight);
1234
+ opacity: 0;
1235
+ pointer-events: none;
1236
+ transition:
1237
+ transform 100ms cubic-bezier(0.2, 0.8, 0.2, 1),
1238
+ opacity 80ms ease-out;
1239
+ }
1240
+
1241
+ .lg-menu-item {
1242
+ position: relative;
1243
+ z-index: 1;
1244
+ box-sizing: border-box;
1245
+ display: flex;
1246
+ align-items: center;
1247
+ gap: 12px;
1248
+ min-height: 42px;
1249
+ padding: 6px 20px;
1250
+ border: 0;
1251
+ border-radius: 21px;
1252
+ color: inherit;
1253
+ background: transparent;
1254
+ font: inherit;
1255
+ text-align: left;
1256
+ text-decoration: none;
1257
+ /* One line a row; the menu widens to fit. */
1258
+ white-space: nowrap;
1259
+ cursor: pointer;
1260
+ }
1261
+
1262
+ .lg-menu-item > svg {
1263
+ flex: none;
1264
+ width: 24px;
1265
+ height: 24px;
1266
+ }
1267
+
1268
+ .lg-menu-item:focus-visible {
1269
+ outline-offset: -2px;
1270
+ background: var(--lg-highlight);
1271
+ }
1272
+
1273
+ @media (hover: hover) and (pointer: fine) {
1274
+ .lg-menu-item:hover:not(:disabled) {
1275
+ background: var(--lg-highlight);
1276
+ }
1277
+ }
1278
+
1279
+ .lg-menu-card[data-scrubbing] .lg-menu-item {
1280
+ background: transparent;
1281
+ outline: none;
1282
+ }
1283
+
1284
+ .lg-menu-item[data-destructive] {
1285
+ color: var(--lg-destructive-ink);
1286
+ }
1287
+
1288
+ .lg-menu-item:disabled {
1289
+ opacity: 0.38;
1290
+ cursor: default;
1291
+ }
1292
+
1293
+ .lg-menu-separator {
1294
+ flex: none;
1295
+ margin: 10px 16px;
1296
+ border-top: 1px solid var(--lg-separator);
1297
+ }
1298
+
1299
+ /* A section's title, in small grey type above its items. */
1300
+ .lg-menu-heading {
1301
+ flex: none;
1302
+ padding: 8px 20px 3px;
1303
+ color: var(--lg-muted);
1304
+ font-size: 13px;
1305
+ white-space: nowrap;
1306
+ }
1307
+
1308
+ .lg-menu-plate + .lg-menu-heading {
1309
+ padding-top: 4px;
1310
+ }
1311
+
1312
+ /* A choice keeps the room for its checkmark, chosen or not, so the labels line up. */
1313
+ .lg-menu-check {
1314
+ flex: none;
1315
+ display: grid;
1316
+ place-items: center;
1317
+ width: 16px;
1318
+ height: 16px;
1319
+ margin-right: -2px;
1320
+ }
1321
+
1322
+ .lg-menu-check > svg {
1323
+ width: 14px;
1324
+ height: 14px;
1325
+ }
1326
+
1327
+ @media (prefers-reduced-motion: reduce) {
1328
+ .lg-menu-plate {
1329
+ transition: opacity 80ms ease-out;
1330
+ }
1331
+
1332
+ .lg-menu-card {
1333
+ animation: lg-menu-fade 100ms ease-out;
1334
+ }
1335
+
1336
+ .lg-alert-card {
1337
+ animation: lg-fade-in 100ms ease-out;
1338
+ }
1339
+
1340
+ .lg-spinner > i {
1341
+ animation-duration: 1600ms;
1342
+ }
1343
+ }
1344
+
1345
+ @keyframes lg-menu-fade {
1346
+ from {
1347
+ opacity: 0;
1348
+ }
1349
+ }
1350
+
1351
+ /* Toolbar */
1352
+
1353
+ .lg-toolbar {
1354
+ position: sticky;
1355
+ top: 0;
1356
+ z-index: 1;
1357
+ display: flex;
1358
+ align-items: center;
1359
+ justify-content: space-between;
1360
+ gap: 12px;
1361
+ padding: 8px 16px;
1362
+ }
1363
+
1364
+ /* The band behind the bar shows once content has scrolled under it. */
1365
+ .lg-toolbar[data-edge]::before {
1366
+ content: "";
1367
+ position: absolute;
1368
+ inset: 0 0 -24px;
1369
+ z-index: -1;
1370
+ pointer-events: none;
1371
+ opacity: 0;
1372
+ transition: opacity 200ms var(--lg-ease);
1373
+ }
1374
+
1375
+ .lg-toolbar[data-scrolled]::before {
1376
+ opacity: 1;
1377
+ }
1378
+
1379
+ .lg-toolbar[data-edge="uniform"]::before {
1380
+ background: color-mix(in srgb, var(--lg-glass-tinted) 72%, transparent);
1381
+ -webkit-backdrop-filter: blur(18px) saturate(1.6);
1382
+ backdrop-filter: blur(18px) saturate(1.6);
1383
+ -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
1384
+ mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
1385
+ }
1386
+
1387
+ .lg-toolbar[data-edge="soft"]::before {
1388
+ -webkit-backdrop-filter: blur(8px);
1389
+ backdrop-filter: blur(8px);
1390
+ -webkit-mask-image: linear-gradient(#000 40%, transparent);
1391
+ mask-image: linear-gradient(#000 40%, transparent);
1392
+ }
1393
+
1394
+ /* 44 points tall on iOS: a lone icon is a circle, and icons in a group are 50 wide. */
1395
+ .lg-toolbar-group {
1396
+ display: flex;
1397
+ align-items: center;
1398
+ height: 44px;
1399
+ border-radius: 22px;
1400
+ }
1401
+
1402
+ .lg-toolbar-group > .lg-button {
1403
+ height: 44px;
1404
+ border-radius: 22px;
1405
+ }
1406
+
1407
+ .lg-toolbar-group > .lg-button[data-icon="only"] {
1408
+ width: 50px;
1409
+ }
1410
+
1411
+ .lg-toolbar-group > .lg-button[data-icon="only"]:only-child {
1412
+ width: 44px;
1413
+ }
1414
+
1415
+ .lg-toolbar-group > .lg-button > svg {
1416
+ width: 26px;
1417
+ height: 26px;
1418
+ }
1419
+
1420
+ /* Buttons in a group share its glass instead of each having their own. */
1421
+ .lg-toolbar-group > .lg-button:not([data-variant="filled"])::before {
1422
+ display: none;
1423
+ }
1424
+
1425
+ .lg-toolbar-group > .lg-button:not([data-variant="filled"]) {
1426
+ box-shadow: none;
1427
+ -webkit-backdrop-filter: none;
1428
+ backdrop-filter: none;
1429
+ }
1430
+
1431
+ .lg-toolbar-group > .lg-button:not([data-variant="filled"]) {
1432
+ background-color: transparent;
1433
+ }
1434
+
1435
+ /* Only a mouse lights a button under it: a touch browser keeps hover on whatever was tapped. */
1436
+ @media (hover: hover) and (pointer: fine) {
1437
+ .lg-toolbar-group > .lg-button:not([data-variant="filled"]):hover {
1438
+ background-color: var(--lg-glass-active);
1439
+ }
1440
+ }
1441
+
1442
+ /* A press lights and grows the whole group, not just the button under the finger. */
1443
+ .lg-toolbar-group > .lg-button:not([data-variant="filled"])::after {
1444
+ display: none;
1445
+ }
1446
+
1447
+ .lg-toolbar-group {
1448
+ transition: background-color 200ms ease;
1449
+ }
1450
+
1451
+ .lg-toolbar-group[data-pressed] {
1452
+ background-color: var(--lg-glass-active);
1453
+ transition-duration: 0s;
1454
+ }
1455
+
1456
+ .lg-toolbar-group > .lg-glass-copy {
1457
+ display: none;
1458
+ }
1459
+
1460
+ /* Navigation bar */
1461
+
1462
+ /* A toolbar with the title between two edges. The title stays centred unless the buttons need the room. */
1463
+ .lg-nav {
1464
+ grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
1465
+ display: grid;
1466
+ }
1467
+
1468
+ .lg-nav-side {
1469
+ display: flex;
1470
+ align-items: center;
1471
+ gap: 8px;
1472
+ min-width: 0;
1473
+ }
1474
+
1475
+ .lg-nav-side[data-side="trailing"] {
1476
+ justify-content: flex-end;
1477
+ }
1478
+
1479
+ /* 17 points, semibold, as on iOS. */
1480
+ .lg-nav-title {
1481
+ min-width: 0;
1482
+ overflow: hidden;
1483
+ color: var(--lg-foreground);
1484
+ font-size: 17px;
1485
+ font-weight: 600;
1486
+ line-height: 22px;
1487
+ text-align: center;
1488
+ text-overflow: ellipsis;
1489
+ white-space: nowrap;
1490
+ }
1491
+
1492
+ /* With a large title the bar's own stays hidden until the large one has scrolled under. */
1493
+ .lg-nav[data-large] .lg-nav-title {
1494
+ opacity: 0;
1495
+ transition: opacity 200ms var(--lg-ease);
1496
+ }
1497
+
1498
+ .lg-nav[data-large][data-collapsed] .lg-nav-title {
1499
+ opacity: 1;
1500
+ }
1501
+
1502
+ /* 34 points, bold. It sits in the content, under the bar, and scrolls with it. */
1503
+ .lg-nav-large {
1504
+ padding: 0 16px 8px;
1505
+ color: var(--lg-foreground);
1506
+ font-size: 34px;
1507
+ font-weight: 700;
1508
+ line-height: 41px;
1509
+ overflow-wrap: anywhere;
1510
+ }
1511
+
1512
+ /* Glass group */
1513
+
1514
+ .lg-glass-group {
1515
+ position: relative;
1516
+ display: inline-flex;
1517
+ align-items: center;
1518
+ }
1519
+
1520
+ .lg-glass-group-shape,
1521
+ .lg-glass-group-layer {
1522
+ position: absolute;
1523
+ top: -24px;
1524
+ left: -24px;
1525
+ width: calc(100% + 48px);
1526
+ height: calc(100% + 48px);
1527
+ pointer-events: none;
1528
+ }
1529
+
1530
+ .lg-glass-group-shape {
1531
+ box-shadow: none;
1532
+ }
1533
+
1534
+ .lg-glass-group-layer {
1535
+ overflow: visible;
1536
+ }
1537
+
1538
+ /* No stacking tricks here: anything that isolates the group would cut its glass
1539
+ off from the page. The layers come first, so the pieces paint over them. */
1540
+ .lg-glass-group > :not(.lg-glass-group-shape, .lg-glass-group-layer) {
1541
+ position: relative;
1542
+ }
1543
+
1544
+ .lg-glass-group-shadow path {
1545
+ fill: var(--lg-drop);
1546
+ transform: translateY(4px);
1547
+ filter: blur(4px);
1548
+ }
1549
+
1550
+ .lg-glass-group-hairline,
1551
+ .lg-glass-group-line {
1552
+ fill: none;
1553
+ stroke-width: 0.67px;
1554
+ }
1555
+
1556
+ .lg-glass-group-hairline {
1557
+ stroke: rgb(0 0 0 / 0.3);
1558
+ stroke-width: 1px;
1559
+ }
1560
+
1561
+ /* The pieces share the shape's glass and keep only what's on them. */
1562
+ .lg-glass-group > .lg-glass:not(.lg-glass-group-shape, [data-variant="filled"]) {
1563
+ background-color: transparent;
1564
+ -webkit-backdrop-filter: none;
1565
+ backdrop-filter: none;
1566
+ box-shadow: none;
1567
+ }
1568
+
1569
+ .lg-glass-group > .lg-glass:not(.lg-glass-group-shape, [data-variant="filled"])::before {
1570
+ display: none;
1571
+ }
1572
+
1573
+ .lg-glass-group > .lg-glass-copy {
1574
+ display: none;
1575
+ }
1576
+
1577
+ /* Segmented control */
1578
+
1579
+ .lg-segmented {
1580
+ position: relative;
1581
+ display: grid;
1582
+ grid-auto-columns: 1fr;
1583
+ grid-auto-flow: column;
1584
+ box-sizing: border-box;
1585
+ height: 32px;
1586
+ border-radius: 16px;
1587
+ background: var(--lg-fill-subtle);
1588
+ color: var(--lg-foreground);
1589
+ font-size: 14px;
1590
+ touch-action: pan-y;
1591
+ user-select: none;
1592
+ -webkit-user-select: none;
1593
+ -webkit-touch-callout: none;
1594
+ -webkit-tap-highlight-color: transparent;
1595
+ }
1596
+
1597
+ /* Under a finger the thumb is a clear lens, as a switch's is, over the labels so that
1598
+ they bend at its rim. */
1599
+ .lg-segmented-lens {
1600
+ z-index: 1;
1601
+ --lg-transparency: 1;
1602
+ --lg-blur: 0px;
1603
+ --lg-tone: saturate(1);
1604
+ --lg-shine: 0.6;
1605
+ position: absolute;
1606
+ top: 50%;
1607
+ left: -10.5px;
1608
+ width: calc(100% / var(--lg-segments) + 21px);
1609
+ height: 44px;
1610
+ border-radius: 22px;
1611
+ visibility: hidden;
1612
+ pointer-events: none;
1613
+ box-shadow:
1614
+ 0 0 0 0.5px rgb(0 0 0 / calc(0.3 * var(--lg-lift, 0))),
1615
+ 0 4px 14px rgb(0 0 0 / calc(0.16 * var(--lg-lift, 0)));
1616
+ }
1617
+
1618
+ .lg-segmented-thumb {
1619
+ position: absolute;
1620
+ top: 2px;
1621
+ bottom: 2px;
1622
+ left: 2px;
1623
+ width: calc(100% / var(--lg-segments) - 4px);
1624
+ border-radius: 14px;
1625
+ background: var(--lg-thumb);
1626
+ box-shadow: 0 1px 4px rgb(0 0 0 / 0.1);
1627
+ pointer-events: none;
1628
+ }
1629
+
1630
+ .lg-segment {
1631
+ position: relative;
1632
+ min-width: 0;
1633
+ padding: 0 8px;
1634
+ border: 0;
1635
+ border-radius: 14px;
1636
+ color: inherit;
1637
+ background: none;
1638
+ font: inherit;
1639
+ cursor: pointer;
1640
+ transition: opacity 160ms ease;
1641
+ }
1642
+
1643
+ .lg-segment[aria-checked="true"] {
1644
+ font-weight: 500;
1645
+ }
1646
+
1647
+ .lg-segment:active:not(:disabled, [aria-checked="true"]) {
1648
+ opacity: 0.6;
1649
+ }
1650
+
1651
+ .lg-segment:disabled {
1652
+ opacity: 0.35;
1653
+ cursor: default;
1654
+ }
1655
+
1656
+ .lg-segment:focus-visible,
1657
+ .lg-stepper-button:focus-visible,
1658
+ .lg-alert-action:focus-visible {
1659
+ outline: 2px solid var(--lg-ring);
1660
+ outline-offset: -2px;
1661
+ }
1662
+
1663
+ /* Stepper */
1664
+
1665
+ .lg-stepper {
1666
+ display: inline-flex;
1667
+ flex: none;
1668
+ align-items: center;
1669
+ height: 32px;
1670
+ border-radius: 16px;
1671
+ background: var(--lg-stepper);
1672
+ color: var(--lg-foreground);
1673
+ }
1674
+
1675
+ .lg-stepper-button {
1676
+ display: grid;
1677
+ flex: none;
1678
+ place-items: center;
1679
+ width: 46px;
1680
+ height: 100%;
1681
+ padding: 0;
1682
+ border: 0;
1683
+ border-radius: 16px;
1684
+ color: inherit;
1685
+ background: none;
1686
+ cursor: pointer;
1687
+ -webkit-tap-highlight-color: transparent;
1688
+ transition: background-color 160ms ease;
1689
+ }
1690
+
1691
+ .lg-stepper-button:active:not(:disabled) {
1692
+ background: var(--lg-stepper);
1693
+ transition-duration: 0s;
1694
+ }
1695
+
1696
+ .lg-stepper-button:disabled {
1697
+ opacity: 0.3;
1698
+ cursor: default;
1699
+ }
1700
+
1701
+ .lg-stepper-button > svg {
1702
+ width: 16px;
1703
+ height: 16px;
1704
+ }
1705
+
1706
+ .lg-stepper-divider {
1707
+ flex: none;
1708
+ width: 1px;
1709
+ height: 16px;
1710
+ margin: 0 -0.5px;
1711
+ background: var(--lg-separator);
1712
+ }
1713
+
1714
+ /* Page control */
1715
+
1716
+ .lg-page-control {
1717
+ display: inline-flex;
1718
+ flex: none;
1719
+ align-items: center;
1720
+ height: 26px;
1721
+ padding: 0 8px;
1722
+ border-radius: 13px;
1723
+ color: var(--lg-foreground);
1724
+ }
1725
+
1726
+ .lg-page-control:not(.lg-glass) {
1727
+ padding: 0;
1728
+ }
1729
+
1730
+ .lg-page-dots {
1731
+ display: flex;
1732
+ align-items: center;
1733
+ }
1734
+
1735
+ .lg-page-dot {
1736
+ display: grid;
1737
+ place-items: center;
1738
+ width: 16px;
1739
+ height: 26px;
1740
+ padding: 0;
1741
+ border: 0;
1742
+ background: none;
1743
+ color: inherit;
1744
+ cursor: pointer;
1745
+ -webkit-tap-highlight-color: transparent;
1746
+ }
1747
+
1748
+ .lg-page-dot::before {
1749
+ content: "";
1750
+ width: 7px;
1751
+ height: 7px;
1752
+ border-radius: 50%;
1753
+ background: currentColor;
1754
+ opacity: 0.3;
1755
+ transition:
1756
+ opacity 160ms ease,
1757
+ transform 160ms ease;
1758
+ }
1759
+
1760
+ .lg-page-dot[aria-current="page"]::before {
1761
+ opacity: 1;
1762
+ }
1763
+
1764
+ .lg-page-dot:active::before {
1765
+ transform: scale(0.85);
1766
+ }
1767
+
1768
+ .lg-page-dot:focus-visible {
1769
+ outline: 2px solid var(--lg-ring);
1770
+ outline-offset: -2px;
1771
+ border-radius: 8px;
1772
+ }
1773
+
1774
+ /* Progress */
1775
+
1776
+ .lg-progress {
1777
+ height: 4px;
1778
+ overflow: hidden;
1779
+ border-radius: 2px;
1780
+ background: var(--lg-fill-subtle);
1781
+ }
1782
+
1783
+ .lg-progress-fill {
1784
+ display: block;
1785
+ height: 100%;
1786
+ border-radius: inherit;
1787
+ background: var(--lg-fill);
1788
+ transform: scaleX(var(--lg-progress));
1789
+ transform-origin: 0 0;
1790
+ transition: transform 300ms var(--lg-ease);
1791
+ }
1792
+
1793
+ .lg-spinner {
1794
+ position: relative;
1795
+ display: inline-block;
1796
+ width: 20px;
1797
+ height: 20px;
1798
+ color: var(--lg-muted);
1799
+ }
1800
+
1801
+ .lg-spinner > i {
1802
+ position: absolute;
1803
+ top: 0;
1804
+ left: calc(50% - 1.25px);
1805
+ width: 2.5px;
1806
+ height: 6px;
1807
+ border-radius: 1.25px;
1808
+ background: currentColor;
1809
+ transform-origin: 1.25px 10px;
1810
+ transform: rotate(calc(var(--lg-blade) * 45deg));
1811
+ animation: lg-spin 800ms linear infinite;
1812
+ animation-delay: calc((var(--lg-blade) - 8) * 100ms);
1813
+ }
1814
+
1815
+ @keyframes lg-spin {
1816
+ from {
1817
+ opacity: 1;
1818
+ }
1819
+
1820
+ to {
1821
+ opacity: 0.2;
1822
+ }
1823
+ }
1824
+
1825
+ /* Alerts and sheets sit in the top layer, over a scrim of their own: fading the
1826
+ dialog itself would stop the glass inside seeing the page. */
1827
+ .lg-modal {
1828
+ position: fixed;
1829
+ inset: 0;
1830
+ z-index: 1000;
1831
+ box-sizing: border-box;
1832
+ width: 100%;
1833
+ max-width: none;
1834
+ height: 100%;
1835
+ max-height: none;
1836
+ margin: 0;
1837
+ padding: 0;
1838
+ overflow: hidden;
1839
+ border: 0;
1840
+ color: var(--lg-foreground);
1841
+ background: none;
1842
+ }
1843
+
1844
+ .lg-modal:not([open]) {
1845
+ display: none;
1846
+ }
1847
+
1848
+ .lg-modal:focus {
1849
+ outline: none;
1850
+ }
1851
+
1852
+ .lg-modal::backdrop {
1853
+ background: none;
1854
+ }
1855
+
1856
+ .lg-modal-scrim {
1857
+ position: absolute;
1858
+ inset: 0;
1859
+ background: var(--lg-scrim);
1860
+ }
1861
+
1862
+ /* Alert */
1863
+
1864
+ /* It sits a little below the middle of the screen, as on iOS. */
1865
+ .lg-alert[open] {
1866
+ display: grid;
1867
+ place-items: center;
1868
+ padding-top: 28px;
1869
+ }
1870
+
1871
+ .lg-alert .lg-modal-scrim {
1872
+ animation: lg-fade-in 200ms ease-out;
1873
+ transition: opacity 120ms ease-out;
1874
+ }
1875
+
1876
+ .lg-alert-card {
1877
+ --lg-card-width: min(320px, calc(100vw - 48px));
1878
+ box-sizing: border-box;
1879
+ width: var(--lg-card-width);
1880
+ border-radius: 33px;
1881
+ box-shadow: 0 8px 40px rgb(0 0 0 / 0.18);
1882
+ animation:
1883
+ lg-fade-in 100ms ease-out 50ms backwards,
1884
+ lg-alert-settle 240ms 50ms backwards linear(0, 0.08 7%, 0.176 14%, 0.352 21%, 0.5 28%, 0.6 35%, 0.7 42%, 0.8 49%, 0.848 56%, 0.9 63%, 0.952 77%, 1);
1885
+ transition: opacity 120ms ease-out;
1886
+ }
1887
+
1888
+ .lg-alert[data-phase="leaving"] :is(.lg-modal-scrim, .lg-alert-card) {
1889
+ opacity: 0;
1890
+ }
1891
+
1892
+ @keyframes lg-fade-in {
1893
+ from {
1894
+ opacity: 0;
1895
+ }
1896
+ }
1897
+
1898
+ @keyframes lg-alert-settle {
1899
+ from {
1900
+ transform: scale(1.125);
1901
+ }
1902
+ }
1903
+
1904
+ .lg-alert-text {
1905
+ padding: 23px 30px 20px;
1906
+ }
1907
+
1908
+ .lg-alert-title {
1909
+ margin: 0;
1910
+ font-size: 17px;
1911
+ font-weight: 600;
1912
+ line-height: 22px;
1913
+ }
1914
+
1915
+ .lg-alert-message {
1916
+ margin: 7px 0 0;
1917
+ color: var(--lg-secondary);
1918
+ font-size: 15px;
1919
+ line-height: 20px;
1920
+ }
1921
+
1922
+ .lg-alert-actions {
1923
+ display: grid;
1924
+ grid-auto-columns: 1fr;
1925
+ grid-auto-flow: column;
1926
+ gap: 8px;
1927
+ padding: 0 16px 16px;
1928
+ }
1929
+
1930
+ .lg-alert-actions[data-stacked] {
1931
+ grid-auto-flow: row;
1932
+ }
1933
+
1934
+ .lg-alert-action {
1935
+ height: 48px;
1936
+ padding: 0 12px;
1937
+ border: 0;
1938
+ border-radius: 24px;
1939
+ color: inherit;
1940
+ background: var(--lg-action);
1941
+ font: inherit;
1942
+ font-size: 17px;
1943
+ font-weight: 500;
1944
+ cursor: pointer;
1945
+ -webkit-tap-highlight-color: transparent;
1946
+ transition: filter 160ms ease;
1947
+ }
1948
+
1949
+ .lg-alert-action:active {
1950
+ filter: brightness(0.9);
1951
+ transition-duration: 0s;
1952
+ }
1953
+
1954
+ .lg-alert-action[data-destructive] {
1955
+ color: var(--lg-destructive-ink);
1956
+ }
1957
+
1958
+ /* Context menu */
1959
+
1960
+ .lg-context-target {
1961
+ -webkit-touch-callout: none;
1962
+ }
1963
+
1964
+ .lg-context .lg-modal-scrim {
1965
+ animation: lg-fade-in 200ms ease-out;
1966
+ transition: opacity 160ms ease-out;
1967
+ }
1968
+
1969
+ .lg-context[data-phase="leaving"] .lg-modal-scrim {
1970
+ opacity: 0;
1971
+ }
1972
+
1973
+ .lg-context-lift {
1974
+ position: absolute;
1975
+ pointer-events: none;
1976
+ }
1977
+
1978
+ .lg-context-card {
1979
+ position: absolute;
1980
+ width: max-content;
1981
+ min-width: 250px;
1982
+ max-width: calc(100vw - 16px);
1983
+ border-radius: 33px;
1984
+ font-size: 17px;
1985
+ box-shadow: 0 12px 40px var(--lg-shadow);
1986
+ }
1987
+
1988
+ /* Sheet */
1989
+
1990
+ .lg-sheet {
1991
+ position: absolute;
1992
+ display: flex;
1993
+ flex-direction: column;
1994
+ box-shadow: 0 8px 40px rgb(0 0 0 / 0.18);
1995
+ }
1996
+
1997
+ /* As it nears full height the glass fills in. */
1998
+ .lg-sheet::after {
1999
+ background: var(--lg-sheet-opaque);
2000
+ border-radius: inherit;
2001
+ opacity: var(--lg-sheet-full, 0);
2002
+ transition: none;
2003
+ }
2004
+
2005
+ /* A drag that starts anywhere in the sheet moves it, so it mustn't also select text. */
2006
+ .lg-sheet[data-dragging] {
2007
+ -webkit-user-select: none;
2008
+ user-select: none;
2009
+ }
2010
+
2011
+ .lg-sheet-handle {
2012
+ position: relative;
2013
+ z-index: 1;
2014
+ display: flex;
2015
+ flex: none;
2016
+ justify-content: center;
2017
+ height: 30px;
2018
+ padding-top: 5.67px;
2019
+ box-sizing: border-box;
2020
+ touch-action: none;
2021
+ cursor: grab;
2022
+ }
2023
+
2024
+ .lg-sheet-grabber {
2025
+ flex: none;
2026
+ width: 57px;
2027
+ height: 4px;
2028
+ border-radius: 2px;
2029
+ background: var(--lg-grabber);
2030
+ }
2031
+
2032
+ .lg-sheet-content {
2033
+ position: relative;
2034
+ z-index: 1;
2035
+ flex: 1;
2036
+ min-height: 0;
2037
+ overflow: auto;
2038
+ overscroll-behavior: contain;
2039
+ }
2040
+
2041
+ /* Growing out of a trigger, for popups an app positions itself. It follows the
2042
+ menu's measured spring; set `transform-origin` to where the trigger is. Add it
2043
+ with `data-open` and `data-closed`, as Base UI and Radix set them. */
2044
+ .lg-grow[data-open] {
2045
+ animation: lg-grow 650ms ease-out;
2046
+ animation-timing-function: linear(0, 0.191 4.2%, 0.559 8.3%, 0.873 12.5%, 1.048 16.7%, 1.113 20.8%, 1.101 25%, 1.063 29.2%, 1.023 33.3%, 0.998 37.5%, 0.988 41.7%, 0.987 45.8%, 0.992 50%, 1);
2047
+ }
2048
+
2049
+ .lg-grow[data-closed] {
2050
+ animation: lg-shrink 180ms ease-in forwards;
2051
+ }
2052
+
2053
+ @keyframes lg-grow {
2054
+ from {
2055
+ opacity: 0.4;
2056
+ scale: 0.4;
2057
+ }
2058
+ }
2059
+
2060
+ @keyframes lg-shrink {
2061
+ to {
2062
+ opacity: 0;
2063
+ scale: 0.5;
2064
+ }
2065
+ }
2066
+
2067
+ @media (prefers-reduced-motion: reduce) {
2068
+ .lg-grow[data-open] {
2069
+ animation: lg-fade-in 100ms ease-out;
2070
+ }
2071
+
2072
+ .lg-grow[data-closed] {
2073
+ animation: none;
2074
+ }
2075
+ }
2076
+
2077
+ /* Reduce Transparency and Increase Contrast win over any transparency the app
2078
+ sets, as they do on iOS. */
2079
+ @media (prefers-reduced-transparency: reduce) {
2080
+ .lg-glass {
2081
+ --lg-transparency: 0;
2082
+ }
2083
+ }
2084
+
2085
+ @media (prefers-contrast: more) {
2086
+ .lg-glass {
2087
+ --lg-transparency: 0;
2088
+ --lg-edge: color-mix(in srgb, var(--lg-foreground) 45%, transparent);
2089
+ }
2090
+ }
2091
+
2092
+ /* Common controls share the existing glass, foreground and accent tokens. */
2093
+ .lg-visually-hidden,
2094
+ .lg-choice-input {
2095
+ position: absolute;
2096
+ width: 1px;
2097
+ height: 1px;
2098
+ padding: 0;
2099
+ margin: -1px;
2100
+ overflow: hidden;
2101
+ clip-path: inset(50%);
2102
+ white-space: nowrap;
2103
+ border: 0;
2104
+ }
2105
+
2106
+ .lg-choice {
2107
+ position: relative;
2108
+ display: inline-flex;
2109
+ align-items: flex-start;
2110
+ gap: 10px;
2111
+ color: var(--lg-foreground);
2112
+ font: inherit;
2113
+ font-size: 14px;
2114
+ line-height: 24px;
2115
+ cursor: pointer;
2116
+ }
2117
+ /* 原生输入覆盖图形区域:保留真实命中目标,同时由相邻玻璃绘制外观。 */
2118
+ .lg-choice-input {
2119
+ width: 22px;
2120
+ height: 22px;
2121
+ margin: 1px 0 0;
2122
+ clip-path: none;
2123
+ opacity: 0;
2124
+ z-index: 1;
2125
+ cursor: inherit;
2126
+ }
2127
+ .lg-choice-control {
2128
+ display: grid;
2129
+ flex: 0 0 22px;
2130
+ place-items: center;
2131
+ width: 22px;
2132
+ height: 22px;
2133
+ margin-top: 1px;
2134
+ box-sizing: border-box;
2135
+ border: 1px solid color-mix(in srgb, var(--lg-foreground) 28%, transparent);
2136
+ border-radius: 7px;
2137
+ color: white;
2138
+ transition:
2139
+ background-color 160ms ease,
2140
+ border-color 160ms ease,
2141
+ transform 160ms ease;
2142
+ }
2143
+ .lg-choice-control svg {
2144
+ width: 20px;
2145
+ height: 20px;
2146
+ }
2147
+ .lg-choice-check,
2148
+ .lg-choice-mixed {
2149
+ opacity: 0;
2150
+ }
2151
+ .lg-choice-input:checked + .lg-choice-control,
2152
+ .lg-choice-input:indeterminate + .lg-choice-control {
2153
+ background: var(--lg-tint, var(--lg-fill));
2154
+ border-color: transparent;
2155
+ }
2156
+ .lg-choice-input:checked:not(:indeterminate)
2157
+ + .lg-choice-control
2158
+ .lg-choice-check,
2159
+ .lg-choice-input:indeterminate + .lg-choice-control .lg-choice-mixed {
2160
+ opacity: 1;
2161
+ }
2162
+ .lg-choice:active:not([data-disabled]) .lg-choice-control {
2163
+ transform: scale(0.94);
2164
+ }
2165
+ .lg-choice-input:focus-visible + .lg-choice-control,
2166
+ .lg-select-trigger:focus-visible,
2167
+ .lg-textarea:focus-within,
2168
+ .lg-dismiss:focus-visible {
2169
+ outline: 2px solid var(--lg-tint, var(--lg-tab-accent));
2170
+ outline-offset: 3px;
2171
+ }
2172
+ .lg-choice[data-disabled],
2173
+ .lg-choice:has(:disabled),
2174
+ .lg-textarea[data-disabled] {
2175
+ opacity: 0.45;
2176
+ cursor: not-allowed;
2177
+ }
2178
+ .lg-choice-text {
2179
+ display: grid;
2180
+ gap: 2px;
2181
+ }
2182
+ .lg-choice-description {
2183
+ color: var(--lg-secondary);
2184
+ font-size: 12px;
2185
+ line-height: 1.5;
2186
+ }
2187
+ .lg-radio-control {
2188
+ border-radius: 50%;
2189
+ }
2190
+ .lg-radio-control > span {
2191
+ width: 8px;
2192
+ height: 8px;
2193
+ border-radius: 50%;
2194
+ background: white;
2195
+ transform: scale(0);
2196
+ transition: transform 160ms ease;
2197
+ }
2198
+ .lg-choice-input:checked + .lg-radio-control > span {
2199
+ transform: scale(1);
2200
+ }
2201
+
2202
+ .lg-textarea {
2203
+ box-sizing: border-box;
2204
+ width: 100%;
2205
+ min-width: 0;
2206
+ padding: 14px 16px;
2207
+ border-radius: 18px;
2208
+ color: var(--lg-foreground);
2209
+ font-size: 14px;
2210
+ }
2211
+ .lg-textarea[data-variant="fill"] {
2212
+ background: var(--lg-fill-subtle);
2213
+ backdrop-filter: none;
2214
+ -webkit-backdrop-filter: none;
2215
+ box-shadow: none;
2216
+ }
2217
+ .lg-textarea[data-variant="fill"]::before {
2218
+ display: none;
2219
+ }
2220
+ .lg-textarea textarea {
2221
+ display: block;
2222
+ box-sizing: border-box;
2223
+ width: 100%;
2224
+ max-width: 100%;
2225
+ min-height: 2.8em;
2226
+ margin: 0;
2227
+ padding: 0;
2228
+ border: 0;
2229
+ outline: 0;
2230
+ background: none;
2231
+ color: inherit;
2232
+ font: inherit;
2233
+ line-height: 1.7;
2234
+ }
2235
+ .lg-textarea textarea::placeholder {
2236
+ color: var(--lg-muted);
2237
+ }
2238
+ .lg-textarea-count {
2239
+ display: block;
2240
+ text-align: end;
2241
+ color: var(--lg-secondary);
2242
+ font-size: 11px;
2243
+ margin-top: 6px;
2244
+ font-variant-numeric: tabular-nums;
2245
+ }
2246
+
2247
+ .lg-select {
2248
+ position: relative;
2249
+ display: inline-block;
2250
+ width: 100%;
2251
+ min-width: 0;
2252
+ }
2253
+ .lg-select-trigger {
2254
+ display: flex;
2255
+ align-items: center;
2256
+ justify-content: space-between;
2257
+ gap: 16px;
2258
+ box-sizing: border-box;
2259
+ width: 100%;
2260
+ min-height: var(--lg-control-height);
2261
+ padding: max(4px, calc((var(--lg-control-height) - 20px) / 2)) var(--lg-space-4);
2262
+ border: 0;
2263
+ border-radius: var(--lg-radius-control);
2264
+ color: var(--lg-foreground);
2265
+ font: inherit;
2266
+ font-size: var(--lg-font-size);
2267
+ line-height: 20px;
2268
+ text-align: start;
2269
+ cursor: pointer;
2270
+ }
2271
+ .lg-select-trigger > span {
2272
+ overflow: hidden;
2273
+ text-overflow: ellipsis;
2274
+ white-space: nowrap;
2275
+ }
2276
+ .lg-select-trigger svg {
2277
+ flex: none;
2278
+ width: 16px;
2279
+ height: 16px;
2280
+ transition: transform 160ms ease;
2281
+ }
2282
+ .lg-select-trigger[aria-expanded="true"] svg {
2283
+ transform: rotate(180deg);
2284
+ }
2285
+ .lg-select-trigger[data-placeholder] {
2286
+ color: var(--lg-secondary);
2287
+ }
2288
+ .lg-select-trigger:disabled {
2289
+ opacity: 0.45;
2290
+ cursor: not-allowed;
2291
+ }
2292
+ .lg-select-trigger[aria-invalid="true"] {
2293
+ outline: 2px solid var(--lg-destructive-ink);
2294
+ outline-offset: 2px;
2295
+ }
2296
+ .lg-select-list {
2297
+ padding: 6px;
2298
+ min-width: 120px;
2299
+ }
2300
+ .lg-select-option {
2301
+ display: flex;
2302
+ justify-content: space-between;
2303
+ align-items: center;
2304
+ gap: 16px;
2305
+ padding: 9px 12px;
2306
+ border-radius: 12px;
2307
+ cursor: pointer;
2308
+ overflow-wrap: anywhere;
2309
+ }
2310
+ .lg-select-option[data-active] {
2311
+ background: var(--lg-highlight);
2312
+ }
2313
+ .lg-select-option[aria-selected="true"] {
2314
+ color: var(--lg-tint, var(--lg-tab-accent));
2315
+ font-weight: 600;
2316
+ }
2317
+ .lg-select-option[aria-disabled="true"] {
2318
+ opacity: 0.4;
2319
+ cursor: not-allowed;
2320
+ }
2321
+ .lg-select-empty {
2322
+ padding: 16px;
2323
+ text-align: center;
2324
+ color: var(--lg-secondary);
2325
+ }
2326
+
2327
+ .lg-floating-anchor {
2328
+ display: inline-flex;
2329
+ align-items: center;
2330
+ vertical-align: middle;
2331
+ }
2332
+ .lg-floating {
2333
+ --lg-transparency: 0.18;
2334
+ position: fixed;
2335
+ inset: auto;
2336
+ z-index: 1000;
2337
+ box-sizing: border-box;
2338
+ margin: 0;
2339
+ border: 0;
2340
+ border-radius: 18px;
2341
+ color: var(--lg-foreground);
2342
+ font: inherit;
2343
+ font-size: 14px;
2344
+ line-height: 1.5;
2345
+ text-align: start;
2346
+ overflow: auto;
2347
+ overscroll-behavior: contain;
2348
+ box-shadow:
2349
+ 0 12px 40px var(--lg-shadow),
2350
+ inset 0 0 0 0.5px var(--lg-surface-edge);
2351
+ animation: lg-floating-enter 150ms ease-out;
2352
+ }
2353
+ .lg-floating:focus {
2354
+ outline: none;
2355
+ }
2356
+ .lg-floating:focus-visible {
2357
+ outline: 2px solid var(--lg-ring);
2358
+ outline-offset: 2px;
2359
+ }
2360
+ .lg-tooltip {
2361
+ width: max-content;
2362
+ max-width: 280px;
2363
+ padding: 8px 12px;
2364
+ border-radius: 12px;
2365
+ font-size: 12px;
2366
+ overflow-wrap: anywhere;
2367
+ }
2368
+ .lg-popover {
2369
+ padding: 20px;
2370
+ overflow-wrap: anywhere;
2371
+ }
2372
+ .lg-popover-title {
2373
+ font-weight: 650;
2374
+ margin-bottom: 12px;
2375
+ font-size: 15px;
2376
+ }
2377
+ @keyframes lg-floating-enter {
2378
+ from {
2379
+ opacity: 0;
2380
+ translate: 0 3px;
2381
+ }
2382
+ to {
2383
+ opacity: 1;
2384
+ translate: 0 0;
2385
+ }
2386
+ }
2387
+
2388
+ .lg-card {
2389
+ --lg-card-padding: 22px;
2390
+ box-sizing: border-box;
2391
+ min-width: 0;
2392
+ border-radius: 24px;
2393
+ color: var(--lg-foreground);
2394
+ font-size: 14px;
2395
+ line-height: 1.6;
2396
+ overflow-wrap: anywhere;
2397
+ }
2398
+ .lg-card[data-padding="small"] {
2399
+ --lg-card-padding: 16px;
2400
+ }
2401
+ .lg-card[data-padding="large"] {
2402
+ --lg-card-padding: 30px;
2403
+ }
2404
+ .lg-card-cover {
2405
+ border-radius: 24px 24px 0 0;
2406
+ overflow: hidden;
2407
+ }
2408
+ .lg-card-cover > img {
2409
+ display: block;
2410
+ width: 100%;
2411
+ object-fit: cover;
2412
+ }
2413
+ .lg-card-header {
2414
+ display: flex;
2415
+ align-items: flex-start;
2416
+ gap: 16px;
2417
+ padding: var(--lg-card-padding) var(--lg-card-padding) 0;
2418
+ }
2419
+ .lg-card-heading {
2420
+ flex: 1;
2421
+ min-width: 0;
2422
+ }
2423
+ .lg-card-title {
2424
+ font-size: 17px;
2425
+ line-height: 1.4;
2426
+ font-weight: 650;
2427
+ letter-spacing: -0.02em;
2428
+ }
2429
+ .lg-card-description {
2430
+ color: var(--lg-secondary);
2431
+ margin-top: 5px;
2432
+ font-size: 12px;
2433
+ }
2434
+ .lg-card-extra {
2435
+ flex: none;
2436
+ }
2437
+ .lg-card-body {
2438
+ padding: var(--lg-card-padding);
2439
+ }
2440
+ .lg-card-footer {
2441
+ padding: 14px var(--lg-card-padding);
2442
+ border-top: 1px solid var(--lg-separator);
2443
+ }
2444
+
2445
+ :where(.lg-tag, .lg-badge-mark) {
2446
+ --lg-status: var(--lg-secondary);
2447
+ }
2448
+ :where(.lg-tag, .lg-badge-mark)[data-tone="info"] {
2449
+ --lg-status: var(--lg-tab-accent);
2450
+ }
2451
+ :where(.lg-tag, .lg-badge-mark)[data-tone="success"] {
2452
+ --lg-status: var(--lg-success-ink);
2453
+ }
2454
+ :where(.lg-tag, .lg-badge-mark)[data-tone="warning"] {
2455
+ --lg-status: var(--lg-warning-ink);
2456
+ }
2457
+ :where(.lg-tag, .lg-badge-mark)[data-tone="danger"] {
2458
+ --lg-status: var(--lg-destructive-ink);
2459
+ }
2460
+ .lg-tag {
2461
+ display: inline-flex;
2462
+ align-items: center;
2463
+ gap: 6px;
2464
+ max-width: 100%;
2465
+ box-sizing: border-box;
2466
+ padding: 3px 10px;
2467
+ border-radius: 10px;
2468
+ color: color-mix(in srgb, var(--lg-status) 80%, var(--lg-foreground));
2469
+ background-color: color-mix(in srgb, var(--lg-status) 12%, transparent);
2470
+ box-shadow: inset 0 0 0 0.5px
2471
+ color-mix(in srgb, var(--lg-status) 25%, transparent);
2472
+ font-size: 12px;
2473
+ line-height: 22px;
2474
+ overflow-wrap: anywhere;
2475
+ }
2476
+ .lg-tag > svg {
2477
+ width: 14px;
2478
+ height: 14px;
2479
+ flex: none;
2480
+ }
2481
+ .lg-dismiss {
2482
+ display: inline-grid;
2483
+ flex: none;
2484
+ place-items: center;
2485
+ width: 24px;
2486
+ height: 24px;
2487
+ padding: 0;
2488
+ border: 0;
2489
+ border-radius: 50%;
2490
+ background: transparent;
2491
+ color: inherit;
2492
+ font: inherit;
2493
+ font-size: 18px;
2494
+ line-height: 1;
2495
+ cursor: pointer;
2496
+ }
2497
+ .lg-dismiss:hover {
2498
+ background: var(--lg-highlight);
2499
+ }
2500
+ .lg-tag .lg-dismiss {
2501
+ margin-inline-end: -5px;
2502
+ }
2503
+ .lg-badge {
2504
+ position: relative;
2505
+ display: inline-flex;
2506
+ vertical-align: middle;
2507
+ }
2508
+ .lg-badge-mark {
2509
+ display: inline-flex;
2510
+ align-items: center;
2511
+ justify-content: center;
2512
+ min-width: 20px;
2513
+ height: 20px;
2514
+ padding: 0 5px;
2515
+ box-sizing: border-box;
2516
+ border-radius: 999px;
2517
+ color: white;
2518
+ background: var(--lg-status);
2519
+ font-size: 10px;
2520
+ line-height: 1;
2521
+ font-weight: 650;
2522
+ font-variant-numeric: tabular-nums;
2523
+ box-shadow:
2524
+ 0 0 0 2px var(--lg-surface),
2525
+ 0 2px 6px var(--lg-shadow);
2526
+ }
2527
+ .lg-badge[data-attached] > .lg-badge-mark {
2528
+ position: absolute;
2529
+ top: 0;
2530
+ right: 0;
2531
+ transform: translate(40%, -40%);
2532
+ z-index: 1;
2533
+ }
2534
+ .lg-badge-mark[data-dot] {
2535
+ min-width: 8px;
2536
+ width: 8px;
2537
+ height: 8px;
2538
+ padding: 0;
2539
+ }
2540
+ .lg-avatar {
2541
+ display: inline-grid;
2542
+ flex: none;
2543
+ place-items: center;
2544
+ width: var(--lg-avatar-size);
2545
+ height: var(--lg-avatar-size);
2546
+ border-radius: 50%;
2547
+ color: var(--lg-foreground);
2548
+ background-color: var(--lg-fill-subtle);
2549
+ font-size: calc(var(--lg-avatar-size) * 0.38);
2550
+ font-weight: 600;
2551
+ line-height: 1;
2552
+ vertical-align: middle;
2553
+ }
2554
+ .lg-avatar[data-shape="rounded"] {
2555
+ border-radius: 28%;
2556
+ }
2557
+ .lg-avatar > img {
2558
+ position: absolute;
2559
+ inset: 0;
2560
+ width: 100%;
2561
+ height: 100%;
2562
+ border-radius: inherit;
2563
+ object-fit: cover;
2564
+ }
2565
+ .lg-avatar > span {
2566
+ display: grid;
2567
+ place-items: center;
2568
+ }
2569
+ .lg-avatar svg {
2570
+ width: calc(var(--lg-avatar-size) * 0.55);
2571
+ height: calc(var(--lg-avatar-size) * 0.55);
2572
+ }
2573
+
2574
+ .lg-empty {
2575
+ display: flex;
2576
+ flex-direction: column;
2577
+ align-items: center;
2578
+ padding: 28px 16px;
2579
+ color: var(--lg-foreground);
2580
+ text-align: center;
2581
+ }
2582
+ .lg-empty-icon {
2583
+ display: grid;
2584
+ place-items: center;
2585
+ width: 76px;
2586
+ height: 76px;
2587
+ margin-bottom: 18px;
2588
+ border-radius: 24px;
2589
+ background: var(--lg-fill-subtle);
2590
+ color: var(--lg-secondary);
2591
+ }
2592
+ .lg-empty-icon svg {
2593
+ width: 54px;
2594
+ height: 54px;
2595
+ }
2596
+ .lg-empty-title {
2597
+ font-weight: 600;
2598
+ font-size: 15px;
2599
+ }
2600
+ .lg-empty-description {
2601
+ max-width: 32ch;
2602
+ margin-top: 6px;
2603
+ color: var(--lg-secondary);
2604
+ font-size: 13px;
2605
+ line-height: 1.6;
2606
+ }
2607
+ .lg-empty-actions {
2608
+ display: flex;
2609
+ flex-wrap: wrap;
2610
+ justify-content: center;
2611
+ gap: 10px;
2612
+ margin-top: 20px;
2613
+ }
2614
+ .lg-skeleton {
2615
+ position: relative;
2616
+ display: block;
2617
+ box-sizing: border-box;
2618
+ width: 100%;
2619
+ height: 14px;
2620
+ border-radius: 7px;
2621
+ overflow: hidden;
2622
+ background: var(--lg-fill-subtle);
2623
+ }
2624
+ .lg-skeleton[data-shape="circle"] {
2625
+ width: 40px;
2626
+ height: 40px;
2627
+ border-radius: 50%;
2628
+ }
2629
+ .lg-skeleton[data-shape="rounded"] {
2630
+ height: 100px;
2631
+ border-radius: 18px;
2632
+ }
2633
+ .lg-skeleton[data-animated]::after {
2634
+ content: "";
2635
+ position: absolute;
2636
+ inset: 0;
2637
+ transform: translateX(-100%);
2638
+ background: linear-gradient(
2639
+ 90deg,
2640
+ transparent,
2641
+ color-mix(in srgb, var(--lg-foreground) 7%, transparent),
2642
+ transparent
2643
+ );
2644
+ animation: lg-skeleton-wave 1.7s ease-in-out infinite;
2645
+ }
2646
+ @keyframes lg-skeleton-wave {
2647
+ to {
2648
+ transform: translateX(100%);
2649
+ }
2650
+ }
2651
+
2652
+ .lg-toast-viewport {
2653
+ position: fixed;
2654
+ inset: auto 24px 24px auto;
2655
+ z-index: 1100;
2656
+ display: grid;
2657
+ gap: 12px;
2658
+ width: min(380px, calc(100vw - 32px));
2659
+ max-height: calc(100dvh - 32px);
2660
+ margin: 0;
2661
+ padding: 0;
2662
+ border: 0;
2663
+ background: transparent;
2664
+ color: var(--lg-foreground);
2665
+ overflow: auto;
2666
+ pointer-events: none;
2667
+ }
2668
+ .lg-toast-viewport:empty {
2669
+ display: none;
2670
+ }
2671
+ .lg-toast-viewport[data-position="top-right"] {
2672
+ top: max(16px, env(safe-area-inset-top));
2673
+ bottom: auto;
2674
+ }
2675
+ .lg-toast-viewport[data-position="bottom-center"] {
2676
+ left: 50%;
2677
+ right: auto;
2678
+ transform: translateX(-50%);
2679
+ }
2680
+ .lg-toast-viewport > div {
2681
+ pointer-events: auto;
2682
+ padding: 3px;
2683
+ }
2684
+ .lg-toast {
2685
+ --lg-transparency: 0.15;
2686
+ --lg-toast-accent: var(--lg-tab-accent);
2687
+ display: flex;
2688
+ align-items: flex-start;
2689
+ gap: 12px;
2690
+ padding: 16px;
2691
+ border-radius: 20px;
2692
+ color: var(--lg-foreground);
2693
+ font-size: 13px;
2694
+ line-height: 1.5;
2695
+ animation: lg-floating-enter 180ms ease-out;
2696
+ }
2697
+ .lg-toast[data-tone="success"] {
2698
+ --lg-toast-accent: var(--lg-success-ink);
2699
+ }
2700
+ .lg-toast[data-tone="warning"] {
2701
+ --lg-toast-accent: var(--lg-warning-ink);
2702
+ }
2703
+ .lg-toast[data-tone="error"] {
2704
+ --lg-toast-accent: var(--lg-destructive-ink);
2705
+ }
2706
+ .lg-toast-icon {
2707
+ display: grid;
2708
+ flex: none;
2709
+ place-items: center;
2710
+ width: 24px;
2711
+ height: 24px;
2712
+ border-radius: 50%;
2713
+ color: color-mix(in srgb, var(--lg-toast-accent) 80%, var(--lg-foreground));
2714
+ background: color-mix(in srgb, var(--lg-toast-accent) 14%, transparent);
2715
+ font-weight: 700;
2716
+ }
2717
+ .lg-toast-content {
2718
+ flex: 1;
2719
+ min-width: 0;
2720
+ overflow-wrap: anywhere;
2721
+ }
2722
+ .lg-toast-title {
2723
+ font-weight: 600;
2724
+ }
2725
+ .lg-toast-description {
2726
+ margin-top: 3px;
2727
+ color: var(--lg-secondary);
2728
+ font-size: 12px;
2729
+ }
2730
+ .lg-toast-content > .lg-button {
2731
+ margin-top: 10px;
2732
+ }
2733
+ .lg-toast > .lg-dismiss {
2734
+ color: var(--lg-secondary);
2735
+ }
2736
+ @media (max-width: 480px) {
2737
+ .lg-toast-viewport {
2738
+ right: 16px;
2739
+ bottom: max(16px, env(safe-area-inset-bottom));
2740
+ }
2741
+ }
2742
+ @media (prefers-reduced-motion: reduce) {
2743
+ .lg-floating,
2744
+ .lg-toast,
2745
+ .lg-skeleton[data-animated]::after {
2746
+ animation: none;
2747
+ }
2748
+ .lg-choice-control,
2749
+ .lg-radio-control > span,
2750
+ .lg-select-trigger svg {
2751
+ transition: none;
2752
+ }
2753
+ }
2754
+ @media (forced-colors: active) {
2755
+ .lg-choice-control,
2756
+ .lg-select-trigger,
2757
+ .lg-textarea,
2758
+ .lg-card,
2759
+ .lg-tag,
2760
+ .lg-badge-mark,
2761
+ .lg-avatar,
2762
+ .lg-floating,
2763
+ .lg-toast {
2764
+ border: 1px solid CanvasText;
2765
+ }
2766
+ .lg-choice-input:checked + .lg-choice-control,
2767
+ .lg-choice-input:indeterminate + .lg-choice-control {
2768
+ background: Highlight;
2769
+ color: HighlightText;
2770
+ forced-color-adjust: none;
2771
+ }
2772
+ .lg-choice-input:checked + .lg-radio-control > span {
2773
+ background: HighlightText;
2774
+ }
2775
+ .lg-skeleton {
2776
+ background: GrayText;
2777
+ }
2778
+ }
2779
+
2780
+ /* 错误放在控件下方,语义通过 aria-describedby 与输入关联。 */
2781
+ .lg-textarea-field { width: 100%; min-width: 0; }
2782
+ .lg-field-error {
2783
+ display: flex;
2784
+ align-items: flex-start;
2785
+ gap: 6px;
2786
+ margin: 8px 4px 0;
2787
+ color: var(--lg-destructive-ink);
2788
+ font-size: 12px;
2789
+ line-height: 1.5;
2790
+ }
2791
+ .lg-field-error > svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
2792
+ .lg-textarea[data-invalid], .lg-select-trigger[aria-invalid="true"] {
2793
+ outline: 1.5px solid var(--lg-destructive-ink);
2794
+ outline-offset: 2px;
2795
+ }
2796
+
2797
+ /* 通用内容使用清晰表面,玻璃集中在交互控件和浮层。 */
2798
+ .lg-sr-only {
2799
+ position: absolute;
2800
+ width: 1px;
2801
+ height: 1px;
2802
+ padding: 0;
2803
+ margin: -1px;
2804
+ overflow: hidden;
2805
+ clip-path: inset(50%);
2806
+ white-space: nowrap;
2807
+ border: 0;
2808
+ }
2809
+ .lg-muted {
2810
+ color: var(--lg-muted);
2811
+ font-size: 13px;
2812
+ }
2813
+ .lg-typography {
2814
+ color: var(--lg-foreground);
2815
+ margin-block: 0;
2816
+ line-height: 1.65;
2817
+ font-size: 15px;
2818
+ }
2819
+ .lg-typography[data-size="small"] {
2820
+ font-size: 13px;
2821
+ }
2822
+ .lg-typography[data-size="large"] {
2823
+ font-size: 19px;
2824
+ }
2825
+ .lg-typography:is(h1, h2, h3, h4) {
2826
+ font-size: 24px;
2827
+ font-weight: 650;
2828
+ letter-spacing: -0.025em;
2829
+ }
2830
+ .lg-typography[data-weight="medium"] {
2831
+ font-weight: 500;
2832
+ }
2833
+ .lg-typography[data-weight="semibold"] {
2834
+ font-weight: 650;
2835
+ }
2836
+ .lg-typography[data-tone="muted"] {
2837
+ color: var(--lg-muted);
2838
+ }
2839
+ .lg-typography[data-tone="success"] {
2840
+ color: var(--lg-success-ink);
2841
+ }
2842
+ .lg-typography[data-tone="warning"] {
2843
+ color: var(--lg-warning-ink);
2844
+ }
2845
+ .lg-typography[data-tone="danger"] {
2846
+ color: var(--lg-destructive-ink);
2847
+ }
2848
+ .lg-typography[data-truncate] {
2849
+ overflow: hidden;
2850
+ text-overflow: ellipsis;
2851
+ white-space: nowrap;
2852
+ }
2853
+ .lg-field {
2854
+ display: grid;
2855
+ gap: 8px;
2856
+ min-width: 0;
2857
+ color: var(--lg-foreground);
2858
+ text-align: start;
2859
+ }
2860
+ .lg-field-label {
2861
+ font-size: 14px;
2862
+ font-weight: 600;
2863
+ }
2864
+ .lg-field-label > span,
2865
+ .lg-field-error {
2866
+ color: var(--lg-destructive-ink);
2867
+ }
2868
+ .lg-field-description {
2869
+ color: var(--lg-muted);
2870
+ font-size: 13px;
2871
+ line-height: 1.5;
2872
+ }
2873
+ .lg-field-error {
2874
+ font-size: 13px;
2875
+ }
2876
+ .lg-field[data-disabled] {
2877
+ opacity: 1;
2878
+ }
2879
+ .lg-field[data-disabled] .lg-field-label {
2880
+ opacity: var(--lg-disabled-opacity);
2881
+ }
2882
+ .lg-dialog {
2883
+ box-sizing: border-box;
2884
+ position: fixed;
2885
+ inset: 0;
2886
+ margin: 0;
2887
+ padding: 24px;
2888
+ border: 0;
2889
+ background: transparent;
2890
+ width: 100%;
2891
+ height: 100%;
2892
+ max-width: none;
2893
+ max-height: none;
2894
+ color: var(--lg-foreground);
2895
+ overflow: auto;
2896
+ }
2897
+ .lg-dialog[open] {
2898
+ display: grid;
2899
+ place-items: center;
2900
+ }
2901
+ .lg-dialog::backdrop {
2902
+ background: var(--lg-scrim);
2903
+ backdrop-filter: blur(3px);
2904
+ }
2905
+ .lg-dialog-panel {
2906
+ width: min(100%, 560px);
2907
+ box-sizing: border-box;
2908
+ border: 1px solid var(--lg-surface-edge);
2909
+ border-radius: 24px;
2910
+ background: var(--lg-surface);
2911
+ backdrop-filter: blur(30px) saturate(1.3);
2912
+ box-shadow: 0 24px 80px var(--lg-shadow);
2913
+ overflow: hidden;
2914
+ animation: lg-dialog-enter 160ms ease-out;
2915
+ }
2916
+ .lg-dialog[data-size="small"] .lg-dialog-panel {
2917
+ width: min(100%, 380px);
2918
+ }
2919
+ .lg-dialog[data-size="large"] .lg-dialog-panel {
2920
+ width: min(100%, 860px);
2921
+ }
2922
+ .lg-dialog[data-phase="leaving"] .lg-dialog-panel {
2923
+ opacity: 0;
2924
+ transform: translateY(6px);
2925
+ transition:
2926
+ opacity 150ms,
2927
+ transform 150ms;
2928
+ }
2929
+ .lg-dialog-header {
2930
+ display: flex;
2931
+ align-items: start;
2932
+ justify-content: space-between;
2933
+ gap: 16px;
2934
+ padding: 24px 24px 16px;
2935
+ }
2936
+ .lg-dialog-header h2 {
2937
+ margin: 0;
2938
+ font-size: 20px;
2939
+ letter-spacing: -0.025em;
2940
+ }
2941
+ .lg-dialog-header p {
2942
+ margin: 8px 0 0;
2943
+ font-size: 13px;
2944
+ line-height: 1.6;
2945
+ color: var(--lg-muted);
2946
+ }
2947
+ .lg-dialog-content {
2948
+ padding: 8px 24px 24px;
2949
+ min-width: 0;
2950
+ }
2951
+ .lg-dialog-footer {
2952
+ display: flex;
2953
+ flex-wrap: wrap;
2954
+ justify-content: end;
2955
+ gap: 10px;
2956
+ padding: 16px 24px;
2957
+ border-top: 1px solid var(--lg-separator);
2958
+ }
2959
+ @keyframes lg-dialog-enter {
2960
+ from {
2961
+ opacity: 0;
2962
+ transform: translateY(8px) scale(0.98);
2963
+ }
2964
+ to {
2965
+ opacity: 1;
2966
+ transform: none;
2967
+ }
2968
+ }
2969
+ .lg-tabs {
2970
+ min-width: 0;
2971
+ color: var(--lg-foreground);
2972
+ width: 100%;
2973
+ }
2974
+ .lg-tabs-list {
2975
+ display: flex;
2976
+ width: fit-content;
2977
+ max-width: 100%;
2978
+ overflow-x: auto;
2979
+ gap: var(--lg-space-1);
2980
+ padding: var(--lg-space-1);
2981
+ border-radius: var(--lg-radius-control);
2982
+ }
2983
+ .lg-tabs-list button {
2984
+ appearance: none;
2985
+ border: 0;
2986
+ background: transparent;
2987
+ color: var(--lg-muted);
2988
+ cursor: pointer;
2989
+ min-height: var(--lg-control-height-small);
2990
+ padding: 4px var(--lg-space-4);
2991
+ border-radius: var(--lg-radius-control);
2992
+ font: inherit;
2993
+ font-size: var(--lg-font-size);
2994
+ line-height: 20px;
2995
+ white-space: nowrap;
2996
+ transition:
2997
+ background 140ms,
2998
+ color 140ms;
2999
+ }
3000
+ .lg-tabs-list button[aria-selected="true"] {
3001
+ color: var(--lg-foreground);
3002
+ background: color-mix(in srgb, var(--lg-sheet-opaque) 64%, transparent);
3003
+ box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 2px 8px var(--lg-shadow);
3004
+ }
3005
+ .lg-tabs-list button:disabled {
3006
+ opacity: 0.4;
3007
+ cursor: not-allowed;
3008
+ }
3009
+ .lg-tabs-list button:focus-visible {
3010
+ outline: 2px solid var(--lg-fill);
3011
+ outline-offset: -2px;
3012
+ }
3013
+ .lg-tabs-panel {
3014
+ padding-block: 20px;
3015
+ outline-offset: -2px;
3016
+ }
3017
+ .lg-table-scroll {
3018
+ width: 100%;
3019
+ overflow-x: auto;
3020
+ border: 1px solid var(--lg-separator);
3021
+ border-radius: 16px;
3022
+ background: var(--lg-surface);
3023
+ }
3024
+ .lg-table {
3025
+ width: 100%;
3026
+ border-collapse: collapse;
3027
+ color: var(--lg-foreground);
3028
+ font-size: 14px;
3029
+ text-align: start;
3030
+ }
3031
+ .lg-table th {
3032
+ font-weight: 600;
3033
+ color: var(--lg-muted);
3034
+ background: var(--lg-fill-subtle);
3035
+ text-align: start;
3036
+ }
3037
+ .lg-table :is(th, td) {
3038
+ padding: 14px 18px;
3039
+ border-bottom: 1px solid var(--lg-separator);
3040
+ white-space: normal;
3041
+ }
3042
+ .lg-table tbody tr:last-child td {
3043
+ border-bottom: 0;
3044
+ }
3045
+ .lg-table tbody tr:hover {
3046
+ background: var(--lg-highlight);
3047
+ }
3048
+ .lg-table-empty {
3049
+ text-align: center;
3050
+ color: var(--lg-muted);
3051
+ height: 100px;
3052
+ }
3053
+ .lg-pagination {
3054
+ display: flex;
3055
+ align-items: center;
3056
+ justify-content: end;
3057
+ gap: 8px;
3058
+ flex-wrap: wrap;
3059
+ color: var(--lg-foreground);
3060
+ }
3061
+ .lg-pagination-page {
3062
+ display: inline-flex;
3063
+ align-items: center;
3064
+ gap: 8px;
3065
+ }
3066
+ .lg-date-range {
3067
+ display: inline-grid;
3068
+ gap: 0;
3069
+ min-width: 0;
3070
+ max-width: 100%;
3071
+ }
3072
+ .lg-date-range-control { position: relative; min-width: 0; }
3073
+ .lg-date-range-trigger { width: 100%; max-width: 100%; justify-content: start; font-variant-numeric: tabular-nums; }
3074
+ .lg-date-range-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3075
+ .lg-date-range-trigger[data-empty] { color: var(--lg-secondary); }
3076
+ .lg-date-range-trigger[data-clearable] { padding-inline-end: 44px; }
3077
+ .lg-date-range-trigger[aria-invalid="true"] { outline: 2px solid var(--lg-destructive-ink); outline-offset: 2px; }
3078
+ .lg-date-range-separator { margin-inline: 12px; color: var(--lg-secondary); }
3079
+ .lg-date-range-clear { position: absolute; inset-inline-end: 8px; top: 50%; translate: 0 -50%; }
3080
+ .lg-date-range-clear:disabled { opacity: var(--lg-disabled-opacity); cursor: not-allowed; }
3081
+ .lg-range-popover { display: flex; flex-direction: column; width: max-content; padding: 16px; --lg-transparency: 0.1; }
3082
+ .lg-range-summary { display: flex; flex: none; align-items: center; gap: 24px; padding: 0 4px 16px; margin-bottom: 16px; border-bottom: 1px solid var(--lg-separator); }
3083
+ .lg-range-summary > div { display: grid; gap: 4px; min-width: 0; }
3084
+ .lg-range-summary > div > span { color: var(--lg-secondary); font-size: 12px; }
3085
+ .lg-range-summary strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
3086
+ .lg-range-summary-arrow { color: var(--lg-secondary); }
3087
+ /* 短视口只滚动日历内容,让确认栏始终可见,兼容 WebKit 的 popover 滚动行为。 */
3088
+ .lg-range-root { position: relative; min-height: 0; overflow: auto; color: var(--lg-foreground); font-family: var(--lg-font-family); font-variant-numeric: tabular-nums; }
3089
+ .lg-range-months { display: flex; gap: 24px; }
3090
+ .lg-range-month { width: 252px; flex: none; }
3091
+ .lg-range-nav { position: absolute; inset-inline: 0; top: 0; display: flex; justify-content: space-between; pointer-events: none; z-index: 1; }
3092
+ .lg-range-nav .lg-button { pointer-events: auto; }
3093
+ .lg-range-month_caption { display: flex; align-items: center; justify-content: center; height: 32px; margin-bottom: 12px; }
3094
+ .lg-range-caption_label { font-size: 14px; font-weight: 600; }
3095
+ .lg-range-month_grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 4px; }
3096
+ .lg-range-weekday { height: 28px; padding: 0; text-align: center; font-size: 12px; font-weight: 400; color: var(--lg-secondary); }
3097
+ .lg-range-day { position: relative; height: 36px; padding: 0; text-align: center; }
3098
+ .lg-range-day_button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; margin: auto; background: transparent; border: 0; border-radius: 10px; font: inherit; font-size: 14px; color: inherit; cursor: pointer; }
3099
+ .lg-range-day:not(.lg-range-selected) .lg-range-day_button:hover { background: var(--lg-highlight); }
3100
+ .lg-range-day_button:focus-visible { outline: 2px solid var(--lg-focus-color); outline-offset: 2px; }
3101
+ .lg-range-disabled { opacity: var(--lg-disabled-opacity); }
3102
+ .lg-range-disabled .lg-range-day_button { cursor: not-allowed; }
3103
+ .lg-range-hidden { visibility: hidden; }
3104
+ .lg-range-selected { font-weight: 600; }
3105
+ .lg-range-range_middle { background: color-mix(in srgb, var(--lg-tab-accent) 12%, transparent); }
3106
+ .lg-range-range_start { background: linear-gradient(to right, transparent 50%, color-mix(in srgb, var(--lg-tab-accent) 12%, transparent) 50%); border-radius: 10px 0 0 10px; }
3107
+ .lg-range-range_end { background: linear-gradient(to left, transparent 50%, color-mix(in srgb, var(--lg-tab-accent) 12%, transparent) 50%); border-radius: 0 10px 10px 0; }
3108
+ :dir(rtl).lg-range-range_start { background: linear-gradient(to left, transparent 50%, color-mix(in srgb, var(--lg-tab-accent) 12%, transparent) 50%); border-radius: 0 10px 10px 0; }
3109
+ :dir(rtl).lg-range-range_end { background: linear-gradient(to right, transparent 50%, color-mix(in srgb, var(--lg-tab-accent) 12%, transparent) 50%); border-radius: 10px 0 0 10px; }
3110
+ .lg-range-range_start.lg-range-range_end { background: transparent; }
3111
+ :is(.lg-range-range_start, .lg-range-range_end) .lg-range-day_button { color: white; background: var(--lg-fill); }
3112
+ .lg-range-today:not(.lg-range-selected) .lg-range-day_button { box-shadow: inset 0 0 0 1px var(--lg-tab-accent); color: var(--lg-tab-accent); }
3113
+ .lg-range-footer { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--lg-separator); }
3114
+ .lg-range-footer > div { display: flex; gap: 8px; }
3115
+ @media (pointer: coarse) { .lg-range-day, .lg-range-day_button { height: 44px; } }
3116
+ @media (max-width: 640px) { .lg-range-month { width: 252px; } }
3117
+ [data-lg-density="compact"] .lg-table :is(th, td) {
3118
+ padding: 9px 12px;
3119
+ }
3120
+ [data-lg-density="compact"] .lg-field {
3121
+ gap: 5px;
3122
+ }
3123
+ [data-lg-density="compact"] .lg-tabs-list button {
3124
+ padding: 7px 13px;
3125
+ }
3126
+ @media (prefers-reduced-motion: reduce) {
3127
+ .lg-dialog-panel {
3128
+ animation: none;
3129
+ }
3130
+ .lg-dialog[data-phase="leaving"] .lg-dialog-panel,
3131
+ .lg-tabs-list button {
3132
+ transition: none;
3133
+ }
3134
+ }
3135
+ @media (max-width: 480px) {
3136
+ .lg-dialog {
3137
+ padding: 12px;
3138
+ }
3139
+ .lg-dialog-header {
3140
+ padding: 20px 18px 12px;
3141
+ }
3142
+ .lg-dialog-content {
3143
+ padding: 8px 18px 20px;
3144
+ }
3145
+ .lg-dialog-footer {
3146
+ padding: 12px 18px;
3147
+ }
3148
+ .lg-pagination {
3149
+ gap: 5px;
3150
+ }
3151
+ .lg-table :is(th, td) {
3152
+ padding: 10px 12px;
3153
+ }
3154
+ }
3155
+
3156
+ .lg-filter-bar {
3157
+ display: flex;
3158
+ align-items: end;
3159
+ flex-wrap: wrap;
3160
+ gap: 16px;
3161
+ color: var(--lg-foreground);
3162
+ }
3163
+ .lg-filter-fields {
3164
+ display: flex;
3165
+ align-items: end;
3166
+ gap: 12px;
3167
+ flex-wrap: wrap;
3168
+ flex: 1;
3169
+ min-width: 0;
3170
+ }
3171
+ .lg-filter-actions {
3172
+ display: flex;
3173
+ align-items: center;
3174
+ gap: 10px;
3175
+ }
3176
+ .lg-data-table {
3177
+ width: 100%;
3178
+ min-width: 0;
3179
+ display: grid;
3180
+ gap: 14px;
3181
+ }
3182
+ .lg-data-toolbar {
3183
+ display: flex;
3184
+ align-items: center;
3185
+ justify-content: space-between;
3186
+ gap: 12px;
3187
+ }
3188
+ .lg-data-toolbar > div:first-child {
3189
+ flex: 1;
3190
+ min-width: 0;
3191
+ }
3192
+ .lg-table-sort {
3193
+ appearance: none;
3194
+ border: 0;
3195
+ background: none;
3196
+ color: inherit;
3197
+ cursor: pointer;
3198
+ padding: 0;
3199
+ font: inherit;
3200
+ display: inline-flex;
3201
+ align-items: center;
3202
+ gap: 8px;
3203
+ text-align: inherit;
3204
+ }
3205
+ .lg-table-sort span {
3206
+ font-size: 12px;
3207
+ color: var(--lg-muted);
3208
+ }
3209
+ .lg-check-list {
3210
+ display: grid;
3211
+ gap: 12px;
3212
+ min-width: 0;
3213
+ }
3214
+ .lg-multi-select {
3215
+ position: relative;
3216
+ max-width: 100%;
3217
+ }
3218
+ .lg-multi-select > .lg-floating-anchor > button {
3219
+ max-width: 100%;
3220
+ overflow: hidden;
3221
+ text-overflow: ellipsis;
3222
+ white-space: nowrap;
3223
+ display: block;
3224
+ text-align: start;
3225
+ }
3226
+ .lg-upload {
3227
+ display: grid;
3228
+ gap: 12px;
3229
+ width: 100%;
3230
+ box-sizing: border-box;
3231
+ border: 1px dashed var(--lg-separator);
3232
+ border-radius: 20px;
3233
+ padding: 24px;
3234
+ background: var(--lg-fill-subtle);
3235
+ color: var(--lg-foreground);
3236
+ }
3237
+ .lg-upload[data-dragging] {
3238
+ border-color: var(--lg-fill);
3239
+ outline: 2px solid var(--lg-fill);
3240
+ outline-offset: 3px;
3241
+ }
3242
+ .lg-upload > .lg-button {
3243
+ justify-self: start;
3244
+ }
3245
+ .lg-upload p {
3246
+ margin: 0;
3247
+ }
3248
+ .lg-upload-files {
3249
+ padding: 0;
3250
+ margin: 0;
3251
+ list-style: none;
3252
+ display: grid;
3253
+ gap: 10px;
3254
+ }
3255
+ .lg-upload-files li {
3256
+ display: flex;
3257
+ align-items: center;
3258
+ justify-content: space-between;
3259
+ gap: 12px;
3260
+ }
3261
+ .lg-upload-files li > span {
3262
+ min-width: 0;
3263
+ overflow-wrap: anywhere;
3264
+ }
3265
+ .lg-upload-files small {
3266
+ display: block;
3267
+ }
3268
+ .lg-drawer[open] {
3269
+ padding: 12px;
3270
+ }
3271
+ .lg-drawer-end[open] {
3272
+ place-items: stretch end;
3273
+ }
3274
+ .lg-drawer-start[open] {
3275
+ place-items: stretch start;
3276
+ }
3277
+ .lg-drawer .lg-dialog-panel {
3278
+ display: flex;
3279
+ flex-direction: column;
3280
+ height: 100%;
3281
+ max-height: 100%;
3282
+ }
3283
+ .lg-drawer .lg-dialog-content {
3284
+ flex: 1;
3285
+ overflow-y: auto;
3286
+ }
3287
+ .lg-drawer-end[data-phase="leaving"] .lg-dialog-panel {
3288
+ transform: translateX(20px);
3289
+ }
3290
+ .lg-drawer-start[data-phase="leaving"] .lg-dialog-panel {
3291
+ transform: translateX(-20px);
3292
+ }
3293
+ :dir(rtl).lg-drawer-end[data-phase="leaving"] .lg-dialog-panel {
3294
+ transform: translateX(-20px);
3295
+ }
3296
+ :dir(rtl).lg-drawer-start[data-phase="leaving"] .lg-dialog-panel {
3297
+ transform: translateX(20px);
3298
+ }
3299
+ .lg-tree,
3300
+ .lg-tree ul {
3301
+ padding: 0;
3302
+ margin: 0;
3303
+ list-style: none;
3304
+ color: var(--lg-foreground);
3305
+ }
3306
+ .lg-tree {
3307
+ width: 100%;
3308
+ min-width: 180px;
3309
+ }
3310
+ .lg-tree ul {
3311
+ padding-inline-start: 20px;
3312
+ }
3313
+ .lg-tree li {
3314
+ outline: none;
3315
+ border-radius: 10px;
3316
+ }
3317
+ .lg-tree-row {
3318
+ padding: 9px 10px;
3319
+ display: flex;
3320
+ align-items: center;
3321
+ gap: 8px;
3322
+ border-radius: 10px;
3323
+ cursor: pointer;
3324
+ font-size: 14px;
3325
+ }
3326
+ .lg-tree li:focus-visible > .lg-tree-row {
3327
+ outline: 2px solid var(--lg-fill);
3328
+ outline-offset: -2px;
3329
+ }
3330
+ .lg-tree li[aria-selected="true"] > .lg-tree-row {
3331
+ background: var(--lg-fill-subtle);
3332
+ color: var(--lg-tab-accent);
3333
+ }
3334
+ .lg-tree li[aria-disabled="true"] > .lg-tree-row {
3335
+ opacity: 0.5;
3336
+ cursor: not-allowed;
3337
+ }
3338
+ .lg-tree-row:hover {
3339
+ background: var(--lg-highlight);
3340
+ }
3341
+ .lg-tree-expander {
3342
+ display: inline-flex;
3343
+ min-width: 20px;
3344
+ align-items: center;
3345
+ justify-content: center;
3346
+ }
3347
+ .lg-descriptions {
3348
+ display: grid;
3349
+ grid-template-columns: repeat(
3350
+ var(--lg-description-columns, 2),
3351
+ minmax(0, 1fr)
3352
+ );
3353
+ gap: 20px 28px;
3354
+ margin: 0;
3355
+ width: 100%;
3356
+ color: var(--lg-foreground);
3357
+ }
3358
+ .lg-descriptions dt {
3359
+ font-size: 13px;
3360
+ color: var(--lg-muted);
3361
+ margin-bottom: 7px;
3362
+ }
3363
+ .lg-descriptions dd {
3364
+ margin: 0;
3365
+ font-size: 15px;
3366
+ overflow-wrap: anywhere;
3367
+ }
3368
+ .lg-statistic {
3369
+ display: grid;
3370
+ gap: 8px;
3371
+ color: var(--lg-foreground);
3372
+ }
3373
+ .lg-statistic-value {
3374
+ font-size: 34px;
3375
+ font-weight: 650;
3376
+ font-variant-numeric: tabular-nums;
3377
+ letter-spacing: -0.04em;
3378
+ line-height: 1.2;
3379
+ }
3380
+ .lg-statistic-value small {
3381
+ font-size: 14px;
3382
+ font-weight: 400;
3383
+ margin-inline-start: 7px;
3384
+ letter-spacing: 0;
3385
+ }
3386
+ @media (max-width: 480px) {
3387
+ .lg-descriptions {
3388
+ grid-template-columns: minmax(0, 1fr);
3389
+ }
3390
+ .lg-upload {
3391
+ padding: 18px;
3392
+ }
3393
+ }
3394
+
3395
+ .lg-member-option {
3396
+ display: inline-flex;
3397
+ align-items: center;
3398
+ gap: 9px;
3399
+ }
3400
+ .lg-import-wizard {
3401
+ display: grid;
3402
+ gap: 20px;
3403
+ width: 100%;
3404
+ color: var(--lg-foreground);
3405
+ }
3406
+ .lg-import-wizard h3 {
3407
+ margin: 0;
3408
+ font-size: 20px;
3409
+ }
3410
+ .lg-import-steps {
3411
+ display: flex;
3412
+ flex-wrap: wrap;
3413
+ gap: 16px;
3414
+ list-style: none;
3415
+ padding: 0;
3416
+ margin: 0;
3417
+ font-size: 13px;
3418
+ color: var(--lg-muted);
3419
+ }
3420
+ .lg-import-steps li[aria-current="step"] {
3421
+ color: var(--lg-tab-accent);
3422
+ font-weight: 650;
3423
+ }
3424
+ .lg-activity-calendar {
3425
+ --lg-transparency: 0.18;
3426
+ width: 100%;
3427
+ max-width: 360px;
3428
+ min-width: 0;
3429
+ box-sizing: border-box;
3430
+ padding: 20px;
3431
+ border-radius: 24px;
3432
+ color: var(--lg-foreground);
3433
+ font-family: var(--lg-font-family);
3434
+ font-variant-numeric: tabular-nums;
3435
+ }
3436
+ .lg-calendar-header {
3437
+ display: flex;
3438
+ align-items: center;
3439
+ justify-content: space-between;
3440
+ gap: 12px;
3441
+ margin-bottom: 20px;
3442
+ }
3443
+ .lg-calendar-caption {
3444
+ margin: 0 0 5px;
3445
+ color: var(--lg-secondary);
3446
+ font-size: 12px;
3447
+ line-height: 1.5;
3448
+ }
3449
+ .lg-calendar-header h3 {
3450
+ margin: 0;
3451
+ font-size: 20px;
3452
+ font-weight: 600;
3453
+ line-height: 1.3;
3454
+ letter-spacing: -0.02em;
3455
+ }
3456
+ .lg-calendar-navigation {
3457
+ display: flex;
3458
+ align-items: center;
3459
+ flex: none;
3460
+ gap: 8px;
3461
+ }
3462
+ .lg-calendar-row {
3463
+ display: grid;
3464
+ grid-template-columns: repeat(7, minmax(0, 1fr));
3465
+ gap: 4px;
3466
+ margin-bottom: 4px;
3467
+ text-align: center;
3468
+ }
3469
+ .lg-calendar-row [role="columnheader"] {
3470
+ color: var(--lg-secondary);
3471
+ padding-block: 8px;
3472
+ font-size: 12px;
3473
+ font-weight: 500;
3474
+ }
3475
+ .lg-calendar-weekdays {
3476
+ margin-bottom: 8px;
3477
+ }
3478
+ .lg-calendar-cell {
3479
+ display: flex;
3480
+ justify-content: center;
3481
+ min-width: 0;
3482
+ min-height: 40px;
3483
+ }
3484
+ .lg-calendar-row button {
3485
+ position: relative;
3486
+ display: grid;
3487
+ place-items: center;
3488
+ box-sizing: border-box;
3489
+ width: 100%;
3490
+ max-width: 40px;
3491
+ height: 40px;
3492
+ padding: 0;
3493
+ border: 1px solid transparent;
3494
+ border-radius: 10px;
3495
+ font: inherit;
3496
+ font-size: 14px;
3497
+ font-weight: 500;
3498
+ line-height: 1;
3499
+ color: var(--lg-foreground);
3500
+ cursor: pointer;
3501
+ background: var(--lg-calendar-activity, transparent);
3502
+ transition: background-color var(--lg-duration-fast) ease, color var(--lg-duration-fast) ease;
3503
+ }
3504
+ .lg-activity-calendar [data-level="1"] {
3505
+ --lg-calendar-activity: color-mix(in srgb, var(--lg-on) 14%, var(--lg-sheet-opaque));
3506
+ }
3507
+ .lg-activity-calendar [data-level="2"] {
3508
+ --lg-calendar-activity: color-mix(in srgb, var(--lg-on) 25%, var(--lg-sheet-opaque));
3509
+ }
3510
+ .lg-activity-calendar [data-level="3"] {
3511
+ --lg-calendar-activity: color-mix(in srgb, var(--lg-on) 36%, var(--lg-sheet-opaque));
3512
+ }
3513
+ .lg-activity-calendar [data-level="4"] {
3514
+ --lg-calendar-activity: color-mix(in srgb, var(--lg-on) 48%, var(--lg-sheet-opaque));
3515
+ }
3516
+ .lg-calendar-row button[data-today] {
3517
+ border-color: var(--lg-tab-accent);
3518
+ color: var(--lg-tab-accent);
3519
+ font-weight: 650;
3520
+ }
3521
+ .lg-calendar-activity-dot {
3522
+ position: absolute;
3523
+ bottom: 4px;
3524
+ width: 4px;
3525
+ height: 3px;
3526
+ border-radius: 2px;
3527
+ background: var(--lg-success-ink);
3528
+ }
3529
+ .lg-calendar-row [data-level="2"] .lg-calendar-activity-dot { width: 7px; }
3530
+ .lg-calendar-row [data-level="3"] .lg-calendar-activity-dot { width: 10px; }
3531
+ .lg-calendar-row [data-level="4"] .lg-calendar-activity-dot { width: 13px; }
3532
+ .lg-calendar-row button:hover:not(:disabled) {
3533
+ box-shadow: inset 0 0 0 1px var(--lg-surface-edge);
3534
+ background: var(--lg-highlight);
3535
+ }
3536
+ .lg-calendar-row [aria-selected="true"] button {
3537
+ color: white;
3538
+ background: var(--lg-fill);
3539
+ border-color: transparent;
3540
+ font-weight: 650;
3541
+ box-shadow: 0 2px 6px color-mix(in srgb, var(--lg-fill) 24%, transparent);
3542
+ }
3543
+ .lg-calendar-row [aria-selected="true"] .lg-calendar-activity-dot { background: white; }
3544
+ .lg-calendar-row button:disabled { cursor: default; }
3545
+ .lg-calendar-footer {
3546
+ display: flex;
3547
+ align-items: center;
3548
+ justify-content: space-between;
3549
+ flex-wrap: wrap;
3550
+ gap: 12px;
3551
+ margin-top: 16px;
3552
+ padding-top: 16px;
3553
+ border-top: 1px solid var(--lg-separator);
3554
+ color: var(--lg-secondary);
3555
+ font-size: 12px;
3556
+ }
3557
+ .lg-calendar-legend {
3558
+ display: flex;
3559
+ align-items: center;
3560
+ gap: 4px;
3561
+ }
3562
+ .lg-calendar-legend > span { margin-inline: 3px; }
3563
+ .lg-calendar-legend i {
3564
+ width: 9px;
3565
+ height: 9px;
3566
+ border-radius: 3px;
3567
+ background: var(--lg-calendar-activity, var(--lg-fill-subtle));
3568
+ box-shadow: inset 0 0 0 0.5px var(--lg-separator);
3569
+ }
3570
+ .lg-calendar-row button:focus-visible {
3571
+ outline: 2px solid var(--lg-focus-color);
3572
+ outline-offset: 2px;
3573
+ }
3574
+ .lg-chevron[data-direction="previous"], :dir(rtl).lg-chevron[data-direction="next"] { transform: rotate(180deg); }
3575
+ :dir(rtl).lg-chevron[data-direction="previous"] { transform: none; }
3576
+ .lg-pagination .lg-pagination-size {
3577
+ width: auto;
3578
+ min-width: 96px;
3579
+ flex: none;
3580
+ }
3581
+ .lg-pagination-size .lg-select-trigger {
3582
+ height: var(--lg-control-height-small);
3583
+ min-height: var(--lg-control-height-small);
3584
+ padding: 0 12px;
3585
+ gap: 8px;
3586
+ }
3587
+ .lg-pagination > .lg-button, .lg-pagination-page > .lg-button {
3588
+ min-width: var(--lg-control-height-small);
3589
+ padding-inline: 8px;
3590
+ }
3591
+ @media (max-width: 480px) {
3592
+ .lg-activity-calendar { padding: 16px; }
3593
+ .lg-calendar-header { gap: 8px; }
3594
+ .lg-calendar-header h3 { font-size: 18px; }
3595
+ .lg-calendar-row { gap: 2px; }
3596
+ .lg-pagination { justify-content: start; }
3597
+ .lg-pagination > .lg-muted { flex-basis: 100%; margin-bottom: 4px; }
3598
+ }
3599
+ @media (pointer: coarse) {
3600
+ .lg-calendar-cell, .lg-calendar-row button { min-height: 44px; }
3601
+ }
3602
+ @media (prefers-reduced-motion: reduce) {
3603
+ .lg-calendar-row button { transition: none; }
3604
+ }
3605
+ .lg-command-palette {
3606
+ display: grid;
3607
+ gap: 16px;
3608
+ }
3609
+ .lg-command-palette ul {
3610
+ list-style: none;
3611
+ padding: 0;
3612
+ margin: 0;
3613
+ max-height: min(50dvh, 360px);
3614
+ overflow-y: auto;
3615
+ }
3616
+ .lg-command-palette li > button {
3617
+ padding: 12px;
3618
+ border-radius: 12px;
3619
+ display: flex;
3620
+ align-items: center;
3621
+ justify-content: space-between;
3622
+ gap: 20px;
3623
+ width: 100%;
3624
+ background: transparent;
3625
+ border: 0;
3626
+ text-align: start;
3627
+ font: inherit;
3628
+ color: var(--lg-foreground);
3629
+ cursor: pointer;
3630
+ }
3631
+ .lg-command-palette li[aria-selected="true"] > button {
3632
+ background: var(--lg-fill-subtle);
3633
+ color: var(--lg-tab-accent);
3634
+ }
3635
+ .lg-command-palette small {
3636
+ display: block;
3637
+ font-size: 12px;
3638
+ color: var(--lg-muted);
3639
+ margin-top: 4px;
3640
+ }
3641
+ .lg-command-palette li[aria-disabled="true"] > button {
3642
+ opacity: 0.45;
3643
+ cursor: not-allowed;
3644
+ }
3645
+ .lg-workspace {
3646
+ height: 360px;
3647
+ width: 100%;
3648
+ min-width: 0;
3649
+ color: var(--lg-foreground);
3650
+ }
3651
+ .lg-workspace > [data-group] {
3652
+ height: 100%;
3653
+ }
3654
+ .lg-workspace-panel {
3655
+ height: 100%;
3656
+ display: flex;
3657
+ flex-direction: column;
3658
+ background: var(--lg-surface);
3659
+ border: 1px solid var(--lg-separator);
3660
+ border-radius: 14px;
3661
+ overflow: hidden;
3662
+ }
3663
+ .lg-workspace-panel header {
3664
+ padding: 12px 16px;
3665
+ font-size: 13px;
3666
+ font-weight: 600;
3667
+ background: var(--lg-fill-subtle);
3668
+ border-bottom: 1px solid var(--lg-separator);
3669
+ }
3670
+ .lg-workspace-panel > div {
3671
+ padding: 16px;
3672
+ overflow: auto;
3673
+ flex: 1;
3674
+ min-width: 0;
3675
+ }
3676
+ .lg-workspace-separator {
3677
+ width: 8px;
3678
+ display: flex;
3679
+ align-items: center;
3680
+ justify-content: center;
3681
+ }
3682
+ .lg-workspace-separator:after {
3683
+ content: "";
3684
+ display: block;
3685
+ height: 32px;
3686
+ width: 3px;
3687
+ border-radius: 4px;
3688
+ background: var(--lg-separator);
3689
+ }
3690
+ .lg-workspace-separator[aria-orientation="horizontal"] {
3691
+ height: 8px;
3692
+ width: 100%;
3693
+ }
3694
+ .lg-workspace-separator[aria-orientation="horizontal"]:after {
3695
+ height: 3px;
3696
+ width: 32px;
3697
+ }
3698
+ .lg-workspace-separator:focus-visible {
3699
+ outline: 2px solid var(--lg-fill);
3700
+ outline-offset: -2px;
3701
+ border-radius: 8px;
3702
+ }
3703
+ .lg-workspace-tools {
3704
+ display: flex;
3705
+ justify-content: end;
3706
+ margin-bottom: 8px;
3707
+ }
3708
+ .lg-workspace {
3709
+ display: flex;
3710
+ flex-direction: column;
3711
+ }
3712
+ .lg-typography[data-truncate] { display: inline-block; max-width: 100%; vertical-align: bottom; }
3713
+
3714
+ /* 控件共用视觉语言,导航、图形与内容展示仍保留各自的信息层级。 */
3715
+ :where(.lg-button, .lg-input, .lg-select, .lg-textarea, .lg-choice, .lg-floating,
3716
+ .lg-dialog, .lg-tabs, .lg-data-table, .lg-pagination, .lg-field, .lg-typography) {
3717
+ font-family: var(--lg-font-family);
3718
+ font-optical-sizing: auto;
3719
+ }
3720
+ [data-lg-density="comfortable"] {
3721
+ --lg-control-height: var(--lg-control-height-regular);
3722
+ }
3723
+ [data-lg-density="compact"] {
3724
+ --lg-control-height: var(--lg-control-height-small);
3725
+ }
3726
+ .lg-button > svg, .lg-input-icon, .lg-select-trigger svg {
3727
+ width: 16px;
3728
+ height: 16px;
3729
+ }
3730
+ .lg-select-trigger:disabled, .lg-choice[data-disabled],
3731
+ .lg-choice:has(:disabled), .lg-textarea[data-disabled],
3732
+ .lg-tabs-list button:disabled, .lg-select-option[aria-disabled="true"] {
3733
+ opacity: var(--lg-disabled-opacity);
3734
+ }
3735
+ .lg-button:focus-visible, .lg-select-trigger:focus-visible,
3736
+ .lg-input-clear:focus-visible, .lg-dismiss:focus-visible,
3737
+ .lg-table-scroll:focus-visible,
3738
+ .lg-floating:focus-visible, .lg-tabs-panel:focus-visible {
3739
+ outline: 2px solid var(--lg-focus-color);
3740
+ outline-offset: 3px;
3741
+ }
3742
+ .lg-input:has(input:focus-visible), .lg-textarea:has(textarea:focus-visible),
3743
+ .lg-choice-input:focus-visible + .lg-choice-control {
3744
+ outline: 2px solid var(--lg-focus-color);
3745
+ outline-offset: 3px;
3746
+ }
3747
+ .lg-input:has(input[aria-invalid="true"]) {
3748
+ outline: 2px solid var(--lg-destructive-ink);
3749
+ outline-offset: 3px;
3750
+ }
3751
+ .lg-tabs-list button:focus-visible, .lg-tree li:focus-visible > .lg-tree-row,
3752
+ .lg-calendar-row button:focus-visible, .lg-workspace-separator:focus-visible {
3753
+ outline-color: var(--lg-focus-color);
3754
+ }
3755
+ .lg-input:has(input:disabled) input {
3756
+ cursor: not-allowed;
3757
+ }
3758
+ .lg-input input[type="date"] {
3759
+ color-scheme: light dark;
3760
+ }
3761
+ [data-theme="light"] .lg-input input[type="date"] { color-scheme: light; }
3762
+ [data-theme="dark"] .lg-input input[type="date"] { color-scheme: dark; }
3763
+ .lg-floating, .lg-upload, .lg-dialog-panel { border-radius: var(--lg-radius-panel); }
3764
+ .lg-select-option, .lg-tree-row { border-radius: var(--lg-radius-item); }
3765
+ .lg-dialog-panel { max-height: calc(100dvh - 48px); display: flex; flex-direction: column; }
3766
+ .lg-dialog-header, .lg-dialog-footer { flex-shrink: 0; }
3767
+ .lg-dialog-content { overflow-y: auto; overscroll-behavior: contain; }
3768
+ .lg-table, .lg-pagination { font-variant-numeric: tabular-nums; }
3769
+ .lg-drawer-end .lg-dialog-panel { animation-name: lg-drawer-enter-end; max-height: 100%; }
3770
+ .lg-drawer-start .lg-dialog-panel { animation-name: lg-drawer-enter-start; max-height: 100%; }
3771
+ :dir(rtl).lg-drawer-end .lg-dialog-panel { animation-name: lg-drawer-enter-start; }
3772
+ :dir(rtl).lg-drawer-start .lg-dialog-panel { animation-name: lg-drawer-enter-end; }
3773
+ @keyframes lg-drawer-enter-end { from { opacity: 0; transform: translateX(20px); } }
3774
+ @keyframes lg-drawer-enter-start { from { opacity: 0; transform: translateX(-20px); } }
3775
+
3776
+ @media (pointer: coarse) {
3777
+ :root, [data-theme], [data-lg-density] {
3778
+ --lg-control-height: 44px;
3779
+ --lg-control-height-small: 44px;
3780
+ }
3781
+ .lg-choice { min-height: 44px; align-items: center; }
3782
+ .lg-choice-control { margin-top: 0; }
3783
+ .lg-choice-input { top: 50%; margin-top: 0; translate: 0 -50%; }
3784
+ .lg-input input, .lg-textarea textarea { font-size: 16px; }
3785
+ }
3786
+ @media (prefers-reduced-motion: reduce) {
3787
+ .lg-dialog-panel, .lg-floating, .lg-toast { animation: none !important; }
3788
+ }
3789
+ /* 用户要求更清晰的材质时,表面和浮层一起退化为实色,不能只关闭玻璃容器的折射。 */
3790
+ @media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
3791
+ .lg-glass, .lg-dialog-panel, .lg-table-scroll, .lg-workspace-panel {
3792
+ background-color: var(--lg-sheet-opaque);
3793
+ backdrop-filter: none;
3794
+ -webkit-backdrop-filter: none;
3795
+ }
3796
+ .lg-glass::before, .lg-glass::after { display: none; }
3797
+ .lg-dialog-panel, .lg-table-scroll { border-color: var(--lg-secondary); }
3798
+ }
3799
+ @media (forced-colors: active) {
3800
+ .lg-dialog-panel, .lg-table-scroll, .lg-tabs-list, .lg-workspace-panel {
3801
+ border: 1px solid CanvasText;
3802
+ background: Canvas;
3803
+ }
3804
+ }