/* FocusGrove tree effects (production). Only transform and opacity animate; glow, gold tint and the sheen mask are cached canvases
   built once by fx.js. No inline style attributes in markup (CSP safe: fx.js sets custom properties through the CSSOM).
   Page background behind trees is #fbdad4; the badge boundary colours were measured against it (>= 3:1). */
:root{--fg-deep:#7a4a00;--fg-gold:#d4a017;--fg-bright:#ffd86b;--fg-pale:#fff4c2;--fg-crimson:#8b1e1e}
.fgfx{position:relative;width:var(--s,128px);height:var(--s,128px);flex:none;
  --bmax:1.012;--sway:0deg;--cycle:6s;--sheen-every:10s;--sheen-a:0;--aura-a:0;--glow-a:0;--gpad:0px;--delay:0s;--sd:0s;--bd:0s;
  --aura-c1:rgba(255,255,255,.9);--aura-c2:rgba(200,200,200,.5);--sheen-c:#fff}
.fgfx *{box-sizing:border-box}
.fgfx-sway,.fgfx-breath{position:absolute;inset:0}
.fgfx-img{position:absolute;inset:0;width:100%;height:100%;display:block;user-select:none;-webkit-user-select:none}
.fgfx-glow{position:absolute;left:calc(var(--gpad) * -1);top:calc(var(--gpad) * -1);width:calc(100% + var(--gpad) * 2);height:calc(100% + var(--gpad) * 2);
  display:block;pointer-events:none;opacity:calc(var(--glow-a) * .55);will-change:opacity;animation:fgfx-glow var(--cycle) ease-in-out var(--delay) infinite}
.fgfx-sway{transform-origin:50% 92%;will-change:transform;animation:fgfx-wind var(--wcycle,6.6s) ease-in-out var(--wdelay,0s) infinite alternate}
.fgfx-breath{will-change:transform;animation:fgfx-breath var(--cycle) ease-in-out var(--delay) infinite;transform-origin:50% 92%}
.fgfx-top .fgfx-glow{animation-name:fgfx-glow-top}
@keyframes fgfx-glow-top{0%,100%{opacity:.82}50%{opacity:1}}
.fgfx:not(.fgfx-lit)[data-rebirth="0"] .fgfx-glow,.fgfx:not(.fgfx-lit)[data-rebirth="0"] .fgfx-aura{display:none}

/* aura (pure CSS gradient; animates transform + opacity only) */
.fgfx-aura{position:absolute;inset:-22%;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,var(--aura-c1),var(--aura-c2) 48%,transparent 74%);
  opacity:var(--aura-a);will-change:transform,opacity;animation:fgfx-aura calc(var(--cycle) * 1.2) ease-in-out var(--delay) infinite}
.fgfx-top .fgfx-aura{background:radial-gradient(closest-side,rgba(255,244,194,.95),rgba(255,216,107,.72) 30%,rgba(212,160,23,.48) 48%,rgba(139,30,30,.3) 62%,rgba(139,30,30,.1) 70%,transparent 78%)}
.fgfx-rays{position:absolute;inset:0;border-radius:50%;display:none;
  background:conic-gradient(from 0deg,transparent 0 8%,rgba(255,216,107,.7) 10%,transparent 13% 33%,rgba(255,244,194,.6) 35%,transparent 38% 58%,rgba(255,216,107,.7) 60%,transparent 63% 83%,rgba(255,244,194,.6) 85%,transparent 88%);
  -webkit-mask-image:radial-gradient(closest-side,transparent 30%,#000 55%,transparent 100%);mask-image:radial-gradient(closest-side,transparent 30%,#000 55%,transparent 100%);
  animation:fgfx-spin 48s linear infinite}
.fgfx-top:not(.fgfx-small) .fgfx-rays{display:block}
.fgfx-top .fgfx-aura{overflow:hidden} /* the spinning rays would otherwise widen the page scroll area (bounding box of a rotated square) */
.fgfx-ring{position:absolute;inset:-10%;border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(closest-side,transparent 55%,var(--aura-c1) 70%,transparent 100%)}

/* metallic sheen: a soft band, masked to the canopy, one sweep every 10 s */
.fgfx-sheen{position:absolute;left:0;top:0;width:100%;height:100%;opacity:var(--sheen-a);pointer-events:none}
.fgfx-top .fgfx-sheen{opacity:.9}

/* motes */
.fgfx-motes{position:absolute;inset:0;pointer-events:none}
.fgfx-mote{position:absolute;left:var(--x);bottom:12%;width:var(--ms);height:var(--ms);border-radius:50%;background:var(--mc);
  box-shadow:0 0 6px var(--mc);opacity:0;will-change:transform,opacity;animation:fgfx-rise var(--md) ease-out var(--mdelay) infinite}

/* badge: shield seal, top-left, 20 % of the tree (>= 18 px, set by fx.js) */
.fgfx-badge{position:absolute;left:8px;top:8px;width:var(--b-size);height:calc(var(--b-size) * 1.12);
  clip-path:polygon(0 0,100% 0,100% 62%,50% 100%,0 62%);background:var(--b-ring);overflow:hidden;z-index:3}
.fgfx-badge[hidden]{display:none}
.fgfx-in{position:absolute;inset:max(2px,calc(var(--b-size) * .09));clip-path:polygon(0 0,100% 0,100% 62%,50% 100%,0 62%);background:var(--b-fill);
  display:flex;align-items:flex-start;justify-content:center;color:var(--b-num);font:700 calc(var(--b-size) * .46)/1 Georgia,"Times New Roman",serif;padding-top:calc(var(--b-size) * .16)}
.fgfx-badge[data-r="5"] .fgfx-in{background:linear-gradient(150deg,var(--fg-pale) 0,var(--fg-bright) 38%,var(--fg-gold) 100%)}
.fgfx-badge[data-r="5"]{background:linear-gradient(160deg,var(--fg-deep),#5a3500)}
.fgfx-shine{position:absolute;top:0;bottom:0;left:0;width:45%;display:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.85),transparent);transform:translateX(-160%) skewX(-18deg)}
.fgfx-badge[data-r="5"] .fgfx-shine{display:block;will-change:transform;animation:fgfx-bshine 5s ease-in-out var(--bd) infinite}

/* idea (flag, default OFF): faint 1 s hint of the next tier */
.fgfx-preview{position:absolute;inset:-22%;border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(closest-side,var(--pv-c1),var(--pv-c2) 48%,transparent 74%);animation:fgfx-pv 1s ease-in-out 1 both}
@keyframes fgfx-pv{0%{opacity:0}40%{opacity:var(--pv-a)}100%{opacity:0}}

/* rebirth ceremony, 3.5 s: old aura draws in (0-1.3 s), new colour appears (1.0-2.5 s), numeral stamps in (2.3-3.5 s). Nothing flashes. */
.fgfx-aura-old{animation:fgfx-cer-old 1.3s ease-in both !important}
.fgfx-cer .fgfx-aura:not(.fgfx-aura-old){animation:fgfx-cer-new 1.5s ease-out 1s both}
.fgfx-cer .fgfx-ring{animation:fgfx-cer-ring 1.8s ease-out 1s both}
.fgfx-cer .fgfx-badge{animation:fgfx-cer-stamp 1.2s cubic-bezier(.2,1.2,.4,1) 2.3s both;transform-origin:50% 50%}
.fgfx-skip{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);z-index:6;min-height:28px;min-width:64px;padding:2px 14px;
  font:600 13px/1.2 Georgia,"Times New Roman",serif;color:#3a1f1a;background:#fff8f6;border:1px solid #7a2e22;border-radius:6px;cursor:pointer}
.fgfx-skip:focus-visible{outline:3px solid #2a6fdb;outline-offset:2px}

@keyframes fgfx-breath{0%,100%{transform:scale(1)}50%{transform:scale(var(--bmax))}}
@keyframes fgfx-wind{from{transform:rotate(calc(var(--wind,2deg) * var(--fg-calm,1) * var(--fg-joy,1) * -1))}to{transform:rotate(calc(var(--wind,2deg) * var(--fg-calm,1) * var(--fg-joy,1)))}}
@keyframes fgfx-glow{0%,100%{opacity:calc(var(--glow-a) * .55)}50%{opacity:var(--glow-a)}}
@keyframes fgfx-aura{0%,100%{opacity:calc(var(--aura-a) * .7);transform:scale(.96)}50%{opacity:var(--aura-a);transform:scale(1.04)}}
@keyframes fgfx-spin{to{transform:rotate(360deg)}}
@keyframes fgfx-sweep{0%{transform:translateX(-140%) skewX(-18deg)}38%,100%{transform:translateX(300%) skewX(-18deg)}}
@keyframes fgfx-sweep-top{0%{transform:translateX(-140%) skewX(-18deg)}20%,100%{transform:translateX(380%) skewX(-18deg)}}
@keyframes fgfx-rise{0%{transform:translate(0,0) scale(.6);opacity:0}15%{opacity:.9}100%{transform:translate(var(--dx),calc(var(--rise) * -1)) scale(1);opacity:0}}
@keyframes fgfx-bshine{0%,70%{transform:translateX(-160%) skewX(-18deg)}100%{transform:translateX(380%) skewX(-18deg)}}
@keyframes fgfx-cer-old{0%{opacity:var(--aura-a);transform:scale(1)}100%{opacity:0;transform:scale(.55)}}
@keyframes fgfx-cer-new{0%{opacity:0;transform:scale(.7)}100%{opacity:var(--aura-a);transform:scale(1)}}
@keyframes fgfx-cer-ring{0%{opacity:0;transform:scale(.6)}25%{opacity:.5}100%{opacity:0;transform:scale(1.7)}}
@keyframes fgfx-cer-stamp{0%{opacity:0;transform:scale(2.2)}40%{opacity:1;transform:scale(.9)}70%{transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}

/* day / night light: fx.js sets data-fg-light (dawn | day | dusk | night) and --fg-calm on <html> from the viewer's local hour. The light lives in the SCENE:
   a static gradient behind the tree on the card (the plate, the accessories and the tree keep their true colours: bought looks never shift by hour).
   The tree canvas gets brightness only (night .8 at the darkest). Nothing here animates. Happy sway: .fgfx-joy for a few seconds after a kept session. */
html{--fg-calm:1;--fg-joy:1}
html.fgfx-joy{--fg-joy:1.6}
.tree-card-fx{position:relative}
.tree-card-fx::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0}
html[data-fg-light="dawn"] .tree-card-fx::before{opacity:1;background:linear-gradient(180deg,rgba(255,150,120,.5),rgba(255,205,150,.28) 60%,rgba(255,230,190,.12))}
html[data-fg-light="dusk"] .tree-card-fx::before{opacity:1;background:linear-gradient(180deg,rgba(96,64,150,.62),rgba(235,110,70,.5) 62%,rgba(255,150,70,.3))}
html[data-fg-light="night"] .tree-card-fx::before{opacity:1;background:radial-gradient(ellipse at 50% 38%,rgba(40,62,120,.84),rgba(10,18,52,.94) 78%)}
html[data-fg-light="dusk"] .fgfx-img{filter:brightness(.92)}
html[data-fg-light="night"] .fgfx-img{filter:brightness(.8)}

/* off screen (one shared IntersectionObserver in fx.js sets .fgfx-off): nothing moves while nobody sees the tree */
.fgfx-off,.fgfx-off *{animation-play-state:paused !important}

/* page hidden: pause everything (fx.js toggles .fgfx-paused on <html> from visibilitychange) */
.fgfx-paused .fgfx,.fgfx-paused .fgfx *{animation-play-state:paused !important}

/* reduced motion (OS setting, or FGFX.setReducedMotion(true) which sets .fgfx-rm): no motion at all.
   Static glow and aura stay, so does the badge; sheen, motes, rays, ring and the badge shine are hidden. */
@media (prefers-reduced-motion: reduce){
  html:not([data-motion="full"]) .fgfx,html:not([data-motion="full"]) .fgfx *{animation:none !important}
  html:not([data-motion="full"]) .fgfx-glow{opacity:calc(var(--glow-a) * .8)}
  html:not([data-motion="full"]) .fgfx-top .fgfx-glow{opacity:1}
  html:not([data-motion="full"]) .fgfx-aura{opacity:var(--aura-a)}
  html:not([data-motion="full"]) .fgfx-sheen,html:not([data-motion="full"]) .fgfx-motes,html:not([data-motion="full"]) .fgfx-rays,html:not([data-motion="full"]) .fgfx-ring,html:not([data-motion="full"]) .fgfx-shine,html:not([data-motion="full"]) .fgfx-preview{display:none !important}
}
/* settings: the saved choice is on <html data-motion="reduce"> from the first byte of the page, so the first frame is already still */
html[data-motion="reduce"] .fgfx,html[data-motion="reduce"] .fgfx *{animation:none !important}
html[data-motion="reduce"] .fgfx-glow{opacity:calc(var(--glow-a) * .8)}
html[data-motion="reduce"] .fgfx-top .fgfx-glow{opacity:1}
html[data-motion="reduce"] .fgfx-aura{opacity:var(--aura-a)}
html[data-motion="reduce"] .fgfx-sheen,html[data-motion="reduce"] .fgfx-motes,html[data-motion="reduce"] .fgfx-rays,html[data-motion="reduce"] .fgfx-ring,html[data-motion="reduce"] .fgfx-shine,html[data-motion="reduce"] .fgfx-preview{display:none !important}
.fgfx-rm .fgfx,.fgfx-rm .fgfx *{animation:none !important}
.fgfx-rm .fgfx-glow{opacity:calc(var(--glow-a) * .8)}
.fgfx-rm .fgfx-top .fgfx-glow{opacity:1}
.fgfx-rm .fgfx-aura{opacity:var(--aura-a)}
.fgfx-rm .fgfx-sheen,.fgfx-rm .fgfx-motes,.fgfx-rm .fgfx-rays,.fgfx-rm .fgfx-ring,.fgfx-rm .fgfx-shine,.fgfx-rm .fgfx-preview{display:none !important}

/* s1b: a static card (every large card but the one animated card of a screen): same as reduced motion, set per tree by tree-card.js */
.fgfx.fgfx-static,.fgfx.fgfx-static *{animation:none !important}
.fgfx-static .fgfx-glow{opacity:calc(var(--glow-a) * .8)}
.fgfx-static.fgfx-top .fgfx-glow{opacity:1}
.fgfx-static .fgfx-aura{opacity:var(--aura-a)}
.fgfx-static .fgfx-sheen,.fgfx-static .fgfx-motes,.fgfx-static .fgfx-rays,.fgfx-static .fgfx-ring,.fgfx-static .fgfx-shine,.fgfx-static .fgfx-preview{display:none !important}
