/* Shared animated backgrounds (Map Card + containers). Moved out of hanly-map-card.css on 2026-11-20; selectors match both hosts. */
/* Container host: the layer sits above the container's own background and below its content. */
:where(.hc-native-container[data-hc-fxbg]){position:relative}
.hc-fxbg{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden;border-radius:inherit;isolation:isolate}
.hc-fxbg[data-hmc-fx-mode=full]{background:color-mix(in srgb,var(--hmc-fx-c2) 30%,#0a0806)}
/* ================= Effects (opt-in): grainy gradient, spotlight, radar, tilt, scramble ================= */
.hmc-fx-blobs,.hmc-fx-grain,.hmc-fx-spot{position:absolute;inset:0;pointer-events:none;border-radius:inherit}
.hmc-fx-blobs{z-index:3;overflow:hidden;mix-blend-mode:screen;opacity:calc(var(--hmc-fx-blend,.7)*.75)}
.hmc-fx-blobs i{position:absolute;border-radius:50%;filter:blur(52px) saturate(1.4);background:var(--c);width:62%;height:80%;animation:hmc-fx-drift var(--hmc-fx-speed,18s) ease-in-out infinite alternate}
.hmc-fx-blobs i:nth-child(1){--c:var(--hmc-fx-c1);left:-8%;top:-10%;--x:34%;--y:18%}
.hmc-fx-blobs i:nth-child(2){--c:var(--hmc-fx-c2);left:32%;top:26%;--x:-28%;--y:-22%;animation-duration:calc(var(--hmc-fx-speed,18s)*1.25)}
.hmc-fx-blobs i:nth-child(3){--c:var(--hmc-fx-c3);left:58%;top:-14%;width:46%;--x:-34%;--y:30%;animation-duration:calc(var(--hmc-fx-speed,18s)*1.1)}
@keyframes hmc-fx-drift{to{transform:translate(var(--x),var(--y)) scale(1.18) rotate(24deg)}}
.hmc-fx-grain{z-index:3;mix-blend-mode:overlay;opacity:var(--hmc-fx-grain,.6);filter:contrast(170%) brightness(1000%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:300px}
.hmc-fx-spot{z-index:3;opacity:0;transition:opacity .35s;background:radial-gradient(circle 170px at var(--hmc-fx-x,50%) var(--hmc-fx-y,50%),#ffe7b844 0,#ffe7b81c 45%,transparent 100%),radial-gradient(circle 260px at var(--hmc-fx-x,50%) var(--hmc-fx-y,50%),transparent 0,#0000 40%,#00000066 100%)}
/* radar sweep + ripples on the marker */
/* tilt: panel leans toward the cursor */
/* Full gradient mode: bold poster-style Grainient look, map faintly visible underneath */
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-blobs{mix-blend-mode:normal;opacity:calc(.55 + var(--hmc-fx-blend,.7)*.45);background:color-mix(in srgb,var(--hmc-fx-c2) 40%,#0a0806)}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-blobs i{filter:blur(70px) saturate(1.25);width:78%;height:100%}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-grain{opacity:calc(var(--hmc-fx-grain,.6)*1.15)}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-blobs i{filter:blur(70px) saturate(2.4) brightness(1.1)}
/* animated grain (film flicker) + livelier drift */
@keyframes hmc-fx-grain-shift{0%{background-position:0 0}20%{background-position:-60px 40px}40%{background-position:45px -70px}60%{background-position:-90px -30px}80%{background-position:70px 80px}100%{background-position:0 0}}
@media(prefers-reduced-motion:no-preference){
.hmc-fx-grain{animation:hmc-fx-grain-shift .8s steps(1,end) infinite}
.hmc-fx-blobs i:nth-child(1){--x:46%;--y:26%}.hmc-fx-blobs i:nth-child(2){--x:-40%;--y:-30%}.hmc-fx-blobs i:nth-child(3){--x:-46%;--y:40%}
}
@keyframes hmc-fx-drift{50%{transform:translate(calc(var(--x)*.55),calc(var(--y)*-.4)) scale(1.1) rotate(-12deg)}to{transform:translate(var(--x),var(--y)) scale(1.25) rotate(28deg)}}
@media(prefers-reduced-motion:reduce){.hmc-fx-grain{animation:none}}

/* v2 motion: transform-driven (compositor friendly, works in Safari), stronger travel in tint mode */
.hmc-fx-grain{inset:-120px;border-radius:0;background-position:0 0!important}
@keyframes hmc-fx-grain-jump{0%{transform:translate(0,0)}20%{transform:translate(-60px,40px)}40%{transform:translate(45px,-70px)}60%{transform:translate(-90px,-30px)}80%{transform:translate(70px,80px)}100%{transform:translate(0,0)}}
.hmc-fx-blobs{isolation:isolate}
.hmc-fx-blobs i{will-change:transform;filter:blur(42px) saturate(1.6)}
:is(.hanly-map-card-wrap,.hc-fxbg):not([data-hmc-fx-mode=full]) .hmc-fx-blobs{opacity:calc(var(--hmc-fx-blend,.7)*1.1)}
@keyframes hmc-fx-drift{25%{transform:translate(calc(var(--x)*.4),calc(var(--y)*-.7)) scale(1.15) rotate(-18deg)}60%{transform:translate(calc(var(--x)*.9),calc(var(--y)*.5)) scale(.95) rotate(20deg)}to{transform:translate(calc(var(--x)*1.35),calc(var(--y)*1.2)) scale(1.35) rotate(40deg)}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-grain{animation:hmc-fx-grain-jump .7s steps(1,end) infinite}}
@media(prefers-reduced-motion:reduce){.hmc-fx-grain{animation:none}}

/* Light rays (shared effects family): soft god-rays falling from the top, slow sway */
.hmc-fx-rays{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden;border-radius:inherit;mix-blend-mode:screen;opacity:calc(var(--hmc-fx-blend,.7)*1.1);-webkit-mask-image:linear-gradient(180deg,#000 0,#000 35%,transparent 92%);mask-image:linear-gradient(180deg,#000 0,#000 35%,transparent 92%)}
.hmc-fx-rays i{position:absolute;left:50%;top:-30%;width:170%;height:170%;margin-left:-85%;transform-origin:50% 0;filter:blur(14px);will-change:transform,opacity;
background:repeating-conic-gradient(from 160deg at 50% 0,transparent 0 3deg,var(--c) 4.5deg 6deg,transparent 8deg 13deg)}
.hmc-fx-rays i:nth-child(1){--c:color-mix(in srgb,var(--hmc-fx-c3) 85%,transparent)}
.hmc-fx-rays i:nth-child(2){--c:color-mix(in srgb,var(--hmc-fx-c1) 70%,transparent);transform:rotate(7deg) scale(1.1);background-size:100% 100%;filter:blur(26px)}
.hmc-fx-rays i:nth-child(3){--c:color-mix(in srgb,var(--hmc-fx-c2) 55%,transparent);transform:rotate(-9deg) scale(1.2);filter:blur(34px)}
@keyframes hmc-fx-sway{0%{transform:rotate(-7deg) scale(1.05);opacity:.55}50%{opacity:1}100%{transform:rotate(7deg) scale(1.12);opacity:.65}}
@media(prefers-reduced-motion:no-preference){
.hmc-fx-rays i:nth-child(1){animation:hmc-fx-sway var(--hmc-fx-speed,18s) ease-in-out infinite alternate}
.hmc-fx-rays i:nth-child(2){animation:hmc-fx-sway calc(var(--hmc-fx-speed,18s)*1.35) ease-in-out -6s infinite alternate-reverse}
.hmc-fx-rays i:nth-child(3){animation:hmc-fx-sway calc(var(--hmc-fx-speed,18s)*.8) ease-in-out -3s infinite alternate}}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=light_rays][data-hmc-fx-mode=full] .hmc-fx-rays{mix-blend-mode:normal;background:color-mix(in srgb,var(--hmc-fx-c2) 35%,#0a0806)}

/* ===== Background effects family (opt-in, CSS-only, theme colours) ===== */
.hmc-fx-x{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden;border-radius:inherit;mix-blend-mode:screen;opacity:calc(var(--hmc-fx-blend,.7)*1.15)}
.hmc-fx-x i,.hmc-fx-x svg{position:absolute;display:block}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-x{mix-blend-mode:normal;background:color-mix(in srgb,var(--hmc-fx-c2) 30%,#0a0806)}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-x:not(.hmc-fx-gradient-blinds){opacity:1}
@media(prefers-reduced-motion:reduce){.hmc-fx-x *{animation:none!important}}

/* Radar sweep */
.hmc-fx-radar-sweep .r{left:50%;top:50%;border-radius:50%;border:1.5px solid color-mix(in srgb,var(--hmc-fx-c3) 70%,transparent);transform:translate(-50%,-50%)}
.hmc-fx-radar-sweep .r:nth-child(1){width:26%;aspect-ratio:1}.hmc-fx-radar-sweep .r:nth-child(2){width:52%;aspect-ratio:1}.hmc-fx-radar-sweep .r:nth-child(3){width:80%;aspect-ratio:1}
.hmc-fx-radar-sweep .sweep{left:50%;top:50%;width:110%;aspect-ratio:1;margin:0;transform:translate(-50%,-50%);border-radius:50%;background:conic-gradient(from 0deg,transparent 0 70%,color-mix(in srgb,var(--hmc-fx-c1) 55%,transparent) 96%,var(--hmc-fx-c3) 100%);-webkit-mask-image:radial-gradient(circle,#000 0,#000 46%,transparent 70%);mask-image:radial-gradient(circle,#000 0,#000 46%,transparent 70%)}
@keyframes hmc-fx-sweep{to{transform:translate(-50%,-50%) rotate(360deg)}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-radar-sweep .sweep{animation:hmc-fx-sweep calc(var(--hmc-fx-speed,18s)*.35) linear infinite}}

/* Scanner */
.hmc-fx-scanner .grid{inset:0;background:repeating-linear-gradient(0deg,transparent 0 5px,color-mix(in srgb,var(--hmc-fx-c3) 14%,transparent) 5px 6px),repeating-linear-gradient(90deg,transparent 0 39px,color-mix(in srgb,var(--hmc-fx-c3) 10%,transparent) 39px 40px)}
.hmc-fx-scanner .bar{left:0;right:0;top:-30%;height:30%;background:linear-gradient(180deg,transparent 0,color-mix(in srgb,var(--hmc-fx-c1) 45%,transparent) 82%,var(--hmc-fx-c3) 99%,#fff 100%);filter:drop-shadow(0 0 14px var(--hmc-fx-c1))}
@keyframes hmc-fx-scan{to{transform:translateY(433%)}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-scanner .bar{animation:hmc-fx-scan calc(var(--hmc-fx-speed,18s)*.3) cubic-bezier(.45,0,.55,1) infinite alternate}}

/* Gradient blinds */
.hmc-fx-gradient-blinds .wash{inset:-20%;background:linear-gradient(100deg,var(--hmc-fx-c1),var(--hmc-fx-c2) 50%,var(--hmc-fx-c3));background-size:200% 100%}
.hmc-fx-gradient-blinds{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 46px,rgba(0,0,0,.25) 46px 50px);mask-image:repeating-linear-gradient(90deg,#000 0 46px,rgba(0,0,0,.25) 46px 50px)}
.hmc-fx-gradient-blinds .slats{inset:0;background:repeating-linear-gradient(90deg,transparent 0 40px,rgba(0,0,0,.35) 49px 50px,transparent 50px 50px);mix-blend-mode:multiply}
@keyframes hmc-fx-wash{to{background-position:100% 0;transform:skewX(-8deg) scale(1.1)}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-gradient-blinds .wash{animation:hmc-fx-wash var(--hmc-fx-speed,18s) ease-in-out infinite alternate}}

/* Magic rings */
.hmc-fx-magic-rings i{left:66%;top:50%;width:70%;aspect-ratio:1;border-radius:50%;margin:0;transform:translate(-50%,-50%) scale(.1);border:2px solid var(--hmc-fx-c3);box-shadow:0 0 30px 2px var(--hmc-fx-c1),inset 0 0 30px 2px var(--hmc-fx-c1);opacity:0}
@keyframes hmc-fx-ring{0%{transform:translate(-50%,-50%) scale(.08);opacity:0}15%{opacity:1}100%{transform:translate(-50%,-50%) scale(1.5);opacity:0}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-magic-rings i{animation:hmc-fx-ring calc(var(--hmc-fx-speed,18s)*.4) ease-out infinite}
.hmc-fx-magic-rings i:nth-child(2){animation-delay:calc(var(--hmc-fx-speed,18s)*-.08);border-color:var(--hmc-fx-c1)}.hmc-fx-magic-rings i:nth-child(3){animation-delay:calc(var(--hmc-fx-speed,18s)*-.16)}.hmc-fx-magic-rings i:nth-child(4){animation-delay:calc(var(--hmc-fx-speed,18s)*-.24);border-color:var(--hmc-fx-c1)}.hmc-fx-magic-rings i:nth-child(5){animation-delay:calc(var(--hmc-fx-speed,18s)*-.32)}}
.hmc-fx-magic-rings i{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.hmc-fx-magic-rings i{opacity:.55;transform:translate(-50%,-50%) scale(calc(.25*var(--k,1)))}}

/* Line waves */
.hmc-fx-line-waves svg{left:0;top:0;width:200%;height:100%;fill:none;stroke-width:1.4;vector-effect:non-scaling-stroke}
.hmc-fx-line-waves path{stroke:var(--hmc-fx-c3);opacity:calc(.35 + var(--i)*.07);vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 5px var(--hmc-fx-c1))}
.hmc-fx-line-waves path:nth-child(even){stroke:var(--hmc-fx-c1)}
@keyframes hmc-fx-wavex{to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-line-waves svg{animation:hmc-fx-wavex calc(var(--hmc-fx-speed,18s)*1.2) linear infinite}}
.hmc-fx-line-waves{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 25%,#000 100%);mask-image:linear-gradient(90deg,transparent 0,#000 25%,#000 100%)}

/* Side rays */
.hmc-fx-side-rays{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 30%,transparent 95%);mask-image:linear-gradient(90deg,#000 0,#000 30%,transparent 95%)}
.hmc-fx-side-rays i{left:-30%;top:50%;width:170%;height:170%;margin-top:-85%;transform-origin:0 50%;filter:blur(12px);background:repeating-conic-gradient(from 70deg at 0 50%,transparent 0 3deg,var(--c) 4.5deg 6.5deg,transparent 9deg 14deg)}
.hmc-fx-side-rays i:nth-child(1){--c:color-mix(in srgb,var(--hmc-fx-c3) 85%,transparent)}
.hmc-fx-side-rays i:nth-child(2){--c:color-mix(in srgb,var(--hmc-fx-c1) 70%,transparent);filter:blur(24px);transform:rotate(6deg) scale(1.1)}
.hmc-fx-side-rays i:nth-child(3){--c:color-mix(in srgb,var(--hmc-fx-c2) 60%,transparent);filter:blur(32px);transform:rotate(-8deg) scale(1.2)}
@keyframes hmc-fx-sidesway{0%{transform:rotate(-6deg) scale(1.05);opacity:.55}50%{opacity:1}100%{transform:rotate(6deg) scale(1.12);opacity:.65}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-side-rays i:nth-child(1){animation:hmc-fx-sidesway var(--hmc-fx-speed,18s) ease-in-out infinite alternate}.hmc-fx-side-rays i:nth-child(2){animation:hmc-fx-sidesway calc(var(--hmc-fx-speed,18s)*1.35) ease-in-out -6s infinite alternate-reverse}.hmc-fx-side-rays i:nth-child(3){animation:hmc-fx-sidesway calc(var(--hmc-fx-speed,18s)*.8) ease-in-out -3s infinite alternate}}

/* Light tunnel */
.hmc-fx-light-tunnel i{left:62%;top:50%;width:90%;height:90%;border-radius:12%;border:2px solid var(--hmc-fx-c3);box-shadow:0 0 36px var(--hmc-fx-c1),inset 0 0 36px var(--hmc-fx-c1);transform:translate(-50%,-50%) scale(.05);opacity:0}
@keyframes hmc-fx-tun{0%{transform:translate(-50%,-50%) scale(.04) rotate(0);opacity:0}12%{opacity:.95}100%{transform:translate(-50%,-50%) scale(2.2) rotate(8deg);opacity:0}}
@media(prefers-reduced-motion:no-preference){.hmc-fx-light-tunnel i{animation:hmc-fx-tun calc(var(--hmc-fx-speed,18s)*.5) cubic-bezier(.5,0,.9,.6) infinite}
.hmc-fx-light-tunnel i:nth-child(2){animation-delay:calc(var(--hmc-fx-speed,18s)*-.083)}.hmc-fx-light-tunnel i:nth-child(3){animation-delay:calc(var(--hmc-fx-speed,18s)*-.167)}.hmc-fx-light-tunnel i:nth-child(4){animation-delay:calc(var(--hmc-fx-speed,18s)*-.25)}.hmc-fx-light-tunnel i:nth-child(5){animation-delay:calc(var(--hmc-fx-speed,18s)*-.333)}.hmc-fx-light-tunnel i:nth-child(6){animation-delay:calc(var(--hmc-fx-speed,18s)*-.417)}}
@media(prefers-reduced-motion:reduce){.hmc-fx-light-tunnel i:nth-child(n){opacity:.5;transform:translate(-50%,-50%) scale(calc(.2*var(--k,1)))}.hmc-fx-light-tunnel i:nth-child(2){--k:2}.hmc-fx-light-tunnel i:nth-child(3){--k:3}.hmc-fx-light-tunnel i:nth-child(4){--k:4}}
/* tuning pass */
.hmc-fx-side-rays i{top:-35%;height:170%;margin-top:0}
:is(.hanly-map-card-wrap,.hc-fxbg):not([data-hmc-fx-mode=full]) .hmc-fx-gradient-blinds{opacity:calc(var(--hmc-fx-blend,.7)*.55)}
.hmc-fx-gradient-blinds{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 26px,rgba(0,0,0,.18) 26px 30px);mask-image:repeating-linear-gradient(90deg,#000 0 26px,rgba(0,0,0,.18) 26px 30px)}
.hmc-fx-gradient-blinds .slats{background:repeating-linear-gradient(90deg,transparent 0 22px,rgba(0,0,0,.4) 29px 30px)}
.hmc-fx-radar-sweep .sweep{background:conic-gradient(from 0deg,transparent 0 62%,color-mix(in srgb,var(--hmc-fx-c1) 40%,transparent) 94%,color-mix(in srgb,var(--hmc-fx-c3) 90%,transparent) 100%);-webkit-mask-image:radial-gradient(circle,#000 0,#000 38%,transparent 66%);mask-image:radial-gradient(circle,#000 0,#000 38%,transparent 66%)}
.hmc-fx-side-rays i{background:repeating-conic-gradient(from 72deg at 0 50%,transparent 0 2deg,var(--c) 3deg 4.2deg,transparent 5.5deg 11deg)}
.hmc-fx-side-rays i:nth-child(1){filter:blur(3px)}.hmc-fx-side-rays i:nth-child(2){filter:blur(9px)}.hmc-fx-side-rays i:nth-child(3){filter:blur(16px)}
/* Gradient blinds: WebGL version replaces the CSS fallback when available */
.hmc-fx-gl{position:absolute;inset:0;width:100%;height:100%;display:none}
.hfx-gl-ok .hmc-fx-gradient-blinds{-webkit-mask-image:none;mask-image:none}
.hfx-gl-ok .hmc-fx-gradient-blinds .wash,.hfx-gl-ok .hmc-fx-gradient-blinds .slats{display:none}
.hfx-gl-ok .hmc-fx-gradient-blinds .hmc-fx-gl{display:block}
:is(.hanly-map-card-wrap,.hc-fxbg):not([data-hmc-fx-mode=full]) .hfx-gl-ok .hmc-fx-gradient-blinds,:is(.hanly-map-card-wrap,.hc-fxbg).hfx-gl-ok:not([data-hmc-fx-mode=full]) .hmc-fx-gradient-blinds{opacity:1}
/* blinds: darken the map beneath so the coloured light reads like the demo */
.hfx-gl-ok .hmc-fx-gradient-blinds{isolation:isolate}
:is(.hanly-map-card-wrap,.hc-fxbg):not([data-hmc-fx-mode=full]) .hfx-gl-ok .hmc-fx-gradient-blinds,:is(.hanly-map-card-wrap,.hc-fxbg).hfx-gl-ok:not([data-hmc-fx-mode=full]) .hmc-fx-gradient-blinds{mix-blend-mode:normal;background:rgba(6,6,9,calc(.3 + var(--hmc-fx-blend,.7)*.5))}
.hfx-gl-ok .hmc-fx-gradient-blinds .hmc-fx-gl{mix-blend-mode:screen}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-mode=full] .hmc-fx-gradient-blinds{background:#08070b}

/* Grainient (WebGL): flowing warped gradient + animated grain; CSS blobs remain as the no-WebGL fallback */
.hmc-fx-gx{display:none}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=grainient].hfx-gl-ok .hmc-fx-gx{display:block;position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden;border-radius:inherit;mix-blend-mode:screen;opacity:calc(var(--hmc-fx-blend,.7)*.95)}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=grainient][data-hmc-fx-mode=full].hfx-gl-ok .hmc-fx-gx{mix-blend-mode:normal;opacity:1}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=grainient].hfx-gl-ok .hmc-fx-gx .hmc-fx-gl{display:block}
:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=grainient].hfx-gl-ok .hmc-fx-blobs,:is(.hanly-map-card-wrap,.hc-fxbg)[data-hmc-fx-bg=grainient].hfx-gl-ok .hmc-fx-grain{display:none}

@media(prefers-reduced-motion:reduce){.hmc-fx-blobs i{animation:none}}
