/* =====================================================================================================================
   Seasonal themes (spec 037). Contract: specs/037-seasonal-holiday-themes/contracts/season-runtime.md

   - Season rules live ONLY under html[data-season="…"], so removing the attribute restores the everyday look.
   - A season sets tokens: --season-bg, --season-card-edge, --season-cta-glow, --season-cta-deco, --season-cta-deco-disc
     and --season-nav-accent. Besides those it may style .season-backdrop *, .season-moment *, .baku-image * and the
     call-to-action toppers (.btn-primary::after, .nav-float-scan-disc::after, and .btn-primary::before while idle).
   - Never change color, font-* or opacity on text, inputs, QR codes or alerts. Contrast stays exactly as everyday.
   - Every animation stops under prefers-reduced-motion, [data-season-paused] (app hidden), [data-season-still]
     (low-power device) and [data-season-calm] (a send/sign confirmation or a QR is on screen; the layer is removed).
   ===================================================================================================================== */

/* ---------- Shared hooks: these read the tokens, so a season only ever sets tokens ---------- */

html[data-season] .season-shell {
    background: var(--season-bg);
    isolation: isolate; /* the backdrop sits between the shell's background and the page */
}

/* A strip along the top edge of a card that wears the season (Home's wallet card). */
html[data-season] .season-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: var(--season-card-edge-h, 12px);
    background: var(--season-card-edge);
    filter: var(--season-card-edge-shadow, none);
    pointer-events: none;
    z-index: 1;
}

/* The call to action (the primary button and the Scan disc) keeps its blue: red already means "danger" in this app.
   A season dresses it instead: --season-cta-glow around it, --season-cta-deco as pattern layers over the blue (kept to
   the ends and corners so the white label keeps its contrast), and the season's topper on ::after, something sitting
   on the button (snow, a spark, a heart, a spider). ::before is the loading spinner, so it is only used while idle. */
html[data-season] .btn-primary {
    box-shadow: var(--ui-primary-shadow), var(--season-cta-glow);
    background-image: var(--season-cta-deco, none);
    background-position: var(--season-cta-deco-pos, 0 0);
    background-size: var(--season-cta-deco-size, auto);
    background-repeat: var(--season-cta-deco-repeat, no-repeat);
}
html[data-season] .nav-float-scan-disc {
    background-image: var(--season-cta-deco-disc, none);
    background-position: var(--season-cta-deco-disc-pos, 0 0);
    background-size: var(--season-cta-deco-disc-size, auto);
    background-repeat: var(--season-cta-deco-disc-repeat, no-repeat);
    box-shadow: var(--ui-primary-shadow), 0 0 0 4px var(--ui-surface), var(--season-cta-glow);
}
html[data-season] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season] .nav-float-scan-disc::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
/* In the desktop rail the disc is static; the topper needs it positioned (no offsets, so it does not move). */
@media (min-width: 1024px) {
    html[data-season] .nav-float-live .nav-float-scan-disc { position: relative; left: auto; bottom: auto; }
}
/* Money is about to move or a secret is on screen: the button goes back to plain (FR-011). */
html[data-season-calm] .btn-primary,
html[data-season-calm] .nav-float-scan-disc { background-image: none !important; }
html[data-season-calm][data-season] .btn-primary::after,
html[data-season-calm][data-season] .nav-float-scan-disc::after,
html[data-season-calm][data-season] .btn-primary:not(.is-loading):not([aria-busy="true"])::before { content: none !important; }

html[data-season] .nav-float-pill {
    background: color-mix(in srgb, var(--season-nav-accent) 26%, transparent);
}

/* ---------- The moving layer behind the page ---------- */

.season-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}
/* Halloween's moon and bats fly in front of the page but under the nav (z-30), sheets and dialogs (z-50 and up). */
.season-backdrop.season-front { z-index: 25; }

/* Snow (winter): 30 soft flakes in three depths. Far flakes are small, faint and slow; near ones are big, softer at the
   edge and faster, so the scene has depth. The flake falls while its ::before sways, so each one drifts on its own
   curve instead of zig-zagging. Gradients only: no blur filters, and nothing but transform and opacity animates. */
.snowflake {
    position: absolute;
    top: -16px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    will-change: transform;
    animation: snow-fall var(--t) linear var(--d) infinite;
}
.snowflake::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0 38%, rgba(255, 255, 255, 0.7) 56%, rgba(255, 255, 255, 0) 72%);
    animation: snow-sway calc(var(--t) / 3) ease-in-out var(--d) infinite alternate;
}
.snowflake.depth-0 { opacity: 0.5; }
.snowflake.depth-1 { opacity: 0.75; }
.snowflake.depth-2 { opacity: 0.85; }
.snowflake.depth-2::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 22%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 72%);
}
/* On the light page white flakes need a cool rim to be seen at all. */
html:not(.dark) .snowflake::before,
html:not(.dark) .snowflake.depth-2::before {
    background: radial-gradient(circle, #ffffff 0 32%, rgba(176, 202, 236, 0.95) 50%, rgba(150, 182, 224, 0) 72%);
}
@keyframes snow-fall {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, calc(100dvh + 32px), 0); }
}
@keyframes snow-sway {
    from { transform: translateX(calc(var(--sway) * -0.5)); }
    to   { transform: translateX(calc(var(--sway) * 0.5)); }
}

/* Winter lights: C9 bulbs clipped onto a twisted green wire that sags in three swags along the top of the app. Each
   bulb hangs square to the wire, with a ridged socket, a glass highlight and a coloured halo, and flickers on its own
   rhythm, as real strings do. */
.xmas-lights {
    position: absolute;
    inset: 0 0 auto 0;
    height: 52px;
}
.xmas-wire {
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    height: 30px;
    overflow: visible;
}
.xmas-wire path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.xmas-wire-main  { stroke: #1d3a26; stroke-width: 2.4; }
.xmas-wire-twist { stroke: #4b7a55; stroke-width: 1; stroke-dasharray: 2 5; }
html.dark .xmas-wire-main  { stroke: #2f5a3a; }
html.dark .xmas-wire-twist { stroke: #6f9f78; }

.xmas-bulb {
    position: absolute;
    width: 10px;
    height: 22px;
    margin: -2px 0 0 -5px;
    transform-origin: 50% 0;
    transform: rotate(var(--rot));
}
/* The socket: a dark green ridged cap. */
.xmas-bulb::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0;
    width: 6px;
    height: 7px;
    border-radius: 1.5px 1.5px 2px 2px;
    background:
        repeating-linear-gradient(180deg, transparent 0 1.5px, rgba(0, 0, 0, 0.35) 1.5px 2px),
        linear-gradient(90deg, #0d2415, #2e5b3a 45%, #12301c);
    z-index: 2;
}
.xmas-bulb-glass {
    position: absolute;
    left: 0;
    top: 6px;
    width: 10px;
    height: 15px;
    border-radius: 45% 45% 50% 50% / 32% 32% 68% 68%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0 9%, rgba(255, 255, 255, 0) 22%),
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c) 35%, #fff) 0%, var(--c) 52%, color-mix(in srgb, var(--c) 62%, #000) 100%);
    z-index: 1;
}
/* Dims the glass in step with the halo, so a bulb flickers as one piece. */
.xmas-bulb-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(10, 10, 20, 0.45);
    opacity: 0;
    animation: xmas-dim var(--tw) ease-in-out var(--td) infinite;
}
.xmas-bulb-halo {
    position: absolute;
    left: 50%;
    top: 14px;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c) 18%, transparent) 38%, transparent 68%);
    animation: xmas-glow var(--tw) ease-in-out var(--td) infinite;
}
html:not(.dark) .xmas-bulb-halo { opacity: 0.7; }
@keyframes xmas-glow {
    0%, 100% { opacity: 1; }
    44%      { opacity: 0.9; }
    50%      { opacity: 0.25; }
    56%      { opacity: 0.85; }
    62%      { opacity: 0.55; }
    68%      { opacity: 1; }
}
@keyframes xmas-dim {
    0%, 44%, 68%, 100% { opacity: 0; }
    50%                { opacity: 1; }
    56%                { opacity: 0.15; }
    62%                { opacity: 0.6; }
}

/* Valentine's: glossy hearts in three depths rise and sway, each on its own curve. */
.season-defs { position: absolute; width: 0; height: 0; }
.heart-float {
    position: absolute;
    bottom: -30px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    will-change: transform;
    animation: heart-rise var(--t) linear var(--d) infinite;
}
.heart-float svg {
    display: block;
    width: 100%;
    height: 100%;
    animation: heart-sway calc(var(--t) / 3) ease-in-out var(--d) infinite alternate;
}
.heart-float.depth-0 { opacity: 0.4; }
.heart-float.depth-1 { opacity: 0.65; }
.heart-float.depth-2 { opacity: 0.85; }
@keyframes heart-rise {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, calc(-100dvh - 40px), 0); }
}
@keyframes heart-sway {
    from { transform: translateX(calc(var(--sway) * -0.5)) rotate(-12deg); }
    to   { transform: translateX(calc(var(--sway) * 0.5)) rotate(12deg); }
}

