/* HeartWise "Kindness Tree" hero (SPEC_magic_hero + SPEC_magic2). Scoped to .mg-scene / .mg-wrap. transform + opacity only (plus one canvas). */
.mg-scene{--mg-night:#22364C;--mg-dusk:#3E4568;--mg-heather:#7A5A7E;--mg-horizon:#E9B98A;--mg-meadow:#3D5A4E;--mg-meadow-d:#2C4A3F;--mg-gold:#F4D58A;--mg-peach:#F6BE98;--mg-lilac:#E2A6CF;--mg-leaf:#B9D79A;
  --mg-rose:var(--lingon-glow);--mg-sky:var(--fjord-glow);--mg-mint:var(--aurora-glow);--mg-cream:var(--cloud-tint);--hs:0;
  position:relative;overflow:hidden;width:100%;border-radius:22px;isolation:isolate;contain:paint;container-type:inline-size;touch-action:pan-y;
  background:linear-gradient(180deg,var(--mg-night) 0%,var(--mg-dusk) 34%,var(--mg-heather) 52%,var(--mg-horizon) 63%,var(--mg-meadow) 66%,var(--mg-meadow-d) 100%);
  box-shadow:0 34px 70px -34px rgba(34,54,76,.55),0 0 0 1px rgba(248,235,203,.35) inset}
.hero .stage:has(.mg-scene){max-width:600px}
.stage:has(.mg-scene) .blob{inset:-14% -12% -10% -12%;border-radius:50%;opacity:.7;background:radial-gradient(closest-side,var(--cloud-tint) 0%,var(--heather-tint) 55%,transparent 100%)}
.mg-wrap{position:relative;z-index:1}
.mg-scene>*{position:absolute;pointer-events:none}
.mg-scene img{display:block;max-width:none;height:auto;width:100%;user-select:none;-webkit-user-drag:none}
.mg-bgw{left:-3%;top:-3%;width:106%}.mg-bg{filter:saturate(1.06) contrast(1.04)}
.mb-core,.mb-hush,.mb-grade,.mb-raysw,.mg-dusk,.mg-veil,.mb-letters,.mg-cv,.mg-birds,.mg-flies,.mg-still{inset:0}
.mg-cv{width:100%;height:100%}
.mg-dusk{background:linear-gradient(180deg,rgba(34,54,76,.55),rgba(34,54,76,.15) 70%,transparent);opacity:calc(var(--hs) * .6)}
.mg-halo{left:22%;top:38%;width:56%;height:56%;mix-blend-mode:screen;opacity:0;background:radial-gradient(closest-side,var(--mg-word,var(--mg-horizon)),transparent)}
.mg-flash{left:14%;top:2%;width:72%;height:46%;opacity:0;mix-blend-mode:screen;background:radial-gradient(closest-side,rgba(248,235,203,.8),transparent)}
.mg-fam{left:var(--fl);top:var(--ft);width:var(--fw)}
.mg-fam img{transform-origin:50% 100%}
.mg-shadow{position:absolute;left:-4%;right:-4%;bottom:-2.5%;height:6%;background:radial-gradient(closest-side,rgba(20,30,28,.45),transparent)}
.mg-veil{background:var(--mg-night);opacity:0}

