/* ─── Promo card animations — premium v2 set ─────────────────────────────────
   Adds 3 new richer animations per promotion type on top of the classic set.
   Tweak "Animation set" (All / New / Classic) controls what the picker offers.
   Loads AFTER promo-card.jsx; reuses its helpers (a, gl, rg, sp, rp, shield). */

(function(){
  if (document.getElementById('pav2-styles')) return;
  const el = document.createElement('style');
  el.id = 'pav2-styles';
  el.textContent = `
    @keyframes pavSweep{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
    @keyframes pavShine{0%{transform:translateX(-90px) skewX(-20deg)}60%,100%{transform:translateX(120px) skewX(-20deg)}}
    @keyframes pavPop{0%,20%{transform:scale(0);opacity:0}35%,80%{transform:scale(1);opacity:1}95%,100%{transform:scale(0);opacity:0}}
    @keyframes pavSlideUp{0%,15%{transform:translateY(26px);opacity:0}40%,85%{transform:translateY(0);opacity:1}100%{transform:translateY(26px);opacity:0}}
    @keyframes pavSplit{0%,55%,100%{transform:translateX(0) rotate(0deg)}75%,85%{transform:translateX(-7px) rotate(-4deg)}}
    @keyframes pavSplitR{0%,55%,100%{transform:translateX(0) rotate(0deg)}75%,85%{transform:translateX(7px) rotate(4deg)}}
    @keyframes pavDrop{0%{transform:translateY(-44px);opacity:0}30%,70%{transform:translateY(0);opacity:1}100%{transform:translateY(30px);opacity:0}}
    @keyframes pavTick{0%,100%{transform:scale(1)}8%{transform:scale(1.25)}16%{transform:scale(1)}}
  `;
  document.head.appendChild(el);
})();

/* sweep beam used by the radar animation */
const pavBeam = () => `<g style="animation:pavSweep 4s linear infinite;transform-origin:80px 80px"><path d="M80 80 L80 22 A58 58 0 0 1 122 38 Z" fill="${a().c}" opacity=".16"/><line x1="80" y1="80" x2="80" y2="22" stroke="${a().c}" stroke-width="2" stroke-linecap="round" opacity=".7"/></g>`;
const pavShine = (x=44,y=40,w=20,h=80) => `<g style="animation:pavShine 3.6s ease-in-out infinite"><rect x="${x}" y="${y}" width="${w}" height="${h}" fill="white" opacity=".45"/></g>`;

