/* Each illustration combines a sky, a silhouette, a foreground and a motif. */
.login-page[data-scene-palette] {
    --scene-rgb: 161, 208, 255;
    --scene-sky: #284561;
    --scene-shade: #132838;
    --scene-accent: rgb(var(--scene-rgb));
}

.login-page[data-scene-palette="rain"] { --scene-rgb: 147, 204, 255; --scene-sky: #355878; --scene-shade: #172e46; }
.login-page[data-scene-palette="ice"] { --scene-rgb: 207, 235, 255; --scene-sky: #416389; --scene-shade: #243d59; }
.login-page[data-scene-palette="rose"] { --scene-rgb: 255, 185, 205; --scene-sky: #684560; --scene-shade: #3f304d; }
.login-page[data-scene-palette="mint"] { --scene-rgb: 172, 242, 202; --scene-sky: #326665; --scene-shade: #204347; }
.login-page[data-scene-palette="gold"] { --scene-rgb: 255, 214, 134; --scene-sky: #6a4c3d; --scene-shade: #452e35; }
.login-page[data-scene-palette="violet"] { --scene-rgb: 226, 193, 255; --scene-sky: #584876; --scene-shade: #332c56; }
.login-page[data-scene-palette="aqua"] { --scene-rgb: 146, 242, 233; --scene-sky: #2c6a7d; --scene-shade: #1b4a5b; }
.login-page[data-scene-palette="coral"] { --scene-rgb: 255, 185, 151; --scene-sky: #84515a; --scene-shade: #533744; }
.login-page[data-scene-palette="sand"] { --scene-rgb: 252, 208, 152; --scene-sky: #795643; --scene-shade: #543943; }
.login-page[data-scene-palette="copper"] { --scene-rgb: 255, 186, 128; --scene-sky: #754a41; --scene-shade: #492f3b; }
.login-page[data-scene-palette="night"] { --scene-rgb: 180, 220, 255; --scene-sky: #384575; --scene-shade: #242e51; }
.login-page[data-scene-palette="ruby"] { --scene-rgb: 255, 177, 173; --scene-sky: #703f53; --scene-shade: #452738; }

[data-scene-palette] .login-ambient {
    background: radial-gradient(ellipse at 86% 45%, rgba(var(--scene-rgb), .14), transparent 56%);
}

[data-scene-palette] .login-brand-topline > span {
    background: var(--scene-accent);
    box-shadow: 0 0 0 4px rgba(var(--scene-rgb), .1);
}

.login-scene {
    --focus: 50%;
    --emblem-size: 60px;
    --particle-size: 5px;
    --particle-height: var(--particle-size);
    --particle-shape: 50%;
    --particle-entry: translateY(-10px) scale(.45);
    --particle-crest: translateY(5px) scale(1.3);
    --particle-rest: none;
    --emblem-entry: translateY(9px) scale(.88);
    --emblem-crest: translateY(-5px) scale(1.06);
    --emblem-rest: none;
    position: relative;
    isolation: isolate;
    height: 104px;
    margin: 0 0 16px;
    scroll-margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(var(--scene-rgb), .31);
    border-radius: 16px;
    background: #101c30;
    color: var(--scene-accent);
}

.login-scene--occasion { --focus: 27%; }

.login-scene-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at var(--focus) 48%, rgba(var(--scene-rgb), .24), transparent 58%),
        linear-gradient(152deg, var(--scene-sky), #142139 72%);
}

.login-scene-art::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(var(--scene-rgb), .17);
    border-radius: 11px;
    pointer-events: none;
}

.login-scene-caption {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 20px;
    width: 48%;
    transform: translateY(-50%);
    color: #fff6ed;
    line-height: 1.35;
    font-size: clamp(15px, 2.1vw, 24px);
    font-weight: 700;
    text-wrap: balance;
}

.login-scene-halo {
    position: absolute;
    top: 50%;
    left: var(--focus);
    width: 86px;
    height: 86px;
    margin: -43px 0 0 -43px;
    border: 1px solid rgba(var(--scene-rgb), .25);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--scene-rgb), .24), rgba(var(--scene-rgb), .03) 72%);
    box-shadow: 0 0 0 8px rgba(var(--scene-rgb), .05);
}

.login-scene-landscape {
    position: absolute;
    inset: auto 0 13px;
    height: 52%;
    background: linear-gradient(160deg, rgba(var(--scene-rgb), .45), var(--scene-shade) 66%);
    clip-path: var(--landscape-outline, ellipse(70% 70% at 45% 97%));
}

.login-scene-foreground {
    position: absolute;
    inset: auto -3% 0;
    height: 31%;
    background: var(--scene-shade);
    clip-path: var(--foreground-outline, ellipse(66% 90% at 62% 91%));
}

[data-landscape="coastline"] {
    --landscape-outline: polygon(0 63%, 8% 54%, 18% 58%, 25% 52%, 35% 61%, 45% 59%, 60% 46%, 73% 47%, 83% 54%, 93% 49%, 100% 58%, 100% 100%, 0 100%);
    --foreground-outline: polygon(0 38%, 12% 24%, 28% 33%, 47% 56%, 67% 39%, 84% 21%, 100% 33%, 100% 100%, 0 100%);
}

[data-landscape="river"] {
    --landscape-outline: polygon(0 61%, 21% 59%, 34% 67%, 53% 68%, 64% 52%, 80% 45%, 91% 48%, 100% 36%, 100% 100%, 0 100%);
    --foreground-outline: polygon(0 54%, 15% 34%, 30% 25%, 54% 51%, 70% 48%, 83% 25%, 100% 20%, 100% 100%, 0 100%);
}

:is([data-landscape="river"], [data-landscape="coastline"]) .login-scene-foreground {
    background: repeating-linear-gradient(176deg, rgba(var(--scene-rgb), .18) 0 1px, transparent 1px 13px), var(--scene-shade);
}

[data-landscape="mountains"] {
    --landscape-outline: polygon(0 74%, 12% 30%, 20% 54%, 35% 8%, 51% 61%, 56% 53%, 67% 18%, 81% 62%, 89% 46%, 100% 70%, 100% 100%, 0 100%);
}

[data-landscape="pyramids"] {
    --landscape-outline: polygon(0 87%, 7% 87%, 23% 22%, 35% 71%, 49% 5%, 66% 74%, 80% 39%, 94% 88%, 100% 88%, 100% 100%, 0 100%);
}

[data-landscape="pyramids"] .login-scene-landscape {
    background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(35, 28, 37, .16) 8px 9px), linear-gradient(158deg, var(--scene-accent), var(--scene-shade) 80%);
}

[data-landscape="temple"] {
    --landscape-outline: polygon(0 75%, 18% 75%, 25% 20%, 77% 20%, 83% 75%, 100% 75%, 100% 100%, 0 100%);
}

[data-landscape="temple"] .login-scene-landscape {
    background: repeating-linear-gradient(90deg, rgba(var(--scene-rgb), .25) 0 18px, transparent 18px 31px), linear-gradient(var(--scene-sky), var(--scene-shade));
}

[data-landscape="city"] {
    --landscape-outline: polygon(0 69%, 7% 69%, 7% 43%, 15% 43%, 15% 62%, 23% 62%, 23% 32%, 30% 32%, 30% 72%, 44% 72%, 44% 45%, 51% 45%, 51% 60%, 60% 60%, 60% 20%, 66% 20%, 66% 55%, 74% 55%, 74% 35%, 82% 35%, 82% 72%, 90% 72%, 90% 44%, 97% 44%, 97% 67%, 100% 67%, 100% 100%, 0 100%);
}

[data-landscape="old-cairo"] {
    --landscape-outline: polygon(0 76%, 10% 76%, 10% 47%, 13% 47%, 13% 32%, 16% 47%, 19% 47%, 19% 68%, 32% 68%, 34% 51%, 40% 41%, 47% 34%, 55% 41%, 61% 52%, 64% 68%, 76% 68%, 76% 26%, 79% 26%, 82% 11%, 85% 26%, 88% 26%, 88% 74%, 100% 74%, 100% 100%, 0 100%);
}

:is([data-landscape="city"], [data-landscape="old-cairo"]) .login-scene-landscape {
    background: radial-gradient(circle, rgba(var(--scene-rgb), .53) 1px, transparent 1.8px) 5px 7px / 18px 16px, var(--scene-shade);
}

[data-landscape="garden"] {
    --landscape-outline: polygon(0 75%, 5% 55%, 9% 47%, 14% 52%, 19% 44%, 25% 55%, 29% 76%, 47% 88%, 62% 64%, 66% 48%, 72% 38%, 78% 45%, 82% 40%, 89% 55%, 92% 66%, 100% 70%, 100% 100%, 0 100%);
}

[data-landscape="fields"] .login-scene-foreground {
    background:
        repeating-linear-gradient(164deg, transparent 0 12px, rgba(var(--scene-rgb), .19) 12px 13px),
        var(--scene-shade);
}

[data-landscape="dunes"] {
    --landscape-outline: polygon(0 88%, 12% 66%, 24% 57%, 33% 60%, 47% 77%, 60% 76%, 73% 49%, 82% 46%, 94% 59%, 100% 70%, 100% 100%, 0 100%);
    --foreground-outline: ellipse(70% 112% at 39% 118%);
}

.login-scene-emblem {
    position: absolute;
    top: calc(50% - var(--emblem-size) / 2);
    left: calc(var(--focus) - var(--emblem-size) / 2);
    display: grid;
    width: var(--emblem-size);
    height: var(--emblem-size);
    place-items: center;
    color: var(--scene-accent);
    font-size: calc(var(--emblem-size) * .60);
    text-shadow: 0 0 12px rgba(var(--scene-rgb), .4);
    transform: var(--emblem-rest);
}

.login-scene-symbol {
    position: relative;
    display: block;
    width: 88%;
    height: 88%;
}

.login-scene-symbol::before, .login-scene-symbol::after {
    content: "";
    position: absolute;
}

[data-symbol="sun"] {
    width: 75%;
    height: 75%;
    border: 1px solid #ffe7b2;
    border-radius: 50%;
    background: linear-gradient(#fff0b4, #f0a35f);
    box-shadow: 0 0 0 8px rgba(var(--scene-rgb), .12), 0 0 0 15px rgba(var(--scene-rgb), .06);
}

[data-symbol="crescent"]::before {
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 12px -9px 0 0 #ffe8aa;
    transform: rotate(-15deg);
}

[data-symbol="crescent"]::after {
    top: 16%;
    right: 8%;
    width: 12%;
    aspect-ratio: 1;
    background: #fff1c6;
    clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 63%, 50% 100%, 37% 63%, 0 50%, 37% 36%);
}

[data-symbol="kite"]::before {
    inset: 4% 19% 27%;
    background: conic-gradient(from 45deg, #f0bc6d 0 25%, #a9eed5 25% 50%, #66bdc8 50% 75%, #f69195 75%);
    clip-path: polygon(50% 0, 98% 39%, 50% 100%, 2% 39%);
}

[data-symbol="kite"]::after {
    top: 68%;
    left: 31%;
    width: 21%;
    height: 33%;
    border-right: 1px solid #f9e1a7;
    border-bottom: 1px solid #f9e1a7;
    border-radius: 0 0 95% 0;
}

[data-symbol="flag"] {
    width: 100%;
    background: linear-gradient(#f8d394, #b88758) left 10% center / 3% 100% no-repeat;
}

[data-symbol="flag"]::before {
    inset: 8% 2% 31% 11%;
    border-radius: 2px 9px 7px 0;
    background: radial-gradient(ellipse at center, #be8730 0 8%, transparent 9%),
        linear-gradient(#db3849 0 33%, #fff2e5 33% 67%, #141820 67%);
}

[data-symbol="flag"]::after {
    inset: 8% 2% 31% 11%;
    border-radius: 2px 9px 7px 0;
    background: linear-gradient(100deg, transparent, rgba(0, 0, 0, .16) 48%, transparent 80%);
}

[data-symbol="lantern"]::before {
    inset: 10% 12% 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 21%, rgba(137, 65, 34, .54) 22% 25%, transparent 26% 31%),
        linear-gradient(#d28b53 0 24%, #ffdf8c 24% 73%, #cd8054 73%);
    clip-path: polygon(50% 0, 83% 22%, 94% 25%, 79% 76%, 61% 91%, 60% 100%, 40% 100%, 39% 91%, 21% 76%, 6% 25%, 17% 22%);
}

[data-symbol="lantern"]::after {
    top: 0;
    left: 42%;
    width: 16%;
    height: 12%;
    border: 2px solid #ffdb92;
    border-radius: 50%;
}

[data-symbol="cookie"] {
    width: 72%;
    height: 72%;
    border: 2px solid #ffe9c1;
    border-radius: 50%;
    background: repeating-conic-gradient(#fad497 0 9deg, #ffebba 10deg 20deg);
    box-shadow: inset 0 0 0 5px #dfaa71;
}

[data-symbol="cookie"]::before {
    inset: 34%;
    border: 2px dotted #be8252;
    border-radius: 50%;
    background: #ffe9b8;
}

[data-symbol="candle"]::before {
    inset: 41% 30% 6%;
    border-radius: 4px;
    background: linear-gradient(90deg, #e6a184, #fff1cf 65%, #eebca0);
}

[data-symbol="candle"]::after {
    inset: 4% 40% 64%;
    border-radius: 80% 35% 70% 40%;
    transform: rotate(38deg);
    background: linear-gradient(#fff6a2, #ffac78);
    box-shadow: 0 0 16px #efa86f;
}

[data-symbol="eggs"]::before, [data-symbol="eggs"]::after {
    width: 42%;
    height: 61%;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
}

[data-symbol="eggs"]::before {
    top: 14%;
    left: 13%;
    transform: rotate(-21deg);
    background: repeating-linear-gradient(0deg, #ffbdc2 0 8px, #ffdba9 8px 12px);
}

[data-symbol="eggs"]::after {
    right: 9%;
    bottom: 14%;
    transform: rotate(19deg);
    background: repeating-linear-gradient(0deg, #7acfbd 0 8px, #def2ac 8px 12px);
}

[data-symbol="sweets"]::before {
    inset: 26% 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #ec9879, #ffd8ad 25% 75%, #f5a2b6);
    clip-path: polygon(0 0, 29% 28%, 71% 28%, 100% 0, 93% 50%, 100% 100%, 71% 72%, 29% 72%, 0 100%, 7% 50%);
}

[data-symbol="sweets"]::after {
    inset: 27% 27%;
    border: 2px solid #ffd9df;
    border-radius: 8px;
    background: repeating-linear-gradient(135deg, #f58f9d 0 6px, #ffe0ab 6px 10px);
}

[data-symbol="felucca"]::before {
    inset: 2% 14% 26%;
    background: linear-gradient(135deg, #fff4cf, #efb996);
    clip-path: polygon(42% 0, 94% 96%, 50% 85%, 38% 99%, 38% 18%, 21% 94%, 0 100%);
}

[data-symbol="felucca"]::after {
    inset: 77% 4% 5%;
    border-radius: 5px 5px 90% 90%;
    background: #e7a281;
}

[data-symbol="palm"]::before {
    inset: 4% 1% 14%;
    background: linear-gradient(120deg, #bcdea2, #64ba9b);
    clip-path: polygon(49% 34%, 58% 11%, 76% 0, 71% 27%, 96% 23%, 100% 40%, 71% 40%, 90% 70%, 60% 51%, 46% 68%, 40% 47%, 12% 69%, 20% 44%, 0 35%, 26% 22%, 35% 23%, 29% 2%);
}

[data-symbol="palm"]::after {
    top: 42%;
    bottom: 5%;
    left: 49%;
    width: 10%;
    transform: rotate(8deg);
    border-radius: 50% 30% 10% 10%;
    background: linear-gradient(90deg, #aa7362, #e9ad78);
}

[data-symbol="flower"]::before {
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 27%, #ffd5c8 0 17%, transparent 18%),
        radial-gradient(ellipse at 76% 49%, #f497af 0 17%, transparent 18%),
        radial-gradient(ellipse at 64% 76%, #f7b3c9 0 17%, transparent 18%),
        radial-gradient(ellipse at 33% 73%, #ee9ea9 0 17%, transparent 18%),
        radial-gradient(ellipse at 24% 46%, #f6adbc 0 17%, transparent 18%);
}

[data-symbol="flower"]::after {
    inset: 38%;
    border-radius: 50%;
    background: #ffdf9c;
}

[data-symbol="leaf"]::before {
    inset: 9% 10% 11%;
    border-radius: 83% 0 72% 13%;
    background: linear-gradient(45deg, #de865c, #ffca86);
}

[data-symbol="leaf"]::after, [data-symbol="wheat"]::after {
    bottom: 7%;
    left: 47%;
    height: 76%;
    width: 2px;
    border-radius: 50%;
    transform: rotate(42deg);
    background: #ffe5a6;
}

[data-symbol="wheat"]::before {
    inset: 0 8% 6%;
    transform: rotate(33deg);
    background:
        radial-gradient(ellipse at 51% 15%, #ffe3a1 0 12%, transparent 13%),
        radial-gradient(ellipse at 35% 34%, #efb874 0 12%, transparent 13%),
        radial-gradient(ellipse at 64% 34%, #ffd696 0 12%, transparent 13%),
        radial-gradient(ellipse at 34% 53%, #f0bc7f 0 12%, transparent 13%),
        radial-gradient(ellipse at 65% 53%, #ffdb96 0 12%, transparent 13%),
        radial-gradient(ellipse at 36% 72%, #ecad6a 0 12%, transparent 13%),
        radial-gradient(ellipse at 61% 72%, #ffd58c 0 12%, transparent 13%);
}

[data-symbol="star"]::before, [data-symbol="firework"]::before {
    inset: 0;
    background: linear-gradient(135deg, #fff2bd, var(--scene-accent));
    clip-path: polygon(50% 0, 59% 38%, 86% 14%, 62% 41%, 100% 50%, 62% 59%, 86% 86%, 59% 62%, 50% 100%, 41% 62%, 14% 86%, 38% 59%, 0 50%, 38% 41%, 14% 14%, 41% 38%);
}

[data-symbol="firework"]::after {
    inset: 8%;
    border: 2px dotted #ffdbab;
    border-radius: 50%;
}

/* Small independently moving shapes. No layout or filter work during playback. */
.login-scene-particles { position: absolute; inset: 0; }

.login-scene-particles > span {
    position: absolute;
    top: var(--y);
    left: calc(var(--focus) + var(--x) - 27%);
    width: var(--particle-size);
    height: var(--particle-height);
    border-radius: var(--particle-shape);
    background: var(--particle-color, currentColor);
    opacity: .64;
    transform: var(--particle-rest);
}

.login-scene-particles > :nth-child(1) { --x: 10%; --y: 32%; --delay: .16s; --dx: 35px; --dy: 17px; }
.login-scene-particles > :nth-child(2) { --x: 35%; --y: 28%; --delay: .38s; --dx: -19px; --dy: 30px; }
.login-scene-particles > :nth-child(3) { --x: 40%; --y: 60%; --delay: .12s; --dx: -26px; --dy: -16px; }
.login-scene-particles > :nth-child(4) { --x: 19%; --y: 68%; --delay: .56s; --dx: 16px; --dy: -25px; }
.login-scene-particles > :nth-child(5) { --x: 15%; --y: 21%; --delay: .27s; --dx: 26px; --dy: 26px; }
.login-scene-particles > :nth-child(6) { --x: 44%; --y: 44%; --delay: .49s; --dx: -39px; --dy: 6px; }
.login-scene-particles > :nth-child(7) { --x: 8%; --y: 66%; --delay: .32s; --dx: 42px; --dy: -16px; }

[data-motion="rain"] {
    --particle-size: 2px;
    --particle-height: 17px;
    --particle-rest: rotate(20deg);
    --particle-animation: scene-rain;
    --particle-duration: 1.8s;
    --particle-iterations: 2;
}

[data-motion="snow"] { --particle-entry: translate(-12px, -30px); --particle-crest: translate(6px, 8px); --particle-duration: 4.1s; }
[data-motion="petals"] { --particle-size: 9px; --particle-shape: 80% 30%; --particle-entry: translate(18px, -18px) rotate(-48deg); --particle-crest: translate(-7px, 12px) rotate(38deg); --particle-rest: rotate(18deg); }
[data-motion="swing"] { --emblem-entry: translateY(8px) rotate(-19deg); --emblem-crest: translateY(-5px) rotate(15deg); --emblem-animation: scene-swing; --particle-entry: scale(.3); --particle-crest: translateY(-6px) scale(1.35); }
[data-motion="sway"] { --emblem-entry: skewX(-12deg); --emblem-crest: skewX(8deg); --emblem-animation: scene-swing; --particle-size: 8px; --particle-height: 5px; --particle-entry: translate(-18px, 4px); --particle-crest: translate(7px, -5px) rotate(32deg); }
[data-motion="rise"] { --emblem-entry: translateY(24px) scale(.72); --emblem-crest: translateY(-3px) scale(1.04); --particle-entry: translateY(18px) scale(.2); --particle-crest: translateY(-8px) scale(1.3); }
[data-motion="sparkle"] { --particle-animation: scene-sparkle; --particle-size: 7px; --particle-shape: 1px; --particle-rest: rotate(45deg); }
[data-motion="wave"] { --emblem-entry: translateX(-26px) rotate(-8deg); --emblem-crest: translateX(6px) rotate(4deg); --particle-size: 22px; --particle-height: 2px; --particle-entry: translateX(-26px) scaleX(.2); --particle-crest: translateX(10px) scaleX(1.2); }
[data-motion="sail"] { --emblem-entry: translate(-24px, 9px) rotate(-7deg); --emblem-crest: translate(9px, -4px) rotate(4deg); --particle-size: 16px; --particle-height: 2px; --particle-entry: translateX(-18px) scaleX(.2); --particle-crest: translateX(11px) scaleX(1.25); }
[data-motion="breeze"] { --emblem-entry: skewX(-10deg); --emblem-crest: skewX(7deg); --emblem-animation: scene-swing; --particle-entry: translateX(-29px); --particle-crest: translate(10px, -5px); }
[data-motion="leaves"] { --emblem-entry: translate(-12px, -18px) rotate(-22deg); --emblem-crest: translate(7px, 5px) rotate(10deg); --particle-size: 11px; --particle-height: 6px; --particle-shape: 86% 10%; --particle-entry: translate(-20px, -27px) rotate(-42deg); --particle-crest: translate(9px, 9px) rotate(74deg); --particle-rest: rotate(27deg); }
[data-motion="burst"] { --emblem-entry: scale(.35) rotate(-9deg); --emblem-crest: scale(1.12) rotate(3deg); --particle-animation: scene-burst; --particle-size: 8px; --particle-height: 5px; --particle-shape: 1px; --particle-rest: rotate(35deg); }
[data-motion="unfurl"] { --emblem-entry: scaleX(.48) skewY(9deg); --emblem-crest: scaleX(1.05) skewY(-6deg); --emblem-animation: scene-swing; --particle-entry: translate(-20px, 11px) rotate(-30deg); --particle-crest: translate(7px, -8px) rotate(68deg); --particle-rest: rotate(36deg); --particle-shape: 1px; }

:is([data-motion="burst"], [data-motion="petals"], [data-motion="leaves"]) .login-scene-particles > :nth-child(2n) { --particle-color: #ffcc88; }
:is([data-motion="burst"], [data-motion="unfurl"]) .login-scene-particles > :nth-child(3n) { --particle-color: #a1ead2; }

@media (prefers-reduced-motion: no-preference) {
    .login-scene-emblem { animation: var(--emblem-animation, scene-emblem) 3.9s ease-out; }
    .login-scene-halo { animation: scene-halo 3.4s ease-out; }
    .login-scene-particles > span {
        animation: var(--particle-animation, scene-particle) var(--particle-duration, 3.7s)
            ease-in-out var(--delay) var(--particle-iterations, 1) backwards;
    }

    :is([data-motion="wave"], [data-motion="sail"], [data-motion="breeze"]) .login-scene-foreground {
        animation: scene-foreground 4s ease-out;
    }
}

@keyframes scene-emblem {
    0% { opacity: .15; transform: var(--emblem-entry); }
    48% { opacity: 1; transform: var(--emblem-crest); }
    100% { opacity: 1; transform: var(--emblem-rest); }
}

@keyframes scene-swing {
    0% { opacity: .2; transform: var(--emblem-entry); }
    32% { opacity: 1; transform: var(--emblem-crest); }
    64% { transform: var(--emblem-entry) scale(.99); }
    100% { transform: var(--emblem-rest); }
}

@keyframes scene-halo {
    0% { opacity: .1; transform: scale(.72); }
    56% { opacity: .92; transform: scale(1.08); }
    100% { opacity: 1; transform: none; }
}

@keyframes scene-particle {
    0% { opacity: 0; transform: var(--particle-entry); }
    52% { opacity: .99; transform: var(--particle-crest); }
    100% { opacity: .64; transform: var(--particle-rest); }
}

@keyframes scene-rain {
    0% { opacity: 0; transform: translate(16px, -37px) rotate(20deg); }
    28% { opacity: .95; }
    77% { opacity: 0; transform: translate(-11px, 34px) rotate(20deg); }
    78% { opacity: 0; transform: var(--particle-rest); }
    100% { opacity: .64; transform: var(--particle-rest); }
}

@keyframes scene-sparkle {
    0% { opacity: 0; transform: rotate(20deg) scale(.2); }
    33% { opacity: .95; transform: rotate(65deg) scale(1.5); }
    61% { opacity: .25; transform: rotate(32deg) scale(.7); }
    100% { opacity: .64; transform: var(--particle-rest); }
}

@keyframes scene-burst {
    0% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.15); }
    39% { opacity: 1; transform: rotate(135deg) scale(1.25); }
    100% { opacity: .64; transform: var(--particle-rest); }
}

@keyframes scene-foreground {
    0% { transform: translateX(-2.3%) scaleY(.78); }
    53% { transform: translateX(1.9%) scaleY(1.08); }
    100% { transform: none; }
}

@media (max-width: 700px) {
    .login-scene { --emblem-size: 46px; height: 82px; margin-bottom: 14px; }
    .login-scene-halo { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
    .login-scene-caption { inset-inline-start: 15px; font-size: 15px; }
    .login-scene-particles > :nth-child(n+4) { display: none; }
}

/* The selector is rendered on the local preview route only. */
.login-page.login-page--preview { align-items: flex-start; padding-block-start: 22px; }

.login-preview {
    margin-bottom: 22px;
    padding: 13px;
    border: 1px solid #30435f;
    border-radius: 16px;
    background: #142239;
}

.login-preview-heading, .login-preview-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.login-preview-heading { justify-content: space-between; margin: 0 2px 12px; }
.login-preview-heading p { margin: 0 0 4px; color: #a9bdd8; font-size: 11px; }
.login-preview-heading strong { color: var(--scene-accent); font-size: 15px; }
.login-preview-actions :is(a, button) { color: #b8d7ff; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.login-preview-actions button { padding: 0; border: 0; background: none; }
.login-preview-actions i { margin-inline-end: 3px; font-size: 10px; }

.login-preview-months {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 5px;
}

.login-preview-months a, .login-preview-links a {
    padding: 7px 4px;
    border: 1px solid #30435f;
    border-radius: 7px;
    color: #c3d4ed;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
}

.login-preview :is(.login-preview-months, .login-preview-links) a:is(:hover, [aria-current="page"]) {
    border-color: var(--scene-accent);
    background: rgba(var(--scene-rgb), .12);
    color: var(--scene-accent);
}

.login-preview-occasions { margin-top: 10px; padding: 9px 1px 1px; border-top: 1px solid #30435f; }
.login-preview-occasions summary { color: #d8e5f7; font-size: 12px; cursor: pointer; }
.login-preview-occasions summary:focus-visible { outline: 2px solid var(--scene-accent); outline-offset: 3px; }

.login-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.login-preview-links a { padding-inline: 9px; }
.login-preview-fields { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.login-preview-fields button { cursor: default; }

@media (max-width: 800px) {
    .login-preview-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 450px) {
    .login-preview-months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