/* v2 layers: heart of the tree, rays, hush behind the sentence, ring, floor, blessing glow, vignette */
.mb-core{mix-blend-mode:screen;opacity:.9;background:radial-gradient(18% 16% at 50% 40%,rgba(255,240,200,.85),rgba(244,213,138,.35) 45%,transparent 75%),radial-gradient(48% 36% at 50% 38%,rgba(244,213,138,.28),transparent 70%)}
.mb-core i{position:absolute;inset:0;opacity:0;background:radial-gradient(18% 16% at 50% 40%,rgba(255,244,214,.95),transparent 75%)}
.mb-raysw{overflow:hidden}
.mb-rays{position:absolute;left:-30%;top:-40%;width:160%;height:160%;opacity:.4;mix-blend-mode:screen;will-change:transform;
  background:repeating-conic-gradient(from 0deg at 50% 50%,rgba(255,236,190,.15) 0 3.5deg,transparent 3.5deg 17deg);-webkit-mask-image:radial-gradient(circle closest-side at 50% 50%,#000 0 18%,transparent 62%);mask-image:radial-gradient(circle closest-side at 50% 50%,#000 0 18%,transparent 62%)}
@supports (mix-blend-mode:plus-lighter){.mb-rays{mix-blend-mode:plus-lighter}}
.mb-hush{opacity:0;transition:opacity .8s ease;background:radial-gradient(46% 15% at 50% 33%,rgba(14,24,42,.46),rgba(14,24,42,.18) 60%,transparent 78%)}
.mb-hush.on{opacity:1}.mb-hush.off{transition-duration:1.4s}
.mb-ring{left:35%;top:23.33%;width:30%;height:33.33%;opacity:0;mix-blend-mode:screen;background:radial-gradient(closest-side,transparent 70%,rgba(255,236,190,.55) 76%,transparent 82%)}
.mb-floor{left:26%;top:84%;width:48%;height:16%;mix-blend-mode:screen;background:radial-gradient(closest-side,rgba(244,213,138,.22),transparent)}
.mb-bless{left:28%;top:46%;width:44%;height:46%;opacity:0;mix-blend-mode:screen;background:radial-gradient(closest-side,rgba(255,226,170,.55),transparent)}
.mb-grade{background:radial-gradient(ellipse 75% 70% at 50% 46%,transparent 58%,rgba(16,24,42,.34) 100%)}
.mb-letters{font-size:var(--ml-fs,32px)}
.mb-hands,.mb-stars{position:absolute;inset:0;pointer-events:none}
.mb-hands i{position:absolute;width:12%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;opacity:0;mix-blend-mode:screen;background:radial-gradient(closest-side,rgba(255,226,150,.95),rgba(244,213,138,.4) 50%,transparent)}
.mb-stars{display:none}
.mb-stars i{position:absolute;translate:-50% -50%;border-radius:50%;background:radial-gradient(circle,#FFF3C4 0 25%,rgba(244,213,138,.5) 40%,transparent 70%)}
.mg-js:not(.mg-live) :is(.mb-core,.mb-raysw){opacity:0}
/* still frame: the first blessing as real text, the same on every screen */
.mg-still{container-type:normal}
.mb-still-s{position:absolute;left:50%;top:34%;translate:-50% -50%;width:84%;margin:0;text-align:center;text-wrap:balance;font:600 max(20px,5.4cqw)/1.16 "Crimson Pro",Georgia,serif;letter-spacing:.01em;color:#FFF1CF;
  text-shadow:0 1px 1px rgba(16,20,36,.55),0 0 2px rgba(255,236,190,.9),0 0 9px rgba(244,213,138,.7),0 0 22px rgba(240,186,110,.42)}
.mb-still-s b{font-weight:600;color:var(--fc);text-shadow:0 1px 1px rgba(16,20,36,.5),0 0 2px var(--fc),0 0 10px color-mix(in srgb,var(--fc) 70%,transparent),0 0 26px color-mix(in srgb,var(--fc) 45%,transparent)}
.mg-still i{position:absolute;translate:-50% -50%;border-radius:50%;background:radial-gradient(circle,#FFF3C4 0 25%,rgba(244,213,138,.5) 40%,transparent 70%)}
.mg-js .mg-still{opacity:0}.mg-js .mg-veil{opacity:.55}
.mg-js:not(.mg-live) .mg-still{animation:mg-in .6s 5s forwards}.mg-js:not(.mg-live) .mg-veil{animation:mg-out 1s 4s forwards}
.mg-live .mg-veil{opacity:0}
.mg-scene:not(.mg-js) .mb-hush{opacity:1}.mg-scene:not(.mg-js) .mb-rays{opacity:.4;animation:none}.mg-scene:not(.mg-js) .mg-halo{opacity:.25}.mg-scene:not(.mg-js) .mb-stars{display:block}
.mg-bird{position:absolute;left:0;top:0;opacity:0;overflow:visible}
.mg-wing{transform-box:fill-box;transform-origin:50% 100%}
.mg-fly{position:absolute;left:0;top:0;overflow:visible}.mg-fw{transform-box:fill-box;transform-origin:50% 50%}
.mg-fly.on .mg-fw{animation:mg-flap .22s ease-in-out infinite alternate}
.mg-bird.go{animation:mg-bird var(--t,16s) linear forwards}.mg-bird.go .mg-wing{animation:mg-flap .5s ease-in-out infinite alternate}
.mg-lite .mg-bird.b1,.mg-lite .mg-bird.b2,.mg-lite .mg-fly.f1{display:none}
.mg-live .mb-core{animation:mb-wake 1.4s var(--mo-out,cubic-bezier(.22,1,.36,1)) .3s backwards,mb-breath 5s ease-in-out 1.7s infinite alternate}
.mg-live .mb-floor{animation:mb-breath 5s ease-in-out infinite alternate}
.mg-live .mb-rays{animation:mb-rot 720s linear infinite}.mg-lite .mb-rays{animation:none!important}
.mg-live .mg-fam img{animation:mg-fb 5s ease-in-out infinite alternate}
.mg-scene.mo-off *{animation-play-state:paused!important}
/* buttons (siblings of the picture so they stay reachable) */
.mg-tree{position:absolute;left:14%;top:6%;width:72%;height:38%;border-radius:50%;background:none;border:0;padding:0;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent}
.mg-tree:focus-visible{outline:2px solid var(--panel);outline-offset:2px;box-shadow:0 0 0 4px var(--focus)}
.mg-play{position:absolute;top:3%;left:50%;translate:-50% 0;z-index:3;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px 0 13px;border:0;border-radius:99px;cursor:pointer;
  font:600 .82rem/1 Montserrat,system-ui,sans-serif;background:var(--panel);color:var(--ink);box-shadow:0 6px 18px -6px rgba(20,30,40,.5)}
.mg-play[aria-pressed=true]{background:var(--heather-ink);color:var(--panel)}
.mg-play:focus-visible{outline:2px solid var(--panel);outline-offset:2px;box-shadow:0 0 0 4px var(--focus)}
.mg-play.new::after{content:"";position:absolute;inset:0;border-radius:99px;border:2px solid var(--panel);opacity:0;animation:mg-ping 1.6s ease-out 3s 3}
.mg-eq{display:none;align-items:flex-end;gap:2px;height:14px}.mg-play[aria-pressed=true] .mg-eq{display:inline-flex}
.mg-eq i{width:3px;height:100%;background:currentColor;border-radius:2px;transform-origin:50% 100%;animation:mg-bars .9s ease-in-out infinite alternate}
.mg-eq i:nth-child(2){animation-duration:1.1s}.mg-eq i:nth-child(3){animation-duration:.7s}
.mg-hint,.mg-status{position:absolute;left:50%;z-index:3;transform:translateX(-50%);padding:6px 12px;border-radius:99px;background:var(--ink);color:var(--panel);font:600 .78rem/1.2 Montserrat,system-ui,sans-serif;pointer-events:none;white-space:nowrap}
.mg-hint{top:17%;opacity:0}.mg-status{top:15%;display:none}.mg-status.on{display:block}
/* floaters and the compass badge stay clear of the family, the sentence and the head zone */
.stage:has(.mg-scene) .f-book2{top:-10%;right:-8%;width:17%}
.stage:has(.mg-scene) .f-book1{top:4%;left:-9%;bottom:auto;width:19%}
.stage:has(.mg-scene) .dial--badge{--dial-size:118px!important;left:-28px!important;right:auto!important;bottom:-36px!important}
@keyframes mg-in{to{opacity:1}}@keyframes mg-out{to{opacity:0}}
@keyframes mb-wake{from{opacity:0}to{opacity:1}}
@keyframes mb-breath{from{opacity:.75}to{opacity:1}}
@keyframes mb-rot{to{rotate:360deg}}
@keyframes mg-fb{from{transform:scale(1)}to{transform:scale(1.006)}}
@keyframes mg-flap{from{transform:scaleY(1)}to{transform:scaleY(.35)}}
@keyframes mg-bird{0%{transform:translate(-6cqw,18cqw);opacity:0}6%{opacity:.8}50%{transform:translate(50cqw,5cqw)}94%{opacity:.8}100%{transform:translate(108cqw,14cqw);opacity:0}}
@keyframes mg-bars{from{transform:scaleY(.3)}to{transform:scaleY(1)}}
@keyframes mg-ping{0%{opacity:.8;transform:scale(1)}100%{opacity:0;transform:scale(1.25,1.5)}}
@media (max-width:900px){.hero .stage:has(.mg-scene){max-width:460px}}
@media (max-width:560px){
  .hero .stage:has(.mg-scene){max-width:100%}
  .mg-fam{left:var(--ml);top:var(--mt);width:var(--mw)}
  .mg-play{min-height:40px;font-size:.74rem;padding:0 12px 0 10px;gap:6px}
  .mg-play::before{content:"";position:absolute;inset:-2px}
  .mb-hush{background:radial-gradient(50% 17% at 50% 30%,rgba(14,24,42,.46),rgba(14,24,42,.18) 60%,transparent 78%)}
  .mb-still-s{top:31%;font-size:max(17px,6cqw)}
  .stage:has(.mg-scene) .f-book2{top:-8%;right:-5%;width:17%}
  .stage:has(.mg-scene) .dial--badge{--dial-size:84px!important;left:auto!important;right:-8px!important;bottom:-30px!important}
}
/* Calm view, reduced motion, print: the still picture only */
html.calm .mg-scene *,html.calm .mg-scene *::before,html.calm .mg-scene *::after,html.calm .mg-eq i{animation:none!important}
html.calm :is(.mb-letters,.mg-cv,.mg-birds,.mg-flies,.mg-veil,.mg-tree,.mg-hint,.mg-dusk,.mg-flash,.mb-ring,.mb-bless,.mb-floor){display:none!important}
html.calm .mg-scene .mg-still{opacity:1!important;animation:none}html.calm .mb-hush{opacity:1}html.calm .mb-rays{opacity:.4}html.calm .mg-halo{opacity:.25}html.calm .mb-stars{display:block}
@media (prefers-reduced-motion:reduce){
  .mg-scene *,.mg-scene *::before,.mg-scene *::after,.mg-eq i{animation:none!important}
  :is(.mb-letters,.mg-cv,.mg-birds,.mg-flies,.mg-veil,.mg-tree,.mg-hint,.mg-dusk,.mg-flash,.mb-ring,.mb-bless,.mb-floor){display:none!important}
  .mg-scene .mg-still{opacity:1!important}.mb-hush{opacity:1}.mb-rays{opacity:.4}.mg-halo{opacity:.25}.mb-stars{display:block}
}
@media print{:is(.mb-letters,.mg-cv,.mg-birds,.mg-flies,.mg-veil,.mg-tree,.mg-hint,.mg-dusk,.mg-play,.mg-status){display:none!important}.mg-scene .mg-still{opacity:1!important}.mg-scene{box-shadow:none}.mb-hush{opacity:1}}