/* Halloween: bats fly across the sky in loose arcs, each flapping on its own beat. */
.bat {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: calc(var(--s) / 2);
    will-change: transform;
    animation: bat-fly var(--t) ease-in-out var(--d) infinite;
}
.bat svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bat-body, .bat-wing { fill: #2a1d3a; }
html.dark .bat-body, html.dark .bat-wing { fill: #140a22; stroke: rgba(253, 230, 138, 0.9); stroke-width: 1.5; }
/* By day a pale rim keeps the silhouette readable where it crosses the blue wallet card. */
html:not(.dark) .bat-body, html:not(.dark) .bat-wing { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.4; }
/* At night a bat is a silhouette against a faintly lit sky: a violet glow gives it that sky to stand against. */
html.dark .bat svg { filter: drop-shadow(0 0 1.5px rgba(253, 230, 138, 0.55)) drop-shadow(0 0 5px rgba(168, 85, 247, 0.6)); }
.bat-wing { transform-box: fill-box; animation: bat-flap-l var(--flap) ease-in-out infinite alternate; }
.bat-wing-l { transform-origin: 100% 40%; }
.bat-wing-r { transform-origin: 0% 40%; animation-name: bat-flap-r; }
.bat.depth-0 svg { opacity: 0.45; }
.bat.depth-1 svg { opacity: 0.7; }
.bat.depth-2 svg { opacity: 0.9; }
html:not(.dark) .bat.depth-0 svg { opacity: 0.35; }
html:not(.dark) .bat.depth-1 svg { opacity: 0.55; }
html:not(.dark) .bat.depth-2 svg { opacity: 0.7; }
@keyframes bat-flap-l {
    from { transform: rotate(-22deg) scaleY(1); }
    to   { transform: rotate(32deg) scaleY(0.7); }
}
@keyframes bat-flap-r {
    from { transform: rotate(22deg) scaleY(1); }
    to   { transform: rotate(-32deg) scaleY(0.7); }
}
@keyframes bat-fly {
    0%   { transform: translate3d(-60vw, 10px, 0) scale(0.85); opacity: 0; }
    8%   { opacity: 1; }
    30%  { transform: translate3d(-20vw, -26px, 0) scale(1); }
    55%  { transform: translate3d(12vw, 14px, 0) scale(1.05); }
    80%  { transform: translate3d(40vw, -20px, 0) scale(0.95); }
    92%  { opacity: 1; }
    100% { transform: translate3d(70vw, 6px, 0) scale(0.85); opacity: 0; }
}

/* ---------- Pause conditions ---------- */

/* Frozen, not removed: the negative delays leave each particle at its own point, so the still version is a scatter. */
html[data-season-paused] .season-backdrop *,
html[data-season-paused] .season-backdrop *::before,
html[data-season-paused] .season-backdrop *::after,
html[data-season-still] .season-backdrop *,
html[data-season-still] .season-backdrop *::before,
html[data-season-still] .season-backdrop *::after {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    .season-backdrop *,
    .season-backdrop *::before,
    .season-backdrop *::after,
    .season-moment *,
    .season-moment *::before,
    .season-moment *::after {
        animation-play-state: paused !important;
        transition: none !important;
    }
}

/* A confirmation, a signing step or a QR is on screen: nothing moves behind it (FR-011). */
html[data-season-calm] .season-backdrop,
html[data-season-calm] .season-moment {
    display: none;
}

/* =====================================================================================================================
   Winter (1–30 December)
   ===================================================================================================================== */

html[data-season="winter"] {
    --season-bg: linear-gradient(180deg, #e8f1fc 0%, #f4f8fd 38%, #f8fafc 100%);
    /* Fresh snow lying along the top of the card: an uneven lower edge, shaded underneath, with icicles hanging off it.
       The same drift as the buttons, seen from the front. The tile repeats seamlessly. */
    --season-card-edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.55' stop-color='%23f6f9fe'/%3E%3Cstop offset='1' stop-color='%23d3e1f2'/%3E%3C/linearGradient%3E%3ClinearGradient id='i' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23cfe3f7' stop-opacity='.7'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23i)' d='M17 8.6l1.5 8 1.7-8.4ZM46 9.6l1 5 1.2-5.2ZM82 8.4l1.3 8.6 1.7-8.8ZM103 7.8l.9 4.8 1.1-4.9Z'/%3E%3Cpath fill='url(%23s)' d='M0 0H120V7C112 9 106 6.5 98 8.5 90 10.5 84 7 76 8.8 68 10.6 60 7.2 52 9 44 11 36 7.4 28 9.2 20 11 12 7.5 0 7Z'/%3E%3C/svg%3E") 0 0 / 120px 18px repeat-x;
    --season-card-edge-h: 18px;
    --season-card-edge-shadow: drop-shadow(0 1.5px 1.5px rgba(2, 12, 30, 0.35));
    --season-cta-glow: 0 0 0 1px rgba(245, 184, 61, 0.45), 0 8px 22px -6px rgba(225, 29, 72, 0.35);
    --season-nav-accent: #e11d48;
}

html.dark[data-season="winter"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #0a2452 0%, rgba(3, 22, 51, 0) 70%),
        linear-gradient(180deg, #041a3d 0%, #021230 60%, #010b20 100%);
    --season-cta-glow: 0 0 0 1px rgba(245, 184, 61, 0.40), 0 8px 24px -6px rgba(56, 189, 248, 0.40);
    --season-nav-accent: #f5b83d;
}


/* =====================================================================================================================
   Baku's image box (<BakuImage>, contracts/baku-image.md). The everyday pose sizes the box in every case. A costumed
   render is the same canvas plus 20 % room on top, so it is drawn 120 % tall from the bottom: Baku's body lands exactly
   where the everyday pose puts it, and the hat rises above the box. Overflow stays visible for that reason.
   ===================================================================================================================== */

.baku-image {
    position: relative;
    display: block;
    overflow: visible;
    user-select: none;
}
.baku-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
}
.baku-image > .baku-image-sizer { visibility: hidden; }
.baku-image > .baku-image-full {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 120%;
}

/* =====================================================================================================================
   Gift-wrapped payment notice (24–25 December, FR-018). The text is in the page from the start, so screen readers
   announce it at once; the box shakes, its lid pops off and the text slides in. A tap (.is-open) or reduced motion
   shows it already open. Not a .season-moment: a payment notice must still show on a calm screen.
   ===================================================================================================================== */

.gift-toast { background: linear-gradient(135deg, #be123c 0%, #9f1239 45%, #166534 100%); cursor: pointer; }

.gift-box {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    animation: gift-shake 0.5s ease-in-out 0.15s 2 both;
}
.gift-body {
    position: absolute;
    left: 3px;
    bottom: 1px;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent 8px, #fef3c7 8px 14px, transparent 14px), #f5b83d;
}
.gift-lid {
    position: absolute;
    left: 1px;
    top: 6px;
    width: 26px;
    height: 7px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent 10px, #fef3c7 10px 16px, transparent 16px), #fcd34d;
    transform-origin: 20% 100%;
    animation: gift-lid-off 0.45s cubic-bezier(0.3, 0.6, 0.4, 1) 1.1s forwards;
}
.gift-lid::before,
.gift-lid::after {
    content: "";
    position: absolute;
    top: -6px;
    width: 8px;
    height: 7px;
    border: 2px solid #fef3c7;
    border-radius: 50% 50% 0 50%;
}
.gift-lid::before { left: 5px; transform: rotate(20deg); }
.gift-lid::after { right: 5px; transform: scaleX(-1) rotate(20deg); }
.gift-burst {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 243, 199, 0.95) 0 2px, transparent 3px) 0 0 / 9px 9px;
    opacity: 0;
    animation: gift-burst 0.6s ease-out 1.2s;
}
.gift-text { animation: gift-reveal 0.35s ease-out 1.25s backwards; }

@keyframes gift-shake {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-10deg); }
    75%      { transform: rotate(10deg); }
}
@keyframes gift-lid-off {
    to { transform: translate(-4px, -16px) rotate(-35deg); opacity: 0; }
}
@keyframes gift-burst {
    0%   { opacity: 1; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(1.4); }
}
@keyframes gift-reveal {
    from { opacity: 0; transform: translateX(-8px); }
}

.gift-toast.is-open *,
.gift-toast.is-open .gift-lid { animation: none !important; }
.gift-toast.is-open .gift-lid { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .gift-toast * { animation: none !important; }
    .gift-toast .gift-lid { opacity: 0; }
}

/* =====================================================================================================================
   New Year fireworks (31 Dec → 1 Jan, FR-019): about 3.5 s of bursts over a night sky, Baku celebrating in the middle.
   .is-still is the reduced-motion version: the same card, no bursts.
   ===================================================================================================================== */

.fireworks-moment,
.lunar-moment {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 80% at 50% 10%, rgba(13, 45, 99, 0.92), rgba(1, 8, 24, 0.96));
    cursor: pointer;
    outline: none;
    animation: moment-in 0.3s ease-out both;
}
.fireworks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* A shell climbs on a fading trail, flashes, and throws sparks that coast outwards, sag under gravity and glitter as
   they burn out. Two transforms make the arc: the outer span falls straight down (gravity, in screen space), the inner
   spark flies out along its own angle. */