const PAV_EXTRA = {
"Warranty":()=>[
/* radar sweep */ `${gl(44,"5s")}<circle cx="80" cy="80" r="58" fill="${a().l}" opacity=".5"/><circle cx="80" cy="80" r="58" fill="none" stroke="${a().c}" stroke-width="1.5" opacity=".4"/><circle cx="80" cy="80" r="42" fill="none" stroke="${a().c}" stroke-width="1" opacity=".3" stroke-dasharray="3 4"/><circle cx="80" cy="80" r="26" fill="none" stroke="${a().c}" stroke-width="1" opacity=".25"/>${pavBeam()}<circle cx="108" cy="56" r="3.5" fill="${a().c}" style="animation:pulsA 4s ease-in-out .4s infinite;transform-origin:108px 56px"/><circle cx="52" cy="102" r="3" fill="${a().c}" style="animation:pulsA 4s ease-in-out 2.2s infinite;transform-origin:52px 102px"/><g style="animation:fYs 5s ease-in-out infinite;transform-origin:80px 80px"><path d="M80 62 L94 69 L94 81 Q94 92 80 97 Q66 92 66 81 L66 69Z" fill="white" stroke="${a().c}" stroke-width="2"/><path d="M73 80 L78 85 L88 72" stroke="${a().c}" stroke-width="2.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>${sp(24,30,".6s")}${sp(134,116,"1.9s")}`,
/* shine shield */ `${gl(42,"5s")}${rg(58,14,"4 7","rCCW","0.12")}<g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 76px"><path d="${shield()}" fill="${a().l}" stroke="${a().c}" stroke-width="2.2"/><clipPath id="pavWs"><path d="${shield()}"/></clipPath><g clip-path="url(#pavWs)">${pavShine(40,28,22,90)}</g><path d="M66 72 L76 82 L96 58" stroke="${a().c}" stroke-width="3.4" fill="none" stroke-linecap="round" stroke-linejoin="round" style="stroke-dasharray:60;stroke-dashoffset:60;animation:dS 1.4s ease-out .4s forwards"/></g><g style="animation:pavPop 4.5s ease-in-out .8s infinite;transform-origin:118px 44px"><path d="M118 34 L120.5 41.5 L128 44 L120.5 46.5 L118 54 L115.5 46.5 L108 44 L115.5 41.5Z" fill="${a().c}" opacity=".85"/></g><g style="animation:pavPop 4.5s ease-in-out 2.6s infinite;transform-origin:36px 104px"><path d="M36 96 L38 102 L44 104 L38 106 L36 112 L34 106 L28 104 L34 102Z" fill="${a().c}" opacity=".7"/></g>${sp(30,40,"1.4s")}`,
/* orbit guard */ `${gl(40,"5s")}<circle cx="80" cy="80" r="52" fill="none" stroke="${a().m}" stroke-width="1" opacity=".5" stroke-dasharray="2 5"/><g style="animation:rCW 9s linear infinite;transform-origin:80px 80px"><circle cx="80" cy="28" r="7" fill="white" stroke="${a().c}" stroke-width="1.5"/><path d="M77 28 L79.5 30.5 L84 25.5" stroke="${a().c}" stroke-width="1.4" fill="none" stroke-linecap="round"/></g><g style="animation:rCCW 14s linear infinite;transform-origin:80px 80px"><circle cx="132" cy="80" r="5" fill="${a().l}" stroke="${a().c}" stroke-width="1.2"/></g><g style="animation:br 5s ease-in-out infinite;transform-origin:80px 78px"><path d="M80 44 L102 55 L102 74 Q102 92 80 100 Q58 92 58 74 L58 55Z" fill="${a().l}" stroke="${a().c}" stroke-width="2"/><path d="M70 72 L77 80 L92 61" stroke="${a().c}" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>${rp("0s")}${rp("1.2s")}${sp(26,36,".5s")}${sp(130,118,"2.1s")}`,
],
"Ext. Warranty":()=>[
/* infinity draw */ `${gl(40,"5s")}${rg(56,16,"4 7","rCW","0.1")}<g style="animation:fYs 5s ease-in-out infinite;transform-origin:80px 80px"><path d="M44 80 Q44 62 58 62 Q72 62 80 80 Q88 98 102 98 Q116 98 116 80 Q116 62 102 62 Q88 62 80 80 Q72 98 58 98 Q44 98 44 80Z" stroke="${a().c}" stroke-width="3" fill="none" stroke-linecap="round" stroke-dasharray="12 210" style="animation:rCW 0s"/><path d="M44 80 Q44 62 58 62 Q72 62 80 80 Q88 98 102 98 Q116 98 116 80 Q116 62 102 62 Q88 62 80 80 Q72 98 58 98 Q44 98 44 80Z" stroke="${a().m}" stroke-width="3" fill="none" opacity=".5"/><path d="M44 80 Q44 62 58 62 Q72 62 80 80 Q88 98 102 98 Q116 98 116 80 Q116 62 102 62 Q88 62 80 80 Q72 98 58 98 Q44 98 44 80Z" stroke="${a().c}" stroke-width="3" fill="none" stroke-linecap="round" stroke-dasharray="34 188"><animate attributeName="stroke-dashoffset" values="222;0" dur="3.2s" repeatCount="indefinite"/></path><path d="M62 40 L70 44 L70 50 Q70 57 62 60 Q54 57 54 50 L54 44Z" fill="${a().l}" stroke="${a().c}" stroke-width="1.4" transform="translate(18,-8)"/></g>${sp(26,34,".5s")}${sp(132,118,"1.8s")}${sp(28,120,"3s")}`,
/* calendar +12 */ `${gl(38,"5s")}<g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 82px"><rect x="34" y="44" width="92" height="80" rx="10" fill="white" stroke="#E2E8F0" stroke-width="1.5"/><rect x="34" y="44" width="92" height="24" rx="10" fill="${a().l}"/><line x1="56" y1="36" x2="56" y2="52" stroke="${a().c}" stroke-width="3" stroke-linecap="round"/><line x1="104" y1="36" x2="104" y2="52" stroke="${a().c}" stroke-width="3" stroke-linecap="round"/><g opacity=".45">${[0,1,2].map(r=>[0,1,2,3].map(c=>`<rect x="${48+c*18}" y="${76+r*15}" width="10" height="8" rx="2" fill="${a().m}"/>`).join('')).join('')}</g><g style="animation:pavTick 4s ease-in-out infinite;transform-origin:104px 108px"><circle cx="104" cy="108" r="17" fill="${a().c}"/><text x="104" y="113" text-anchor="middle" font-size="12" font-weight="800" fill="white" font-family="system-ui">+12</text></g></g>${sp(24,32,".6s")}${sp(134,40,"1.9s")}`,
/* cascading shields */ `${gl(42,"5s")}${rg(56,18,"3 6","rCCW","0.1")}<g style="animation:fYs 5s ease-in-out .5s infinite;transform-origin:56px 72px" opacity=".45"><path d="M56 40 L74 49 L74 64 Q74 79 56 86 Q38 79 38 64 L38 49Z" fill="${a().m}" stroke="${a().c}" stroke-width="1.2"/></g><g style="animation:fYs 5s ease-in-out .25s infinite;transform-origin:104px 72px" opacity=".65"><path d="M104 36 L124 46 L124 62 Q124 78 104 86 Q84 78 84 62 L84 46Z" fill="${a().l}" stroke="${a().c}" stroke-width="1.5"/></g><g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 84px"><path d="M80 50 L106 63 L106 84 Q106 105 80 114 Q54 105 54 84 L54 63Z" fill="white" stroke="${a().c}" stroke-width="2.2"/><path d="M69 84 L77 92 L94 70" stroke="${a().c}" stroke-width="3.2" fill="none" stroke-linecap="round" stroke-linejoin="round" style="stroke-dasharray:55;stroke-dashoffset:55;animation:dS 1.3s ease-out .5s forwards"/></g>${sp(24,110,".7s")}${sp(136,110,"2.2s")}`,
],
"Cashback":()=>[
/* coin fountain */ `${gl(36,"4.5s")}<g style="animation:pavDrop 3s ease-in-out infinite"><circle cx="58" cy="44" r="10" fill="${a().l}" stroke="${a().c}" stroke-width="1.6"/><text x="58" y="48" text-anchor="middle" font-size="10" font-weight="800" fill="${a().c}" font-family="system-ui">₹</text></g><g style="animation:pavDrop 3s ease-in-out .5s infinite"><circle cx="86" cy="38" r="11" fill="${a().m}" stroke="${a().c}" stroke-width="1.6"/><text x="86" y="42" text-anchor="middle" font-size="10" font-weight="800" fill="${a().c}" font-family="system-ui">₹</text></g><g style="animation:pavDrop 3s ease-in-out 1s infinite"><circle cx="110" cy="46" r="9" fill="${a().l}" stroke="${a().c}" stroke-width="1.4"/><text x="110" y="50" text-anchor="middle" font-size="9" font-weight="800" fill="${a().c}" font-family="system-ui">₹</text></g><g style="animation:fYs 4.5s ease-in-out infinite;transform-origin:80px 108px"><path d="M34 88 Q34 82 40 82 L120 82 Q126 82 126 88 L126 122 Q126 130 118 130 L42 130 Q34 130 34 122Z" fill="${a().l}" stroke="${a().c}" stroke-width="2"/><path d="M34 92 L74 92 Q80 100 86 92 L126 92" stroke="${a().c}" stroke-width="1.6" fill="none"/><rect x="100" y="100" width="20" height="14" rx="4" fill="white" stroke="${a().c}" stroke-width="1.4"/></g>${sp(26,70,".6s")}${sp(134,72,"2s")}`,
/* counter ring */ `${gl(38,"4.5s")}<circle cx="80" cy="80" r="54" fill="none" stroke="#E2E8F0" stroke-width="6"/><circle cx="80" cy="80" r="54" fill="none" stroke="${a().c}" stroke-width="6" stroke-linecap="round" transform="rotate(-90 80 80)" stroke-dasharray="339"><animate attributeName="stroke-dashoffset" values="339;68;68;339" dur="4.5s" repeatCount="indefinite" calcMode="spline" keySplines=".4 0 .6 1;.4 0 .6 1;.4 0 .6 1"/></circle><circle cx="80" cy="80" r="38" fill="${a().l}" style="animation:br 4.5s ease-in-out infinite;transform-origin:80px 80px"/><text x="80" y="76" text-anchor="middle" font-size="20" font-weight="900" fill="${a().c}" font-family="system-ui" style="animation:pulsA 4.5s ease-in-out infinite;transform-origin:80px 72px">10%</text><text x="80" y="94" text-anchor="middle" font-size="9" font-weight="700" fill="${a().c}" font-family="system-ui" opacity=".7">CASH BACK</text>${sp(24,30,".5s")}${sp(132,32,"1.6s")}${sp(26,126,"2.8s")}`,
/* wallet magnet */ `${gl(38,"4.5s")}${rg(56,16,"4 7","rCW","0.1")}<circle r="8" fill="${a().l}" stroke="${a().c}" stroke-width="1.4"><animateMotion path="M 26 40 Q 50 46 68 66" dur="2.6s" repeatCount="indefinite"/></circle><circle r="6.5" fill="${a().m}" stroke="${a().c}" stroke-width="1.2"><animateMotion path="M 134 44 Q 108 50 92 66" dur="2.6s" begin=".7s" repeatCount="indefinite"/></circle><g style="animation:fYs 4.5s ease-in-out infinite;transform-origin:80px 96px"><path d="M46 72 Q46 66 52 66 L108 66 Q114 66 114 72 L114 114 Q114 122 106 122 L54 122 Q46 122 46 114Z" fill="${a().l}" stroke="${a().c}" stroke-width="2"/><rect x="94" y="86" width="20 " height="16" rx="4" fill="white" stroke="${a().c}" stroke-width="1.4"/><circle cx="104" cy="94" r="3.5" fill="${a().c}" style="animation:pulsA 4.5s ease-in-out infinite;transform-origin:104px 94px"/></g>${sp(30,110,".8s")}${sp(128,112,"2.3s")}`,
],
"Coupon":()=>[
/* tear apart */ `${gl(38,"5s")}${rg(56,18,"4 7","rCCW","0.1")}<g style="animation:pavSplit 4s ease-in-out infinite;transform-origin:46px 80px"><path d="M14 62 L14 98 Q14 102 18 102 L74 102 L74 58 L18 58 Q14 58 14 62Z" fill="white" stroke="${a().c}" stroke-width="1.8"/><text x="44" y="85" text-anchor="middle" font-size="10" font-weight="800" fill="${a().c}" font-family="system-ui">50% OFF</text></g><g style="animation:pavSplitR 4s ease-in-out infinite;transform-origin:114px 80px"><path d="M86 58 L86 102 L142 102 Q146 102 146 98 L146 62 Q146 58 142 58Z" fill="${a().l}" stroke="${a().c}" stroke-width="1.8"/><line x1="100" y1="72" x2="132" y2="72" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round"/><line x1="100" y1="82" x2="126" y2="82" stroke="${a().m}" stroke-width="1.2" stroke-linecap="round" opacity=".7"/></g><line x1="80" y1="54" x2="80" y2="106" stroke="${a().c}" stroke-width="1.4" stroke-dasharray="4 4" opacity=".6"/><g style="animation:pavPop 4s ease-in-out 2.9s infinite;transform-origin:80px 44px"><path d="M80 34 L82.5 41.5 L90 44 L82.5 46.5 L80 54 L77.5 46.5 L70 44 L77.5 41.5Z" fill="${a().c}"/></g>${sp(24,34,".5s")}${sp(134,120,"1.9s")}`,
/* punch card */ `${gl(38,"5s")}<g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 80px"><rect x="22" y="52" width="116" height="60" rx="10" fill="white" stroke="${a().c}" stroke-width="1.8"/><circle cx="22" cy="82" r="8" fill="${a().l}" stroke="${a().c}" stroke-width="1.4"/><circle cx="138" cy="82" r="8" fill="${a().l}" stroke="${a().c}" stroke-width="1.4"/><g style="animation:pavTick 4s ease-in-out infinite;transform-origin:52px 82px"><circle cx="52" cy="82" r="15" fill="${a().l}"/><text x="52" y="88" text-anchor="middle" font-size="16" font-weight="900" fill="${a().c}" font-family="system-ui">%</text></g><line x1="76" y1="70" x2="122" y2="70" stroke="${a().m}" stroke-width="1.6" stroke-linecap="round"/><line x1="76" y1="82" x2="112" y2="82" stroke="${a().m}" stroke-width="1.3" stroke-linecap="round" opacity=".7"/><rect x="76" y="90" width="34" height="9" rx="4.5" fill="${a().c}" opacity=".85"/></g><g style="animation:pavPop 4.5s ease-in-out 1s infinite;transform-origin:126px 40px"><path d="M126 31 L128 37 L134 39 L128 41 L126 47 L124 41 L118 39 L124 37Z" fill="${a().c}" opacity=".8"/></g>${sp(28,124,".7s")}${sp(132,124,"2.4s")}`,
/* code reveal */ `${gl(38,"4.5s")}<g style="animation:fYs 4.5s ease-in-out infinite;transform-origin:80px 80px"><rect x="24" y="56" width="112" height="52" rx="10" fill="${a().l}" stroke="${a().c}" stroke-width="1.8"/><clipPath id="pavCr"><rect x="24" y="56" width="112" height="52" rx="10"/></clipPath><g clip-path="url(#pavCr)">${pavShine(30,50,24,66)}</g><rect x="36" y="72" width="88" height="20" rx="5" fill="white" stroke="${a().m}" stroke-width="1.2"/><text x="80" y="86" text-anchor="middle" font-size="11" font-weight="800" fill="${a().c}" font-family="ui-monospace,monospace" letter-spacing="2">SAVE-20</text><rect x="36" y="72" width="88" height="20" rx="5" fill="${a().m}"><animate attributeName="width" values="88;0;0;88" dur="4.5s" repeatCount="indefinite" calcMode="spline" keySplines=".4 0 .6 1;.4 0 .6 1;.4 0 .6 1"/></rect></g>${rp("0s")}${sp(24,38,".5s")}${sp(134,40,"1.7s")}${sp(26,124,"2.9s")}`,
],
"Gift Card":()=>[
/* lid pop + card rise */ `${gl(38,"5s")}<g style="animation:pavSlideUp 4s ease-in-out infinite"><rect x="52" y="40" width="56" height="36" rx="6" fill="white" stroke="${a().c}" stroke-width="1.6"/><rect x="52" y="40" width="56" height="12" rx="6" fill="${a().l}"/><text x="80" y="68" text-anchor="middle" font-size="8" font-weight="700" fill="${a().c}" font-family="system-ui">GIFT CARD</text></g><g style="animation:fYs 5s ease-in-out infinite;transform-origin:80px 104px"><rect x="38" y="86" width="84" height="44" rx="6" fill="${a().l}" stroke="${a().c}" stroke-width="1.8"/><rect x="32" y="74" width="96" height="18" rx="5" fill="${a().c}" opacity=".75"/><rect x="73" y="74" width="14" height="56" fill="white" opacity=".35"/></g><g style="animation:pavPop 4s ease-in-out .6s infinite;transform-origin:36px 48px"><path d="M36 39 L38.5 46 L45 48 L38.5 50 L36 57 L33.5 50 L27 48 L33.5 46Z" fill="${a().c}" opacity=".85"/></g><g style="animation:pavPop 4s ease-in-out 2.1s infinite;transform-origin:124px 56px"><path d="M124 48 L126 54 L132 56 L126 58 L124 64 L122 58 L116 56 L122 54Z" fill="${a().c}" opacity=".7"/></g>${sp(26,110,".8s")}${sp(134,104,"2.4s")}`,
/* ribbon draw */ `${gl(40,"5s")}${rg(56,18,"4 7","rCW","0.1")}<g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 82px"><rect x="20" y="52" width="120" height="72" rx="12" fill="white" stroke="#E2E8F0" stroke-width="1.5"/><rect x="20" y="52" width="120" height="72" rx="12" fill="none" stroke="${a().c}" stroke-width="2.4" stroke-dasharray="380" style="stroke-dashoffset:380;animation:dS 2.4s ease-out .3s forwards"/><line x1="80" y1="52" x2="80" y2="124" stroke="${a().c}" stroke-width="2" opacity=".55"/><line x1="20" y1="88" x2="140" y2="88" stroke="${a().c}" stroke-width="2" opacity=".55"/><path d="M80 52 Q68 36 58 40 Q54 45 64 49 Q72 50 80 52Z" fill="${a().c}" opacity=".85"/><path d="M80 52 Q92 36 102 40 Q106 45 96 49 Q88 50 80 52Z" fill="${a().c}" opacity=".85"/><circle cx="80" cy="52" r="5.5" fill="${a().c}" stroke="white" stroke-width="1.6"/></g>${sp(22,34,".5s")}${sp(136,38,"1.8s")}${sp(24,132,"3s")}`,
/* sparkle orbit card */ `${gl(38,"5s")}<g style="animation:rCW 12s linear infinite;transform-origin:80px 84px"><circle cx="80" cy="30" r="3" fill="${a().c}" opacity=".8"/><circle cx="128" cy="110" r="2.5" fill="${a().c}" opacity=".6"/><circle cx="32" cy="110" r="2.5" fill="${a().c}" opacity=".6"/></g><g style="animation:br 5s ease-in-out infinite;transform-origin:80px 84px"><rect x="28" y="56" width="104" height="60" rx="10" fill="${a().l}" stroke="${a().c}" stroke-width="1.8"/><clipPath id="pavGo"><rect x="28" y="56" width="104" height="60" rx="10"/></clipPath><g clip-path="url(#pavGo)">${pavShine(34,50,22,74)}</g><text x="80" y="82" text-anchor="middle" font-size="10" font-weight="800" fill="${a().c}" font-family="system-ui" letter-spacing="1.5">★ GIFT CARD ★</text><rect x="42" y="92" width="44" height="10" rx="5" fill="white" opacity=".7"/></g>${rp(".3s")}${sp(24,40,".6s")}${sp(134,44,"2s")}`,
],
"Product Info":()=>[
/* page flip book */ `${gl(38,"5s")}<g style="animation:fYs 5s ease-in-out infinite;transform-origin:80px 84px"><path d="M80 48 Q56 38 30 44 L30 116 Q56 110 80 120 Q104 110 130 116 L130 44 Q104 38 80 48Z" fill="white" stroke="${a().c}" stroke-width="1.8"/><line x1="80" y1="48" x2="80" y2="120" stroke="${a().m}" stroke-width="1.4"/><path d="M80 48 Q60 40 42 44" stroke="${a().m}" stroke-width="1.2" fill="none" opacity=".6" style="stroke-dasharray:44;stroke-dashoffset:44;animation:dS 2s ease-out .3s forwards"/><line x1="42" y1="62" x2="70" y2="58" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round" opacity=".55"/><line x1="42" y1="74" x2="70" y2="70" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round" opacity=".45"/><line x1="90" y1="58" x2="118" y2="62" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round" opacity=".55"/><line x1="90" y1="70" x2="118" y2="74" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round" opacity=".45"/><g style="animation:pavTick 4s ease-in-out infinite;transform-origin:106px 96px"><circle cx="106" cy="96" r="12" fill="${a().l}" stroke="${a().c}" stroke-width="1.6"/><circle cx="106" cy="91.5" r="2.2" fill="${a().c}"/><line x1="106" y1="96" x2="106" y2="102" stroke="${a().c}" stroke-width="2.4" stroke-linecap="round"/></g></g>${sp(22,36,".5s")}${sp(136,36,"1.8s")}`,
/* roving magnifier */ `${gl(36,"4.5s")}<g style="animation:fYs 4.5s ease-in-out infinite;transform-origin:80px 80px"><rect x="30" y="30" width="100" height="104" rx="8" fill="white" stroke="#E2E8F0" stroke-width="1.5"/><rect x="30" y="30" width="100" height="20" rx="8" fill="${a().l}"/><line x1="42" y1="64" x2="118" y2="64" stroke="${a().m}" stroke-width="1.5" stroke-linecap="round" opacity=".45"/><line x1="42" y1="78" x2="118" y2="78" stroke="${a().m}" stroke-width="1.5" stroke-linecap="round" opacity=".4"/><line x1="42" y1="92" x2="118" y2="92" stroke="${a().m}" stroke-width="1.5" stroke-linecap="round" opacity=".35"/><line x1="42" y1="106" x2="96" y2="106" stroke="${a().m}" stroke-width="1.5" stroke-linecap="round" opacity=".3"/></g><g><animateMotion path="M 0 0 Q 22 8 34 30 Q 10 44 0 0" dur="5s" repeatCount="indefinite"/><circle cx="62" cy="62" r="17" fill="${a().l}" opacity=".65" stroke="${a().c}" stroke-width="2.2"/><line x1="74" y1="75" x2="88" y2="90" stroke="${a().c}" stroke-width="4.5" stroke-linecap="round"/><circle cx="56" cy="56" r="4.5" fill="white" opacity=".8"/></g>${sp(22,24,".5s")}${sp(136,26,"1.8s")}`,
/* tooltip pops */ `${gl(38,"5s")}<g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 88px"><path d="M80 60 L112 76 L112 108 L80 124 L48 108 L48 76Z" fill="${a().l}" stroke="${a().c}" stroke-width="1.8"/><path d="M80 60 L112 76 L80 92 L48 76Z" fill="${a().m}" opacity=".6"/></g><g style="animation:pavPop 4.5s ease-in-out infinite;transform-origin:44px 46px"><rect x="20" y="34" width="48" height="20" rx="6" fill="white" stroke="${a().c}" stroke-width="1.4"/><path d="M40 54 L46 62 L50 54Z" fill="white" stroke="${a().c}" stroke-width="1.4"/><line x1="28" y1="44" x2="60" y2="44" stroke="${a().m}" stroke-width="1.6" stroke-linecap="round"/></g><g style="animation:pavPop 4.5s ease-in-out 1.5s infinite;transform-origin:118px 42px"><rect x="94" y="30" width="48" height="20" rx="6" fill="white" stroke="${a().c}" stroke-width="1.4"/><path d="M112 50 L116 58 L122 50Z" fill="white" stroke="${a().c}" stroke-width="1.4"/><circle cx="104" cy="40" r="3" fill="${a().c}"/><line x1="112" y1="40" x2="134" y2="40" stroke="${a().m}" stroke-width="1.6" stroke-linecap="round"/></g><g style="animation:pavPop 4.5s ease-in-out 3s infinite;transform-origin:126px 106px"><circle cx="126" cy="106" r="12" fill="${a().c}"/><circle cx="126" cy="101.5" r="2" fill="white"/><line x1="126" y1="106" x2="126" y2="112" stroke="white" stroke-width="2.2" stroke-linecap="round"/></g>${sp(28,120,".7s")}`,
],
"Download":()=>[
/* conveyor drop */ `${gl(36,"4.5s")}<g style="animation:pavDrop 2.8s ease-in-out infinite"><path d="M64 26 L64 62 L96 62 L96 38 L84 26Z" fill="white" stroke="${a().c}" stroke-width="1.8"/><path d="M84 26 L84 38 L96 38" fill="${a().l}" stroke="${a().c}" stroke-width="1.2"/><line x1="72" y1="48" x2="88" y2="48" stroke="${a().m}" stroke-width="1.4" stroke-linecap="round"/></g><g style="animation:fYs 4.5s ease-in-out infinite;transform-origin:80px 104px"><path d="M40 92 L48 92 L48 116 L112 116 L112 92 L120 92 L120 124 Q120 130 114 130 L46 130 Q40 130 40 124Z" fill="${a().l}" stroke="${a().c}" stroke-width="2"/></g><rect x="48" y="136" width="64" height="5" rx="2.5" fill="#E2E8F0"/><rect x="48" y="136" width="0" height="5" rx="2.5" fill="${a().c}"><animate attributeName="width" values="0;64;64;0" dur="2.8s" repeatCount="indefinite"/></rect>${sp(30,40,".6s")}${sp(130,44,"2s")}`,
/* orbit cloud */ `${gl(40,"5s")}<g style="animation:rCW 10s linear infinite;transform-origin:80px 80px"><circle cx="80" cy="26" r="3.5" fill="${a().c}" opacity=".8"/><circle cx="134" cy="80" r="2.5" fill="${a().c}" opacity=".55"/><circle cx="80" cy="134" r="3" fill="${a().c}" opacity=".65"/><circle cx="26" cy="80" r="2.5" fill="${a().c}" opacity=".55"/></g><circle cx="80" cy="80" r="54" fill="none" stroke="${a().m}" stroke-width="1" opacity=".45" stroke-dasharray="2 5"/><g style="animation:fY 5s ease-in-out infinite;transform-origin:80px 76px"><path d="M40 84 Q32 84 32 72 Q32 58 48 58 Q50 44 66 44 Q76 34 90 40 Q102 32 114 46 Q128 46 128 62 Q128 76 114 80Z" fill="${a().l}" stroke="${a().c}" stroke-width="2"/><g style="animation:dlA 2s ease-in-out infinite"><line x1="80" y1="76" x2="80" y2="102" stroke="${a().c}" stroke-width="3.2" stroke-linecap="round"/><path d="M68 94 L80 108 L92 94" stroke="${a().c}" stroke-width="3.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g></g>${rp(".2s")}${sp(28,116,".7s")}${sp(132,112,"2.2s")}`,
/* stack complete */ `${gl(38,"4.5s")}${rg(56,16,"4 7","rCCW","0.1")}<g style="animation:fYs 4.5s ease-in-out .5s infinite;transform-origin:80px 96px" opacity=".4"><rect x="44" y="92" width="72" height="14" rx="4" fill="${a().m}"/></g><g style="animation:fYs 4.5s ease-in-out .25s infinite;transform-origin:80px 82px" opacity=".65"><rect x="38" y="74" width="84" height="16" rx="4" fill="${a().l}" stroke="${a().c}" stroke-width="1.2"/></g><g style="animation:fY 4.5s ease-in-out infinite;transform-origin:80px 62px"><rect x="32" y="48" width="96" height="22" rx="5" fill="white" stroke="${a().c}" stroke-width="1.8"/><line x1="44" y1="59" x2="86" y2="59" stroke="${a().m}" stroke-width="1.6" stroke-linecap="round"/><g style="animation:pavTick 4s ease-in-out infinite;transform-origin:112px 59px"><circle cx="112" cy="59" r="8" fill="${a().c}"/><path d="M108 59 L111 62 L116.5 55.5" stroke="white" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g></g><g style="animation:dlA 2s ease-in-out infinite"><line x1="80" y1="112" x2="80" y2="128" stroke="${a().c}" stroke-width="3" stroke-linecap="round"/><path d="M70 124 L80 136 L90 124" stroke="${a().c}" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>${sp(26,36,".5s")}${sp(134,40,"1.9s")}`,
],
};

/* wrap the classic factories: tweak decides which pool the picker offers */
(function(){
  const CLASSIC = {};
  Object.keys(ICONS).forEach(k => { CLASSIC[k] = ICONS[k]; });
  Object.keys(ICONS).forEach(k => {
    ICONS[k] = () => {
      const mode = window.__animSet || 'All';
      const fresh = PAV_EXTRA[k] ? PAV_EXTRA[k]() : [];
      const classic = CLASSIC[k]();
      if (mode === 'New' && fresh.length) return fresh;
      if (mode === 'Classic') return classic;
      return fresh.concat(classic);
    };
  });
  window.__promoAnimsV2 = true;
})();
