/* The prototype engine's own chrome: screens, sheets, toast and rolling figures. Shared by the story page
   (index.html) and the single prototype page (play.html), so both run the prototypes the same way. */
:root { --dur: 240ms; --ease: cubic-bezier(.2, .7, .2, 1); }

.scr-host { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.js .scr-in.in-fwd { transform: translateX(32px); opacity: 0; }
.js .scr-in.in-back { transform: translateX(-24px); opacity: 0; }
.js .scr-in.in-up { transform: translateY(48px); opacity: 0; }
.js .scr-in.in-fade { opacity: 0; }
.scr-out { pointer-events: none; }
.js .scr-out.out-fwd { transform: translateX(-24px); opacity: 0; }
.js .scr-out.out-back { transform: translateX(32px); opacity: 0; }
.js .scr-out.out-up, .js .scr-out.out-fade { opacity: 0; }
.sheet-host { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.sheet-scrim { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur) var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; overflow-y: auto; transform: translateY(100%); transition: transform 300ms var(--ease); border-radius: 14px 14px 0 0; }
.sheet-wrap.on .sheet { transform: none; }
.sheet-wrap.on .sheet-scrim { opacity: 1; }
.toast { position: absolute; left: 16px; right: 16px; bottom: 104px; z-index: 6; padding: 12px 14px; border-radius: 6px; font-size: 15px; line-height: 1.35; opacity: 0; transform: translateY(8px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.roll { display: inline-flex; line-height: 1; vertical-align: baseline; }
.roll-v { display: inline-flex; }
.dg { display: inline-block; height: 1em; overflow: hidden; }
.dg i { display: block; font-style: normal; line-height: 1; transform: translateY(calc(var(--d) * -1em)); transition: transform 320ms var(--ease); }
.ch { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .scr, .sheet, .sheet-scrim, .toast, .dg i { transition: none !important; }
}