.firework-trail {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 2px;
    height: 70px;
    margin-left: -1px;
    border-radius: 1px;
    background: linear-gradient(180deg, #fff7d6, rgba(253, 230, 138, 0.6) 20%, transparent);
    opacity: 0;
    animation: firework-climb 0.55s cubic-bezier(0.2, 0.6, 0.4, 1) var(--delay) both;
}
@keyframes firework-climb {
    0%   { transform: translateY(70vh) scaleY(1); opacity: 1; }
    85%  { transform: translateY(4px) scaleY(0.8); opacity: 1; }
    100% { transform: translateY(0) scaleY(0.2); opacity: 0; }
}
.firework {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 0;
    height: 0;
}
/* The flash at the moment of the burst. */
.firework::before {
    content: "";
    position: absolute;
    left: -60px;
    top: -60px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff) 0%, color-mix(in srgb, var(--c) 30%, transparent) 30%, transparent 65%);
    opacity: 0;
    animation: firework-flash 0.7s ease-out calc(var(--delay) + 500ms) both;
}
@keyframes firework-flash {
    0%   { transform: scale(0.2); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}
.spark-fall {
    position: absolute;
    left: 0;
    top: 0;
    animation: spark-gravity 1.5s cubic-bezier(0.55, 0, 0.9, 0.6) calc(var(--delay) + 500ms) both;
}
.spark {
    position: absolute;
    left: -1.5px;
    top: 0;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(0deg, #ffffff 0 12%, var(--c) 22%, color-mix(in srgb, var(--c) 40%, transparent) 55%, transparent);
    transform-origin: 1.5px 0;
    opacity: 0;
    animation: spark-out 1.5s cubic-bezier(0.1, 0.75, 0.3, 1) calc(var(--delay) + 500ms) both;
}
@keyframes spark-gravity {
    from { transform: translateY(0); }
    to   { transform: translateY(46px); }
}
@keyframes spark-out {
    0%   { transform: rotate(var(--r)) translateY(0) scaleY(0.2); opacity: 1; }
    40%  { transform: rotate(var(--r)) translateY(calc(var(--dist) * 0.85)) scaleY(1); opacity: 1; }
    65%  { opacity: 0.9; }
    72%  { opacity: 0.35; }
    78%  { opacity: 1; }
    85%  { opacity: 0.3; }
    91%  { opacity: 0.8; }
    100% { transform: rotate(var(--r)) translateY(var(--dist)) scaleY(0.35); opacity: 0; }
}
@keyframes moment-in { from { opacity: 0; } }

.fireworks-card {
    position: relative;
    text-align: center;
    padding: 1.5rem 2rem 1.25rem;
    animation: fireworks-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.fireworks-title { margin-top: 0.75rem; font-size: 1.375rem; font-weight: 800; color: #ffffff; }
.fireworks-year {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #fde68a, #f5b83d 60%, #b45309);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@keyframes fireworks-card-in { from { transform: scale(0.85); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .fireworks-moment, .lunar-moment, .fireworks-card { animation: none !important; }
}

/* =====================================================================================================================
   New Year (31 Dec – 2 Jan): midnight sky with a gold sparkle. DigiByte's birthday (10 Jan): a party in DigiByte blue.
   ===================================================================================================================== */

html[data-season="newyear"] {
    --season-bg: linear-gradient(180deg, #eef2fb 0%, #f8f6ee 55%, #f8fafc 100%);
    --season-card-edge: linear-gradient(90deg, transparent, #f5b83d 20%, #fde68a 50%, #f5b83d 80%, transparent) 0 0 / 100% 3px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(245, 184, 61, 0.55), 0 8px 22px -6px rgba(245, 184, 61, 0.45);
    --season-nav-accent: #d97706;
}
html.dark[data-season="newyear"] {
    --season-bg:
        radial-gradient(2px 2px at 20% 12%, rgba(253, 230, 138, 0.8), transparent 60%),
        radial-gradient(1.5px 1.5px at 70% 8%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1.5px 1.5px at 85% 22%, rgba(253, 230, 138, 0.6), transparent 60%),
        radial-gradient(120% 55% at 50% 0%, #1a1f4d 0%, rgba(6, 10, 32, 0) 70%),
        linear-gradient(180deg, #080d2b 0%, #050a22 60%, #030617 100%);
    --season-nav-accent: #f5b83d;
}

html[data-season="birthday"] {
    --season-bg: linear-gradient(180deg, #e6f0ff 0%, #f4f8ff 45%, #f8fafc 100%);
    --season-card-edge:
        linear-gradient(90deg, #3b82f6 0 20%, #f5b83d 20% 40%, #fb7185 40% 60%, #22c55e 60% 80%, #a78bfa 80%) 0 0 / 100% 4px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(59, 130, 246, 0.45), 0 8px 22px -6px rgba(0, 102, 255, 0.45);
    --season-nav-accent: #0066ff;
}
html.dark[data-season="birthday"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #06275e 0%, rgba(3, 22, 51, 0) 70%),
        linear-gradient(180deg, #03205a 0%, #021437 60%, #010b20 100%);
    --season-nav-accent: #60a5fa;
}

/* DigiByte's birthday banner on Home, and its one-time confetti (FR-020). */
.birthday-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(245, 184, 61, 0.14));
}
.birthday-cake { font-size: 1.25rem; line-height: 1; }
/* New Year's Eve countdown: gold on the night, the digits in fixed widths so they don't jitter as they tick. */
.newyear-countdown {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    border: 1px solid rgba(245, 184, 61, 0.45);
    background: linear-gradient(90deg, rgba(245, 184, 61, 0.16), rgba(253, 230, 138, 0.08));
    font-variant-numeric: tabular-nums;
}
.newyear-countdown-star {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8l2.9 6.2 6.8.8-5 4.7 1.3 6.7L12 16.9l-6 3.3 1.3-6.7-5-4.7 6.8-.8Z' fill='%23f5b83d'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: countdown-twinkle 2s ease-in-out infinite;
}
@keyframes countdown-twinkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
    50%      { transform: scale(0.82) rotate(18deg); opacity: 0.7; }
}
html[data-season-paused] .newyear-countdown-star,
html[data-season-still] .newyear-countdown-star { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .newyear-countdown-star { animation: none; } }
.confetti {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 220px;
    overflow: hidden;
    pointer-events: none;
    z-index: 20; /* over the wallet card below the banner */
    perspective: 420px;
}
.confetti-bit {
    position: absolute;
    top: -12px;
    left: calc(var(--i) * 4.1% + 1%);
    width: 7px;
    height: 11px;
    border-radius: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%), #3b82f6;
    --drift: 18px;
    --spin: 1080deg;
    animation: confetti-fall 2.6s cubic-bezier(0.25, 0.45, 0.55, 1) calc(var(--i) * 23ms) both;
}
.confetti-bit:nth-child(4n + 1) { background-color: #f5b83d; --drift: -22px; }
.confetti-bit:nth-child(4n + 2) { background-color: #fb7185; --drift: 26px; --spin: 900deg; }
.confetti-bit:nth-child(4n + 3) { background-color: #22c55e; --drift: -14px; --spin: 1260deg; }
.confetti-bit:nth-child(3n) { width: 9px; height: 6px; }
.confetti-bit:nth-child(5n) { width: 5px; height: 5px; border-radius: 50%; }
/* Paper flips as it falls: rotateX shows the bit edge-on and face-on in turn, the way real confetti flutters. */
@keyframes confetti-fall {
    0%   { transform: translate3d(0, 0, 0) rotateZ(0deg) rotateX(0deg); opacity: 1; }
    35%  { transform: translate3d(var(--drift), 80px, 0) rotateZ(120deg) rotateX(calc(var(--spin) * 0.35)); }
    70%  { transform: translate3d(calc(var(--drift) * -0.4), 165px, 0) rotateZ(240deg) rotateX(calc(var(--spin) * 0.7)); opacity: 1; }
    100% { transform: translate3d(calc(var(--drift) * 0.3), 235px, 0) rotateZ(330deg) rotateX(var(--spin)); opacity: 0; }
}

/* Snow globe (winter easter egg): 12 flakes swirl around Baku for 2.5 s. Reduced motion: a still frost glow. */
.baku-image .globe-flake {
    position: absolute;
    left: 50%;
    top: 40%;
    width: 4px;
    height: 4px;
    margin: -2px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(147, 197, 253, 0.9);
    pointer-events: none;
    animation: globe-swirl 2.1s ease-in-out calc(var(--i) * 0.033s) both;
}
@keyframes globe-swirl {
    0%   { transform: rotate(calc(var(--i) * 47deg)) translateX(calc(8px + var(--i) * 2px)); opacity: 0; }
    15%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { transform: rotate(calc(var(--i) * 47deg + 420deg)) translateX(calc(30px + var(--i) * 3px)) translateY(calc(var(--i) * 4px)); opacity: 0; }
}
.baku-image.baku-frost {
    filter: drop-shadow(0 0 6px rgba(224, 242, 254, 0.95)) drop-shadow(0 0 14px rgba(147, 197, 253, 0.8));
}
@media (prefers-reduced-motion: reduce) {
    .baku-image .globe-flake { display: none; }
}
.baku-image .globe-flake:nth-child(3n) { width: 6px; height: 6px; }
.baku-image .globe-flake:nth-child(4n + 1) { top: 60%; }

/* =====================================================================================================================
   Lunar New Year (15 days from the new moon, to the Lantern Festival; dates from SeasonCalendar.LunarNewYear): red and gold, swaying lanterns.
   ===================================================================================================================== */

html[data-season="lunar"] {
    --season-bg: linear-gradient(180deg, #fdecec 0%, #fdf6ee 45%, #f8fafc 100%);
    --season-card-edge:
        linear-gradient(90deg, #b91c1c, #f5b83d 50%, #b91c1c) 0 0 / 100% 3px no-repeat,
        radial-gradient(circle at 6px 3px, #f5b83d 0 2px, transparent 2.5px) 0 3px / 24px 8px repeat-x;
    --season-cta-glow: 0 0 0 1px rgba(245, 184, 61, 0.5), 0 8px 22px -6px rgba(185, 28, 28, 0.45);
    --season-nav-accent: #dc2626;
}
html.dark[data-season="lunar"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #3a0a10 0%, rgba(26, 6, 10, 0) 70%),
        linear-gradient(180deg, #2a0a10 0%, #170710 60%, #0c0410 100%);
    --season-nav-accent: #f5b83d;
}

/* Paper lanterns: a gold cap, a ribbed red globe lit from inside, a gold base and a red silk tassel. Each sways like a
   pendulum from its cord, and its glow breathes like a candle. */
.season-lanterns {
    position: absolute;
    inset: 0 0 auto 0;
    display: flex;
    justify-content: space-between;
    /* Kept to the middle of the top row: page titles sit on its left and header buttons (Export CSV, Add) on its
       right, and neither should have a lantern behind it. */
    padding: 0 27% 0 40%;
}
.lantern {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    transform-origin: 50% -40px;
    animation: lantern-sway 5s ease-in-out calc(var(--i) * -1.1s) infinite;
}
.lantern:nth-child(2n) { margin-top: 22px; }
.lantern:nth-child(3)  { margin-top: 15px; }

.lantern::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 1px;
    height: 64px;
    background: linear-gradient(180deg, #92400e, #d4a017);
}
.lantern-glow {
    position: absolute;
    left: 50%;
    top: 14px;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 60, 0.5) 0%, rgba(239, 68, 68, 0.18) 40%, transparent 68%);
    animation: lantern-flicker 2.8s ease-in-out calc(var(--i) * -0.7s) infinite;
}
html:not(.dark) .lantern-glow { opacity: 0.6; }
.lantern-cap {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 4px;
    border-radius: 1.5px;
    background: linear-gradient(180deg, #fde68a, #d4a017 50%, #8a5a06);
}
.lantern-body {
    position: relative;
    width: 24px;
    height: 21px;
    margin: -1px 0;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 46%, #ffe08a 0%, #ff8a4c 24%, #e02424 56%, #8f1111 100%);
    box-shadow: inset 0 -3px 5px rgba(70, 0, 0, 0.35);
}
/* Bamboo ribs curve round the globe; a soft highlight sells the paper sheen. */
.lantern-ribs {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.45) 0 6%, transparent 22%),
        radial-gradient(ellipse 16% 54% at 50% 50%, transparent 86%, rgba(110, 12, 12, 0.45) 92%, transparent 100%),
        radial-gradient(ellipse 36% 54% at 50% 50%, transparent 88%, rgba(110, 12, 12, 0.4) 93%, transparent 100%),
        radial-gradient(ellipse 58% 54% at 50% 50%, transparent 89%, rgba(110, 12, 12, 0.35) 94%, transparent 100%);
}
.lantern-tassel {
    width: 6px;
    height: 15px;
    margin-top: 1px;
    background:
        radial-gradient(circle at 50% 2px, #fbbf24 0 2px, transparent 2.5px),
        repeating-linear-gradient(90deg, #b91c1c 0 1px, #ef4444 1px 2px);
    clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
    transform-origin: 50% 0;
    animation: tassel-swing 5s ease-in-out calc(var(--i) * -1.1s - 0.4s) infinite;
}
@keyframes lantern-sway {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}
@keyframes tassel-swing {
    0%, 100% { transform: rotate(5deg); }
    50%      { transform: rotate(-5deg); }
}
@keyframes lantern-flicker {
    0%, 100% { opacity: 1; }
    30%      { opacity: 0.8; }
    55%      { opacity: 0.95; }
    70%      { opacity: 0.75; }
}

/* =====================================================================================================================
   Valentine's (12–14 Feb): soft rose, hearts drifting up.
   ===================================================================================================================== */

html[data-season="valentine"] {
    --season-bg: linear-gradient(180deg, #fde8ef 0%, #fdf3f6 45%, #f8fafc 100%);
    --season-card-edge:
        radial-gradient(circle at 7px 6px, #fb7185 0 3.5px, transparent 4px) 0 0 / 26px 12px repeat-x,
        radial-gradient(circle at 13px 6px, #fb7185 0 3.5px, transparent 4px) 0 0 / 26px 12px repeat-x;
    --season-cta-glow: 0 0 0 1px rgba(251, 113, 133, 0.5), 0 8px 22px -6px rgba(225, 29, 72, 0.4);
    --season-nav-accent: #e11d48;
}
html.dark[data-season="valentine"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #3a0c26 0%, rgba(24, 6, 22, 0) 70%),
        linear-gradient(180deg, #2a0a22 0%, #1a0718 60%, #0e0410 100%);
    --season-nav-accent: #fb7185;
}

/* =====================================================================================================================
   Halloween (15–31 Oct): moonlit night, small bats drifting down.
   ===================================================================================================================== */

html[data-season="halloween"] {
    --season-bg: linear-gradient(180deg, #f3ecfb 0%, #fbf4ec 50%, #f8fafc 100%);
    --season-card-edge: linear-gradient(90deg, #f97316, #a855f7 50%, #f97316) 0 0 / 100% 3px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(249, 115, 22, 0.5), 0 8px 22px -6px rgba(168, 85, 247, 0.45);
    --season-nav-accent: #ea580c;
}
html.dark[data-season="halloween"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #24103e 0%, rgba(14, 6, 26, 0) 70%),
        linear-gradient(180deg, #1b0c30 0%, #110820 60%, #080411 100%);
    --season-nav-accent: #fb923c;
}

/* A full moon with soft maria and craters, limb darkening, a wide halo and a thin cloud drifting across it. Low mist
   drifts along the bottom of the page. */
/* It flies in front of the page, so it hangs in the one gap every main page leaves at the top: just right of centre,
   between the unlock page's logo and Home's sponsors pill, above the wallet card. On a narrow phone it keeps clear of
   the pill (a link) before the logo. Drawn at 54 px and scaled, so the craters and cloud keep their proportions. */
.season-moon {
    position: absolute;
    top: 6px;
    left: min(calc(50% + 34px), calc(100% - 180px));
    width: 54px;
    height: 54px;
    transform: scale(0.75);
    transform-origin: 0 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 60%, rgba(176, 140, 80, 0.38) 0 8%, rgba(176, 140, 80, 0) 14%),
        radial-gradient(circle at 63% 30%, rgba(176, 140, 80, 0.32) 0 6%, rgba(176, 140, 80, 0) 11%),
        radial-gradient(circle at 66% 66%, rgba(176, 140, 80, 0.28) 0 10%, rgba(176, 140, 80, 0) 17%),
        radial-gradient(circle at 44% 40%, rgba(176, 140, 80, 0.2) 0 4%, rgba(176, 140, 80, 0) 8%),
        radial-gradient(circle at 48% 78%, rgba(176, 140, 80, 0.18) 0 3%, rgba(176, 140, 80, 0) 6%),
        radial-gradient(ellipse 42% 30% at 40% 52%, rgba(190, 160, 100, 0.22), transparent 70%),
        radial-gradient(circle at 36% 32%, #fffdf3 0%, #fdeeb8 50%, #ecc970 82%, #c9983b 100%);
    box-shadow:
        inset -5px -6px 12px rgba(120, 80, 20, 0.35),
        0 0 0 8px rgba(253, 230, 138, 0.07),
        0 0 46px 16px rgba(253, 230, 138, 0.24);
}
html:not(.dark)[data-season="halloween"] .season-moon { opacity: 0.6; }
/* From 640 px the sponsors pill shows its "Supported by" label and grows to about 215 px, reaching past centre. Where
   the pill is on the page, the moon hangs just left of it instead. */
@media (min-width: 640px) {
    .season-shell:has(.sponsors-pill) .season-moon { left: calc(100% - 300px); }
}
/* Beside the costumed logo (unlock page), the moon moves out past the witch hat's brim. */
.season-shell:has(.season-logo) .season-moon { left: min(calc(50% + 64px), calc(100% - 60px)); }
.moon-cloud {
    position: absolute;
    left: -34px;
    top: 30px;
    width: 92px;
    height: 16px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse 30% 70% at 30% 60%, rgba(46, 26, 72, 0.75), transparent 72%),
        radial-gradient(ellipse 40% 60% at 62% 50%, rgba(46, 26, 72, 0.6), transparent 72%);
    animation: moon-cloud-drift 26s ease-in-out infinite alternate;
}
html:not(.dark) .moon-cloud {
    background:
        radial-gradient(ellipse 30% 70% at 30% 60%, rgba(255, 255, 255, 0.85), transparent 72%),
        radial-gradient(ellipse 40% 60% at 62% 50%, rgba(255, 255, 255, 0.7), transparent 72%);
}
@keyframes moon-cloud-drift {
    from { transform: translateX(-12px); }
    to   { transform: translateX(40px); }
}
.season-fog {
    position: absolute;
    left: -50%;
    bottom: 0;
    width: 200%;
    height: 32%;
    background:
        radial-gradient(ellipse 30% 70% at 25% 100%, rgba(168, 85, 247, 0.14), transparent 70%),
        radial-gradient(ellipse 35% 60% at 62% 100%, rgba(148, 163, 184, 0.16), transparent 70%),
        radial-gradient(ellipse 25% 50% at 85% 100%, rgba(168, 85, 247, 0.1), transparent 70%);
    animation: fog-drift 38s ease-in-out infinite alternate;
}
@keyframes fog-drift {
    from { transform: translateX(-8%); }
    to   { transform: translateX(8%); }
}


/* =====================================================================================================================
   Seasonal calls to action. Layers over the blue stay at the ends and corners and at low alpha, so white on the button
   never drops below 4.5:1 where the label sits. Toppers sit on the edge, outside the label. Sheens run once every few
   seconds and stop with everything else (reduced motion, hidden app, low-power device, calm screen).
   ===================================================================================================================== */

/* Winter: fresh snow piled on top with a couple of drips, frost creeping in from two corners, ice crystals. */
html[data-season="winter"] {
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20' fill='none' stroke='%23fff' stroke-opacity='.5' stroke-width='1.1' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M0 0V-8M0-4.6l-2.2-2.2M0-4.6l2.2-2.2'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60)'/%3E%3Cuse href='%23a' transform='rotate(120)'/%3E%3Cuse href='%23a' transform='rotate(180)'/%3E%3Cuse href='%23a' transform='rotate(240)'/%3E%3Cuse href='%23a' transform='rotate(300)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='1.2' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M0 0V-8M0-4.6l-2.2-2.2M0-4.6l2.2-2.2'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60)'/%3E%3Cuse href='%23a' transform='rotate(120)'/%3E%3Cuse href='%23a' transform='rotate(180)'/%3E%3Cuse href='%23a' transform='rotate(240)'/%3E%3Cuse href='%23a' transform='rotate(300)'/%3E%3C/svg%3E"),
        radial-gradient(90% 120% at 0% 100%, rgba(224, 242, 254, 0.2), transparent 32%),
        radial-gradient(90% 120% at 100% 100%, rgba(224, 242, 254, 0.14), transparent 26%);
    --season-cta-deco-pos: left 7px bottom 5px, right 9px bottom 7px, 0 0, 0 0;
    --season-cta-deco-size: 13px 13px, 9px 9px, auto, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    --season-cta-deco-disc:
        radial-gradient(circle at 30% 80%, rgba(224, 242, 254, 0.22), transparent 45%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html[data-season="winter"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="winter"] .nav-float-scan-disc::after {
    top: -10px;
    left: 5px;
    right: 5px;
    height: 21px;
    /* A drift with an uneven top, shaded underneath, and a couple of icicles; the tile repeats seamlessly. */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 21'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.65' stop-color='%23f5f9fe'/%3E%3Cstop offset='1' stop-color='%23d5e2f2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 16V9C6 6 12 5 18 7C24 4 32 3 40 6C46 5 50 7 54 8C60 4 70 3 78 6C84 5 90 6 94 8C100 5 110 4 120 9V16C115 16.5 110 15.5 104 16.4 98 17 92 15.8 86 16.6 80 17 74 15.8 68 16.5 60 17 52 15.8 44 16.6 36 17 28 15.8 20 16.6 12 17 6 15.8 0 16Z'/%3E%3Cpath fill='%23fff' d='M30 16c.3 3 1 4.6 1.6 4.6S32.9 19 33.2 16ZM86 16c.2 2.2.8 3.4 1.3 3.4s1-1.2 1.3-3.4Z'/%3E%3C/svg%3E") 0 0 / 120px 21px repeat-x;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
    filter: drop-shadow(0 1px 1px rgba(15, 45, 95, 0.3));
}
html[data-season="winter"] .nav-float-scan-disc::after { left: 9px; right: 9px; top: -9px; background-position: -22px 0; }

/* Snow settled along the top of the floating nav bar, tapering off before its rounded ends. The Scan disc (positioned,
   later in the tree) sits on top of it, wearing its own cap. */
html[data-season="winter"] .nav-float::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 26px;
    right: 26px;
    height: 21px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 21'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.65' stop-color='%23f5f9fe'/%3E%3Cstop offset='1' stop-color='%23d5e2f2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 16V11C8 9 14 8 22 10C30 8 38 7.5 46 9.5C54 8 62 9 70 10.5C80 8.5 92 8 100 10C108 9 114 9.5 120 11V16C110 16.6 100 15.6 90 16.4 80 17 70 15.8 60 16.5 50 17 40 15.8 30 16.6 20 17 10 15.8 0 16Z'/%3E%3Cpath fill='%23fff' d='M38 16c.3 2.6.9 4 1.5 4s1.2-1.4 1.5-4ZM96 16c.2 2 .7 3 1.2 3s1-1 1.2-3Z'/%3E%3C/svg%3E") 0 0 / 120px 21px repeat-x;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    filter: drop-shadow(0 1px 1px rgba(15, 45, 95, 0.3));
}
/* The desktop rail stands upright: only its top cap gets snow. */
@media (min-width: 1024px) {
    html[data-season="winter"] .nav-float-live::before { left: 10px; right: 10px; }
}
html[data-season-calm][data-season] .nav-float::before { content: none; }

/* A tap on a dressed button shakes a little snow off it (theme.js adds .season-puff at the tap). */
.season-puff {
    position: fixed;
    z-index: 300;
    width: 0;
    height: 0;
    pointer-events: none;
}
.season-puff i {
    position: absolute;
    left: -2.5px;
    top: -2.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0 45%, rgba(214, 230, 248, 0.9) 60%, rgba(214, 230, 248, 0) 72%);
    animation: snow-puff 0.75s cubic-bezier(0.2, 0.7, 0.4, 1) both;
}
.season-puff i:nth-child(2n) { width: 3.5px; height: 3.5px; }
/* Valentine's: a popped heart throws rose and white sparkles instead of snow. */
.season-puff.is-sparkle i { background: radial-gradient(circle, #ffffff 0 30%, #fb7185 55%, rgba(251, 113, 133, 0) 72%); }
.season-puff.is-sparkle i:nth-child(3n) { background: radial-gradient(circle, #fff1f2 0 40%, rgba(255, 228, 230, 0) 72%); }
@keyframes snow-puff {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 1; }
    40%  { transform: translate(var(--dx), calc(var(--dy) * -1)) scale(1); opacity: 1; }
    100% { transform: translate(calc(var(--dx) * 1.5), 16px) scale(0.8); opacity: 0; }
}

/* Tap a bulb: it swings on its socket and a flash runs down the string either side (theme.js adds the classes). */
.xmas-bulb.is-swing { animation: bulb-swing 1s ease-out; }
.xmas-bulb.is-flash .xmas-bulb-halo { animation: xmas-flash 0.65s ease-out var(--chase, 0ms) both; }
.xmas-bulb.is-flash .xmas-bulb-glass::after { animation: none; opacity: 0; }
@keyframes bulb-swing {
    0%   { transform: rotate(var(--rot)); }
    20%  { transform: rotate(calc(var(--rot) + 16deg)); }
    45%  { transform: rotate(calc(var(--rot) - 10deg)); }
    70%  { transform: rotate(calc(var(--rot) + 5deg)); }
    100% { transform: rotate(var(--rot)); }
}
@keyframes xmas-flash {
    0%   { transform: scale(1); opacity: 1; }
    30%  { transform: scale(1.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Daylight bulbs: on the pale page the glow alone is lost, so the glass is deeper and casts a small shadow, and the
   halo carries more colour. */
html:not(.dark) .xmas-bulb-halo {
    opacity: 1;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, transparent) 0%, color-mix(in srgb, var(--c) 26%, transparent) 34%, transparent 62%);
}
html:not(.dark) .xmas-bulb-glass {
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0 9%, rgba(255, 255, 255, 0) 22%),
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c) 55%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 50%, #000) 100%);
    box-shadow: 0 2px 3px rgba(15, 23, 42, 0.28), inset 0 -2px 3px color-mix(in srgb, var(--c) 55%, #000);
}
/* The warm white bulbs need an edge to read against white. */
html:not(.dark) .xmas-bulb:nth-of-type(5n) .xmas-bulb-glass { box-shadow: 0 2px 3px rgba(15, 23, 42, 0.3), inset 0 0 0 0.75px rgba(180, 130, 40, 0.55), inset 0 -2px 3px rgba(200, 150, 50, 0.5); }

@media (prefers-reduced-motion: reduce) {
    .season-puff { display: none; }
    .xmas-bulb.is-swing, .xmas-bulb.is-flash .xmas-bulb-halo { animation: none !important; }
}

/* New Year: gold glitter, a gold sheen sweeping across now and then, and a twinkling star on the corner. */
html[data-season="newyear"] {
    --season-cta-deco:
        radial-gradient(circle at 20% 30%, rgba(253, 230, 138, 0.7) 0 0.7px, transparent 1.3px),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.45) 0 0.6px, transparent 1.1px),
        linear-gradient(90deg, rgba(245, 184, 61, 0.22), transparent 22% 78%, rgba(245, 184, 61, 0.22));
    --season-cta-deco-pos: 0 0, 5px 3px, 0 0;
    --season-cta-deco-size: 41px 23px, 53px 19px, auto;
    --season-cta-deco-repeat: repeat, repeat, no-repeat;
    --season-cta-deco-disc:
        radial-gradient(circle at 20% 30%, rgba(253, 230, 138, 0.9) 0 0.7px, transparent 1.3px);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: 15px 13px;
    --season-cta-deco-disc-repeat: repeat;
}
html[data-season="newyear"] .btn-primary:not(.is-loading):not([aria-busy="true"])::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 244, 204, 0.1) 47%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 244, 204, 0.1) 53%, transparent 62%) 0 0 / 300% 100% no-repeat;
    animation: cta-sheen 6s ease-in-out 1.5s infinite;
}
html[data-season="newyear"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="newyear"] .nav-float-scan-disc::after {
    top: -7px;
    right: 8px;
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C10.8 6 14 9.2 20 10 14 10.8 10.8 14 10 20 9.2 14 6 10.8 0 10 6 9.2 9.2 6 10 0Z' fill='%23fde68a'/%3E%3Ccircle cx='10' cy='10' r='2.2' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 3px rgba(253, 230, 138, 0.9));
    animation: cta-twinkle 2.4s ease-in-out infinite;
}
html[data-season="newyear"] .nav-float-scan-disc::after { top: -3px; right: 2px; }

/* DigiByte's birthday: rainbow sprinkles at the two ends and a party-blue sheen. */
html[data-season="birthday"] {
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 7l4 2' stroke='%23fde68a'/%3E%3Cpath d='M16 4l-2 4' stroke='%23fda4af'/%3E%3Cpath d='M20 15l4 1' stroke='%2386efac'/%3E%3Cpath d='M8 18l1 4' stroke='%23c4b5fd'/%3E%3Cpath d='M3 30l4-2' stroke='%23fff'/%3E%3Cpath d='M15 27l3 3' stroke='%23fde68a'/%3E%3Cpath d='M20 37l-1 4' stroke='%23fda4af'/%3E%3Cpath d='M6 40l4 1' stroke='%2386efac'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M20 6l-4 2' stroke='%23c4b5fd'/%3E%3Cpath d='M9 5l2 4' stroke='%2386efac'/%3E%3Cpath d='M4 16l4-1' stroke='%23fde68a'/%3E%3Cpath d='M18 19l-1 4' stroke='%23fff'/%3E%3Cpath d='M22 30l-4-2' stroke='%23fda4af'/%3E%3Cpath d='M10 27l-3 3' stroke='%23c4b5fd'/%3E%3Cpath d='M6 38l1 4' stroke='%23fde68a'/%3E%3Cpath d='M20 41l-4 1' stroke='%2386efac'/%3E%3C/svg%3E");
    --season-cta-deco-pos: left 2px center, right 2px center;
    --season-cta-deco-size: 22px 44px, 22px 44px;
    --season-cta-deco-repeat: no-repeat, no-repeat;
    --season-cta-deco-disc:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 14l4 2' stroke='%23fde68a'/%3E%3Cpath d='M40 9l-2 4' stroke='%23fda4af'/%3E%3Cpath d='M46 30l4 1' stroke='%2386efac'/%3E%3Cpath d='M10 36l1 4' stroke='%23c4b5fd'/%3E%3Cpath d='M30 47l3 2' stroke='%23fde68a'/%3E%3C/svg%3E");
    --season-cta-deco-disc-pos: center;
    --season-cta-deco-disc-size: cover;
    --season-cta-deco-disc-repeat: no-repeat;
}

/* On the Scan disc, a striped birthday candle with a flickering flame stands on top. */
html[data-season="birthday"] .nav-float-scan-disc::after {
    top: -19px;
    left: 50%;
    width: 10px;
    height: 22px;
    margin-left: -5px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 22'%3E%3Cdefs%3E%3CradialGradient id='f' cx='.5' cy='.7' r='.6'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.35' stop-color='%23fde68a'/%3E%3Cstop offset='1' stop-color='%23f97316'/%3E%3C/radialGradient%3E%3CclipPath id='c'%3E%3Crect x='3' y='9' width='4' height='13' rx='1'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M5 .5C6.8 3 7.6 4.6 7.6 6 7.6 7.5 6.4 8.5 5 8.5S2.4 7.5 2.4 6C2.4 4.6 3.2 3 5 .5Z' fill='url(%23f)'/%3E%3Cpath d='M5 8.4v1' stroke='%23334155' stroke-width='.8'/%3E%3Cg clip-path='url(%23c)'%3E%3Crect x='3' y='9' width='4' height='13' fill='%23fff'/%3E%3Cpath d='M1 12l8-3v2.4l-8 3ZM1 16.5l8-3v2.4l-8 3ZM1 21l8-3v2.4l-8 3Z' fill='%233b82f6'/%3E%3C/g%3E%3C/svg%3E") center bottom / contain no-repeat;
    transform-origin: 50% 100%;
    filter: drop-shadow(0 -2px 4px rgba(253, 186, 116, 0.75));
    animation: candle-flame 1.4s ease-in-out infinite;
}
@keyframes candle-flame {
    0%, 100% { transform: scaleY(1) skewX(0); }
    30%      { transform: scaleY(1.04) skewX(-3deg); }
    60%      { transform: scaleY(0.97) skewX(2deg); }
}

/* Lunar New Year: gold cloud scrolls at the two ends and a slow gold shimmer. */
html[data-season="lunar"] {
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%23fcd34d' stroke-opacity='.75' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M2 20h24M6 20c-2-4 1-8 5-6 0-5 7-6 9-1 3-2 7 1 6 5'/%3E%3Cpath d='M11 14c2-2 5-1 5 2-2 1-4 0-3-2'/%3E%3Cpath d='M20 13c2 0 3 2 1 3'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%23fcd34d' stroke-opacity='.75' stroke-width='1.4' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 1 30 0)'%3E%3Cpath d='M2 20h24M6 20c-2-4 1-8 5-6 0-5 7-6 9-1 3-2 7 1 6 5'/%3E%3Cpath d='M11 14c2-2 5-1 5 2-2 1-4 0-3-2'/%3E%3Cpath d='M20 13c2 0 3 2 1 3'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(90deg, rgba(185, 28, 28, 0.32), transparent 18% 82%, rgba(185, 28, 28, 0.32));
    --season-cta-deco-pos: left 6px center, right 6px center, 0 0;
    --season-cta-deco-size: 22px 22px, 22px 22px, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat, no-repeat;
    --season-cta-deco-disc:
        radial-gradient(circle, transparent 58%, rgba(252, 211, 77, 0.45) 62%, transparent 66%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html[data-season="lunar"] .btn-primary:not(.is-loading):not([aria-busy="true"])::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(252, 211, 77, 0.1) 50%, transparent 60%) 0 0 / 300% 100% no-repeat;
    animation: cta-sheen 7s ease-in-out 2s infinite;
}

/* Valentine's: small hearts at the ends and a glossy heart perched on the corner, beating gently. */
html[data-season="valentine"] {
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48' fill='%23fecdd3' fill-opacity='.6'%3E%3Cpath transform='translate(3 6) scale(.34)' d='M16 28.5C9 23.3 1.5 17.6 1.5 9.8 1.5 5.2 5 1.5 9.4 1.5c2.8 0 5.2 1.5 6.6 3.8 1.4-2.3 3.8-3.8 6.6-3.8 4.4 0 7.9 3.7 7.9 8.3 0 7.8-7.5 13.5-14.5 18.7Z'/%3E%3Cpath transform='translate(13 21) rotate(14) scale(.26)' d='M16 28.5C9 23.3 1.5 17.6 1.5 9.8 1.5 5.2 5 1.5 9.4 1.5c2.8 0 5.2 1.5 6.6 3.8 1.4-2.3 3.8-3.8 6.6-3.8 4.4 0 7.9 3.7 7.9 8.3 0 7.8-7.5 13.5-14.5 18.7Z'/%3E%3Cpath transform='translate(4 34) rotate(-12) scale(.22)' d='M16 28.5C9 23.3 1.5 17.6 1.5 9.8 1.5 5.2 5 1.5 9.4 1.5c2.8 0 5.2 1.5 6.6 3.8 1.4-2.3 3.8-3.8 6.6-3.8 4.4 0 7.9 3.7 7.9 8.3 0 7.8-7.5 13.5-14.5 18.7Z'/%3E%3C/svg%3E"),
        radial-gradient(70% 120% at 100% 100%, rgba(244, 63, 94, 0.3), transparent 36%),
        radial-gradient(70% 120% at 0% 0%, rgba(244, 63, 94, 0.22), transparent 30%);
    --season-cta-deco-pos: left 2px center, 0 0, 0 0;
    --season-cta-deco-size: 22px 44px, auto, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat, no-repeat;
    --season-cta-deco-disc:
        radial-gradient(circle at 50% 100%, rgba(244, 63, 94, 0.4), transparent 55%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html[data-season="valentine"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="valentine"] .nav-float-scan-disc::after {
    top: -8px;
    right: 8px;
    width: 17px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cdefs%3E%3CradialGradient id='h' cx='.35' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23ffd1dc'/%3E%3Cstop offset='.4' stop-color='%23fb7185'/%3E%3Cstop offset='1' stop-color='%23be123c'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M16 28.5C9 23.3 1.5 17.6 1.5 9.8 1.5 5.2 5 1.5 9.4 1.5c2.8 0 5.2 1.5 6.6 3.8 1.4-2.3 3.8-3.8 6.6-3.8 4.4 0 7.9 3.7 7.9 8.3 0 7.8-7.5 13.5-14.5 18.7Z' fill='url(%23h)' stroke='%23fff' stroke-width='2'/%3E%3Cellipse cx='10' cy='8' rx='4' ry='2.4' transform='rotate(-35 10 8)' fill='%23fff' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(14deg);
    filter: drop-shadow(0 1px 1.5px rgba(136, 19, 55, 0.45));
    animation: cta-heartbeat 1.6s ease-in-out infinite;
}
html[data-season="valentine"] .nav-float-scan-disc::after { top: -4px; right: 0; }

/* Halloween: a cobweb in the corner, a purple dusk at the far end, and a little spider dangling on its thread. */
html[data-season="halloween"] {
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23fff' stroke-opacity='.5' stroke-width='.7'%3E%3Cpath d='M0 0L32 6M0 0L28 20M0 0L18 30M0 0L5 32'/%3E%3Cpath d='M9.6 1.8Q7.6 3.2 8.4 6Q5.9 6.6 5.4 9Q3 8.6 1.5 9.6M17.6 3.3Q14 6 15.4 11Q11 12 9.9 16.5Q5.5 15.8 2.75 17.6M26.2 4.9Q21 9.5 23 16.4Q16.5 18.5 14.8 24.6Q8.5 23.5 4.1 26.2'/%3E%3C/svg%3E"),
        linear-gradient(90deg, transparent 55%, rgba(88, 28, 135, 0.45));
    --season-cta-deco-pos: left top, 0 0;
    --season-cta-deco-size: 26px 26px, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat;
    --season-cta-deco-disc:
        radial-gradient(circle at 70% 75%, rgba(88, 28, 135, 0.5), transparent 60%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html[data-season="halloween"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="halloween"] .nav-float-scan-disc::after {
    top: -2px;
    right: 10px;
    width: 11px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 26'%3E%3Cpath d='M6 0V15' stroke='%23e2e8f0' stroke-opacity='.8' stroke-width='.6'/%3E%3Cg stroke='%23120a1c' stroke-width='.9' fill='none' stroke-linecap='round'%3E%3Cpath d='M4.6 17L1.5 14.5 .6 16M4.4 18.5L1 18 .3 20M4.6 20L1.8 22 1.5 24M5 21L3.5 24.5'/%3E%3Cpath d='M7.4 17l3.1-2.5.9 1.5M7.6 18.5l3.4-.5.7 2M7.4 20l2.8 2 .3 2M7 21l1.5 3.5'/%3E%3C/g%3E%3Cellipse cx='6' cy='16.4' rx='1.8' ry='1.6' fill='%23120a1c'/%3E%3Cellipse cx='6' cy='19.6' rx='2.4' ry='2.8' fill='%23120a1c' stroke='%23c4b5fd' stroke-opacity='.7' stroke-width='.5'/%3E%3C/svg%3E") center top / contain no-repeat;
    transform-origin: 50% 0;
    animation: cta-dangle 3.2s ease-in-out infinite alternate;
}
html[data-season="halloween"] .nav-float-scan-disc::after { right: 4px; top: 0; }

@keyframes cta-sheen {
    0%       { background-position: 100% 0; }
    25%, 100% { background-position: 0% 0; }
}
@keyframes cta-twinkle {
    0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.85; }
    50%      { transform: scale(1.1) rotate(20deg); opacity: 1; }
}
@keyframes cta-heartbeat {
    0%, 40%, 100% { transform: rotate(14deg) scale(1); }
    15%           { transform: rotate(14deg) scale(1.15); }
    28%           { transform: rotate(14deg) scale(1.05); }
}
@keyframes cta-dangle {
    from { transform: rotate(-7deg) translateY(0); }
    to   { transform: rotate(6deg) translateY(2px); }
}

/* The dressing stays; only its motion stops. */
html[data-season-paused] .btn-primary:not(.is-loading):not([aria-busy="true"])::before,
html[data-season-paused] .btn-primary::after,
html[data-season-paused] .nav-float-scan-disc::after,
html[data-season-still] .btn-primary:not(.is-loading):not([aria-busy="true"])::before,
html[data-season-still] .btn-primary::after,
html[data-season-still] .nav-float-scan-disc::after {
    animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
    html[data-season] .btn-primary:not(.is-loading):not([aria-busy="true"])::before,
    html[data-season] .btn-primary::after,
    html[data-season] .nav-float-scan-disc::after {
        animation: none !important;
    }
}

/* =====================================================================================================================
   Small touches across the app: the loading shimmer and the bottom-sheet grip wear the season too.
   ===================================================================================================================== */

/* Night stars (winter, dark mode only): tiny points with a soft glint that twinkle in place behind the snow. */
.night-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 3px 1px rgba(191, 219, 254, 0.55);
    opacity: 0.7;
    animation: star-twinkle var(--t) ease-in-out var(--d) infinite;
}
html:not(.dark) .night-star { display: none; }
@keyframes star-twinkle {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50%      { opacity: 0.15; transform: scale(0.6); }
}

/* Loading placeholders glint in the season's colour instead of grey. */
html[data-season] .skeleton {
    background-image: linear-gradient(90deg, rgba(148, 163, 184, 0.1) 25%, var(--season-shimmer, rgba(148, 163, 184, 0.2)) 50%, rgba(148, 163, 184, 0.1) 75%);
}
html.dark[data-season] .skeleton {
    background-image: linear-gradient(90deg, rgba(100, 116, 139, 0.15) 25%, var(--season-shimmer-dark, rgba(100, 116, 139, 0.25)) 50%, rgba(100, 116, 139, 0.15) 75%);
}
html[data-season="winter"]    { --season-shimmer: rgba(125, 190, 240, 0.35); --season-shimmer-dark: rgba(186, 230, 253, 0.28); }
html[data-season="newyear"]   { --season-shimmer: rgba(245, 184, 61, 0.32);  --season-shimmer-dark: rgba(253, 230, 138, 0.26); }
html[data-season="birthday"]  { --season-shimmer: rgba(59, 130, 246, 0.3);   --season-shimmer-dark: rgba(96, 165, 250, 0.3); }
html[data-season="lunar"]     { --season-shimmer: rgba(220, 38, 38, 0.22);   --season-shimmer-dark: rgba(252, 211, 77, 0.24); }
html[data-season="valentine"] { --season-shimmer: rgba(244, 63, 94, 0.25);   --season-shimmer-dark: rgba(251, 113, 133, 0.26); }
html[data-season="halloween"] { --season-shimmer: rgba(249, 115, 22, 0.28);  --season-shimmer-dark: rgba(251, 146, 60, 0.26); }

/* The grab bar on bottom sheets: a candy cane, a gold bar, a party stripe, a rose bar, a pumpkin-to-dusk bar. */
html[data-season] :is(.more-sheet-grip, .sheet-grip) { background: var(--season-grip, var(--ui-border)); }
html[data-season="winter"]    { --season-grip: repeating-linear-gradient(-45deg, #dc2626 0 4px, #ffffff 4px 8px); }
html[data-season="newyear"],
html[data-season="lunar"]     { --season-grip: linear-gradient(90deg, #b45309, #fde68a 50%, #b45309); }
html[data-season="birthday"]  { --season-grip: linear-gradient(90deg, #3b82f6 0 25%, #f5b83d 25% 50%, #fb7185 50% 75%, #22c55e 75%); }
html[data-season="valentine"] { --season-grip: linear-gradient(90deg, #fda4af, #e11d48 50%, #fda4af); }
html[data-season="halloween"] { --season-grip: linear-gradient(90deg, #f97316, #7e22ce); }
html[data-season="winter"] :is(.more-sheet-grip, .sheet-grip) { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); }
/* A calm screen (unlock, confirmations) keeps the everyday grip. */
html[data-season-calm] :is(.more-sheet-grip, .sheet-grip) { background: var(--ui-border); box-shadow: none; }

/* =====================================================================================================================
   Lunar New Year moment: two strings of red firecrackers hang either side of Baku and pop from the bottom up, each with
   a flash and a spray of red and gold paper, over a deep red night.
   ===================================================================================================================== */
.lunar-moment { background: radial-gradient(120% 80% at 50% 15%, rgba(127, 18, 18, 0.93), rgba(28, 4, 8, 0.97)); }
.firecrackers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.firecracker-string {
    position: absolute;
    top: 0;
    left: 13%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 34px;
}
.firecracker-string.side-1 { left: auto; right: 13%; }
/* The cord they are braided on, with a gold knot at the top. */
.firecracker-string::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: calc(100% - 8px);
    margin-left: -1px;
    background: linear-gradient(180deg, #fbbf24, #b91c1c 30%, #7f1d1d);
}
.firecracker-string::after {
    content: "";
    position: absolute;
    top: 22px;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 3px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #fde68a, #d4a017 55%, #92400e);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
.firecracker {
    position: relative;
    width: 10px;
    height: 24px;
    margin-top: -5px;
    transform: rotate(28deg);
}
.firecracker:nth-child(2n) { transform: rotate(-28deg); }
/* The paper tube with gold bands; it vanishes at the bang. */
.firecracker::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background:
        linear-gradient(180deg, #fbbf24 0 3px, transparent 3px calc(100% - 3px), #fbbf24 calc(100% - 3px)),
        linear-gradient(90deg, #7f1d1d, #ef4444 40%, #b91c1c 70%, #7f1d1d);
    animation: cracker-pop 0.45s ease-out var(--pop) both;
}
/* The flash. */
.firecracker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #fde68a 18%, rgba(251, 146, 60, 0.55) 38%, transparent 66%);
    opacity: 0;
    animation: cracker-flash 0.45s ease-out var(--pop) both;
}
/* Red and gold paper thrown out by the bang. */
.firecracker i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 3px;
    margin: -1.5px 0 0 -2px;
    background: #dc2626;
    box-shadow: 12px -8px 0 #fbbf24, -11px -6px 0 #ef4444, 9px 10px 0 #b91c1c, -10px 9px 0 #fde68a,
                16px 2px 0 #dc2626, -15px 1px 0 #fbbf24, 2px -14px 0 #ef4444, -3px 15px 0 #dc2626;
    opacity: 0;
    animation: cracker-paper 0.9s ease-out var(--pop) both;
}
@keyframes cracker-pop {
    0%, 35% { opacity: 1; }
    45%     { opacity: 0; }
    100%    { opacity: 0; }
}
@keyframes cracker-flash {
    0%   { opacity: 0; scale: 0.2; }
    25%  { opacity: 1; scale: 1; }
    100% { opacity: 0; scale: 1.3; }
}
@keyframes cracker-paper {
    0%   { opacity: 0; scale: 0.3; translate: 0 0; }
    15%  { opacity: 1; }
    100% { opacity: 0; scale: 2.2; translate: 0 26px; }
}

/* =====================================================================================================================
   Valentine's payment notice: a rose toast with a heart for the tick, and six small hearts floating up off it.
   White on #be123c..#9f1239 is above 6:1.
   ===================================================================================================================== */
.hearts-toast { background: linear-gradient(135deg, #be123c 0%, #9f1239 100%); }
.hearts-icon { position: relative; flex-shrink: 0; width: 20px; height: 20px; }
.hearts-icon svg {
    display: block;
    width: 20px;
    height: 19px;
    fill: #ffe4e6;
    animation: hearts-beat 1.2s ease-in-out 2;
}
/* They lift off the icon and drift right across the notice, staying on it (the toast sits near the top of the screen,
   so anything rising far above it would leave the screen). */
.hearts-float {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 11px;
    height: 11px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 28.5C9 23.3 1.5 17.6 1.5 9.8 1.5 5.2 5 1.5 9.4 1.5c2.8 0 5.2 1.5 6.6 3.8 1.4-2.3 3.8-3.8 6.6-3.8 4.4 0 7.9 3.7 7.9 8.3 0 7.8-7.5 13.5-14.5 18.7Z' fill='%23ffe4e6'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    animation: hearts-up 2.2s cubic-bezier(0.3, 0.6, 0.5, 1) calc(var(--h) * 220ms + 200ms) both;
}
.hearts-float:nth-child(2n) { width: 8px; height: 8px; --rise: -16px; }
.hearts-float:nth-child(3n) { --rise: -6px; }
@keyframes hearts-up {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(-12deg); }
    15%  { opacity: 0.95; }
    70%  { opacity: 0.7; }
    100% { opacity: 0; transform: translate(calc(70px + var(--h) * 34px), var(--rise, -11px)) scale(1) rotate(14deg); }
}
@keyframes hearts-beat {
    0%, 40%, 100% { transform: scale(1); }
    15%           { transform: scale(1.2); }
    28%           { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .hearts-float { display: none; }
    .hearts-icon svg { animation: none; }
}

/* =====================================================================================================================
   The other seasons' payment notices. White text stays above 4.5:1 on each: #991b1b (envelope) 8.3:1, #9a3412 (treat)
   7.3:1, #78350f (glitter) 9.6:1. Each plays once as it arrives, and stands still under reduced motion.
   ===================================================================================================================== */
.envelope-toast { background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%); }
.treat-toast    { background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%); }
.glitter-toast  { background: linear-gradient(135deg, #92400e 0%, #78350f 100%); box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.35), 0 10px 24px rgba(120, 53, 15, 0.35); }

/* Lunar New Year: a red envelope with a gold seal; the flap lifts and five coins hop out and settle. */
.envelope-icon { position: relative; flex-shrink: 0; width: 20px; height: 20px; }
.envelope-body {
    position: absolute;
    left: 2px;
    top: 4px;
    width: 16px;
    height: 13px;
    border-radius: 2px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.7);
}
.envelope-flap {
    position: absolute;
    left: 2px;
    top: 4px;
    width: 16px;
    height: 8px;
    background: #b91c1c;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: 50% 0;
    animation: envelope-open 0.5s ease-out 0.3s both;
}
.envelope-seal {
    position: absolute;
    left: 8px;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fbbf24;
}
.envelope-coin {
    position: absolute;
    left: 7px;
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fef3c7, #fbbf24 55%, #b45309);
    opacity: 0;
    pointer-events: none;
    animation: envelope-coin 1.3s cubic-bezier(0.25, 0.6, 0.4, 1) calc(0.55s + var(--c) * 110ms) both;
}
@keyframes envelope-open {
    from { transform: scaleY(1); }
    to   { transform: scaleY(-1); }
}
@keyframes envelope-coin {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
    15%  { opacity: 1; }
    45%  { transform: translate(calc(14px + var(--c) * 12px), -12px) scale(1); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(22px + var(--c) * 20px), 4px) scale(0.9); }
}

/* Halloween: a wrapped sweet that wiggles twice. */
.treat-icon { flex-shrink: 0; width: 24px; height: 15px; }
.treat-icon svg { display: block; width: 24px; height: 15px; animation: treat-wiggle 0.9s ease-in-out 0.2s 2; }
@keyframes treat-wiggle {
    0%, 100% { transform: rotate(0); }
    20%      { transform: rotate(-14deg); }
    45%      { transform: rotate(11deg); }
    70%      { transform: rotate(-5deg); }
}

/* New Year: a gold star that pops a ring of glitter. */
.glitter-icon { position: relative; flex-shrink: 0; width: 20px; height: 20px; }
.glitter-icon svg { display: block; width: 20px; height: 20px; fill: #fde68a; filter: drop-shadow(0 0 4px rgba(253, 230, 138, 0.7)); animation: glitter-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.15s both; }
.glitter-bit {
    position: absolute;
    left: 9px;
    top: 9px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fef3c7;
    box-shadow: 0 0 4px #fde68a;
    opacity: 0;
    pointer-events: none;
    animation: glitter-out 0.9s ease-out 0.35s both;
    rotate: calc(var(--g) * 45deg);
}
.glitter-bit:nth-child(2n) { background: #fbbf24; width: 2px; height: 2px; }
@keyframes glitter-pop {
    0%   { transform: scale(0.3) rotate(-40deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes glitter-out {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-18px) scale(0.4); }
}
@media (prefers-reduced-motion: reduce) {
    .envelope-coin, .glitter-bit { display: none; }
    .envelope-flap, .treat-icon svg, .glitter-icon svg { animation: none; }
}

/* =====================================================================================================================
   Halloween's Scan disc is a jack-o'-lantern: a candle glow flickers up from inside it (kept low, so the white icon
   keeps its contrast) and a pumpkin stem sits on top.
   ===================================================================================================================== */
/* The pumpkin: deep orange with darker ribs, so white on it stays above 4.5:1 (#c2410c is 5.2:1). */
html[data-season="halloween"] .nav-float-scan-disc {
    isolation: isolate;
    background:
        radial-gradient(38% 60% at 50% 50%, transparent 92%, rgba(67, 20, 7, 0.32) 100%),
        radial-gradient(70% 62% at 50% 50%, transparent 90%, rgba(67, 20, 7, 0.28) 100%),
        radial-gradient(120% 100% at 50% 30%, #c2410c 0%, #b23a0a 60%, #7c2d12 100%);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45), 0 0 0 4px var(--ui-surface);
}
/* The candle inside, glowing up from the bottom and kept below the icon. */
html[data-season="halloween"] .nav-float-scan-disc::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(60% 36% at 50% 100%, rgba(253, 186, 116, 0.75) 0%, rgba(251, 146, 60, 0.35) 55%, transparent 100%);
    animation: candle-flicker 2.3s linear infinite;
}
html[data-season="halloween"] .nav-float-scan-disc::after {
    top: -7px;
    left: 50%;
    right: auto;
    width: 12px;
    height: 11px;
    margin-left: -6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 11'%3E%3Cpath d='M5 11C5 8 4.6 5.5 3.6 3.2 3.2 2.3 4 1.6 4.8 2 6 2.6 6.6 5.5 6.8 11Z' fill='%23365314'/%3E%3Cpath d='M6.4 4C7 2 8.6.8 11 1.2 10.4 3.2 8.6 4.4 6.4 4Z' fill='%2365a30d'/%3E%3C/svg%3E") center bottom / contain no-repeat;
    transform: none;
    animation: none;
}
@keyframes candle-flicker {
    0%, 100% { opacity: 1; }
    12%      { opacity: 0.78; }
    20%      { opacity: 0.95; }
    34%      { opacity: 0.7; }
    41%      { opacity: 1; }
    63%      { opacity: 0.82; }
    71%      { opacity: 0.96; }
    86%      { opacity: 0.74; }
}
html[data-season-paused][data-season="halloween"] .nav-float-scan-disc::before,
html[data-season-still][data-season="halloween"] .nav-float-scan-disc::before { animation-play-state: paused; }
html[data-season-calm][data-season="halloween"] .nav-float-scan-disc::before { content: none; }
html[data-season-calm][data-season="halloween"] .nav-float-scan-disc {
    background: var(--ui-primary);
    box-shadow: var(--ui-primary-shadow), 0 0 0 4px var(--ui-surface);
}
@media (prefers-reduced-motion: reduce) {
    html[data-season="halloween"] .nav-float-scan-disc::before { animation: none; }
}

/* =====================================================================================================================
   Easter (Good Friday to Easter Monday): a pastel spring sky with blossom petals drifting down.
   ===================================================================================================================== */

html[data-season="easter"] {
    --season-bg: linear-gradient(180deg, #f3eefe 0%, #f0faf5 45%, #f8fafc 100%);
    --season-card-edge: linear-gradient(90deg, #f9a8d4, #c4b5fd 25%, #86efac 50%, #fde68a 75%, #f9a8d4) 0 0 / 100% 3px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(196, 181, 253, 0.55), 0 8px 22px -6px rgba(134, 239, 172, 0.45);
    --season-nav-accent: #7c3aed;
    --season-shimmer: rgba(196, 181, 253, 0.35);
    --season-shimmer-dark: rgba(196, 181, 253, 0.26);
    --season-grip: linear-gradient(90deg, #f9a8d4, #c4b5fd 33%, #86efac 66%, #fde68a);
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 40'%3E%3Cellipse cx='8' cy='14' rx='5' ry='6.4' fill='%23fbcfe8' fill-opacity='.7'/%3E%3Cpath d='M3.2 13.4l1.6-1.4 1.6 1.4 1.6-1.4 1.6 1.4 1.6-1.4 1.6 1.4' stroke='%23a78bfa' stroke-width='.9' fill='none'/%3E%3Cellipse cx='18' cy='27' rx='4' ry='5.2' fill='%23bbf7d0' fill-opacity='.7'/%3E%3Ccircle cx='16.6' cy='26' r='.9' fill='%23fde68a'/%3E%3Ccircle cx='19.4' cy='28.4' r='.9' fill='%23fde68a'/%3E%3C/svg%3E"),
        radial-gradient(70% 120% at 0% 100%, rgba(196, 181, 253, 0.3), transparent 34%);
    --season-cta-deco-pos: left 2px center, 0 0;
    --season-cta-deco-size: 22px 34px, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat;
    --season-cta-deco-disc: radial-gradient(circle at 30% 80%, rgba(196, 181, 253, 0.4), transparent 55%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html.dark[data-season="easter"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #2c2152 0%, rgba(20, 16, 40, 0) 70%),
        linear-gradient(180deg, #1f1838 0%, #151229 60%, #0b0a17 100%);
    --season-nav-accent: #c4b5fd;
}
/* A painted egg, pink with a violet zigzag and a mint band, perched on the corner; now and then it wobbles. */
html[data-season="easter"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="easter"] .nav-float-scan-disc::after {
    top: -9px;
    right: 10px;
    width: 13px;
    height: 17px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 34'%3E%3Cdefs%3E%3CclipPath id='e'%3E%3Cpath d='M13 1C6 1 1 12 1 20s5.4 13 12 13 12-5 12-13S20 1 13 1Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23e)'%3E%3Crect width='26' height='34' fill='%23fbcfe8'/%3E%3Crect y='17' width='26' height='6' fill='%2386efac'/%3E%3Cpath d='M0 13l3.2-3 3.3 3 3.2-3 3.3 3 3.2-3 3.3 3 3.2-3 3.3 3' stroke='%238b5cf6' stroke-width='2' fill='none'/%3E%3Ccircle cx='8' cy='28' r='1.6' fill='%23fde68a'/%3E%3Ccircle cx='18' cy='28' r='1.6' fill='%23fde68a'/%3E%3C/g%3E%3Cpath d='M13 1C6 1 1 12 1 20s5.4 13 12 13 12-5 12-13S20 1 13 1Z' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3Cellipse cx='8.5' cy='9' rx='2.4' ry='3.6' transform='rotate(25 8.5 9)' fill='%23fff' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(12deg);
    transform-origin: 50% 100%;
    filter: drop-shadow(0 1px 1.5px rgba(76, 29, 149, 0.4));
    animation: cta-wobble 4s ease-in-out infinite;
}
html[data-season="easter"] .nav-float-scan-disc::after { top: -6px; right: 1px; }
@keyframes cta-wobble {
    0%, 80%, 100% { transform: rotate(12deg); }
    85%           { transform: rotate(2deg); }
    90%           { transform: rotate(20deg); }
    95%           { transform: rotate(8deg); }
}

/* Blossom petals: each falls while its ::before turns and sways, so it flutters instead of dropping straight. */
.petal {
    position: absolute;
    top: -20px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    will-change: transform;
    animation: snow-fall var(--t) linear var(--d) infinite;
}
.petal::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 80% 0 80% 0;
    background: radial-gradient(circle at 30% 30%, #ffffff 0, #fde4f0 30%, #f9a8d4 75%, #f472b6 100%);
    animation: petal-flutter calc(var(--t) / 3) ease-in-out var(--d) infinite alternate;
}
.petal:nth-child(3n)::before { background: radial-gradient(circle at 30% 30%, #ffffff 0, #f5f3ff 35%, #ddd6fe 80%, #c4b5fd 100%); }
.petal.depth-0 { opacity: 0.45; }
.petal.depth-1 { opacity: 0.7; }
.petal.depth-2 { opacity: 0.85; }
html.dark .petal.depth-0 { opacity: 0.35; }
html.dark .petal.depth-1 { opacity: 0.55; }
html.dark .petal.depth-2 { opacity: 0.7; }
@keyframes petal-flutter {
    from { transform: translateX(calc(var(--sway) * -0.5)) rotate(-40deg) scaleX(1); }
    50%  { transform: translateX(0) rotate(30deg) scaleX(0.55); }
    to   { transform: translateX(calc(var(--sway) * 0.5)) rotate(110deg) scaleX(1); }
}

/* =====================================================================================================================
   Diwali (Dhanteras to Bhai Dooj): the festival of lights. An indigo night warmed by marigold and gold, a row of clay
   lamps along the top with flickering flames, and embers floating up.
   ===================================================================================================================== */

html[data-season="diwali"] {
    --season-bg: linear-gradient(180deg, #fff4e0 0%, #fffaf0 45%, #f8fafc 100%);
    --season-card-edge: linear-gradient(90deg, #f59e0b, #ea580c 25%, #db2777 50%, #ea580c 75%, #f59e0b) 0 0 / 100% 3px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(251, 191, 36, 0.55), 0 8px 22px -6px rgba(234, 88, 12, 0.45);
    --season-nav-accent: #c2410c;
    --season-shimmer: rgba(245, 158, 11, 0.3);
    --season-shimmer-dark: rgba(251, 191, 36, 0.26);
    --season-grip: linear-gradient(90deg, #ea580c, #fbbf24 50%, #db2777);
    /* Rangoli at the two ends: little flowers of petals around a dot. */
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg fill='%23fde68a' fill-opacity='.75'%3E%3Ccircle r='2.2'/%3E%3Cg id='p'%3E%3Cellipse cy='-6.5' rx='1.8' ry='3.2'/%3E%3C/g%3E%3Cuse href='%23p' transform='rotate(45)'/%3E%3Cuse href='%23p' transform='rotate(90)'/%3E%3Cuse href='%23p' transform='rotate(135)'/%3E%3Cuse href='%23p' transform='rotate(180)'/%3E%3Cuse href='%23p' transform='rotate(225)'/%3E%3Cuse href='%23p' transform='rotate(270)'/%3E%3Cuse href='%23p' transform='rotate(315)'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg fill='%23fda4af' fill-opacity='.6'%3E%3Ccircle r='2.2'/%3E%3Cg id='p'%3E%3Cellipse cy='-6.5' rx='1.8' ry='3.2'/%3E%3C/g%3E%3Cuse href='%23p' transform='rotate(60)'/%3E%3Cuse href='%23p' transform='rotate(120)'/%3E%3Cuse href='%23p' transform='rotate(180)'/%3E%3Cuse href='%23p' transform='rotate(240)'/%3E%3Cuse href='%23p' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(90deg, rgba(234, 88, 12, 0.3), transparent 18% 82%, rgba(219, 39, 119, 0.28));
    --season-cta-deco-pos: left 6px center, right 6px center, 0 0;
    --season-cta-deco-size: 18px 18px, 15px 15px, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat, no-repeat;
    --season-cta-deco-disc: radial-gradient(circle, transparent 58%, rgba(251, 191, 36, 0.45) 62%, transparent 66%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html.dark[data-season="diwali"] {
    --season-bg:
        radial-gradient(120% 40% at 50% 0%, rgba(217, 119, 6, 0.22) 0%, rgba(20, 15, 46, 0) 70%),
        linear-gradient(180deg, #140f2e 0%, #0d0a22 60%, #070514 100%);
    --season-nav-accent: #fbbf24;
}
/* A small clay diya with a living flame sits on the corner. */
html[data-season="diwali"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="diwali"] .nav-float-scan-disc::after {
    top: -13px;
    right: 9px;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cdefs%3E%3CradialGradient id='f' cx='.5' cy='.7' r='.6'%3E%3Cstop offset='0' stop-color='%23fffbeb'/%3E%3Cstop offset='.45' stop-color='%23fcd34d'/%3E%3Cstop offset='1' stop-color='%23f97316'/%3E%3C/radialGradient%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c2410c'/%3E%3Cstop offset='1' stop-color='%237c2d12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='18' cy='13' r='9' fill='%23fbbf24' opacity='.25'/%3E%3Cpath d='M18 3c3 4 4.6 7 4.6 9.6A4.6 4.6 0 0 1 13.4 12.6C13.4 10 15 7 18 3Z' fill='url(%23f)'/%3E%3Cpath d='M3 20h30c-1.6 7-7.6 12-15 12S4.6 27 3 20Z' fill='url(%23b)'/%3E%3Cpath d='M3 20h30' stroke='%23fbbf24' stroke-width='1.6'/%3E%3Cpath d='M9 25.5h18' stroke='%23fbbf24' stroke-width='1' stroke-dasharray='1.5 2.2' opacity='.8'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.55));
    transform-origin: 50% 100%;
    animation: cta-flicker 1.8s ease-in-out infinite alternate;
}
html[data-season="diwali"] .nav-float-scan-disc::after { top: -10px; right: 0; }
@keyframes cta-flicker {
    0%   { transform: scale(1, 1); opacity: 0.95; }
    40%  { transform: scale(0.97, 1.04); opacity: 1; }
    70%  { transform: scale(1.02, 0.98); opacity: 0.9; }
    100% { transform: scale(1, 1.03); opacity: 1; }
}

/* Embers rise and fade like sparks from the lamps, each on its own drifting curve. */
.ember {
    position: absolute;
    bottom: -10px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    will-change: transform;
    animation: heart-rise var(--t) linear var(--d) infinite;
}
.ember::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #fffbeb 0 25%, #fbbf24 50%, rgba(249, 115, 22, 0) 75%);
    box-shadow: 0 0 6px 2px rgba(251, 191, 36, 0.45);
    animation: ember-drift calc(var(--t) / 4) ease-in-out var(--d) infinite alternate;
}
.ember.depth-0 { opacity: 0.4; }
.ember.depth-1 { opacity: 0.65; }
.ember.depth-2 { opacity: 0.85; }
html:not(.dark) .ember::before { box-shadow: 0 0 4px 1px rgba(234, 88, 12, 0.35); }
@keyframes ember-drift {
    from { transform: translateX(calc(var(--sway) * -0.5)); opacity: 1; }
    to   { transform: translateX(calc(var(--sway) * 0.5)); opacity: 0.35; }
}
/* Clay lamps (diyas) in a row along the top, like the winter lights: a terracotta bowl with a gold rim and a flame
   that flickers on its own beat. */
.diyas {
    position: absolute;
    inset: 6px 3% auto 3%;
    display: flex;
    justify-content: space-between;
}
.diya {
    position: relative;
    width: 22px;
    height: 24px;
}
.diya:nth-child(even) { margin-top: 6px; }
.diya-bowl {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 9px;
    border-radius: 2px 2px 11px 11px / 2px 2px 9px 9px;
    background: linear-gradient(180deg, #c2410c, #7c2d12);
    box-shadow: inset 0 1.5px 0 #fbbf24, 0 1px 2px rgba(0, 0, 0, 0.35);
}
.diya-flame {
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 8px;
    height: 13px;
    margin-left: -4px;
    border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
    background: radial-gradient(circle at 50% 72%, #fffbeb 0 20%, #fde68a 40%, #fb923c 75%, rgba(249, 115, 22, 0) 100%);
    box-shadow: 0 0 10px 4px rgba(251, 191, 36, 0.35);
    transform-origin: 50% 100%;
    animation: diya-flicker calc(1.3s + var(--i) * 0.17s) ease-in-out calc(var(--i) * -0.4s) infinite alternate;
}
html:not(.dark) .diya-flame { box-shadow: 0 0 8px 3px rgba(234, 88, 12, 0.25); }
@keyframes diya-flicker {
    0%   { transform: scale(1, 1) rotate(-2deg); opacity: 0.95; }
    35%  { transform: scale(0.92, 1.08) rotate(2deg); opacity: 1; }
    70%  { transform: scale(1.05, 0.95) rotate(-1deg); opacity: 0.88; }
    100% { transform: scale(0.97, 1.05) rotate(1.5deg); opacity: 1; }
}

/* =====================================================================================================================
   Thanksgiving (US, Thursday to Sunday): a warm autumn afternoon, with maple and oak leaves tumbling down.
   ===================================================================================================================== */

html[data-season="thanksgiving"] {
    --season-bg: linear-gradient(180deg, #fdf1e2 0%, #fbf7f1 45%, #f8fafc 100%);
    --season-card-edge: linear-gradient(90deg, #b45309, #dc2626 33%, #ca8a04 66%, #b45309) 0 0 / 100% 3px no-repeat;
    --season-cta-glow: 0 0 0 1px rgba(217, 119, 6, 0.5), 0 8px 22px -6px rgba(194, 65, 12, 0.42);
    --season-nav-accent: #c2410c;
    --season-shimmer: rgba(217, 119, 6, 0.28);
    --season-shimmer-dark: rgba(251, 146, 60, 0.24);
    --season-grip: linear-gradient(90deg, #b45309, #dc2626 50%, #ca8a04);
    --season-cta-deco:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath transform='rotate(-25 16 16)' fill='%23fed7aa' fill-opacity='.6' d='M16 2l2.4 5.2 3.6-1.4-.8 5 4.8-1.4-1.6 4.4 4 1.2-5.2 3.6 1.4 2.6-5.6-.8-1.6 3.4V31h-1.6v-3.2l-1.6-3.4-5.6.8 1.4-2.6L4.6 16l4-1.2-1.6-4.4 4.8 1.4-.8-5 3.6 1.4Z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath transform='rotate(30 16 16)' fill='%23fde68a' fill-opacity='.5' d='M16 2l2.4 5.2 3.6-1.4-.8 5 4.8-1.4-1.6 4.4 4 1.2-5.2 3.6 1.4 2.6-5.6-.8-1.6 3.4V31h-1.6v-3.2l-1.6-3.4-5.6.8 1.4-2.6L4.6 16l4-1.2-1.6-4.4 4.8 1.4-.8-5 3.6 1.4Z'/%3E%3C/svg%3E"),
        linear-gradient(90deg, rgba(194, 65, 12, 0.3), transparent 20% 80%, rgba(180, 83, 9, 0.28));
    --season-cta-deco-pos: left 5px center, right 7px center, 0 0;
    --season-cta-deco-size: 20px 20px, 15px 15px, auto;
    --season-cta-deco-repeat: no-repeat, no-repeat, no-repeat;
    --season-cta-deco-disc: radial-gradient(circle at 30% 80%, rgba(217, 119, 6, 0.4), transparent 55%);
    --season-cta-deco-disc-pos: 0 0;
    --season-cta-deco-disc-size: auto;
    --season-cta-deco-disc-repeat: no-repeat;
}
html.dark[data-season="thanksgiving"] {
    --season-bg:
        radial-gradient(120% 55% at 50% 0%, #3a1d0b 0%, rgba(28, 16, 9, 0) 70%),
        linear-gradient(180deg, #1c1009 0%, #140b06 60%, #0a0603 100%);
    --season-nav-accent: #fb923c;
}
/* A red maple leaf has landed on the corner and stirs in the breeze now and then. */
html[data-season="thanksgiving"] .btn-primary:not(:disabled):not([aria-disabled="true"])::after,
html[data-season="thanksgiving"] .nav-float-scan-disc::after {
    top: -9px;
    right: 9px;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f59e0b'/%3E%3Cstop offset='.55' stop-color='%23dc2626'/%3E%3Cstop offset='1' stop-color='%239a3412'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23l)' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round' d='M16 2l2.4 5.2 3.6-1.4-.8 5 4.8-1.4-1.6 4.4 4 1.2-5.2 3.6 1.4 2.6-5.6-.8-1.6 3.4V31h-1.6v-3.2l-1.6-3.4-5.6.8 1.4-2.6L4.6 16l4-1.2-1.6-4.4 4.8 1.4-.8-5 3.6 1.4Z'/%3E%3Cpath d='M16 9v18M16 18l-5-4M16 18l5-4M16 23l-4-2M16 23l4-2' stroke='%237c2d12' stroke-width='.7' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(-18deg);
    transform-origin: 50% 90%;
    filter: drop-shadow(0 1px 1.5px rgba(124, 45, 18, 0.45));
    animation: cta-rustle 5s ease-in-out infinite;
}
html[data-season="thanksgiving"] .nav-float-scan-disc::after { top: -7px; right: 0; }
@keyframes cta-rustle {
    0%, 70%, 100% { transform: rotate(-18deg); }
    78%           { transform: rotate(-6deg); }
    86%           { transform: rotate(-24deg); }
    93%           { transform: rotate(-14deg); }
}

/* Leaves tumble: each falls while its svg rocks and spins, so it sails side to side like a real leaf. */
.leaf {
    position: absolute;
    top: -34px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    will-change: transform;
    animation: snow-fall var(--t) linear var(--d) infinite;
}
.leaf svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: var(--c);
    animation: leaf-tumble calc(var(--t) / 3) ease-in-out var(--d) infinite alternate;
}
.leaf.depth-0 { opacity: 0.4; }
.leaf.depth-1 { opacity: 0.65; }
.leaf.depth-2 { opacity: 0.85; }
html.dark .leaf.depth-0 { opacity: 0.3; }
html.dark .leaf.depth-1 { opacity: 0.5; }
html.dark .leaf.depth-2 { opacity: 0.7; }
@keyframes leaf-tumble {
    from { transform: translateX(calc(var(--sway) * -0.6)) rotate(-50deg) scaleY(1); }
    50%  { transform: translateX(0) rotate(20deg) scaleY(0.7); }
    to   { transform: translateX(calc(var(--sway) * 0.6)) rotate(140deg) scaleY(1); }
}

/* =====================================================================================================================
   Winter: a light dusting of snow along the top of each PIN box. A background layer inside the box; the digit, its
   colour and the border are untouched. Not on calm screens (a PIN for a send or a signature).
   ===================================================================================================================== */
html[data-season="winter"]:not([data-season-calm]) .pin-box {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 8' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 0h44v3.6c-2.4 1.4-4.6.4-6.6 1.4-2.4 1.2-4 .2-6-.2-2.6-.6-4 1.4-6.6 1-2.2-.4-3.2-1.6-5.6-.8-2.4.8-4 .4-6-.4-2.2-.8-3.6.8-6 .6C3 5 1.4 3.8 0 4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 7px;
}
html:not(.dark)[data-season="winter"]:not([data-season-calm]) .pin-box {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 8' preserveAspectRatio='none'%3E%3Cpath fill='%23dbeafe' d='M0 0h44v3.6c-2.4 1.4-4.6.4-6.6 1.4-2.4 1.2-4 .2-6-.2-2.6-.6-4 1.4-6.6 1-2.2-.4-3.2-1.6-5.6-.8-2.4.8-4 .4-6-.4-2.2-.8-3.6.8-6 .6C3 5 1.4 3.8 0 4Z'/%3E%3C/svg%3E");
}

/* The DigiByte logo in the season's costume (DigiLogo Seasonal="true"). The image is larger than the logo's box so the
   hat and scarf fit around the ring; it overflows the box without moving the layout. */
.season-logo {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.season-logo > img {
    position: absolute;
    max-width: none;
    pointer-events: none;
    user-select: none;
}
