/* wormhole.css r4 (ship 5 c: + the whb rules at the end, the card back out of the vortex; used only by wormhole-back.js). r3: the departure half of the wormhole (signed-in landing → Murder Pad / Games; sign-in page → landing). Used only by wormhole.js.
 * Nothing here shows until wormhole.js adds a class to <html>; with no JS, reduced motion or the static background the page is exactly as before.
 * No url(), no @import, no fonts. Layers: .sky (-1, the page's own galaxy + crow) < #wh-sky (1, the tunnel) < .wrap (2, the tiles) < #wh-flash (3).
 * r3: the Murder Pad trip no longer fades (the arrival page opens out instead); the sign-in trip puts the tunnel over the whole page. */
#wh-sky { position: fixed; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity .7s ease-in; }
#wh-flash { position: fixed; inset: 0; z-index: 3; opacity: 0; pointer-events: none; background: #07050F; transition: opacity .38s ease-in; }
html[data-wh="games"] #wh-flash { background: #100B16; }   /* the colour Games opens in */

html.wh-on { overflow: hidden; scrollbar-gutter: stable; }       /* no scrolling mid-flight; the gutter stays so nothing shifts sideways */
html.wh-on .wrap { position: relative; z-index: 2; pointer-events: none; }
html.wh-on header, html.wh-on .hero, html.wh-on .lbl, html.wh-on footer { transition: opacity .4s; }
html.wh-on .mod { transition: transform .65s cubic-bezier(.2, .7, .2, 1), opacity .4s, border-color .2s; }

html.wh-leaving header, html.wh-leaving .hero, html.wh-leaving .lbl, html.wh-leaving footer { opacity: 0; }
html.wh-leaving .mod:not(.wh-tile) { transform: translateY(46px) scale(.92); opacity: 0; }
/* the tapped tile flies to the crow (--wh-x / --wh-y are set by wormhole.js from the tile's place on screen), then falls in */
html.wh-leaving .mod.wh-tile { z-index: 3; border-color: var(--k); transform: translate(var(--wh-x, 0px), var(--wh-y, 0px)) scale(1.04); transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .45s, border-color .2s; }
html.wh-leaving .mod.wh-tile.wh-in { transform: translate(var(--wh-x, 0px), var(--wh-y, 0px)) scale(.2); opacity: 0; transition: transform .45s ease-in, opacity .45s ease-in; }

html.wh-warp #wh-sky { opacity: 1; }
html.wh-flash #wh-flash { opacity: 1; }
/* sign-in: the tunnel comes up over the whole sign-in page and takes every tap while it is there */
html.wh-sign #wh-sky { z-index: 2147483000; pointer-events: auto; transition: opacity .3s ease-in; }

/* belt and braces: wormhole.js never starts in these cases, and these rules keep the layers off even if it did */
html.bg-static #wh-sky, html.bg-static #wh-flash { display: none; }
@media (prefers-reduced-motion: reduce) { #wh-sky, #wh-flash { display: none; } }
/* r4 (ship 5 c, Nerion r_3f39516df0055fa4): the way BACK (wormhole-back.js, only while html.whb-on). The Murder Pad tile starts IN the vortex at the crow
 * (--whb-x / --whb-y), grows out (.whb-grow, .45 s), then flies home (.whb-home, .7 s) while the other tiles rise back (.whb-back): wormhole.js r5 in reverse.
 * whb-cap ends the hidden state BY ITSELF at 6.5 s even if the script dies. No pointer-events rule: the page is never left unclickable. */
html.whb-on .mod:not(.whb-tile) { transform: translateY(46px) scale(.92); opacity: 0; transition: none; }
html.whb-on.whb-back .mod:not(.whb-tile) { transform: none; opacity: 1; transition: transform .65s cubic-bezier(.2, .7, .2, 1), opacity .4s; }
html.whb-on .mod.whb-tile { z-index: 3; transform: translate(var(--whb-x, 0px), var(--whb-y, 0px)) scale(.2); opacity: 0; transition: none; }
html.whb-on .mod.whb-tile.whb-grow { border-color: var(--k); transform: translate(var(--whb-x, 0px), var(--whb-y, 0px)) scale(1.04); opacity: 1; transition: transform .45s ease-out, opacity .45s ease-out; }
html.whb-on .mod.whb-tile.whb-grow.whb-home { transform: none; transition: transform .7s cubic-bezier(.2, .7, .2, 1), border-color .2s; }
html.whb-on .mod { animation: whb-cap 0s linear 6.5s forwards; }
@keyframes whb-cap { to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.whb-on .mod { transform: none !important; opacity: 1 !important; } }
