@makefully/fancifully 0.3.0 → 0.4.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/CHANGELOG.md +19 -0
- package/README.md +50 -1
- package/dist/Storybook.d.ts +22 -0
- package/dist/Storybook.d.ts.map +1 -1
- package/dist/fancifully.css +1 -1
- package/dist/fancifully.iife.js +2 -2
- package/dist/fancifully.js +1567 -1380
- package/dist/games/PageGame.d.ts +34 -0
- package/dist/games/PageGame.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/interop/fabricLike.d.ts +24 -3
- package/dist/interop/fabricLike.d.ts.map +1 -1
- package/dist/render/PageView.d.ts.map +1 -1
- package/dist/render/blocks/AreaBlock.d.ts +5 -0
- package/dist/render/blocks/AreaBlock.d.ts.map +1 -0
- package/dist/render/blocks/HotspotBlock.d.ts +6 -0
- package/dist/render/blocks/HotspotBlock.d.ts.map +1 -1
- package/dist/schema/story.d.ts +1359 -69
- package/dist/schema/story.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.4.0]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `area` story blocks for host-registered minigames (`registerPageGame`, `StorybookOptions.pageGames`)
|
|
10
|
+
- Area lifecycle: mount/destroy on spread change, `areacomplete` event, `requireComplete` nav gate
|
|
11
|
+
- Hotspot `requiredTaps` / `onComplete`, plus `addClass` / `removeClass` / `replayClass` tap actions
|
|
12
|
+
- Fabric-like interop for area descriptors
|
|
13
|
+
|
|
14
|
+
## [0.3.1]
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Story `guides` keep only margin/gutter rails; show/snap toggles are editor prefs, not story fields
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Ignore `deploy/` build staging in git
|
|
23
|
+
|
|
5
24
|
## [0.3.0]
|
|
6
25
|
|
|
7
26
|
### Added
|
package/README.md
CHANGED
|
@@ -215,11 +215,60 @@ Stories are JSON packages (not a single HTML document). Text may embed HTML; ima
|
|
|
215
215
|
| `backCover` | If true, last page is a back cover (no blank to its right); can close centered at the end |
|
|
216
216
|
| `hardback` | If true (with a cover flag), cover boards are larger than interior pages so open spreads show a cover rim |
|
|
217
217
|
| `assets` | Map of image / audio / vtt / html |
|
|
218
|
-
| `pages[].blocks` | `text`, `image`, `hotspot` with `layout` boxes |
|
|
218
|
+
| `pages[].blocks` | `text`, `image`, `hotspot`, `area` with `layout` boxes |
|
|
219
219
|
| `pages[].readAloud` | `{ audio, cues }` — cues are a VTT asset id or inline `{id,start,end}[]` |
|
|
220
220
|
|
|
221
221
|
`pages` is always a flat list. Facing pages are a reader presentation, not a stored spread.
|
|
222
222
|
|
|
223
|
+
### Hotspots
|
|
224
|
+
|
|
225
|
+
`hotspot` blocks are invisible hit targets. Each tap runs `onTap` actions:
|
|
226
|
+
|
|
227
|
+
| Action | Effect |
|
|
228
|
+
|--------|--------|
|
|
229
|
+
| `{ play: assetId }` | Play an audio asset on the SFX bus |
|
|
230
|
+
| `{ toggleClass: { target, className } }` | Toggle a class on `[data-block-id=target]` |
|
|
231
|
+
| `{ addClass: { target, className } }` | Add a class (one-way reveal) |
|
|
232
|
+
| `{ removeClass: { target, className } }` | Remove a class |
|
|
233
|
+
| `{ replayClass: { target, className } }` | Remove then re-add next frame (CSS bursts every tap) |
|
|
234
|
+
|
|
235
|
+
Optional `requiredTaps` counts taps; after N taps, `onComplete` runs **once** (each tap still runs `onTap`).
|
|
236
|
+
|
|
237
|
+
### Area blocks (host minigames)
|
|
238
|
+
|
|
239
|
+
`area` marks a rectangle for a host-provided game. Fancifully mounts an empty `.fc-block-area` host; the host registers the game:
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import { Storybook, registerPageGame } from '@makefully/fancifully';
|
|
243
|
+
|
|
244
|
+
registerPageGame('my.toys-sort', (ctx) => {
|
|
245
|
+
// ctx.el is the mount host; call ctx.onComplete() when finished
|
|
246
|
+
ctx.el.textContent = 'Play here';
|
|
247
|
+
const done = document.createElement('button');
|
|
248
|
+
done.textContent = 'Done';
|
|
249
|
+
done.onclick = () => ctx.onComplete();
|
|
250
|
+
ctx.el.append(done);
|
|
251
|
+
return { destroy() { ctx.el.replaceChildren(); } };
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
await Storybook.create(el, {
|
|
255
|
+
story: './story.json',
|
|
256
|
+
pageGames: {
|
|
257
|
+
// optional per-instance override of the global registry
|
|
258
|
+
'my.toys-sort': (ctx) => ({ destroy() {} }),
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
| Field | Purpose |
|
|
264
|
+
|-------|---------|
|
|
265
|
+
| `game` | Registry id (`registerPageGame` / `pageGames`) |
|
|
266
|
+
| `params` | Opaque JSON for the host game |
|
|
267
|
+
| `requireComplete` | When true, prev/next/swipe stay locked until `onComplete` |
|
|
268
|
+
| `ariaLabel` | Accessibility label on the host |
|
|
269
|
+
|
|
270
|
+
Listen for `areacomplete: { pageId, blockId, game }` for analytics. On page leave / `replaceStory` / destroy, each area’s `destroy()` runs and its `signal` aborts.
|
|
271
|
+
|
|
223
272
|
### Covers (`frontCover` / `backCover` / `hardback`)
|
|
224
273
|
|
|
225
274
|
- **Unset (default):** book starts open with a blank mate beside the first page (`[blank, p0]`) and a trailing blank after an orphan last page.
|
package/dist/Storybook.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FlipStyleInput } from './flip/index.js';
|
|
2
|
+
import { type PageGameFactory } from './games/PageGame.js';
|
|
2
3
|
import { findFanciFile } from './load/fanciFile.js';
|
|
3
4
|
import { type LoadedAssets } from './load/loadStory.js';
|
|
4
5
|
import type { StorySource } from './load/packageTypes.js';
|
|
@@ -51,6 +52,11 @@ export type StorybookOptions = {
|
|
|
51
52
|
layoutMode?: LayoutMode;
|
|
52
53
|
/** Stage width in px where `auto` switches to two-page. Default 900. */
|
|
53
54
|
singleBreakpoint?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Host page games keyed by `area.game` id. Overrides global
|
|
57
|
+
* {@link registerPageGame} registrations for this instance.
|
|
58
|
+
*/
|
|
59
|
+
pageGames?: Record<string, PageGameFactory>;
|
|
54
60
|
};
|
|
55
61
|
export type EditableLeaf = {
|
|
56
62
|
side: 'left' | 'right';
|
|
@@ -63,6 +69,11 @@ type StorybookEvents = PagerEvents & {
|
|
|
63
69
|
story: Story;
|
|
64
70
|
};
|
|
65
71
|
loading: LoadProgress;
|
|
72
|
+
areacomplete: {
|
|
73
|
+
pageId: string;
|
|
74
|
+
blockId: string;
|
|
75
|
+
game: string;
|
|
76
|
+
};
|
|
66
77
|
};
|
|
67
78
|
type Listener<K extends keyof StorybookEvents> = (payload: StorybookEvents[K]) => void;
|
|
68
79
|
export declare class Storybook {
|
|
@@ -92,6 +103,9 @@ export declare class Storybook {
|
|
|
92
103
|
private defaultFontFamily;
|
|
93
104
|
/** When true, swipe/keyboard/chrome nav and read-aloud are locked (editor overlay). */
|
|
94
105
|
private navLocked;
|
|
106
|
+
/** Instance page-game factories (override the global registry). */
|
|
107
|
+
private pageGames;
|
|
108
|
+
private areaSessions;
|
|
95
109
|
private constructor();
|
|
96
110
|
static create(container: HTMLElement, options: StorybookOptions): Promise<Storybook>;
|
|
97
111
|
get story(): Story;
|
|
@@ -105,6 +119,9 @@ export declare class Storybook {
|
|
|
105
119
|
get pageIds(): string[];
|
|
106
120
|
get spreadIndex(): number;
|
|
107
121
|
get isNavLocked(): boolean;
|
|
122
|
+
/** True when editor lock or an incomplete `requireComplete` area blocks turning. */
|
|
123
|
+
private isReaderNavBlocked;
|
|
124
|
+
private hasIncompleteAreaGate;
|
|
108
125
|
getDefaultFontFamily(): string | null;
|
|
109
126
|
setDefaultFontFamily(family: string | null): void;
|
|
110
127
|
getExtraFiles(): Record<string, Uint8Array>;
|
|
@@ -166,6 +183,11 @@ export declare class Storybook {
|
|
|
166
183
|
private buildReadAloudClips;
|
|
167
184
|
private resolveCues;
|
|
168
185
|
private handleTapActions;
|
|
186
|
+
private applyClassAction;
|
|
187
|
+
private resolvePageGame;
|
|
188
|
+
private teardownPageGames;
|
|
189
|
+
/** Destroy prior area games and mount factories for visible area hosts. */
|
|
190
|
+
private syncPageGames;
|
|
169
191
|
private emit;
|
|
170
192
|
}
|
|
171
193
|
export { findFanciFile };
|
package/dist/Storybook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storybook.d.ts","sourceRoot":"","sources":["../src/Storybook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Storybook.d.ts","sourceRoot":"","sources":["../src/Storybook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAgC,KAAK,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAO,KAAK,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACz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rem;--fc-captions-bg: rgba(31, 26, 20, .82);--fc-captions-fg: #fff;--fc-captions-bottom: 4.5rem;--fc-btn-border: rgba(250, 246, 239, .35);--fc-btn-hover-bg: rgba(250, 246, 239, .12);--fc-btn-read-bg: var(--fc-accent);--fc-btn-read-fg: #fff;--fc-btn-prev-image: none;--fc-btn-next-image: none;--fc-btn-read-image: none;--fc-btn-image-size: 3.5rem;box-sizing:border-box;position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:360px;background:radial-gradient(ellipse at 20% 0%,rgba(255,255,255,.45),transparent 50%),linear-gradient(160deg,#f0e6d4 0%,var(--fc-bg) 45%,#d9cfc0 100%);color:var(--fc-ink);font-family:Georgia,Times New Roman,serif;outline:none;overflow:hidden}.fc-root *,.fc-root *:before,.fc-root *:after{box-sizing:border-box}.fc-stage{position:relative;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y}.fc-stage.fc-stage-scroll{overflow:auto;align-items:safe center;justify-content:safe center}.fc-stage.fc-stage-fit-page{overflow-x:auto;overflow-y:hidden;align-items:center;justify-content:safe center}.fc-spread-viewport{--fc-hardback-overhang-x: 0px;--fc-hardback-overhang-y: 0px;position:relative;flex-shrink:0;overflow:hidden}.fc-spread-viewport-single{overflow:hidden}.fc-hardback{position:absolute;left:0;top:0;display:flex;flex-direction:row;pointer-events:none;z-index:0;will-change:transform}.fc-hardback-board{position:relative;flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a141a}.fc-hardback-board-left{border-radius:6px 0 0 6px}.fc-hardback-board-right{border-radius:0 6px 6px 0;box-shadow:inset 0 0 0 1px #1f1a141a,-4px 0 14px #1f1a1424}.fc-hardback-page{width:100%;height:100%}.fc-spread-viewport.fc-hardback-open .fc-spread{position:absolute;z-index:1}.fc-spread{--fc-page-width: 768px;--fc-page-height: 1024px;--fc-flip-duration: .4s;position:relative;display:flex;flex-direction:row;transform-origin:left top;will-change:transform}.fc-leaf.fc-leaf-dimmed{visibility:hidden;pointer-events:none}.fc-leaf{position:relative;width:var(--fc-page-width);height:var(--fc-page-height);flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a1414}.fc-leaf-left{border-radius:4px 0 0 4px}.fc-leaf-right{border-radius:0 4px 4px 0;box-shadow:inset 0 0 0 1px #1f1a1414,-6px 0 18px #1f1a141f}.fc-spread.is-solo-cover .fc-leaf.is-cover-hidden{display:none}.fc-spread.is-solo-cover .fc-leaf{border-radius:4px;box-shadow:inset 0 0 0 1px #1f1a1414}.fc-page{position:relative;width:100%;height:100%;overflow:hidden}.fc-page-blank{background:transparent;box-shadow:none}.fc-block{position:absolute}.fc-block-text{z-index:2;line-height:1.35}.fc-block-text p,.fc-block-text h1,.fc-block-text h2,.fc-block-text h3,.fc-block-text h4,.fc-block-text h5,.fc-block-text h6{margin:0}.fc-block-image{z-index:1;overflow:hidden}.fc-block-image img{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none}.fc-block-hotspot{z-index:3;margin:0;padding:0;border:2px dashed transparent;background:transparent;cursor:pointer}.fc-block-hotspot:focus-visible{border-color:var(--fc-accent);outline:none}.fc-block-hotspot:hover{background:#c45c2614}.fc-cue.is-active{background:var(--fc-cue-active-bg);border-radius:.15em}.fc-cue.is-read:not(.is-active){background:var(--fc-cue-read-bg);border-radius:.15em}.fc-captions{position:absolute;left:50%;bottom:var(--fc-captions-bottom);transform:translate(-50%);max-width:min(36rem,90%);padding:.4rem .75rem;border-radius:.35rem;background:var(--fc-captions-bg);color:var(--fc-captions-fg);font-size:.95rem;text-align:center;pointer-events:none;z-index:5}.fc-captions:empty,.fc-captions[hidden]{display:none}.fc-chrome{display:flex;gap:.5rem;justify-content:center;align-items:center;padding:var(--fc-chrome-padding);background:var(--fc-chrome-bg);color:var(--fc-chrome-fg)}.fc-chrome[hidden]{display:none}.fc-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0}.fc-icon svg{display:block;width:1.15rem;height:1.15rem}.fc-btn-label--sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.fc-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border:1px solid var(--fc-btn-border);background-color:transparent;background-image:none;background-repeat:no-repeat;background-position:center;background-size:contain;color:inherit;font:inherit;font-size:.95rem;padding:.4rem .9rem;border-radius:.3rem;cursor:pointer}.fc-btn:hover,.fc-btn:focus-visible{background-color:var(--fc-btn-hover-bg);outline:none}.fc-btn:disabled,.fc-btn.is-disabled{opacity:.35;pointer-events:none;cursor:default}.fc-btn-prev{background-image:var(--fc-btn-prev-image)}.fc-btn-next{background-image:var(--fc-btn-next-image)}.fc-btn-read{background-color:var(--fc-btn-read-bg);background-image:var(--fc-btn-read-image);border-color:transparent;color:var(--fc-btn-read-fg)}.fc-chrome.fc-chrome--images .fc-btn{width:var(--fc-btn-image-size);height:var(--fc-btn-image-size);padding:0;border:none;background-color:transparent;color:transparent;font-size:0;line-height:0;overflow:hidden}.fc-chrome.fc-chrome--images .fc-btn .fc-icon,.fc-chrome.fc-chrome--images .fc-btn .fc-btn-label{display:none}.fc-chrome.fc-chrome--images .fc-btn:hover,.fc-chrome.fc-chrome--images .fc-btn:focus-visible{background-color:transparent;filter:brightness(1.08)}.fc-chrome.fc-chrome--images .fc-btn-read{background-color:transparent}.fc-spread.fc-turn-next .fc-leaf-right{animation:fc-flip-next var(--fc-flip-duration) ease forwards;transform-origin:left center}.fc-spread.fc-turn-prev .fc-leaf-left{animation:fc-flip-prev var(--fc-flip-duration) ease forwards;transform-origin:right center}@keyframes fc-flip-next{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(-90deg)}}@keyframes fc-flip-prev{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(90deg)}}.fc-block-image.lit{filter:brightness(1.15) saturate(1.1);box-shadow:0 0 24px #ffc85073}
|
|
1
|
+
.fc-root{--fc-bg: #e8e2d6;--fc-page-bg: #faf6ef;--fc-ink: #1f1a14;--fc-accent: #c45c26;--fc-cue-active-bg: rgba(196, 92, 38, .28);--fc-cue-read-bg: rgba(196, 92, 38, .12);--fc-chrome-bg: rgba(31, 26, 20, .88);--fc-chrome-fg: #faf6ef;--fc-chrome-padding: .65rem;--fc-captions-bg: rgba(31, 26, 20, .82);--fc-captions-fg: #fff;--fc-captions-bottom: 4.5rem;--fc-btn-border: rgba(250, 246, 239, .35);--fc-btn-hover-bg: rgba(250, 246, 239, .12);--fc-btn-read-bg: var(--fc-accent);--fc-btn-read-fg: #fff;--fc-btn-prev-image: none;--fc-btn-next-image: none;--fc-btn-read-image: none;--fc-btn-image-size: 3.5rem;box-sizing:border-box;position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:360px;background:radial-gradient(ellipse at 20% 0%,rgba(255,255,255,.45),transparent 50%),linear-gradient(160deg,#f0e6d4 0%,var(--fc-bg) 45%,#d9cfc0 100%);color:var(--fc-ink);font-family:Georgia,Times New Roman,serif;outline:none;overflow:hidden}.fc-root *,.fc-root *:before,.fc-root *:after{box-sizing:border-box}.fc-stage{position:relative;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y}.fc-stage.fc-stage-scroll{overflow:auto;align-items:safe center;justify-content:safe center}.fc-stage.fc-stage-fit-page{overflow-x:auto;overflow-y:hidden;align-items:center;justify-content:safe center}.fc-spread-viewport{--fc-hardback-overhang-x: 0px;--fc-hardback-overhang-y: 0px;position:relative;flex-shrink:0;overflow:hidden}.fc-spread-viewport-single{overflow:hidden}.fc-hardback{position:absolute;left:0;top:0;display:flex;flex-direction:row;pointer-events:none;z-index:0;will-change:transform}.fc-hardback-board{position:relative;flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a141a}.fc-hardback-board-left{border-radius:6px 0 0 6px}.fc-hardback-board-right{border-radius:0 6px 6px 0;box-shadow:inset 0 0 0 1px #1f1a141a,-4px 0 14px #1f1a1424}.fc-hardback-page{width:100%;height:100%}.fc-spread-viewport.fc-hardback-open .fc-spread{position:absolute;z-index:1}.fc-spread{--fc-page-width: 768px;--fc-page-height: 1024px;--fc-flip-duration: .4s;position:relative;display:flex;flex-direction:row;transform-origin:left top;will-change:transform}.fc-leaf.fc-leaf-dimmed{visibility:hidden;pointer-events:none}.fc-leaf{position:relative;width:var(--fc-page-width);height:var(--fc-page-height);flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a1414}.fc-leaf-left{border-radius:4px 0 0 4px}.fc-leaf-right{border-radius:0 4px 4px 0;box-shadow:inset 0 0 0 1px #1f1a1414,-6px 0 18px #1f1a141f}.fc-spread.is-solo-cover .fc-leaf.is-cover-hidden{display:none}.fc-spread.is-solo-cover .fc-leaf{border-radius:4px;box-shadow:inset 0 0 0 1px #1f1a1414}.fc-page{position:relative;width:100%;height:100%;overflow:hidden}.fc-page-blank{background:transparent;box-shadow:none}.fc-block{position:absolute}.fc-block-text{z-index:2;line-height:1.35}.fc-block-text p,.fc-block-text h1,.fc-block-text h2,.fc-block-text h3,.fc-block-text h4,.fc-block-text h5,.fc-block-text h6{margin:0}.fc-block-image{z-index:1;overflow:hidden}.fc-block-image img{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none}.fc-block-hotspot{z-index:3;margin:0;padding:0;border:2px dashed transparent;background:transparent;cursor:pointer}.fc-block-hotspot:focus-visible{border-color:var(--fc-accent);outline:none}.fc-block-hotspot:hover{background:#c45c2614}.fc-block-area{z-index:4;overflow:hidden;pointer-events:auto}.fc-cue.is-active{background:var(--fc-cue-active-bg);border-radius:.15em}.fc-cue.is-read:not(.is-active){background:var(--fc-cue-read-bg);border-radius:.15em}.fc-captions{position:absolute;left:50%;bottom:var(--fc-captions-bottom);transform:translate(-50%);max-width:min(36rem,90%);padding:.4rem .75rem;border-radius:.35rem;background:var(--fc-captions-bg);color:var(--fc-captions-fg);font-size:.95rem;text-align:center;pointer-events:none;z-index:5}.fc-captions:empty,.fc-captions[hidden]{display:none}.fc-chrome{display:flex;gap:.5rem;justify-content:center;align-items:center;padding:var(--fc-chrome-padding);background:var(--fc-chrome-bg);color:var(--fc-chrome-fg)}.fc-chrome[hidden]{display:none}.fc-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0}.fc-icon svg{display:block;width:1.15rem;height:1.15rem}.fc-btn-label--sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.fc-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border:1px solid var(--fc-btn-border);background-color:transparent;background-image:none;background-repeat:no-repeat;background-position:center;background-size:contain;color:inherit;font:inherit;font-size:.95rem;padding:.4rem .9rem;border-radius:.3rem;cursor:pointer}.fc-btn:hover,.fc-btn:focus-visible{background-color:var(--fc-btn-hover-bg);outline:none}.fc-btn:disabled,.fc-btn.is-disabled{opacity:.35;pointer-events:none;cursor:default}.fc-btn-prev{background-image:var(--fc-btn-prev-image)}.fc-btn-next{background-image:var(--fc-btn-next-image)}.fc-btn-read{background-color:var(--fc-btn-read-bg);background-image:var(--fc-btn-read-image);border-color:transparent;color:var(--fc-btn-read-fg)}.fc-chrome.fc-chrome--images .fc-btn{width:var(--fc-btn-image-size);height:var(--fc-btn-image-size);padding:0;border:none;background-color:transparent;color:transparent;font-size:0;line-height:0;overflow:hidden}.fc-chrome.fc-chrome--images .fc-btn .fc-icon,.fc-chrome.fc-chrome--images .fc-btn .fc-btn-label{display:none}.fc-chrome.fc-chrome--images .fc-btn:hover,.fc-chrome.fc-chrome--images .fc-btn:focus-visible{background-color:transparent;filter:brightness(1.08)}.fc-chrome.fc-chrome--images .fc-btn-read{background-color:transparent}.fc-spread.fc-turn-next .fc-leaf-right{animation:fc-flip-next var(--fc-flip-duration) ease forwards;transform-origin:left center}.fc-spread.fc-turn-prev .fc-leaf-left{animation:fc-flip-prev var(--fc-flip-duration) ease forwards;transform-origin:right center}@keyframes fc-flip-next{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(-90deg)}}@keyframes fc-flip-prev{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(90deg)}}.fc-block-image.lit{filter:brightness(1.15) saturate(1.1);box-shadow:0 0 24px #ffc85073}
|