/* Christmas look (2026-11-07 → end of New Year's Eve, src/season.js). Only ever linked while the season is on; everything
   hangs off html[data-season="christmas"], which public/christmas.js sets unless the member turned the look off.
   Decoration never takes a tap and never sits on top of a trade's numbers: snow and scenery are BEHIND the cards.
   The !important on the colours beats a group's saved overrides (set inline). */
html[data-season="christmas"][data-theme] {
  --bg:#071a16 !important; --surface:#0e2620 !important; --surface-2:#15342c !important; --line:#24473d !important;
  --ink:#f7f3ea !important; --body:#d8e3dc !important; --muted:#9db5aa !important;
  --accent:#e9b949 !important; --accent-hi:#f6cd6a !important; --accent-ink:#1c1402 !important;
  /* buy/sell stay two clearly different colours, and neither is the gold of the buttons or the red of the ribbons */
  --up:#5fd68b !important; --buy:#5fd68b !important; --down:#ff6b7f !important; --sell:#ff6b7f !important;
  --gain:#5fd68b !important; --loss:#ff7070 !important; color-scheme: dark; }

html[data-season="christmas"] body { background: radial-gradient(ellipse at 70% 20%, #123a33, #030c0a 70%); }
html[data-season="christmas"] .device { box-shadow: 0 0 0 2px #1d3a33, 0 0 90px -20px rgb(233 185 73 / .35), inset 0 0 0 1px #24473d; }
html[data-season="christmas"] .app { background: linear-gradient(#0f2d27 0, #071a16 170px); }
@media (max-width: 760px) { html[data-season="christmas"] body { background: #071a16; } }

/* ── top bar: fairy lights along its edge, a Santa hat on the logo, a sleigh going past ── */
html[data-season="christmas"] .top { position: relative; }
html[data-season="christmas"] .top > * { position: relative; z-index: 1; }
html[data-season="christmas"] .top::before { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 12px; z-index: 2; pointer-events: none;
  background:
    radial-gradient(circle at 7px 7px, #ff4d5e 0 3px, rgb(255 77 94 / .35) 4px, transparent 6px) 0 0 / 64px 12px repeat-x,
    radial-gradient(circle at 23px 8px, #ffd36b 0 3px, rgb(255 211 107 / .35) 4px, transparent 6px) 0 0 / 64px 12px repeat-x,
    radial-gradient(circle at 39px 7px, #5fd68b 0 3px, rgb(95 214 139 / .35) 4px, transparent 6px) 0 0 / 64px 12px repeat-x,
    radial-gradient(circle at 55px 8px, #7cc4ff 0 3px, rgb(124 196 255 / .35) 4px, transparent 6px) 0 0 / 64px 12px repeat-x,
    linear-gradient(transparent 3px, rgb(10 30 25 / .9) 3px 4px, transparent 4px) 0 0 / 100% 12px;
  animation: xm-twinkle 1.6s steps(2, jump-none) infinite alternate; }
html[data-season="christmas"] .top::after { content: ""; position: absolute; left: 0; top: 6px; width: 74px; height: 25px; z-index: 2; pointer-events: none; background: url("img/christmas/sleigh.svg") center / contain no-repeat;
  translate: 520px 0; animation: xm-sleigh 38s linear infinite; }
html[data-season="christmas"] .brand { position: relative; }
html[data-season="christmas"] .brand::before { content: ""; position: absolute; left: -8px; top: -15px; width: 32px; height: 28px; z-index: 2; pointer-events: none; rotate: -18deg; background: url("img/christmas/santa-hat.svg") center / contain no-repeat; }

/* the present (tap it: a festive reminder and a flurry of snow, public/christmas.js) */
.xm-gift { display: none; }
html[data-season="christmas"] .xm-gift { display: block; width: 40px; height: 40px; padding: 0; margin-right: 6px; border: 0; border-radius: 50%; background: url("img/christmas/gift.svg") center / 30px no-repeat; filter: drop-shadow(0 0 7px rgb(233 185 73 / .55)); animation: xm-wiggle 6s ease-in-out infinite; transition: transform .25s var(--ease); }
html[data-season="christmas"] .xm-gift:active { transform: scale(.86) rotate(8deg); }
.xm-bubble { position: absolute; left: 16px; right: 16px; top: calc(var(--top-h) + 10px); z-index: 25; padding: 12px 14px; border-radius: 14px; background: #15342c; border: 1px solid #e9b949; color: #f7f3ea; font-size: .9rem; box-shadow: 0 12px 30px rgb(0 0 0 / .5); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s var(--ease), transform .3s var(--ease); }
.xm-bubble small { display: block; margin-top: 4px; color: #e9b949; font-size: .78rem; }
.xm-bubble.show { opacity: 1; transform: none; }
.xm-flake { position: absolute; z-index: 26; width: 16px; height: 16px; pointer-events: none; background: url("img/christmas/snowflake.svg") center / contain no-repeat; animation: xm-flurry 2.2s cubic-bezier(.25,.1,.5,1) forwards; }

/* ── behind the screens: falling snow and a snowy village (the cards sit in front of both) ── */
html[data-season="christmas"] .screens { isolation: isolate; }
html[data-season="christmas"] .screens::before, html[data-season="christmas"] .onboard::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  /* three layers on odd-sized tiles (no visible grid), each falling at its own speed: near flakes big + fast, far ones small + slow */
  background:
    radial-gradient(circle at 31px 47px, #fff 0 1.9px, transparent 2.7px), radial-gradient(circle at 142px 121px, #fff 0 1.6px, transparent 2.4px), radial-gradient(circle at 97px 188px, #fff 0 2.1px, transparent 2.9px),
    radial-gradient(circle at 19px 83px, rgb(255 255 255 / .8) 0 1.2px, transparent 1.9px), radial-gradient(circle at 88px 22px, rgb(255 255 255 / .8) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 41px 9px, rgb(255 255 255 / .55) 0 .8px, transparent 1.4px), radial-gradient(circle at 12px 58px, rgb(255 255 255 / .55) 0 .7px, transparent 1.3px);
  background-size: 173px 211px, 173px 211px, 173px 211px, 113px 127px, 113px 127px, 71px 79px, 71px 79px;
  animation: xm-snow 18s linear infinite; }
html[data-season="christmas"] .screens::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: -1; pointer-events: none; background: url("img/christmas/snowscape.svg") bottom center / 100% 130px no-repeat; }
html[data-season="christmas"] .screens:has([data-screen="chat"].is-active)::after { display: none; }   /* the message box would cut it in half */

/* ── cards + tabs: holly in the corner, gold glow, snow on the tab bar ── */
html[data-season="christmas"] .sig, html[data-season="christmas"] .matrix-hero { position: relative; isolation: isolate; box-shadow: 0 0 22px -12px rgb(233 185 73 / .5); }
html[data-season="christmas"] .sig::after, html[data-season="christmas"] .matrix-hero::after { content: ""; position: absolute; top: 0; right: 0; width: 60px; height: 60px; z-index: -1; opacity: .3; pointer-events: none;   /* behind the card's text, so never over a price */ border-top-right-radius: var(--r); background: url("img/christmas/holly.svg") top right / contain no-repeat; }
html[data-season="christmas"] .btn-primary { box-shadow: 0 4px 20px -6px rgb(233 185 73 / .65); }
html[data-season="christmas"] .sig.is-copied .btn-primary { box-shadow: none; }
html[data-season="christmas"] .tabs { position: relative; }
html[data-season="christmas"] .tab.is-on svg { filter: drop-shadow(0 0 6px rgb(233 185 73 / .75)); }
html[data-season="christmas"] .tabs::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; height: 9px; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 14px 7px at 14px 7px, #eef4f8 98%, transparent) 0 0 / 26px 9px repeat-x, linear-gradient(transparent 6px, #eef4f8 6px) 0 0 / 100% 9px; opacity: .92; }

/* ── sign-up ── */
html[data-season="christmas"] .onboard { background: linear-gradient(#0f2d27, #071a16 45%); isolation: isolate; }
html[data-season="christmas"] .onboard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: -1; pointer-events: none; background: url("img/christmas/snowscape.svg") bottom center / 100% 130px no-repeat; }
html[data-season="christmas"] .ob-step { position: relative; z-index: 1; }

@keyframes xm-twinkle { from { filter: brightness(.75) saturate(.8); } to { filter: brightness(1.25) saturate(1.2); } }
@keyframes xm-sleigh { 0% { translate: 520px 6px; } 30% { translate: 160px -4px; } 48%, 100% { translate: -120px 4px; } }
/* each layer moves a whole number of its own tiles per loop, so the loop is seamless: 2×211, 2×127, 2×79 down */
@keyframes xm-snow { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; } to { background-position: 173px 422px, 173px 422px, 173px 422px, -113px 254px, -113px 254px, 71px 158px, 71px 158px; } }
@keyframes xm-wiggle { 0%, 88%, 100% { rotate: 0deg; } 91% { rotate: -9deg; } 94% { rotate: 8deg; } 97% { rotate: -4deg; } }
@keyframes xm-flurry { from { transform: translate(0, 0) rotate(0) scale(.4); opacity: 0; } 12% { opacity: 1; } to { transform: translate(var(--xm-x), var(--xm-y)) rotate(var(--xm-r)) scale(1.1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html[data-season="christmas"] .screens::before, html[data-season="christmas"] .onboard::before, html[data-season="christmas"] .top::before, html[data-season="christmas"] .xm-gift { animation: none; }
  html[data-season="christmas"] .top::after { display: none; }
}
