/* AC483 Act I story encounters (docs/workorders/ACT1_ENCOUNTERS.md): choice icons, run-effect
   badges under the Day timeline, the encounter (?) at the stage's top left, outcome flights into
   the HUD and the full-screen storm layer. Transform/opacity only; reduced motion is static. */

/* Paired choices keep the existing 54px story faces; an icon leads the one-line label. */
#online.journey-view button.story-event-choice>.button-label{display:inline-flex;align-items:center;justify-content:center;gap:7px;max-width:100%}
.story-choice-icon{flex:none;width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 2px 0 color-mix(in srgb,var(--vs-ink) 45.1%,transparent))}
@media(max-width:380px){#online.journey-view button.story-event-choice>.button-label{gap:5px}.story-choice-icon{width:26px;height:26px}.story-choice-icon.is-svg svg{width:22px;height:22px}}
.story-choice-icon.is-svg{display:inline-grid;place-items:center;filter:none}
.story-choice-icon.is-svg svg{width:26px;height:26px}
.story-event-choice-text{min-width:0}

/* Run effects: compact pills hanging under the Day timeline, each a 44px tap target. */
#story-overlay .run-effects{position:absolute;z-index:3;top:52px;left:50%;transform:translateX(-50%);display:flex;gap:6px;pointer-events:none}
.run-effect{position:relative;display:inline-flex;align-items:center;gap:3px;height:26px;margin:0;padding:0 9px 0 2px;border:1.5px solid #d5b875;border-radius:13px;background:linear-gradient(#173349f2,#1c3d52ec);box-shadow:0 2px 0 #0d2238;color:#ffeab0;font:13px/1 Lucky,'Baloo 2',sans-serif;white-space:nowrap;pointer-events:auto;cursor:pointer;text-shadow:none;-webkit-tap-highlight-color:transparent}
.run-effect::before{content:'';position:absolute;inset:-9px -4px}
.run-effect:active{scale:.94}
.run-effect-icon{flex:none;width:24px;height:24px;margin-top:-2px;object-fit:contain;filter:drop-shadow(0 1px 0 #0b1a28)}
.run-effect-icon.is-svg svg{width:20px;height:20px}
.run-effect-left{padding-top:1px}
.run-effect.is-arriving{opacity:0}
/* Story minigames: a token-driven game's marks (the fortune tokens). Owner 2026-11-19 (R9: "to dalbym po prawej - i w
   zasadzie niech po prostu wychodzi z prawej i sie animuje podbijanie i sie chowa z powrotem"): the counter is not on
   screen at rest. Its beat (story-events-ui.ts, STORY_MARK_PEEK) slides a plate out of the stage's right edge in the
   row under the top bar (one row lower and a size smaller when the run-effect chips reach that far: is-low, the band
   between the chips and a flying opponent's name is narrow), above every actor, name
   label and HP pill on a normal and on a return round: the token's medal over the left end of a navy plate joined to
   the edge, count/need, a gold rim and glow once complete. The host is a stage child (renders never replace it) that
   clips at the stage's right edge only; the plate runs 12px past that edge, so its overshoot and squash never open a
   gap. The overlay keeps the count as hidden text; the host's live region says a new count. */
#story-overlay .story-marks-status,.story-marks-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#stage>.story-marks-peek{position:absolute;z-index:3;top:66px;right:0;display:flex;flex-direction:column;align-items:flex-end;gap:10px;font-size:clamp(16px,4.4vw,19px);pointer-events:none;clip-path:inset(-80px 0 -80px -100vw)}
#stage>.story-marks-peek.is-low{top:100px;font-size:clamp(14px,3.75vw,17px)}
.story-mark-slide{position:relative;display:block}
.story-mark{position:relative;display:flex;align-items:center;height:1.75em;margin:0 -12px 0 0;padding:.06em calc(var(--safe-right,env(safe-area-inset-right,0px)) + 12px + .6em) 0 2.2em;border:2px solid #e3c47c;border-right:0;border-radius:.875em 0 0 .875em;background:linear-gradient(#1d3f58fa,#15304af7);box-shadow:inset 0 1px 0 #ffffff26,0 2px 0 #0d2238,0 4px 8px #0d223880;color:#ffeab0;font:1em/1 Lucky,'Baloo 2',sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;transform-origin:100% 50%}
.story-mark-medal,.story-mark-ring{position:absolute;left:-.5em;top:50%;width:2.5em;height:2.5em;margin-top:-1.3em;pointer-events:none}
.story-mark-icon{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1.5px 0 #0b1a28)}
.story-mark-count{position:relative;display:inline-flex;align-items:baseline;line-height:1}
.story-mark-num{display:inline-block;font:inherit;font-size:1.12em;color:#fff3c4}
.story-mark-num.is-out{position:absolute;left:0;top:0;font-style:normal}
.story-mark-need{opacity:.82}
.story-mark.is-full{border-color:#ffd84a;background:linear-gradient(#2a4d5ff5,#1c3d52f0);box-shadow:0 0 0 1.5px #ffd84a8c,0 0 12px 3px #ffc93c99,0 2px 0 #0d2238;color:#ffe27a}
.story-mark.is-full .story-mark-num{color:#fff8d6}
.story-mark.is-full .story-mark-icon{filter:drop-shadow(0 1.5px 0 #0b1a28) drop-shadow(0 0 5px #ffd84acc)}
.story-mark-ring{border:2.5px solid #fff0a8;border-radius:50%;box-shadow:0 0 0 1px #c98a1a99,0 0 8px 1px #ffd84a,inset 0 0 5px #ffd84a99}
.story-mark-spark{position:absolute;left:.75em;top:50%;width:.9em;height:.9em;margin:-.45em 0 0 -.45em;pointer-events:none;filter:drop-shadow(0 0 1px #8a5200) drop-shadow(0 0 1px #8a5200) drop-shadow(0 0 4px #ffc93c)}
.story-mark-spark b{display:block;width:100%;height:100%;background:#fff6c8;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
.story-mark-shine{position:absolute;inset:0 12px 0 0;border-radius:inherit;overflow:hidden;pointer-events:none}
.story-mark-shine b{position:absolute;top:-20%;bottom:-20%;left:0;width:22%;background:linear-gradient(90deg,#fff0,#fff8dccc 45%,#ffffff 50%,#fff8dccc 55%,#fff0)}
.story-event-flight.is-token{filter:drop-shadow(0 0 5px #ffd76b) drop-shadow(0 2px 1px #4b2e14)}
.story-event-flight.is-token svg{display:block;width:100%;height:100%}
.run-effects-ghost{position:absolute;z-index:3;pointer-events:none}

/* The waiting encounter's shared (?) at the stage's top left, clear of the timeline and Settings. */
#story-overlay .story-event-help{position:absolute;top:0;left:4px;pointer-events:auto}

/* Rules sheet: one row per choice or effect, icon beside its single rule line. */
.story-event-rules h1{display:flex;align-items:center;justify-content:center;gap:8px}
.story-event-rules ul{display:grid;gap:12px;margin:12px 0 2px;padding:0;list-style:none}
.story-event-rules li{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;text-align:start}
.story-event-help-icon{width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 2px 0 color-mix(in srgb,var(--vs-ink) 45.1%,transparent))}
.story-event-help-icon.is-svg{display:inline-grid;place-items:center;filter:none}
.story-event-help-icon.is-svg svg{width:30px;height:30px}
.story-event-rules h1 .story-event-help-icon{width:34px;height:34px}
.story-effect-left{margin-top:6px;font-weight:700}

/* Outcome flights from the hero into the HUD (house AC340 arc, story-events-ui.ts). */
.story-event-flight{position:fixed;left:0;top:0;z-index:60;width:36px;height:36px;pointer-events:none;filter:drop-shadow(0 2px 2px #33204780)}
.story-event-flight img{width:100%;height:100%;object-fit:contain}
.story-event-flight.is-skill{filter:drop-shadow(0 0 6px #ffd76b) drop-shadow(0 2px 1px #4b2e14)}
.story-event-flight.is-up{filter:drop-shadow(0 0 6px #9cf5a6) drop-shadow(0 2px 1px #24192a)}
.story-event-flight.is-down{filter:drop-shadow(0 0 6px #ff8a7a) drop-shadow(0 2px 1px #24192a)}
.story-effect-chip{position:fixed;z-index:60;display:inline-flex;align-items:center;gap:4px;padding:3px 10px 3px 4px;border:2px solid #24323f;border-radius:15px;background:linear-gradient(#f2fdff,#a7e9f6);box-shadow:inset 0 2px #fff,0 2px 0 #24192a;color:#173349;font:15px/1 Lucky,'Baloo 2',sans-serif;white-space:nowrap;pointer-events:none;transform:translate(-50%,-50%)}
.story-effect-chip b{font-weight:400}
/* b130 review: the chip tints into the navy badge on its way (this layer fades in under the icon and count). */
.story-effect-chip{isolation:isolate}
.story-effect-chip>*:not(.story-effect-chip-navy){position:relative}
.story-effect-chip-navy{position:absolute;inset:0;z-index:0;border-radius:inherit;background:linear-gradient(#173349f2,#1c3d52ec);opacity:0;pointer-events:none}
/* The chip is the badge at 1.2x (same proportions: height, border, padding, gap, icon, type), so where it lands
   at 1/1.2 on the badge the two images coincide and the crossfade shows no double pill. */
.story-effect-chip{gap:3.6px;height:31.2px;box-sizing:border-box;padding:0 10.8px 0 2.4px;border-width:1.8px;border-radius:15.6px;font-size:15.6px;line-height:1;text-shadow:none}
.story-effect-chip .run-effect-icon{width:28.8px;height:28.8px;margin:0;align-self:center}
.story-effect-chip .run-effect-icon.is-svg svg{width:24px;height:24px}
#skill-belt .learned.is-awaiting>b{opacity:0}
/* SM1 (STORY_MOTION): a plain draft's pick flies in as a jade spark (the intro spark's jade: INTRO_JADE in scene.ts) with
   two smaller motes behind it; a skill learned just now keeps its whole slot back until the spark lands. */
#skill-belt .learned.is-awaiting.is-new{opacity:0}
.story-event-flight.is-spark{filter:none}
.story-jade-spark{position:absolute;left:50%;top:50%;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;background:radial-gradient(circle,#fff 0 16%,#e4fff7 28%,#8ff3dc 46%,#3fd8bacc 60%,#3fd8ba00 72%);box-shadow:0 0 12px 3px #3fd8ba99}
.story-jade-spark::before{content:'';position:absolute;inset:-7px;background:#e4fff7;clip-path:polygon(50% 0,57% 43%,100% 50%,57% 57%,50% 100%,43% 57%,0 50%,43% 43%)}
.story-event-flight.is-trail .story-jade-spark{transform:scale(.55);opacity:.6;box-shadow:0 0 8px 2px #3fd8ba80}
.story-event-flight.is-trail .story-jade-spark::before{content:none}
.story-skill-spark.is-jade{border-color:#3fd8ba;box-shadow:0 0 12px #3fd8ba,inset 0 0 8px #e4fff7}
.story-skill-spark{position:absolute;inset:-6px;border:2px solid #ffd76b;border-radius:50%;box-shadow:0 0 12px #ffd76b,inset 0 0 8px var(--gold-50);pointer-events:none}

/* The storm crosses the whole UI (HUD, journal, buttons) and never takes a tap. */
#story-storm-layer{position:fixed;inset:0;z-index:20;overflow:hidden;pointer-events:none}
.storm-leaf,.storm-streak{position:absolute;left:0;top:0;will-change:transform,opacity;pointer-events:none}
.storm-streak{height:2px;border-radius:2px;background:linear-gradient(90deg,#ffffffe6,#ffffff00)}
.storm-leaf.is-art{background-size:400% 200%;background-repeat:no-repeat;filter:drop-shadow(0 2px 1px #1f2a1240)}
.storm-leaf:not(.is-art){border:1.5px solid #2f3a1ec0;border-radius:0 100% 0 100%;background:linear-gradient(135deg,transparent 47%,#fffad28c 48%,#fffad28c 52%,transparent 53%),var(--leaf,#7cc045)}
@media (prefers-reduced-motion:reduce){#story-storm-layer{display:none}.run-effect:active{scale:none}}

/* AC566 (build 125 feedback): the parcel is an ordinary stop; its former illustrated card layer is gone. */

/* AC549 (build 125 feedback): the effect icon and its count share one vertical centre in the pill. */
.run-effect-icon{margin-top:0;align-self:center}
.run-effect-left{padding-top:0;line-height:1}

/* AC598 (build 128 feedback, "Ty też nie dopracowane": the ward's "1 day" pill hung half under the
   "WAVE 2 / 3 · ROUND 1 / 15" pill because this sheet's old 38px playing offset beat story-ui.css).
   Run effects have ONE home on the run screens, the same in every state (Day strip, ROUND, WAVE x/3 ·
   ROUND, the swaps between them, travel and stops): a row left-aligned with the top row's strip/pill
   (stage x 62px) and 12px under its bottom edge (stage y 64px; #story-overlay sits at 6px, #run-topbar
   is 8px + 44px). The strip's slide-in overshoot (easeOutBack 1.7, about 5px) still leaves >= 6px. */
#online.story-mode #story-overlay .run-effects,#online.story-playing #story-overlay .run-effects{top:58px;left:62px;transform:none;justify-content:flex-start}
/* b130 lead review: the row steps aside while the battle intro's VS cards and "First move!" hold the top of the
   stage (opacity 0 over 160ms with a 4px lift, back over 220ms once the cards have left; storyEffectsVeilFrame). */
#story-overlay .run-effects{opacity:var(--run-fx-o,1);translate:0 var(--run-fx-y,0px)}
/* Visual polish r2 (story #152): the parcel sheet's edge cases are a small footnote under its two rows. */
.story-event-rules.is-parcel .story-event-rules-note{margin:12px 0 0;font:600 12px/1.35 system-ui,sans-serif;color:#7a6449}

/* Story minigames (docs/workorders/STORY_MINIGAMES.md): the parchment card over the lower Story stage (title plate and
   art window; story-events-ui.ts → syncStoryMinigame). It sits below the Day timeline (and the run-effect badges when
   shown), never scrolls, and leaves the action row to the Story bottom row. Each game styles only its art window. */
#stage>.story-minigame{position:absolute;z-index:4;left:8px;right:8px;top:56px;bottom:6px;display:flex;justify-content:center;pointer-events:none}
#stage:has(#story-overlay .run-effects)>.story-minigame{top:84px}
.story-minigame-card{position:relative;display:flex;flex-direction:column;width:100%;max-width:414px;min-height:0;border:var(--vs-outline) solid var(--vs-ink);border-radius:var(--vs-radius);background:var(--paper);box-shadow:0 var(--vs-drop-y) 0 color-mix(in srgb,var(--vs-ink) 45.1%,transparent);overflow:hidden;pointer-events:auto}
.story-minigame-plate{flex:none;display:flex;justify-content:center;align-items:center;min-height:26px;padding:2px 10px;border-bottom:1.5px solid #c8b387;background:linear-gradient(#ffe99a,#ffcc55 70%,#edaa3b)}
.story-minigame-plate>span{font:17px/1.15 Lucky,'Baloo 2',sans-serif;color:var(--paper);-webkit-text-stroke:.14em #3c2b29;paint-order:stroke fill;text-align:center}
.story-minigame-art{position:relative;flex:1;min-height:0;overflow:hidden}
/* Story minigames, presentation:'fullscreen' (owner 2026-11-19, R1: "te minigry sa jakby on top z tlem"): the game on
   top of the Story screen. The layer fills the app column and IS the dim (about 70 % dark; the stage, stats bar and
   journal stay visible behind it and take no tap). The prop floats in the art window between the top safe area and
   the action row; the title ribbon with the shared (?) sits on the prop's top edge (placed by story-events-ui.ts →
   storyMinigameFramePlace). The layer shows no result of its own. While the outcome plays and during the dwell the
   action row holds an inert placeholder of the same height. The game's one action, while the game waits, lies exactly
   on Next day's place and has its size: story-events-ui.ts → storyMinigameRowPlace measures the Story row's button and
   sets --mg-row-*; the values here are that button's own (#content.story-content>button.primary: 6 px from the sides,
   10 px over the bottom safe area, 70 px tall, 27 px label) until it is measured. On a screen too short for the Story
   row itself the action still stays 4 px over the bottom safe area (--mg-row-b). */
#online>.story-minigame.is-fullscreen{position:absolute;inset:0;z-index:30;overflow:hidden;background:#10192db8;pointer-events:auto;outline:none;--mg-row-h:70px;--mg-row-side:6px;--mg-row-fs:27px;--mg-row-bottom:calc(var(--safe-bottom,env(safe-area-inset-bottom,0px)) + 10px);--mg-row-b:max(var(--mg-row-bottom),calc(var(--safe-bottom,env(safe-area-inset-bottom,0px)) + 4px))}
.story-minigame-float{position:absolute;left:max(8px,calc(50% - 260px));right:max(8px,calc(50% - 260px));top:calc(var(--safe-top,env(safe-area-inset-top,0px)) + 8px);bottom:calc(var(--mg-row-b) + var(--mg-row-h) + 12px);transform-origin:50% 40%}
.story-minigame.is-fullscreen .story-minigame-art{position:absolute;inset:0;overflow:visible}
/* The title ribbon: a gold plate (the card's title plate gold) with the ink outline and hard drop, two folded tails
   behind its ends, the title in the game font and the shared (?) inside its right end. */
.story-minigame-ribbon{position:absolute;z-index:3;left:50%;top:0;translate:-50% 0;box-sizing:border-box;display:flex;justify-content:center;height:40px;width:max-content}
.story-minigame-ribbon::before,.story-minigame-ribbon::after{content:'';position:absolute;top:9px;width:26px;height:34px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 34'%3E%3Cpath d='M25 1H2l8 16-8 16h23z' fill='%23c97f22' stroke='%23241925' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M25 3H14v28h11z' fill='%239a5a14'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
.story-minigame-ribbon::before{left:-15px}
.story-minigame-ribbon::after{right:-15px;scale:-1 1}
.story-minigame-ribbon>span{position:relative;z-index:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-width:100%;height:100%;padding:0 46px 1px;border:var(--vs-outline) solid var(--vs-ink);border-radius:10px;background:linear-gradient(#fff0b0,#ffd25c 55%,#f0a93a);box-shadow:inset 0 2px 0 #fff8d6,inset 0 -3px 0 #d98d2a,0 var(--vs-drop-y) 0 color-mix(in srgb,var(--vs-ink) 70%,transparent);font:21px/1 Lucky,'Baloo 2',sans-serif;color:var(--paper);-webkit-text-stroke:.14em #3c2b29;paint-order:stroke fill;white-space:nowrap}
/* Owner 2026-11-19 ("czemu tak wystaje"): the (?) sits inside the plate's right end (30px disc, 7px in from its edge), never over its border. */
.story-minigame-ribbon>.help-button{--help-disc:30px;position:absolute;z-index:2;right:0;top:50%;translate:0 -50%;margin:0}
.story-minigame-ribbon>.help-button>span{font-size:22px}
/* Owner 2026-11-19 (Three symbols: "„?” bym wywalił, bo zbędne"): a game that opts out (`help:false`) has no (?); its
   plate needs no room for the disc and keeps the title centred. */
.story-minigame-ribbon.no-help>span{padding:0 22px 1px}
.story-minigame-actions{position:absolute;left:var(--mg-row-side);right:var(--mg-row-side);bottom:var(--mg-row-b);height:var(--mg-row-h);display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}
#online.journey-view .story-minigame-actions>button.story-choice,.story-minigame-actions>button.story-choice{width:100%;height:var(--mg-row-h);min-height:var(--mg-row-h);margin:0;padding:6px 10px;font-size:var(--mg-row-fs);line-height:1.1;white-space:nowrap}
/* The Story row's place holder under the layer (Next day's own kind of button, invisible and inert). */
#content.story-content>button.story-minigame-slot{visibility:hidden;pointer-events:none}
.story-event-flight.is-gold{filter:drop-shadow(0 0 6px #ffd76b) drop-shadow(0 2px 1px #4b2e14)}
/* The Field Journal coin chip (Story minigame gold). */
#feed .stat-change.coin-change{color:#ffd76b}
/* b217: a game drawn on the stage itself (presentation:'stage', the Creature duel) has no window; its holder never shows. */
#stage>.story-minigame.is-stage,.story-minigame[hidden]{display:none}
/* A stage game with tap targets (framework `stageOverlay`, Camp break): the holder is a see-through layer over the stage
   under the Day timeline; only what the game puts in it takes taps. */
#stage>.story-minigame.is-stage.has-overlay{display:block}
.story-minigame.is-stage.has-overlay>.story-minigame-art{position:absolute;inset:0;overflow:visible;pointer-events:none}
/* b217 set B: the stage duel's health is the Arena / Mountain duel HUD (story-ui.css "Duel HUD"), under the Story top row
   (and under the run-effect chips when they show), never over the duel itself. */
#story-overlay .duel-hud.is-stage-duel{top:58px}
#story-overlay:has(.run-effects) .duel-hud.is-stage-duel{top:92px}
/* Short stages (Compact): a smaller HUD, so its crest and HP row stay clear of the creatures' A/B coins and of Blip. */
@media(max-height:740px){
 #story-overlay .duel-hud.is-stage-duel{--duel-crest:46px;--duel-bar:14px;--duel-chip:32px}
 #story-overlay .duel-hud.is-stage-duel .duel-side{grid-template-rows:18px var(--duel-bar) 14px;row-gap:2px}
 #story-overlay .duel-hud.is-stage-duel .duel-name{font-size:15px;line-height:18px}
 #story-overlay .duel-hud.is-stage-duel .duel-hp{font-size:12px;line-height:14px}
 #story-overlay .duel-hud.is-stage-duel .duel-crest{height:50px;padding-top:3px}
 #story-overlay .duel-hud.is-stage-duel .duel-round{font-size:21px;line-height:21px}
 #story-overlay .duel-hud.is-stage-duel .duel-word{font-size:6.5px;line-height:8px}
 #story-overlay .duel-hud.is-stage-duel .duel-limit{font-size:9px;line-height:10px}
 #story-overlay:has(.run-effects) .duel-hud.is-stage-duel{top:88px}
}

/* Outcome lettering and card tones (docs/workorders/STORY_MINIGAMES.md → Outcome lettering; tracker R2/R3).
   R3: the Field Journal card of a loss, a gain and a jackpot keeps a thin trim in its tone (the journal's own loss red,
   gain green and level gold), so the journal can be scanned later. No tag, no extra text. */
#online.journey-view #feed .log-entry.log-entry.outcome-loss{--jl-trim:#c4604c;--jl-trim-lip:#9b4e3e}
#online.journey-view #feed .log-entry.log-entry.outcome-gain{--jl-trim:#6f9a52;--jl-trim-lip:#557343}
#online.journey-view #feed .log-entry.log-entry.outcome-jackpot{--jl-trim:#e2a93b;--jl-trim-lip:#c48f3c}
#online.journey-view #feed .log-entry.log-entry:is(.outcome-loss,.outcome-gain,.outcome-jackpot){border-color:var(--jl-trim);box-shadow:0 2px 0 var(--jl-trim-lip),inset 0 0 0 1px color-mix(in srgb,var(--jl-trim) 55%,transparent)}
/* R2: the lettering born from the Story action button (owner 2026-11-19 on the ribbon version: "zbyt jebutne te
   napisy, powinny byc super animowane ale tak jakby pasowac do buttonu i z niego wynikac"). The layer is a child of
   #online over the whole Story screen and takes no tap. storyLetteringPlace anchors it to the action row's primary
   button by its box: `.jl-stage` runs from the screen's top down to the button's top edge (`--jl-floor`), so the word
   rises from behind that edge and nothing of it lies on the button's face; `.jl-face` and `.jl-ring` are the button's
   own answer (a tint, a shine sweep, a glow round it) on its box.
   The word is the button's material at about its label's size (`--jl-size`, set from the label): the display font, the
   button's ink (#171a29) as a thick outline through the shared .ink-text and one hard drop (never a text-shadow, no
   blur on the glyphs), and each letter in three flat layers: its own fill is the lip, ::before the face lifted so the
   lip shows under it, ::after a hard highlight on the upper part (a clip-path, no background-clip:text: WebKit paints
   that as a block under a filtered or animated parent). Steel for a loss, the button's green for a gain, gold for a
   jackpot. Motion: story-events-ui.ts storyLetteringShow (WAAPI, transform and opacity only).
   The face weight is 900 for the languages the display font does not cover (their system face takes its heaviest cut).
   `.is-still` = reduced motion: the word fades in place above the button, nothing is thrown, the rays stand still. */
.journal-lettering{position:absolute;inset:0;z-index:28;overflow:hidden;pointer-events:none;--jl-ink:#171a29;--jl-em:calc(var(--jl-size,30px)*var(--jl-fit,1))}
.journal-lettering.is-loss{--jl-face:#a9b8d6;--jl-hi:#edf2ff;--jl-lip:#566685;--jl-tint:#1b2440;--jl-glow:#9fb0d4}
.journal-lettering.is-gain{--jl-face:#8fe450;--jl-hi:#e9ffb4;--jl-lip:#297849;--jl-tint:#efffc4;--jl-glow:#c4ff7a;--jl-spark:#c9f96b}
.journal-lettering.is-jackpot{--jl-face:#ffc62e;--jl-hi:#fff5b0;--jl-lip:#c2641a;--jl-tint:#ffe873;--jl-glow:#ffd84a;--jl-spark:#ffdc3d}
.jl-stage{position:absolute;left:0;right:0;top:0;height:var(--jl-floor,100%);overflow:hidden}
.jl-pop{position:absolute;left:var(--jl-x,50%);bottom:5px;translate:-50% 0;transform-origin:50% 100%;font:900 var(--jl-em)/1 Lucky,system-ui;white-space:nowrap}
.jl-text{position:relative;display:block;font:inherit;letter-spacing:.015em;color:var(--jl-lip);transform-origin:50% 100%;--ink:var(--jl-ink);--ink-stroke:.2em;--ink-drop:.1em}
.jl-word{display:inline-block}.jl-word+.jl-word{margin-left:.24em}
.jl-text i{position:relative;display:inline-block;font-style:normal;transform-origin:50% 100%}
.jl-text i::before,.jl-text i::after{content:attr(data-c);position:absolute;left:0;top:0;-webkit-text-stroke:0;translate:0 -.05em}
.jl-text i::before{color:var(--jl-face)}
.jl-text i::after{color:var(--jl-hi);clip-path:inset(0 0 52% 0)}
/* Thrown from the word's foot on the button's edge: sparkles (a gain, a jackpot), dust (a loss), coins (a jackpot).
   Small inked shapes in the button's style; `--w` is their size in letter sizes. */
.jl-spark,.jl-puff,.jl-coin{position:absolute;left:var(--jl-x,50%);bottom:0;width:calc(var(--w)*var(--jl-em));height:calc(var(--w)*var(--jl-em));margin:0 0 calc(var(--w)*var(--jl-em)/-2) calc(var(--w)*var(--jl-em)/-2);overflow:visible;opacity:0}
.jl-spark path{fill:var(--jl-spark,#fff);stroke:var(--jl-ink);stroke-width:2.6;stroke-linejoin:round;paint-order:stroke}
.jl-puff path{fill:#c3cee4;stroke:var(--jl-ink);stroke-width:2.2;stroke-linejoin:round;paint-order:stroke}
.jl-coin{box-sizing:border-box;border:1.5px solid var(--jl-ink);border-radius:50%;background:radial-gradient(circle at 38% 32%,#fff5b0 0 22%,#ffc62e 24% 62%,#e8951c 64%)}
/* The jackpot's rays fan out of the button's edge behind the word (centred on the word's foot; the stage's floor hides
   their lower half). */
.jl-rays{position:absolute;left:var(--jl-x,50%);bottom:0;width:calc(var(--jl-em)*6);height:calc(var(--jl-em)*6);margin:0 0 calc(var(--jl-em)*-3) calc(var(--jl-em)*-3);overflow:visible;opacity:0}
.journal-lettering.is-still .jl-rays{opacity:1}
/* The button's answer, on its box (`--jl-bx/by/bw/bh/br` from storyLetteringPlace). clip-path, not overflow: WebKit
   lets an animated child out of a rounded overflow box. */
.jl-face,.jl-ring{position:absolute;left:var(--jl-bx,0);top:var(--jl-by,0);width:var(--jl-bw,0);height:var(--jl-bh,0);border-radius:var(--jl-br,999px)}
.jl-face{clip-path:inset(0 round var(--jl-br,999px))}
.jl-tint{position:absolute;inset:0;background:var(--jl-tint);opacity:0}
.jl-sheen{position:absolute;top:-10%;bottom:-10%;left:0;width:30%;background:linear-gradient(90deg,#fff0,#ffffffd1 50%,#fff0);opacity:0}
.jl-ring{box-shadow:0 0 0 2px var(--jl-glow),0 0 16px 5px var(--jl-glow);opacity:0}
.journal-lettering:not([data-anchor="button"]) :is(.jl-face,.jl-ring){display:none}
