@pathmx/player 0.5.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.
package/play.css ADDED
@@ -0,0 +1,1052 @@
1
+ [data-pmx-augmentations] > [data-pmx-augmentation="player"] {
2
+ display: contents;
3
+ }
4
+
5
+ /* Compact Player chrome and shared settings composition. */
6
+ .pmx-play-chrome {
7
+ --pmx-ui-accent: var(--pmx-color-accent, #2563eb);
8
+ --pmx-ui-bg: var(--pmx-color-bg, Canvas);
9
+ --pmx-ui-fg: var(--pmx-color-fg, CanvasText);
10
+ --pmx-ui-surface: var(--pmx-color-surface, Canvas);
11
+ --pmx-ui-border: var(--pmx-color-border, #d4d4d8);
12
+ --pmx-ui-destructive: var(--pmx-color-danger, #b91c1c);
13
+ position: fixed;
14
+ z-index: 1000;
15
+ right: max(1rem, env(safe-area-inset-right));
16
+ bottom: max(1rem, env(safe-area-inset-bottom));
17
+ display: flex;
18
+ align-items: flex-end;
19
+ gap: 0.5rem;
20
+ color: var(--pmx-ui-fg);
21
+ font: 560 0.875rem/1.2 var(--pmx-font-body, system-ui, sans-serif);
22
+ pointer-events: none;
23
+ }
24
+
25
+ .pmx-play-chrome
26
+ :where(button, [data-slot="popover-trigger"], [data-slot="drawer-trigger"]) {
27
+ pointer-events: auto;
28
+ }
29
+
30
+ .pmx-play-launcher {
31
+ width: 2.5rem !important;
32
+ height: 2.5rem !important;
33
+ min-width: 2.5rem;
34
+ min-height: 2.5rem;
35
+ }
36
+
37
+ .pmx-play-exit {
38
+ display: none;
39
+ pointer-events: auto;
40
+ }
41
+
42
+ .pmx-play-controls-trigger {
43
+ opacity: 0;
44
+ transform: translateY(0.35rem) scale(0.92);
45
+ transition:
46
+ opacity 160ms ease,
47
+ transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
48
+ }
49
+
50
+ .pmx-play-chrome[data-pmx-play-visible] .pmx-play-controls-trigger,
51
+ .pmx-play-controls-trigger[aria-pressed="true"],
52
+ .pmx-play-controls-trigger:focus-visible {
53
+ opacity: 1;
54
+ transform: translateY(0) scale(1);
55
+ }
56
+
57
+ .pmx-play-chrome:not([data-pmx-play-visible])
58
+ .pmx-play-controls-trigger:not(:focus-visible) {
59
+ pointer-events: none;
60
+ }
61
+
62
+ .pmx-play-actions {
63
+ position: absolute;
64
+ right: 0;
65
+ bottom: 3rem;
66
+ display: flex;
67
+ max-width: min(26rem, calc(100vw - 2rem));
68
+ gap: 0.4rem;
69
+ overflow-x: auto;
70
+ scrollbar-width: none;
71
+ pointer-events: auto;
72
+ }
73
+
74
+ .pmx-play-actions::-webkit-scrollbar {
75
+ display: none;
76
+ }
77
+
78
+ .pmx-play-actions [data-slot="button"] {
79
+ max-width: 18rem;
80
+ min-height: 2.5rem;
81
+ flex: none;
82
+ color: var(--pmx-ui-fg);
83
+ background: var(--pmx-ui-surface);
84
+ box-shadow: 0 4px 12px rgb(0 0 0 / 14%);
85
+ }
86
+
87
+ .pmx-play-actions span {
88
+ overflow: hidden;
89
+ text-overflow: ellipsis;
90
+ }
91
+
92
+ .pmx-play-actions kbd {
93
+ opacity: 0.58;
94
+ font: inherit;
95
+ font-size: 0.72rem;
96
+ }
97
+
98
+ .pmx-play-progressbar[hidden] {
99
+ display: none;
100
+ }
101
+
102
+ .pmx-play-progressbar {
103
+ position: fixed;
104
+ z-index: 1003;
105
+ inset-block-start: 0;
106
+ inset-inline: 0;
107
+ height: 3px;
108
+ overflow: hidden;
109
+ background: color-mix(
110
+ in oklab,
111
+ var(--pmx-color-accent, #3897ff) 20%,
112
+ transparent
113
+ );
114
+ pointer-events: none;
115
+ }
116
+
117
+ .pmx-play-progressbar > [data-pmx-play-progress-fill] {
118
+ display: block;
119
+ width: 100%;
120
+ height: 100%;
121
+ background: var(--pmx-color-accent, #3897ff);
122
+ transform: scaleX(var(--pmx-play-progress, 0));
123
+ transform-origin: left center;
124
+ transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
125
+ }
126
+
127
+ .pmx-play-progressbar[data-mode="presentation"] {
128
+ inset-block-start: calc(env(safe-area-inset-top) + 0.75rem);
129
+ inset-inline-start: max(1rem, env(safe-area-inset-left));
130
+ inset-inline-end: max(1rem, env(safe-area-inset-right));
131
+ height: 4px;
132
+ overflow: visible;
133
+ background: transparent;
134
+ }
135
+
136
+ .pmx-play-progress-blocks,
137
+ .pmx-play-progress-block {
138
+ display: flex;
139
+ min-width: 0;
140
+ height: 100%;
141
+ }
142
+
143
+ .pmx-play-progress-blocks {
144
+ gap: var(--pmx-play-block-gap, 5px);
145
+ }
146
+
147
+ .pmx-play-progress-block {
148
+ position: relative;
149
+ min-width: 0;
150
+ flex: 1 1 0;
151
+ overflow: hidden;
152
+ border-radius: 999px;
153
+ background: color-mix(
154
+ in oklab,
155
+ var(--pmx-color-accent, #3897ff) 20%,
156
+ transparent
157
+ );
158
+ transition: box-shadow 180ms ease;
159
+ }
160
+
161
+ [data-pmx-play-progress-block-fill] {
162
+ display: block;
163
+ width: 100%;
164
+ height: 100%;
165
+ background: var(--pmx-color-accent, #3897ff);
166
+ transform: scaleX(var(--pmx-play-block-progress, 0));
167
+ transform-origin: left center;
168
+ transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
169
+ }
170
+
171
+ .pmx-play-progress-block[data-state="current"] {
172
+ box-shadow: 0 0 0.4rem
173
+ color-mix(in oklab, var(--pmx-color-accent, #3897ff) 55%, transparent);
174
+ }
175
+
176
+ .pmx-play-progress-block[data-state="current"]
177
+ [data-pmx-play-progress-block-fill] {
178
+ background: color-mix(in oklab, var(--pmx-color-accent, #3897ff) 72%, white);
179
+ }
180
+
181
+ .pmx-ui-popover-content,
182
+ .pmx-ui-drawer-popup,
183
+ .pmx-ui-select-content {
184
+ --pmx-ui-accent: var(--pmx-color-accent, #2563eb);
185
+ --pmx-ui-bg: var(--pmx-color-bg, Canvas);
186
+ --pmx-ui-fg: var(--pmx-color-fg, CanvasText);
187
+ --pmx-ui-surface: var(--pmx-color-surface, Canvas);
188
+ --pmx-ui-border: var(--pmx-color-border, #d4d4d8);
189
+ --pmx-ui-destructive: var(--pmx-color-danger, #b91c1c);
190
+ font: 540 0.875rem/1.25 var(--pmx-font-body, system-ui, sans-serif);
191
+ }
192
+
193
+ .pmx-ui-popover-header {
194
+ position: absolute;
195
+ }
196
+
197
+ .pmx-ui-popover-title {
198
+ position: absolute;
199
+ width: 1px;
200
+ height: 1px;
201
+ overflow: hidden;
202
+ clip: rect(0 0 0 0);
203
+ }
204
+
205
+ .pmx-play-panel-actions {
206
+ display: grid;
207
+ grid-template-columns: repeat(4, minmax(0, 1fr));
208
+ gap: 0.55rem;
209
+ padding-block-end: 0.85rem;
210
+ }
211
+
212
+ .pmx-play-panel-action {
213
+ display: grid;
214
+ justify-items: center;
215
+ gap: 0.45rem;
216
+ }
217
+
218
+ .pmx-play-panel-action > span {
219
+ color: var(--pmx-ui-muted, var(--pmx-color-muted, currentColor));
220
+ font-size: 0.76rem;
221
+ white-space: nowrap;
222
+ }
223
+
224
+ .pmx-play-panel-actions .pmx-ui-action-button {
225
+ width: 2.75rem;
226
+ height: 2.75rem;
227
+ }
228
+
229
+ .pmx-play-panel-actions .pmx-ui-action-button[aria-pressed="true"] {
230
+ color: var(--pmx-ui-accent);
231
+ }
232
+
233
+ .pmx-play-settings-scroll {
234
+ min-height: 0;
235
+ }
236
+
237
+ .pmx-play-setting,
238
+ .pmx-play-switch-row {
239
+ box-sizing: border-box;
240
+ display: grid;
241
+ grid-template-columns: 5.75rem minmax(0, 1fr);
242
+ align-items: center;
243
+ gap: 0.65rem;
244
+ min-height: 3.05rem;
245
+ padding-block: 0.42rem;
246
+ }
247
+
248
+ .pmx-play-setting > span,
249
+ .pmx-play-switch-row > span:first-child {
250
+ font-weight: 620;
251
+ }
252
+
253
+ .pmx-play-setting > div {
254
+ min-width: 0;
255
+ }
256
+
257
+ .pmx-play-switch-row {
258
+ grid-template-columns: minmax(0, 1fr) auto auto;
259
+ cursor: pointer;
260
+ }
261
+
262
+ .pmx-play-switch-value {
263
+ color: var(--pmx-ui-muted, var(--pmx-color-muted, currentColor));
264
+ font-weight: 450;
265
+ }
266
+
267
+ .pmx-play-guide {
268
+ position: fixed;
269
+ z-index: 80;
270
+ inset: 0;
271
+ opacity: 0;
272
+ pointer-events: none;
273
+ transition: opacity 180ms ease;
274
+ }
275
+
276
+ .pmx-play-guide[data-visible="true"] {
277
+ opacity: 1;
278
+ }
279
+
280
+ [data-pmx-play-guide-bar] {
281
+ position: fixed;
282
+ left: var(--pmx-guide-left);
283
+ top: var(--pmx-guide-top);
284
+ width: 3px;
285
+ height: var(--pmx-guide-height);
286
+ min-height: 0.9rem;
287
+ border-radius: 999px;
288
+ background: var(--pmx-color-accent, #3897ff);
289
+ box-shadow: 0 0 0.5rem
290
+ color-mix(in oklab, var(--pmx-color-accent) 30%, transparent);
291
+ transition:
292
+ left 260ms cubic-bezier(0.22, 1, 0.36, 1),
293
+ top 260ms cubic-bezier(0.22, 1, 0.36, 1),
294
+ height 260ms cubic-bezier(0.22, 1, 0.36, 1);
295
+ }
296
+
297
+ [data-pmx-play-guide-highlight] {
298
+ position: fixed;
299
+ left: var(--pmx-guide-target-left);
300
+ top: var(--pmx-guide-top);
301
+ width: var(--pmx-guide-target-width);
302
+ height: var(--pmx-guide-height);
303
+ border-radius: 0.35rem;
304
+ background: color-mix(
305
+ in oklab,
306
+ var(--pmx-color-accent, #3897ff) 12%,
307
+ transparent
308
+ );
309
+ opacity: 0;
310
+ transition:
311
+ left 260ms cubic-bezier(0.22, 1, 0.36, 1),
312
+ top 260ms cubic-bezier(0.22, 1, 0.36, 1),
313
+ width 260ms cubic-bezier(0.22, 1, 0.36, 1),
314
+ height 260ms cubic-bezier(0.22, 1, 0.36, 1),
315
+ opacity 180ms ease;
316
+ }
317
+
318
+ .pmx-play-guide:is([data-highlight="row"], [data-highlight="code"])
319
+ [data-pmx-play-guide-highlight] {
320
+ opacity: 1;
321
+ }
322
+
323
+ html[data-pmx-play-guide-tracking]
324
+ :is([data-pmx-play-guide-bar], [data-pmx-play-guide-highlight]) {
325
+ transition: none;
326
+ }
327
+
328
+ html[data-pmx-play-scrolling] .pmx-play-guide,
329
+ html[data-pmx-play-scrolling] .pmx-play-actions {
330
+ opacity: 0;
331
+ pointer-events: none;
332
+ }
333
+
334
+ html[data-pmx-play-active]
335
+ [data-pmx-view]
336
+ *:has(.pmx-document)
337
+ > :not(:has(.pmx-document)):not(.pmx-document):not(
338
+ [data-component="player:app"]
339
+ ) {
340
+ display: none !important;
341
+ }
342
+
343
+ html[data-pmx-play-active]
344
+ [data-pmx-view]
345
+ > :not(:has(.pmx-document)):not([data-component="player:app"]) {
346
+ display: none !important;
347
+ }
348
+
349
+ html[data-pmx-play-active] [data-pmx-view] *:has(.pmx-document) {
350
+ width: 100%;
351
+ max-width: none;
352
+ grid-template-columns: minmax(0, 1fr) !important;
353
+ margin: 0;
354
+ padding: 0;
355
+ }
356
+
357
+ html[data-pmx-play-active] .pmx-document {
358
+ box-sizing: border-box;
359
+ padding: 0;
360
+ }
361
+
362
+ /* Focus spotlight and Beat state. */
363
+ .pmx-document[data-pmx-play-intensity="low"] {
364
+ --pmx-play-seen-opacity: 1;
365
+ --pmx-play-upcoming-opacity: 1;
366
+ --pmx-play-seen-block-opacity: 1;
367
+ --pmx-play-upcoming-block-opacity: 1;
368
+ }
369
+
370
+ .pmx-document[data-pmx-play-intensity="medium"] {
371
+ --pmx-play-seen-opacity: 0.58;
372
+ --pmx-play-upcoming-opacity: 0.2;
373
+ --pmx-play-seen-block-opacity: 0.46;
374
+ --pmx-play-upcoming-block-opacity: 0.22;
375
+ }
376
+
377
+ .pmx-document[data-pmx-play-intensity="high"] {
378
+ --pmx-play-seen-opacity: 0.34;
379
+ --pmx-play-upcoming-opacity: 0;
380
+ --pmx-play-seen-block-opacity: 0.3;
381
+ --pmx-play-upcoming-block-opacity: 0;
382
+ }
383
+
384
+ .pmx-document[data-pmx-play] [data-pmx-play-state] {
385
+ transition:
386
+ opacity 220ms ease,
387
+ filter 220ms ease;
388
+ }
389
+
390
+ .pmx-document[data-pmx-play] [data-pmx-play-state="upcoming"] {
391
+ opacity: var(--pmx-play-upcoming-opacity);
392
+ }
393
+
394
+ .pmx-document[data-pmx-play] [data-pmx-play-state="seen"] {
395
+ opacity: var(--pmx-play-seen-opacity);
396
+ }
397
+
398
+ .pmx-document[data-pmx-play] [data-pmx-play-state="active"],
399
+ .pmx-document[data-pmx-play] [data-pmx-play-target-active] {
400
+ opacity: 1 !important;
401
+ }
402
+
403
+ .pmx-document[data-pmx-play]
404
+ [data-pmx-beats="explicit"]
405
+ > :not([data-pmx-beat]) {
406
+ opacity: var(--pmx-play-upcoming-opacity);
407
+ }
408
+
409
+ html[data-pmx-play-scrolling] .pmx-document [data-pmx-play-state],
410
+ html[data-pmx-play-scrolling] .pmx-document > section[data-pmx-play-block],
411
+ html[data-pmx-play-scrolling] .pmx-document [data-pmx-beats="explicit"] > * {
412
+ opacity: 1;
413
+ transform: none;
414
+ }
415
+
416
+ html[data-pmx-play-mode="presentation"] {
417
+ scroll-padding-block: 0;
418
+ scroll-snap-type: block mandatory;
419
+ }
420
+
421
+ html[data-pmx-play-programmatic-scroll] {
422
+ scroll-snap-type: none !important;
423
+ }
424
+
425
+ /* Native slide stage and Block layouts. */
426
+ .pmx-document[data-pmx-play="presentation"] {
427
+ --pmx-slide-bg: var(--pmx-color-bg);
428
+ --pmx-slide-fg: var(--pmx-color-fg);
429
+ --pmx-slide-muted: var(--pmx-color-muted);
430
+ --pmx-slide-accent: var(--pmx-color-accent);
431
+ --pmx-slide-surface: var(--pmx-color-surface);
432
+ --pmx-slide-font-body: var(--pmx-font-body);
433
+ --pmx-slide-font-heading: var(--pmx-font-heading);
434
+ --pmx-slide-font-mono: var(--pmx-font-mono);
435
+ --pmx-slide-padding: clamp(2.5rem, 7vw, 6.5rem);
436
+ --pmx-slide-gap: clamp(1rem, 2.5vw, 2rem);
437
+ --pmx-slide-title-size: clamp(3.25rem, 8vw, 7rem);
438
+ --pmx-slide-body-size: clamp(1.05rem, 1.65vw, 1.45rem);
439
+ --pmx-slide-code-size: clamp(0.85rem, 1.25vw, 1.15rem);
440
+ --pmx-slide-media-radius: 0.9rem;
441
+ width: 100%;
442
+ max-width: none;
443
+ color: var(--pmx-slide-fg);
444
+ background: var(--pmx-slide-bg);
445
+ font-family: var(--pmx-slide-font-body);
446
+ font-size: var(--pmx-slide-body-size);
447
+ }
448
+
449
+ .pmx-document[data-pmx-play="presentation"] > section[data-pmx-block] {
450
+ position: relative;
451
+ box-sizing: border-box;
452
+ display: flex;
453
+ width: 100%;
454
+ height: 100vh;
455
+ height: 100dvh;
456
+ min-height: 100vh;
457
+ min-height: 100dvh;
458
+ flex-direction: column;
459
+ justify-content: center;
460
+ gap: var(--pmx-slide-gap);
461
+ margin: 0;
462
+ padding: var(--pmx-slide-padding);
463
+ overflow-x: hidden;
464
+ overflow-y: auto;
465
+ overscroll-behavior: contain;
466
+ border: 0;
467
+ color: var(--pmx-slide-fg);
468
+ background: var(--pmx-slide-bg);
469
+ isolation: isolate;
470
+ scroll-snap-align: start;
471
+ scroll-snap-stop: always;
472
+ transition:
473
+ opacity 220ms ease,
474
+ transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
475
+ }
476
+
477
+ [data-pmx-play-snap-end] {
478
+ position: absolute;
479
+ inset-inline-start: 0;
480
+ inset-block-end: 0;
481
+ width: 1px;
482
+ height: 1px;
483
+ pointer-events: none;
484
+ scroll-snap-align: end;
485
+ scroll-snap-stop: always;
486
+ }
487
+
488
+ .pmx-document[data-pmx-play="presentation"]
489
+ > section[data-pmx-play-block="seen"] {
490
+ opacity: var(--pmx-play-seen-block-opacity);
491
+ }
492
+
493
+ .pmx-document[data-pmx-play="presentation"]
494
+ > section[data-pmx-play-block="upcoming"] {
495
+ opacity: var(--pmx-play-upcoming-block-opacity);
496
+ }
497
+
498
+ /* A non-active slide owns its fade as one unit. Beat opacity remains useful
499
+ only inside the active slide; multiplying both would erase viewed slides. */
500
+ .pmx-document[data-pmx-play="presentation"]
501
+ > section:not([data-pmx-play-block="active"])
502
+ [data-pmx-play-state] {
503
+ opacity: 1;
504
+ }
505
+
506
+ .pmx-document[data-pmx-play="presentation"]
507
+ > section[data-pmx-play-block="active"] {
508
+ opacity: 1;
509
+ }
510
+
511
+ .pmx-document[data-pmx-play="presentation"] :is(h1, h2, h3) {
512
+ max-width: 18ch;
513
+ margin-block: 0;
514
+ color: var(--pmx-slide-fg);
515
+ font-family: var(--pmx-slide-font-heading);
516
+ text-wrap: balance;
517
+ }
518
+
519
+ .pmx-document[data-pmx-play="presentation"] h1 {
520
+ font-size: var(--pmx-slide-title-size);
521
+ line-height: 0.96;
522
+ letter-spacing: -0.045em;
523
+ }
524
+
525
+ .pmx-document[data-pmx-play="presentation"] h2 {
526
+ font-size: clamp(1.6rem, 3.5vw, 3.25rem);
527
+ line-height: 1.05;
528
+ }
529
+
530
+ .pmx-document[data-pmx-play="presentation"] :is(p, li) {
531
+ max-width: 62ch;
532
+ line-height: 1.5;
533
+ }
534
+
535
+ .pmx-document[data-pmx-play="presentation"]
536
+ :is(table, pre, figure, img, video, iframe, .pmx-code-block) {
537
+ max-width: 100%;
538
+ }
539
+
540
+ .pmx-document[data-pmx-play="presentation"] :is(pre, code) {
541
+ font-family: var(--pmx-slide-font-mono);
542
+ font-size: var(--pmx-slide-code-size);
543
+ }
544
+
545
+ .pmx-document[data-pmx-play="presentation"] :is(img, video, iframe) {
546
+ max-height: 62dvh;
547
+ border-radius: var(--pmx-slide-media-radius);
548
+ object-fit: contain;
549
+ }
550
+
551
+ .pmx-document[data-pmx-play="presentation"]
552
+ > section[data-pmx-block]
553
+ > [data-pmx-play-media-frame] {
554
+ max-width: none;
555
+ margin: 0;
556
+ }
557
+
558
+ .pmx-document[data-pmx-play="presentation"]
559
+ > section[data-pmx-block]
560
+ > [data-pmx-play-media-frame][data-pmx-play-fit="contain"],
561
+ .pmx-document[data-pmx-play="presentation"]
562
+ > section[data-pmx-block]
563
+ > [data-pmx-play-media-frame][data-pmx-play-fit="cover"] {
564
+ display: grid;
565
+ width: 100%;
566
+ min-height: 0;
567
+ flex: 1;
568
+ place-items: center;
569
+ overflow: hidden;
570
+ }
571
+
572
+ .pmx-document[data-pmx-play="presentation"]
573
+ > section[data-pmx-block]
574
+ > [data-pmx-play-media-frame][data-pmx-play-fit="contain"]
575
+ > img,
576
+ .pmx-document[data-pmx-play="presentation"]
577
+ > section[data-pmx-block]
578
+ > [data-pmx-play-media-frame][data-pmx-play-fit="cover"]
579
+ > img {
580
+ width: 100%;
581
+ height: 100%;
582
+ min-height: 0;
583
+ max-height: 100%;
584
+ }
585
+
586
+ .pmx-document[data-pmx-play="presentation"]
587
+ > section[data-pmx-block]
588
+ > [data-pmx-play-media-frame][data-pmx-play-fit="contain"]
589
+ > img {
590
+ object-fit: contain;
591
+ }
592
+
593
+ .pmx-document[data-pmx-play="presentation"]
594
+ > section[data-pmx-block]
595
+ > [data-pmx-play-media-frame][data-pmx-play-fit="cover"]
596
+ > img {
597
+ object-fit: cover;
598
+ }
599
+
600
+ .pmx-document[data-pmx-play="presentation"]
601
+ > section[data-pmx-block]:has(
602
+ > [data-pmx-play-media-frame][data-pmx-play-media="content"][data-pmx-play-fit="cover"]
603
+ ):not(
604
+ :has(
605
+ > :not(
606
+ [data-pmx-play-media-frame][data-pmx-play-media="content"][data-pmx-play-fit="cover"]
607
+ ):not([data-pmx-play-snap-end])
608
+ )
609
+ ) {
610
+ padding: 0;
611
+ }
612
+
613
+ .pmx-document[data-pmx-play="presentation"]
614
+ > section[data-pmx-block]
615
+ > [data-pmx-play-media-frame][data-pmx-play-media="background"] {
616
+ position: absolute;
617
+ z-index: -1;
618
+ inset: 0;
619
+ width: 100%;
620
+ height: 100%;
621
+ border-radius: 0;
622
+ }
623
+
624
+ .pmx-document[data-pmx-play="presentation"]
625
+ > section[data-pmx-block]
626
+ > [data-pmx-play-media-frame][data-pmx-play-media="background"]
627
+ > img {
628
+ width: 100%;
629
+ height: 100%;
630
+ max-height: none;
631
+ border-radius: 0;
632
+ }
633
+
634
+ .pmx-document[data-pmx-play="presentation"] table {
635
+ color: inherit;
636
+ background: var(--pmx-slide-surface);
637
+ }
638
+
639
+ .pmx-document[data-pmx-play="presentation"]
640
+ > section[data-pmx-play-variant="cover"],
641
+ .pmx-document[data-pmx-play="presentation"]
642
+ > section[data-pmx-block-layout="center"],
643
+ .pmx-document[data-pmx-play="presentation"]
644
+ > section[data-pmx-play-variant="section"],
645
+ .pmx-document[data-pmx-play="presentation"]
646
+ > section[data-pmx-play-variant="end"] {
647
+ align-items: center;
648
+ text-align: center;
649
+ }
650
+
651
+ .pmx-document[data-pmx-play="presentation"]
652
+ > section[data-pmx-play-variant="quote"]
653
+ blockquote {
654
+ max-width: 20ch;
655
+ border: 0;
656
+ color: var(--pmx-slide-fg);
657
+ font-family: var(--pmx-slide-font-heading);
658
+ font-size: clamp(2rem, 5vw, 4.5rem);
659
+ line-height: 1.08;
660
+ }
661
+
662
+ .pmx-document[data-pmx-play="presentation"]
663
+ > section[data-pmx-play-variant="fact"]
664
+ :is(h1, h2) {
665
+ max-width: 12ch;
666
+ color: var(--pmx-slide-accent);
667
+ font-size: clamp(4rem, 12vw, 11rem);
668
+ }
669
+
670
+ .pmx-document[data-pmx-play="presentation"]
671
+ > section:is(
672
+ [data-pmx-block-layout="media-start"],
673
+ [data-pmx-block-layout="media-end"]
674
+ ) {
675
+ display: grid;
676
+ align-content: center;
677
+ }
678
+
679
+ .pmx-document[data-pmx-play="presentation"]
680
+ > section[data-pmx-play-variant="full"] {
681
+ padding: 0;
682
+ }
683
+
684
+ /* Built-in Player theme tokens. */
685
+ .pmx-document[data-pmx-play="presentation"][data-pmx-play-theme="editorial"] {
686
+ --pmx-slide-bg: oklch(0.96 0.025 78);
687
+ --pmx-slide-fg: oklch(0.25 0.025 52);
688
+ --pmx-slide-muted: oklch(0.5 0.025 55);
689
+ --pmx-slide-accent: oklch(0.57 0.13 35);
690
+ --pmx-slide-surface: oklch(0.91 0.03 76);
691
+ --pmx-slide-font-body: Georgia, "Times New Roman", serif;
692
+ --pmx-slide-font-heading: Georgia, "Times New Roman", serif;
693
+ --pmx-slide-media-radius: 0.25rem;
694
+ }
695
+
696
+ .pmx-document[data-pmx-play="presentation"][data-pmx-play-theme="signal"] {
697
+ --pmx-slide-bg: oklch(0.15 0.018 250);
698
+ --pmx-slide-fg: oklch(0.97 0.005 250);
699
+ --pmx-slide-muted: oklch(0.62 0.025 250);
700
+ --pmx-slide-accent: oklch(0.68 0.18 251);
701
+ --pmx-slide-surface: oklch(0.2 0.022 250);
702
+ --pmx-slide-font-body: Inter, ui-sans-serif, system-ui, sans-serif;
703
+ --pmx-slide-font-heading: Inter, ui-sans-serif, system-ui, sans-serif;
704
+ --pmx-slide-title-size: clamp(3.5rem, 8.5vw, 7.5rem);
705
+ }
706
+
707
+ .pmx-document[data-pmx-play="presentation"][data-pmx-play-theme="code"] {
708
+ --pmx-slide-bg: oklch(0.13 0.025 270);
709
+ --pmx-slide-fg: oklch(0.94 0.015 250);
710
+ --pmx-slide-muted: oklch(0.66 0.035 255);
711
+ --pmx-slide-accent: oklch(0.76 0.16 170);
712
+ --pmx-slide-surface: oklch(0.18 0.035 268);
713
+ --pmx-slide-font-body: ui-sans-serif, system-ui, sans-serif;
714
+ --pmx-slide-font-heading: ui-monospace, SFMono-Regular, Menlo, monospace;
715
+ --pmx-slide-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
716
+ --pmx-slide-code-size: clamp(1rem, 1.55vw, 1.35rem);
717
+ }
718
+
719
+ .pmx-document[data-pmx-play="focus"] [data-pmx-play-target-active] {
720
+ scroll-margin-block: 20dvh;
721
+ }
722
+
723
+ /* Block grid is a temporary projection of the rendered document. The real
724
+ Blocks become the cards, so authored content and live components cannot
725
+ drift from a separate thumbnail renderer. */
726
+ html[data-pmx-play-grid] {
727
+ overflow-x: clip;
728
+ overflow-y: auto;
729
+ scroll-snap-type: none;
730
+ }
731
+
732
+ html[data-pmx-play-grid] .pmx-play-guide {
733
+ display: none;
734
+ }
735
+
736
+ html[data-pmx-play-grid] .pmx-document[data-pmx-play] {
737
+ display: grid;
738
+ grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
739
+ align-items: start;
740
+ gap: clamp(0.85rem, 2vw, 1.5rem);
741
+ box-sizing: border-box;
742
+ width: 100%;
743
+ max-width: 90rem !important;
744
+ min-height: 100dvh;
745
+ margin-inline: auto;
746
+ padding: clamp(3.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem) 6rem;
747
+ }
748
+
749
+ html[data-pmx-play-grid]
750
+ .pmx-document[data-pmx-play]
751
+ > section[data-pmx-block] {
752
+ --pmx-slide-padding: clamp(1rem, 2.5vw, 2rem);
753
+ --pmx-slide-gap: clamp(0.55rem, 1.2vw, 1rem);
754
+ --pmx-slide-title-size: clamp(1.8rem, 3.5vw, 3.5rem);
755
+ --pmx-slide-body-size: clamp(0.75rem, 1.15vw, 1rem);
756
+ --pmx-slide-code-size: clamp(0.66rem, 1vw, 0.9rem);
757
+ position: relative;
758
+ box-sizing: border-box;
759
+ width: 100%;
760
+ height: auto !important;
761
+ min-height: clamp(14rem, 26vw, 24rem) !important;
762
+ max-height: 26rem;
763
+ aspect-ratio: 16 / 10;
764
+ margin-block: 0 !important;
765
+ padding: var(--pmx-slide-padding) !important;
766
+ overflow: hidden !important;
767
+ overscroll-behavior: auto !important;
768
+ touch-action: pan-y;
769
+ border: 1px solid
770
+ color-mix(in oklab, var(--pmx-color-border, currentColor) 72%, transparent);
771
+ border-radius: 0.9rem;
772
+ outline: 2px solid transparent;
773
+ outline-offset: 3px;
774
+ color: var(--pmx-slide-fg, var(--pmx-color-fg));
775
+ background: var(
776
+ --pmx-slide-bg,
777
+ var(--pmx-color-surface, var(--pmx-color-bg))
778
+ );
779
+ box-shadow: 0 0.65rem 1.8rem rgb(0 0 0 / 10%);
780
+ opacity: 0.7 !important;
781
+ cursor: pointer;
782
+ scroll-snap-align: none;
783
+ transition:
784
+ opacity 160ms ease,
785
+ outline-color 160ms ease,
786
+ box-shadow 180ms ease;
787
+ }
788
+
789
+ html[data-pmx-play-grid]
790
+ .pmx-document[data-pmx-play]
791
+ > section[data-pmx-play-grid-block="seen"] {
792
+ opacity: 0.82 !important;
793
+ }
794
+
795
+ html[data-pmx-play-grid]
796
+ .pmx-document[data-pmx-play]
797
+ > section[data-pmx-play-grid-block="current"] {
798
+ outline-color: var(--pmx-color-accent, #3897ff);
799
+ box-shadow:
800
+ 0 0 0 1px color-mix(in oklab, var(--pmx-color-accent) 35%, transparent),
801
+ 0 0.8rem 2rem rgb(0 0 0 / 14%);
802
+ opacity: 1 !important;
803
+ }
804
+
805
+ html[data-pmx-play-grid]
806
+ .pmx-document[data-pmx-play]
807
+ > section[data-pmx-block]:is(:hover, :focus-visible) {
808
+ outline-color: var(--pmx-color-accent, #3897ff);
809
+ opacity: 1 !important;
810
+ }
811
+
812
+ html[data-pmx-play-grid] .pmx-document[data-pmx-play] [data-pmx-play-state] {
813
+ opacity: 1 !important;
814
+ }
815
+
816
+ html[data-pmx-play-grid]
817
+ .pmx-document[data-pmx-play]
818
+ > section[data-pmx-block]
819
+ h1 {
820
+ max-width: 20ch;
821
+ font-size: clamp(1.5rem, 2.5vw, 2.4rem);
822
+ }
823
+
824
+ html[data-pmx-play-grid]
825
+ .pmx-document[data-pmx-play]
826
+ > section[data-pmx-block]
827
+ h2 {
828
+ max-width: 24ch;
829
+ font-size: clamp(1.2rem, 2vw, 1.7rem);
830
+ }
831
+
832
+ html[data-pmx-play-grid]
833
+ .pmx-document[data-pmx-play]
834
+ > section[data-pmx-block]
835
+ h3 {
836
+ max-width: 28ch;
837
+ font-size: clamp(1rem, 1.5vw, 1.3rem);
838
+ }
839
+
840
+ html[data-pmx-play-grid]
841
+ .pmx-document[data-pmx-play]
842
+ > section[data-pmx-block]
843
+ :is(p, li) {
844
+ font-size: clamp(0.72rem, 1.1vw, 0.95rem);
845
+ }
846
+
847
+ html[data-pmx-play-grid]
848
+ .pmx-document[data-pmx-play]
849
+ > section[data-pmx-block]
850
+ blockquote {
851
+ font-size: clamp(1rem, 1.6vw, 1.4rem);
852
+ }
853
+
854
+ html[data-pmx-play-grid]
855
+ .pmx-document[data-pmx-play]
856
+ > section[data-pmx-block]
857
+ :is(pre, table, img, video, iframe, .pmx-code-block) {
858
+ max-width: 100%;
859
+ max-height: 12rem;
860
+ overflow: hidden;
861
+ }
862
+
863
+ /* Touch targets, Drawer layout, and narrow slide fallback. */
864
+ @media (max-width: 42rem), (pointer: coarse) {
865
+ html[data-pmx-play-mode="presentation"] {
866
+ overscroll-behavior-y: none;
867
+ scroll-snap-type: block mandatory;
868
+ }
869
+
870
+ .pmx-document[data-pmx-play="presentation"] {
871
+ touch-action: pan-y pinch-zoom;
872
+ }
873
+
874
+ .pmx-play-exit {
875
+ position: fixed;
876
+ z-index: 1004;
877
+ top: calc(env(safe-area-inset-top) + 1.75rem);
878
+ right: max(0.75rem, env(safe-area-inset-right));
879
+ display: inline-flex;
880
+ width: 2.75rem !important;
881
+ height: 2.75rem !important;
882
+ color: var(--pmx-color-fg, CanvasText);
883
+ background: color-mix(
884
+ in oklab,
885
+ var(--pmx-color-surface, Canvas) 72%,
886
+ transparent
887
+ );
888
+ border: 1px solid
889
+ color-mix(in oklab, var(--pmx-color-fg, CanvasText) 14%, transparent);
890
+ box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 14%);
891
+ backdrop-filter: blur(0.65rem);
892
+ }
893
+
894
+ .pmx-play-exit svg {
895
+ width: 1.3rem;
896
+ height: 1.3rem;
897
+ }
898
+
899
+ .pmx-play-chrome {
900
+ right: max(0.75rem, env(safe-area-inset-right));
901
+ bottom: max(0.75rem, env(safe-area-inset-bottom));
902
+ }
903
+
904
+ .pmx-play-controls-trigger,
905
+ .pmx-play-chrome[data-pmx-play-visible] .pmx-play-controls-trigger {
906
+ width: 2.75rem !important;
907
+ height: 2.75rem !important;
908
+ opacity: 1;
909
+ transform: none;
910
+ }
911
+
912
+ .pmx-play-chrome:not([data-pmx-play-visible])
913
+ .pmx-play-controls-trigger:not(:focus-visible) {
914
+ pointer-events: auto;
915
+ }
916
+
917
+ .pmx-play-actions {
918
+ bottom: 3.25rem;
919
+ }
920
+
921
+ .pmx-ui-drawer-popup {
922
+ max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)));
923
+ padding-bottom: env(safe-area-inset-bottom);
924
+ }
925
+
926
+ .pmx-ui-drawer-header {
927
+ min-height: 1.5rem;
928
+ padding: 1.4rem 1.25rem 0;
929
+ }
930
+
931
+ .pmx-ui-drawer-title {
932
+ position: absolute;
933
+ width: 1px;
934
+ height: 1px;
935
+ overflow: hidden;
936
+ clip: rect(0 0 0 0);
937
+ }
938
+
939
+ .pmx-ui-drawer-content > .pmx-ui-separator {
940
+ margin-inline: 1.25rem;
941
+ width: auto;
942
+ }
943
+
944
+ .pmx-play-panel-actions {
945
+ padding: 0.75rem 1.25rem 1.15rem;
946
+ }
947
+
948
+ .pmx-play-panel-actions .pmx-ui-action-button {
949
+ width: 3.35rem;
950
+ height: 3.35rem;
951
+ }
952
+
953
+ .pmx-play-settings-scroll {
954
+ flex: 1;
955
+ padding: 0 1.25rem 0.4rem;
956
+ overflow-y: auto;
957
+ overscroll-behavior: contain;
958
+ }
959
+
960
+ .pmx-play-setting,
961
+ .pmx-play-switch-row {
962
+ min-height: 4.45rem;
963
+ }
964
+
965
+ .pmx-play-setting {
966
+ grid-template-columns: 7.2rem minmax(0, 1fr);
967
+ }
968
+
969
+ .pmx-play-setting[data-stacked] {
970
+ grid-template-columns: 7.2rem minmax(0, 1fr);
971
+ }
972
+
973
+ .pmx-ui-toggle-group-item,
974
+ .pmx-ui-select-trigger {
975
+ min-height: 2.85rem;
976
+ }
977
+
978
+ .pmx-ui-switch {
979
+ width: 2.8rem;
980
+ height: 1.6rem;
981
+ }
982
+
983
+ [data-slot="switch-thumb"] {
984
+ width: 1.3rem;
985
+ height: 1.3rem;
986
+ }
987
+
988
+ .pmx-ui-switch[data-checked] [data-slot="switch-thumb"] {
989
+ transform: translateX(1.22rem);
990
+ }
991
+
992
+ html[data-pmx-play-grid] .pmx-document[data-pmx-play] {
993
+ grid-template-columns: minmax(0, 1fr);
994
+ gap: 0.85rem;
995
+ padding: 3.75rem 0.85rem 5.5rem;
996
+ }
997
+
998
+ html[data-pmx-play-grid]
999
+ .pmx-document[data-pmx-play]
1000
+ > section[data-pmx-block] {
1001
+ min-height: 13rem !important;
1002
+ max-height: 19rem;
1003
+ }
1004
+
1005
+ .pmx-document[data-pmx-play="presentation"] {
1006
+ --pmx-slide-padding: 4.5rem 1.25rem 5.5rem;
1007
+ --pmx-slide-title-size: clamp(2.75rem, 14vw, 4.75rem);
1008
+ --pmx-slide-body-size: 1rem;
1009
+ --pmx-slide-code-size: 0.82rem;
1010
+ }
1011
+
1012
+ .pmx-document[data-pmx-play="presentation"] > section[data-pmx-block] {
1013
+ height: auto;
1014
+ min-height: 100svh;
1015
+ justify-content: flex-start;
1016
+ overflow-x: clip;
1017
+ overflow-y: visible;
1018
+ overscroll-behavior: auto;
1019
+ }
1020
+
1021
+ .pmx-document[data-pmx-play="presentation"]
1022
+ > section:is(
1023
+ [data-pmx-block-layout="media-start"],
1024
+ [data-pmx-block-layout="media-end"]
1025
+ ) {
1026
+ display: block;
1027
+ }
1028
+
1029
+ .pmx-document[data-pmx-play="presentation"] :is(table, .pmx-code-block) {
1030
+ width: 100%;
1031
+ overflow-x: auto;
1032
+ }
1033
+ }
1034
+
1035
+ @media (prefers-reduced-motion: reduce) {
1036
+ .pmx-document[data-pmx-play] [data-pmx-play-state],
1037
+ .pmx-document[data-pmx-play="presentation"] > section[data-pmx-block],
1038
+ .pmx-play-controls-trigger,
1039
+ .pmx-play-progressbar > [data-pmx-play-progress-fill],
1040
+ [data-pmx-play-progress-block-fill],
1041
+ html[data-pmx-play-grid]
1042
+ .pmx-document[data-pmx-play]
1043
+ > section[data-pmx-block],
1044
+ [data-pmx-play-guide-bar],
1045
+ [data-pmx-play-guide-highlight] {
1046
+ transition: none;
1047
+ }
1048
+
1049
+ .pmx-document[data-pmx-play] [data-pmx-play-state] {
1050
+ transform: none;
1051
+ }
1052
+ }