// Suri — the Sirisora mascot, redesigned as a chubby owl.
// All inline SVG, scalable, several moods.

function Suri({ mood = 'happy', size = 140, color = '#FF6B2C', wave = false, className = '' }) {
  // Body color palette derived from `color`
  const tint = (mix) => mixColor(color, '#FFFFFF', mix);
  const dark = (mix) => mixColor(color, '#1F1A3D', mix);
  const belly = '#FFF1DC';
  const ink = '#1F1A3D';

  const eyeDisc = '#FFFFFF';
  const cheek = '#FFB7C8';

  const moods = {
    happy:    { eye: 'open',    mouth: 'smile',  wingPose: 'rest',   browTilt:  0,  tear: false, extra: null },
    cheer:    { eye: 'closed',  mouth: 'wide',   wingPose: 'up',     browTilt:  0,  tear: false, extra: null },
    wave:     { eye: 'open',    mouth: 'smile',  wingPose: 'wave',   browTilt:  0,  tear: false, extra: null },
    sleepy:   { eye: 'sleepy',  mouth: 'small',  wingPose: 'rest',   browTilt: -4,  tear: false, extra: null },
    thinking: { eye: 'side',    mouth: 'tiny',   wingPose: 'rest',   browTilt:  3,  tear: false, extra: null },
    proud:    { eye: 'closed',  mouth: 'smile',  wingPose: 'rest',   browTilt:  2,  tear: false, extra: null },
    sad:      { eye: 'sad',     mouth: 'frown',  wingPose: 'down',   browTilt:  6,  tear: true,  extra: null },
    dance:    { eye: 'open',    mouth: 'wide',   wingPose: 'flap',   browTilt:  0,  tear: false, extra: 'notes' },
    kiss:     { eye: 'wink',    mouth: 'pucker', wingPose: 'kiss',   browTilt:  0,  tear: false, extra: 'heart' },
    flex:     { eye: 'open',    mouth: 'smirk',  wingPose: 'flex',   browTilt:  2,  tear: false, extra: 'sweat' },
    wink:     { eye: 'wink',    mouth: 'smile',  wingPose: 'thumbs', browTilt:  0,  tear: false, extra: null },
  };
  const m = moods[mood] || moods.happy;

  return (
    <svg
      width={size} height={size} viewBox="0 0 200 200"
      className={className}
      style={{ display: 'block', overflow: 'visible' }}
    >
      <defs>
        <radialGradient id={`suri-body-${color.replace('#','')}`} cx="40%" cy="35%" r="75%">
          <stop offset="0%"  stopColor={tint(0.55)} />
          <stop offset="55%" stopColor={color} />
          <stop offset="100%" stopColor={dark(0.25)} />
        </radialGradient>
        <filter id="suri-soft-shadow" x="-30%" y="-20%" width="160%" height="140%">
          <feGaussianBlur in="SourceAlpha" stdDeviation="3.5" />
          <feOffset dy="5" />
          <feComponentTransfer><feFuncA type="linear" slope="0.22" /></feComponentTransfer>
          <feMerge><feMergeNode /><feMergeNode in="SourceGraphic" /></feMerge>
        </filter>
      </defs>

      {/* Ear tufts (behind body) */}
      <g filter="url(#suri-soft-shadow)">
        <path d="M58 56 Q60 30 76 38 Q82 50 80 62 Z"
              fill={dark(0.15)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M142 56 Q140 30 124 38 Q118 50 120 62 Z"
              fill={dark(0.15)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />

        {/* Body — egg shape with flat-ish bottom for feet */}
        <path
          d="M100 38
             C 138 38, 168 64, 168 108
             C 168 144, 142 168, 100 168
             C  58 168,  32 144,  32 108
             C  32  64,  62  38, 100  38 Z"
          fill={`url(#suri-body-${color.replace('#','')})`}
          stroke={ink}
          strokeWidth="3"
        />
      </g>

      {/* Belly patch — lighter oval */}
      <ellipse cx="100" cy="120" rx="42" ry="40" fill={belly} opacity="0.92" />

      {/* Tiny chest mark */}
      <path d="M100 137 l-4 -6 a3 3 0 0 1 4 -3 a3 3 0 0 1 4 3 z"
            fill={color} opacity="0.55" />

      {/* Wings */}
      {m.wingPose === 'rest' && (
        <React.Fragment>
          <path d="M44 112 Q34 130 50 148 Q62 144 64 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <path d="M156 112 Q166 130 150 148 Q138 144 136 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
        </React.Fragment>
      )}
      {m.wingPose === 'up' && (
        <React.Fragment>
          <path d="M48 100 Q28 88 28 70 Q44 70 58 88 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <path d="M152 100 Q172 88 172 70 Q156 70 142 88 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
        </React.Fragment>
      )}
      {m.wingPose === 'wave' && (
        <React.Fragment>
          <path d="M44 112 Q34 130 50 148 Q62 144 64 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <g style={{ transformOrigin: '152px 110px', animation: 'wiggle 1.2s ease-in-out infinite' }}>
            <path d="M152 96 Q178 76 178 56 Q156 56 138 80 Z"
                  fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          </g>
        </React.Fragment>
      )}
      {m.wingPose === 'down' && (
        <React.Fragment>
          {/* Wings drooping forward — covering face slightly, sad pose */}
          <path d="M44 124 Q44 150 62 156 Q70 144 64 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <path d="M156 124 Q156 150 138 156 Q130 144 136 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
        </React.Fragment>
      )}
      {m.wingPose === 'flap' && (
        <g>
          <g className="suri-wing suri-wing-l" style={{ transformOrigin: '64px 124px' }}>
            <path d="M44 112 Q34 130 50 148 Q62 144 64 128 Z"
                  fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          </g>
          <g className="suri-wing suri-wing-r" style={{ transformOrigin: '136px 124px' }}>
            <path d="M156 112 Q166 130 150 148 Q138 144 136 128 Z"
                  fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          </g>
        </g>
      )}
      {m.wingPose === 'flex' && (
        <React.Fragment>
          {/* Bicep flex — wings curled up at sides showing 'muscle' */}
          <path d="M52 110 Q36 96 40 70 Q54 76 60 96 Q62 108 56 116 Z"
                fill={dark(0.2)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <path d="M148 110 Q164 96 160 70 Q146 76 140 96 Q138 108 144 116 Z"
                fill={dark(0.2)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          {/* Bicep bulge highlight */}
          <ellipse cx="48" cy="88" rx="6" ry="9" fill="rgba(255,255,255,0.25)" />
          <ellipse cx="152" cy="88" rx="6" ry="9" fill="rgba(255,255,255,0.25)" />
        </React.Fragment>
      )}
      {m.wingPose === 'kiss' && (
        <React.Fragment>
          {/* One wing held to mouth (blowing kiss) */}
          <path d="M44 112 Q34 130 50 148 Q62 144 64 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <g style={{ transformOrigin: '140px 110px' }}>
            <path d="M152 108 Q132 100 120 112 Q124 122 138 122 Z"
                  fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          </g>
        </React.Fragment>
      )}
      {m.wingPose === 'thumbs' && (
        <React.Fragment>
          {/* Left wing rest, right wing thumbs-up */}
          <path d="M44 112 Q34 130 50 148 Q62 144 64 128 Z"
                fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
          <g>
            <path d="M156 100 Q172 80 168 56 Q150 60 142 84 Q140 96 148 106 Z"
                  fill={dark(0.18)} stroke={ink} strokeWidth="2.5" strokeLinejoin="round" />
            {/* thumb sticking up */}
            <ellipse cx="158" cy="50" rx="6" ry="8" fill={dark(0.18)} stroke={ink} strokeWidth="2" />
          </g>
        </React.Fragment>
      )}

      {/* Eye discs — the iconic big owl eyes */}
      <g>
        <circle cx="78"  cy="98" r="22" fill={eyeDisc} stroke={ink} strokeWidth="2.5" />
        <circle cx="122" cy="98" r="22" fill={eyeDisc} stroke={ink} strokeWidth="2.5" />
      </g>

      {/* Pupils per mood */}
      {m.eye === 'open' && (
        <React.Fragment>
          <circle cx="80" cy="100" r="9" fill={ink} />
          <circle cx="124" cy="100" r="9" fill={ink} />
          <circle cx="83" cy="96" r="3.2" fill="white" />
          <circle cx="127" cy="96" r="3.2" fill="white" />
        </React.Fragment>
      )}
      {m.eye === 'side' && (
        <React.Fragment>
          <circle cx="86" cy="97" r="9" fill={ink} />
          <circle cx="130" cy="97" r="9" fill={ink} />
          <circle cx="89" cy="93" r="3.2" fill="white" />
          <circle cx="133" cy="93" r="3.2" fill="white" />
        </React.Fragment>
      )}
      {m.eye === 'sleepy' && (
        <React.Fragment>
          <path d="M62 100 Q78 92 94 100" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
          <path d="M106 100 Q122 92 138 100" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
        </React.Fragment>
      )}
      {m.eye === 'closed' && (
        <React.Fragment>
          <path d="M66 98 Q78 90 90 98" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
          <path d="M110 98 Q122 90 134 98" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
        </React.Fragment>
      )}
      {m.eye === 'wink' && (
        <React.Fragment>
          {/* Right eye open, left eye winked */}
          <path d="M66 100 Q78 92 90 100" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
          <circle cx="124" cy="100" r="9" fill={ink} />
          <circle cx="127" cy="96" r="3.2" fill="white" />
        </React.Fragment>
      )}
      {m.eye === 'sad' && (
        <React.Fragment>
          {/* Down-curved sad eyes */}
          <path d="M66 102 Q78 112 90 102" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
          <path d="M110 102 Q122 112 134 102" stroke={ink} strokeWidth="3.5" fill="none" strokeLinecap="round" />
        </React.Fragment>
      )}

      {/* Tear */}
      {m.tear && (
        <path d="M84 116 q-3 6 0 10 q3 -4 0 -10 Z"
              fill="#6979F8" opacity="0.85"
              style={{ animation: 'wiggle 1.6s ease-in-out infinite' }} />
      )}

      {/* Eyebrows — small tilt by mood */}
      <path d={`M64 76 Q78 ${72 + m.browTilt} 92 76`} stroke={ink} strokeWidth="3" fill="none" strokeLinecap="round" />
      <path d={`M108 76 Q122 ${72 - m.browTilt} 136 76`} stroke={ink} strokeWidth="3" fill="none" strokeLinecap="round" />

      {/* Cheeks (always — they're part of the character) */}
      <ellipse cx="62" cy="120" rx="9" ry="6" fill={cheek} opacity="0.85" />
      <ellipse cx="138" cy="120" rx="9" ry="6" fill={cheek} opacity="0.85" />

      {/* Beak */}
      <path d="M100 110 L94 120 L100 124 L106 120 Z"
            fill={dark(0.05)} stroke={ink} strokeWidth="2" strokeLinejoin="round" />

      {/* Mouth indicator (under beak — subtle) */}
      {m.mouth === 'smile' && (
        <path d="M92 130 Q100 138 108 130" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
      )}
      {m.mouth === 'wide' && (
        <path d="M88 128 Q100 144 112 128 Q102 138 98 138 Z" fill={ink} />
      )}
      {m.mouth === 'small' && (
        <path d="M96 130 Q100 134 104 130" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
      )}
      {m.mouth === 'tiny' && (
        <circle cx="100" cy="132" r="2" fill={ink} />
      )}
      {m.mouth === 'frown' && (
        <path d="M92 134 Q100 126 108 134" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
      )}
      {m.mouth === 'pucker' && (
        /* Pursed kiss lips — small oval */
        <ellipse cx="100" cy="132" rx="4" ry="5" fill="#F25C7F" stroke={ink} strokeWidth="1.5" />
      )}
      {m.mouth === 'smirk' && (
        <path d="M92 132 Q100 138 108 130" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
      )}

      {/* Mood-specific extras (floating particles) */}
      {m.extra === 'heart' && (
        <g style={{ animation: 'kiss-heart-fly 1.6s ease-out infinite' }}>
          <path d="M132 100 c-4 -4 -10 2 -4 8 l4 4 l4 -4 c6 -6 0 -12 -4 -8 z" fill="#F25C7F" stroke={ink} strokeWidth="1.5" />
        </g>
      )}
      {m.extra === 'notes' && (
        <g>
          <text x="20" y="40" fontSize="22" fill="#FFD23F"
                style={{ animation: 'note-float 1.8s ease-in-out infinite' }}>♪</text>
          <text x="170" y="56" fontSize="20" fill="#FFB7C8"
                style={{ animation: 'note-float 1.6s ease-in-out infinite 0.3s' }}>♫</text>
          <text x="10" y="130" fontSize="18" fill="#6979F8"
                style={{ animation: 'note-float 2s ease-in-out infinite 0.6s' }}>♪</text>
        </g>
      )}
      {m.extra === 'sweat' && (
        <g style={{ animation: 'sweat-drip 1.4s ease-in-out infinite' }}>
          <path d="M155 60 q-3 6 0 10 q3 -4 0 -10 Z" fill="#6979F8" opacity="0.85" />
        </g>
      )}

      {/* Feet */}
      <g>
        <g className="suri-foot suri-foot-l" style={{ transformOrigin: '80px 178px' }}>
          <path d="M76 168 Q72 178 86 178 Q88 174 84 168 Z"
                fill={dark(0.1)} stroke={ink} strokeWidth="2.2" strokeLinejoin="round" />
        </g>
        <g className="suri-foot suri-foot-r" style={{ transformOrigin: '120px 178px' }}>
          <path d="M124 168 Q128 178 114 178 Q112 174 116 168 Z"
                fill={dark(0.1)} stroke={ink} strokeWidth="2.2" strokeLinejoin="round" />
        </g>
      </g>

      {/* Sparkles */}
      <g opacity="0.85">
        <Sparkle cx={26} cy={48}  size={5}/>
        <Sparkle cx={174} cy={52} size={6}/>
        <Sparkle cx={22} cy={158} size={4}/>
      </g>
    </svg>
  );
}

function Sparkle({ cx, cy, size }) {
  cx = +cx; cy = +cy;
  return (
    <g style={{ transformOrigin: `${cx}px ${cy}px`, animation: 'spin-slow 6s linear infinite' }}>
      <path
        d={`M${cx} ${cy - size}
           L${cx + size * 0.3} ${cy - size * 0.3}
           L${cx + size} ${cy}
           L${cx + size * 0.3} ${cy + size * 0.3}
           L${cx} ${cy + size}
           L${cx - size * 0.3} ${cy + size * 0.3}
           L${cx - size} ${cy}
           L${cx - size * 0.3} ${cy - size * 0.3} Z`}
        fill="#FFD23F"
      />
    </g>
  );
}

// Color helper — mix two hex colors
function mixColor(a, b, t) {
  const pa = parseHex(a), pb = parseHex(b);
  const r = Math.round(pa.r * (1 - t) + pb.r * t);
  const g = Math.round(pa.g * (1 - t) + pb.g * t);
  const bl= Math.round(pa.b * (1 - t) + pb.b * t);
  return `rgb(${r}, ${g}, ${bl})`;
}
function parseHex(h) {
  const s = h.replace('#', '');
  const n = parseInt(s.length === 3 ? s.split('').map(c => c + c).join('') : s, 16);
  return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255 };
}

// Speech bubble
function SuriBubble({ children, tail = 'left' }) {
  return (
    <div style={{
      position: 'relative',
      background: 'white',
      borderRadius: 22,
      padding: '16px 22px',
      fontFamily: 'var(--font-display)',
      fontWeight: 500,
      fontSize: 16,
      color: 'var(--ink)',
      maxWidth: 320,
      lineHeight: 1.45,
      letterSpacing: '-0.01em',
      boxShadow: '0 2px 4px rgba(31,26,61,0.06), 0 18px 36px -16px rgba(31,26,61,0.22)',
      border: '1px solid rgba(31,26,61,0.06)',
    }}>
      {children}
      <div style={{
        position: 'absolute',
        [tail === 'left' ? 'left' : 'right']: -7,
        bottom: 20,
        width: 16, height: 16,
        background: 'white',
        transform: 'rotate(45deg)',
        boxShadow: 'inherit',
      }} />
    </div>
  );
}

// ── Star characters — little starling buddies with personality ───────────
const STAR_POSES = ['happy', 'wink', 'cheer', 'chill', 'guitar', 'party', 'dance', 'peace', 'sleepy', 'love', 'rockstar', 'flex', 'traveler', 'money', 'yummy'];

function StarChar({ pose = 'happy', size = 40 }) {
  const ink = '#1F1A3D';
  const body = '#FFD23F';
  const bodyShade = '#E0A800';
  const blush = '#FFB7C8';

  // Body is a 5-point star centered in 80x80 viewBox
  return (
    <svg width={size} height={size} viewBox="0 0 80 80" style={{ display: 'block', overflow: 'visible' }}>
      <defs>
        <radialGradient id={`star-grad-${pose}`} cx="40%" cy="35%" r="60%">
          <stop offset="0%"  stopColor="#FFEDA8" />
          <stop offset="60%" stopColor={body} />
          <stop offset="100%" stopColor={bodyShade} />
        </radialGradient>
      </defs>

      {/* Soft chubby star body */}
      <path
        d="M40 8
           Q42 18 46 26
           Q58 28 70 32
           Q70 40 58 44
           Q60 56 60 68
           Q52 70 42 58
           Q40 56 38 58
           Q28 70 20 68
           Q20 56 22 44
           Q10 40 10 32
           Q22 28 34 26
           Q38 18 40 8 Z"
        fill={`url(#star-grad-${pose})`}
        stroke={ink}
        strokeWidth="2.5"
        strokeLinejoin="round"
        strokeLinecap="round"
      />

      {/* Face — adjusted per pose */}
      {pose === 'happy' && <FaceHappy ink={ink} blush={blush} />}
      {pose === 'wink'  && <FaceWink ink={ink} blush={blush} />}
      {pose === 'cheer' && <FaceCheer ink={ink} blush={blush} />}
      {pose === 'sleepy'&& <FaceSleepy ink={ink} blush={blush} />}
      {pose === 'love'  && <FaceLove ink={ink} blush={blush} />}
      {pose === 'rockstar' && <FaceTongue ink={ink} blush={blush} />}
      {pose === 'flex'  && <FaceCheer ink={ink} blush={blush} />}
      {pose === 'yummy' && <FaceYummy ink={ink} blush={blush} />}
      {pose === 'money' && <FaceMoneyEyes ink={ink} blush={blush} />}
      {(pose === 'chill' || pose === 'guitar' || pose === 'party' || pose === 'dance' || pose === 'peace' || pose === 'traveler') && <FaceHappy ink={ink} blush={blush} />}

      {/* Accessories per pose */}
      {pose === 'chill' && (
        <g>
          {/* Sunglasses */}
          <rect x="22" y="32" width="14" height="9" rx="3" fill={ink} />
          <rect x="44" y="32" width="14" height="9" rx="3" fill={ink} />
          <rect x="36" y="35" width="8" height="2" fill={ink} />
          <ellipse cx="27" cy="35" rx="2" ry="1" fill="white" opacity="0.6" />
          <ellipse cx="49" cy="35" rx="2" ry="1" fill="white" opacity="0.6" />
        </g>
      )}
      {pose === 'guitar' && (
        <g style={{ transformOrigin: '60px 50px', animation: 'wiggle 0.8s ease-in-out infinite' }}>
          {/* Tiny guitar — body to the right */}
          <path d="M52 46 q-2 -8 6 -8 q8 0 6 8 l-2 6 q-2 4 -5 4 q-3 0 -5 -4 z" fill="#7A3B1F" stroke={ink} strokeWidth="1.5" />
          <circle cx="58" cy="48" r="2" fill={ink} />
          {/* Neck */}
          <rect x="42" y="34" width="14" height="3" rx="1" transform="rotate(-25 49 35.5)" fill="#A85A2D" stroke={ink} strokeWidth="1.2" />
        </g>
      )}
      {pose === 'party' && (
        <g style={{ transformOrigin: '40px 18px', animation: 'wiggle 1.2s ease-in-out infinite' }}>
          {/* Party hat */}
          <path d="M30 14 L40 -4 L50 14 Z" fill="#FF6B2C" stroke={ink} strokeWidth="2" strokeLinejoin="round" />
          <circle cx="40" cy="-4" r="3" fill="#FFB7C8" stroke={ink} strokeWidth="1.5" />
          <path d="M32 12 q4 -2 8 0 q4 2 8 0" stroke="white" strokeWidth="1.5" fill="none" />
        </g>
      )}
      {pose === 'dance' && (
        <g>
          {/* Music notes around */}
          <text x="0" y="20" fontSize="14" fill="#6979F8" style={{ animation: 'wiggle 0.6s ease-in-out infinite' }}>♪</text>
          <text x="68" y="28" fontSize="12" fill="#6979F8" style={{ animation: 'wiggle 0.8s ease-in-out infinite' }}>♫</text>
        </g>
      )}
      {pose === 'peace' && (
        <g>
          {/* Peace sign — small V hand */}
          <g transform="translate(58 50)">
            <path d="M0 0 q-2 -6 -1 -10" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
            <path d="M0 0 q3 -5 5 -8" stroke={ink} strokeWidth="2.5" fill="none" strokeLinecap="round" />
            <circle cx="0" cy="0" r="3" fill={body} stroke={ink} strokeWidth="1.5" />
          </g>
        </g>
      )}
      {pose === 'love' && (
        <g>
          {/* Hearts floating */}
          <path d="M12 12 c-2 -2 -5 1 -2 4 l4 4 l4 -4 c3 -3 0 -6 -2 -4 z" fill="#F25C7F" opacity="0.85"
                style={{ animation: 'wiggle 1.4s ease-in-out infinite' }}/>
        </g>
      )}
      {pose === 'rockstar' && (
        <g>
          {/* Sunglasses */}
          <rect x="22" y="32" width="14" height="9" rx="3" fill={ink} />
          <rect x="44" y="32" width="14" height="9" rx="3" fill={ink} />
          <rect x="36" y="35" width="8" height="2" fill={ink} />
          {/* Rock-horns hand 🤘 on the right */}
          <g transform="translate(58 52)" style={{ animation: 'wiggle 0.7s ease-in-out infinite' }}>
            <circle cx="0" cy="0" r="6" fill={body} stroke={ink} strokeWidth="1.5" />
            <rect x="-2" y="-12" width="3" height="9" rx="1.4" fill={body} stroke={ink} strokeWidth="1.2" />
            <rect x="3"  y="-12" width="3" height="9" rx="1.4" fill={body} stroke={ink} strokeWidth="1.2" />
          </g>
        </g>
      )}
      {pose === 'flex' && (
        <g>
          {/* Two biceps — round bulges on each side */}
          <g style={{ animation: 'wiggle 1.1s ease-in-out infinite' }}>
            <ellipse cx="14" cy="44" rx="7" ry="9" fill={body} stroke={ink} strokeWidth="1.8" />
            <path d="M11 41 q3 2 6 0" stroke={ink} strokeWidth="1.4" fill="none" strokeLinecap="round" />
            <ellipse cx="66" cy="44" rx="7" ry="9" fill={body} stroke={ink} strokeWidth="1.8" />
            <path d="M63 41 q3 2 6 0" stroke={ink} strokeWidth="1.4" fill="none" strokeLinecap="round" />
          </g>
        </g>
      )}
      {pose === 'traveler' && (
        <g>
          {/* Sun hat — brim + crown sitting on top of the star */}
          <ellipse cx="40" cy="14" rx="22" ry="4" fill="#E89930" stroke={ink} strokeWidth="2" />
          <path d="M28 14 q12 -14 24 0 z" fill="#FFC56A" stroke={ink} strokeWidth="2" strokeLinejoin="round" />
          <path d="M28 14 q12 -3 24 0" stroke={ink} strokeWidth="1.4" fill="none" opacity="0.6" />
          <path d="M30 9 q10 -2 20 0" stroke="#E94B58" strokeWidth="2.2" fill="none" strokeLinecap="round" />
          {/* Suitcase — bottom right, with handle, swinging */}
          <g style={{ transformOrigin: '64px 54px', animation: 'wiggle 0.9s ease-in-out infinite' }}>
            <rect x="56" y="54" width="16" height="12" rx="2" fill="#6979F8" stroke={ink} strokeWidth="1.8" />
            <rect x="60" y="50" width="8" height="3" rx="1.4" fill="none" stroke={ink} strokeWidth="1.6" />
            <rect x="56" y="58" width="16" height="2" fill={ink} opacity="0.35" />
            <circle cx="60" cy="62" r="1" fill={ink} />
            <circle cx="68" cy="62" r="1" fill={ink} />
          </g>
          {/* Tiny plane motion line */}
          <text x="2" y="18" fontSize="10" fill="#6979F8">✈</text>
        </g>
      )}
      {pose === 'money' && (
        <g>
          {/* Cash held in left hand — fan of bills with $ */}
          <g style={{ transformOrigin: '16px 52px', animation: 'wiggle 1.2s ease-in-out infinite' }}>
            <rect x="6"  y="48" width="18" height="10" rx="1.5" fill="#9DE3C0" stroke={ink} strokeWidth="1.6" transform="rotate(-14 15 53)" />
            <rect x="9"  y="46" width="18" height="10" rx="1.5" fill="#7AD8AB" stroke={ink} strokeWidth="1.6" transform="rotate(-6 18 51)" />
            <text x="13" y="55" fontSize="8" fontWeight="700" fill={ink}>$</text>
          </g>
          {/* Coin in right hand */}
          <g style={{ transformOrigin: '64px 52px', animation: 'wiggle 1.4s ease-in-out infinite' }}>
            <circle cx="64" cy="52" r="6" fill="#FFD23F" stroke={ink} strokeWidth="1.6" />
            <text x="61" y="56" fontSize="9" fontWeight="700" fill={ink}>₹</text>
          </g>
        </g>
      )}
      {pose === 'yummy' && (
        <g>
          {/* Donut in upper-right corner */}
          <g style={{ transformOrigin: '64px 18px', animation: 'wiggle 1.0s ease-in-out infinite' }}>
            <circle cx="64" cy="18" r="7" fill="#FFB7C8" stroke={ink} strokeWidth="1.8" />
            <circle cx="64" cy="18" r="2.5" fill="#FBF6EB" stroke={ink} strokeWidth="1.2" />
            <circle cx="60" cy="15" r="0.8" fill="#6979F8" />
            <circle cx="67" cy="14" r="0.8" fill="#00C896" />
            <circle cx="68" cy="20" r="0.8" fill="#FFD23F" />
            <circle cx="61" cy="22" r="0.8" fill="#C73E8B" />
          </g>
        </g>
      )}
    </svg>
  );
}

function FaceTongue({ ink, blush }) {
  return (
    <g>
      <circle cx="32" cy="36" r="2.4" fill={ink} />
      <circle cx="48" cy="36" r="2.4" fill={ink} />
      <ellipse cx="26" cy="42" rx="3" ry="2" fill={blush} opacity="0.7" />
      <ellipse cx="54" cy="42" rx="3" ry="2" fill={blush} opacity="0.7" />
      <path d="M32 44 q8 4 16 0 q-4 6 -8 6 q-4 0 -8 -6 z" fill={ink} />
      {/* Tongue sticking out */}
      <path d="M38 48 q2 4 4 4 q2 0 4 -4 z" fill="#F25C7F" stroke={ink} strokeWidth="1" />
    </g>
  );
}

function FaceYummy({ ink, blush }) {
  return (
    <g>
      {/* Half-closed satisfied eyes */}
      <path d="M28 36 q4 -2 8 0" stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />
      <path d="M44 36 q4 -2 8 0" stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />
      <ellipse cx="26" cy="42" rx="3.2" ry="2.2" fill={blush} opacity="0.85" />
      <ellipse cx="54" cy="42" rx="3.2" ry="2.2" fill={blush} opacity="0.85" />
      {/* Smiling open mouth with big licking tongue */}
      <path d="M32 44 q8 6 16 0 q-4 8 -8 8 q-4 0 -8 -8 z" fill={ink} />
      <path d="M37 50 q3 6 6 6 q3 0 6 -6 q-3 1 -6 1 q-3 0 -6 -1 z" fill="#F25C7F" stroke={ink} strokeWidth="1" />
      {/* Drool */}
      <circle cx="50" cy="56" r="1.2" fill="#7AD8FF" opacity="0.85" />
    </g>
  );
}

function FaceMoneyEyes({ ink, blush }) {
  return (
    <g>
      {/* $ signs as eyes */}
      <text x="28" y="40" fontSize="11" fontWeight="800" fill="#00A176">$</text>
      <text x="44" y="40" fontSize="11" fontWeight="800" fill="#00A176">$</text>
      <ellipse cx="26" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <ellipse cx="54" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <path d="M34 46 q6 5 12 0" stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
    </g>
  );
}

// Big, expressive open-eye face — the default look for most star poses.
// Uses white sclera + dark pupil + a tiny highlight for that "anime sparkle"
// kid characters always have.
function FaceHappy({ ink, blush }) {
  return (
    <g>
      {/* Eye whites */}
      <ellipse cx="31" cy="36" rx="5.4" ry="6.2" fill="#FFFFFF" stroke={ink} strokeWidth="1.4" />
      <ellipse cx="49" cy="36" rx="5.4" ry="6.2" fill="#FFFFFF" stroke={ink} strokeWidth="1.4" />
      {/* Pupils (slightly low for a 'looking up' friendly gaze) */}
      <circle cx="31" cy="37.5" r="2.8" fill={ink} />
      <circle cx="49" cy="37.5" r="2.8" fill={ink} />
      {/* Sparkle highlights */}
      <circle cx="29.2" cy="35"   r="1.1" fill="#FFFFFF" />
      <circle cx="47.2" cy="35"   r="1.1" fill="#FFFFFF" />
      <circle cx="32.8" cy="39"   r="0.6" fill="#FFFFFF" />
      <circle cx="50.8" cy="39"   r="0.6" fill="#FFFFFF" />
      {/* Blush + smile */}
      <ellipse cx="23" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <ellipse cx="57" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <path d="M33 46 q7 5.5 14 0" stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />
    </g>
  );
}
// Winking face — open right eye matches FaceHappy, left eye closed cute.
function FaceWink({ ink, blush }) {
  return (
    <g>
      {/* Closed left eye — happy curve */}
      <path d="M26 36 q5 -4 10 0" stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />
      {/* Open right eye matching FaceHappy */}
      <ellipse cx="49" cy="36" rx="5.4" ry="6.2" fill="#FFFFFF" stroke={ink} strokeWidth="1.4" />
      <circle cx="49" cy="37.5" r="2.8" fill={ink} />
      <circle cx="47.2" cy="35"   r="1.1" fill="#FFFFFF" />
      <circle cx="50.8" cy="39"   r="0.6" fill="#FFFFFF" />
      <ellipse cx="23" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <ellipse cx="57" cy="44" rx="3" ry="2" fill={blush} opacity="0.75" />
      <path d="M33 46 q7 5.5 14 0" stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />
    </g>
  );
}
// Cheering face — open eyes with raised brows + big laughing mouth.
function FaceCheer({ ink, blush }) {
  return (
    <g>
      {/* Raised brows */}
      <path d="M25 28 q5 -2 10 0" stroke={ink} strokeWidth="1.8" fill="none" strokeLinecap="round" />
      <path d="M45 28 q5 -2 10 0" stroke={ink} strokeWidth="1.8" fill="none" strokeLinecap="round" />
      {/* Open eyes with sparkle */}
      <ellipse cx="31" cy="36" rx="5.4" ry="6.2" fill="#FFFFFF" stroke={ink} strokeWidth="1.4" />
      <ellipse cx="49" cy="36" rx="5.4" ry="6.2" fill="#FFFFFF" stroke={ink} strokeWidth="1.4" />
      <circle cx="31" cy="38" r="2.8" fill={ink} />
      <circle cx="49" cy="38" r="2.8" fill={ink} />
      <circle cx="29.2" cy="35"   r="1.1" fill="#FFFFFF" />
      <circle cx="47.2" cy="35"   r="1.1" fill="#FFFFFF" />
      <ellipse cx="23" cy="45" rx="3" ry="2" fill={blush} opacity="0.85" />
      <ellipse cx="57" cy="45" rx="3" ry="2" fill={blush} opacity="0.85" />
      {/* Wide laughing mouth */}
      <path d="M32 46 q8 8 16 0 q-4 4 -8 4 q-4 0 -8 -4 z" fill={ink} />
    </g>
  );
}
function FaceSleepy({ ink, blush }) {
  return (
    <g>
      <path d="M28 38 q4 -2 8 0" stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
      <path d="M44 38 q4 -2 8 0" stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
      <path d="M36 46 q4 3 8 0" stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
      <text x="58" y="22" fontSize="10" fill={ink}>z</text>
    </g>
  );
}
function FaceLove({ ink, blush }) {
  return (
    <g>
      {/* Heart eyes */}
      <path d="M28 34 c-2 -2 -5 1 -2 4 l4 4 l4 -4 c3 -3 0 -6 -2 -4 z" fill="#F25C7F" />
      <path d="M44 34 c-2 -2 -5 1 -2 4 l4 4 l4 -4 c3 -3 0 -6 -2 -4 z" fill="#F25C7F" />
      <path d="M34 46 q6 4 12 0" stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
    </g>
  );
}


const SPRINKLE_COLORS = ['#FFD23F', '#FF6B2C', '#00C896', '#6979F8', '#FFB7C8', '#C73E8B'];
function sprinkleStars({ count = 36, duration = 2400 } = {}) {
  const W = window.innerWidth;
  for (let i = 0; i < count; i++) {
    const star = document.createElement('div');
    star.className = 'sprinkle-star';
    const size = 14 + Math.random() * 22;
    const color = SPRINKLE_COLORS[Math.floor(Math.random() * SPRINKLE_COLORS.length)];
    star.innerHTML = `<svg viewBox="0 0 24 24" width="${size}" height="${size}" fill="${color}"><path d="M12 2.2l2.7 6.1 6.6.6-5 4.5 1.5 6.5L12 16.6 6.2 19.9l1.5-6.5-5-4.5 6.6-.6L12 2.2z"/></svg>`;
    star.style.left = `${Math.random() * W}px`;
    star.style.top = `-40px`;
    star.style.setProperty('--drift', `${(Math.random() - 0.5) * 200}px`);
    star.style.setProperty('--spin', `${(Math.random() > 0.5 ? 1 : -1) * (360 + Math.random() * 360)}deg`);
    star.style.animationDuration = `${duration + Math.random() * 800}ms`;
    star.style.animationDelay = `${Math.random() * 400}ms`;
    document.body.appendChild(star);
    setTimeout(() => star.remove(), duration + 1400);
  }
}
function fireConfetti() { sprinkleStars({ count: 36 }); }

function jarMix(hex, mix = '#FFFFFF', weight = 0.35) {
  const h = String(hex || '#6979F8').replace('#', '');
  if (h.length !== 6) return hex;
  const m = mix.replace('#', '');
  const ch = (i) => parseInt(h.slice(i, i + 2), 16);
  const cm = (i) => parseInt(m.slice(i, i + 2), 16);
  const blend = (a, b) => Math.round(a * (1 - weight) + b * weight);
  const toHex = (n) => n.toString(16).padStart(2, '0');
  return `#${toHex(blend(ch(0), cm(0)))}${toHex(blend(ch(2), cm(2)))}${toHex(blend(ch(4), cm(4)))}`;
}

function JarBabyFace({ mood = 'idle', ink, eyeY = 80 }) {
  const eye = (cx, side) => {
    const happy = mood === 'happy' || mood === 'excited';
    const sad = mood === 'sad';
    const envy = mood === 'envy';
    if (happy) {
      return <path d={`M${cx - 5.5} ${eyeY} q5.5 -5 11 0`} stroke={ink} strokeWidth="2.2" fill="none" strokeLinecap="round" />;
    }
    if (sad) {
      return (
        <g>
          <path d={`M${cx - 5.5} ${eyeY + 1} q5.5 4.5 11 0`} stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />
          {side === 'left' && <ellipse cx={cx + 1} cy={eyeY + 8} rx="1.6" ry="2.4" fill="#8EC5FF" opacity="0.85" />}
        </g>
      );
    }
    const pupilShift = envy ? 1.8 : 0;
    return (
      <g>
        <ellipse cx={cx} cy={eyeY} rx="4.8" ry="4.8" fill={ink}>
          {mood === 'idle' && (
            <animate attributeName="ry" values="4.8;0.45;4.8" keyTimes="0;0.5;1" dur="3.8s" repeatCount="indefinite" />
          )}
        </ellipse>
        <circle cx={cx - 1.5 + pupilShift} cy={eyeY - 1.8} r="1.5" fill="#FFF" />
        <circle cx={cx + 1.2 + pupilShift} cy={eyeY + 0.6} r="0.75" fill="#FFF" opacity="0.85" />
      </g>
    );
  };

  const mouth = () => {
    const my = eyeY + 8;
    if (mood === 'happy' || mood === 'excited') {
      return <path d={`M 41 ${my} Q 50 ${my + 9} 59 ${my} Q 50 ${my + 4} 41 ${my} Z`} fill={ink} />;
    }
    if (mood === 'sad') {
      return <path d={`M 43 ${my + 2} Q 50 ${my - 3} 57 ${my + 2}`} stroke={ink} strokeWidth="2" fill="none" strokeLinecap="round" />;
    }
    if (mood === 'envy') {
      return <path d={`M 44 ${my} Q 48 ${my + 2} 50 ${my - 1} Q 52 ${my + 2} 56 ${my}`} stroke={ink} strokeWidth="1.8" fill="none" strokeLinecap="round" />;
    }
    return <path d={`M 44 ${my} Q 50 ${my + 4} 56 ${my}`} stroke={ink} strokeWidth="1.8" fill="none" strokeLinecap="round" />;
  };

  const blushOpacity = mood === 'sad' ? 0.35 : mood === 'envy' ? 0.55 : 0.82;

  return (
    <g className={`jar-baby-face mood-${mood}`}>
      {mood === 'idle' && (
        <g stroke={ink} strokeWidth="1.2" strokeLinecap="round" fill="none">
          <path d={`M${36} ${eyeY - 4} l-2.5 -3`} /><path d={`M${37} ${eyeY - 5} l-1.5 -3.5`} /><path d={`M${38} ${eyeY - 4} l-0.5 -3.8`} />
          <path d={`M${64} ${eyeY - 4} l2.5 -3`} /><path d={`M${63} ${eyeY - 5} l1.5 -3.5`} /><path d={`M${62} ${eyeY - 4} l0.5 -3.8`} />
        </g>
      )}
      {eye(42, 'left')}
      {eye(58, 'right')}
      <ellipse cx="35" cy={eyeY + 6} rx="3.8" ry="2.4" fill="#FFB7C8" opacity={blushOpacity} />
      <ellipse cx="65" cy={eyeY + 6} rx="3.8" ry="2.4" fill="#FFB7C8" opacity={blushOpacity} />
      {mouth()}
      {mood === 'envy' && (
        <g opacity="0.55">
          <path d="M 68 72 Q 72 68 76 72" stroke={ink} strokeWidth="1.4" fill="none" strokeLinecap="round" />
          <path d="M 70 74 Q 74 70 78 74" stroke={ink} strokeWidth="1.2" fill="none" strokeLinecap="round" />
        </g>
      )}
    </g>
  );
}

// Cute cloth-top jar baby — squat glass + fabric cover & twine bow; Sirisora colors via `color`.
function StarJar({ color = '#6979F8', fillPct = 0.5, size = 120, id: jarId, mood = 'idle', emoji }) {
  const ink = '#1F1A3D';
  const clipId = `jar-clip-${jarId || `${String(color).replace('#', '')}-${size}`}`;
  const liquid = jarMix(color, '#FFFFFF', 0.15);
  const fabric = color;
  const fabricDark = jarMix(color, '#1F1A3D', 0.28);
  const fabricLight = jarMix(color, '#FFFFFF', 0.38);
  const twine = '#C9A06C';
  const twineDark = '#8B6538';
  // Squat rounded glass jar — wide & short like the reference
  const bodyPath = 'M24 48 C20 48 18 52 18 58 L18 106 C18 117 28 121 50 121 C72 121 82 117 82 106 L82 58 C82 52 80 48 76 48 L72 48 C72 38 62 36 50 36 C38 36 28 38 28 48 Z';
  const fillBottom = 119;
  const fillTop = 56;
  const fillY = fillBottom - (fillBottom - fillTop) * Math.max(0, Math.min(1, fillPct));
  const starCount = Math.min(6, Math.max(0, Math.floor(fillPct * 8)));
  const showSparkles = mood === 'happy' || mood === 'excited' || fillPct > 0.15;

  return (
    <svg width={size} height={size * 1.22} viewBox="0 0 100 122" aria-hidden="true" className={`star-jar-svg mood-${mood}`} style={{ overflow: 'visible' }}>
      <defs>
        <clipPath id={clipId}>
          <path d={bodyPath} />
        </clipPath>
      </defs>

      <ellipse cx="50" cy="120" rx="26" ry="4" fill="rgba(31,26,61,0.1)" />

      {/* Glass body */}
      <path d={bodyPath} fill="rgba(255,255,255,0.78)" stroke={ink} strokeWidth="2.4" strokeLinejoin="round" />
      <path d="M22 58 L22 106" stroke="rgba(31,26,61,0.06)" strokeWidth="6" strokeLinecap="round" />
      <path d="M78 58 L78 106" stroke="rgba(31,26,61,0.05)" strokeWidth="4" strokeLinecap="round" />

      {/* Liquid + stars */}
      <g clipPath={`url(#${clipId})`}>
        <rect x="18" y={fillY} width="64" height={fillBottom - fillY + 4} fill={liquid} opacity="0.9" />
        {fillPct > 0.03 && (
          <path d={`M18 ${fillY + 2} Q34 ${fillY - 2} 50 ${fillY + 1} Q66 ${fillY + 4} 82 ${fillY + 2}`}
            fill={liquid} opacity="0.85" />
        )}
        {starCount > 0 && [...Array(starCount)].map((_, i) => (
          <path key={i}
            transform={`translate(${28 + (i * 10) % 40}, ${fillY + 10 + (i % 3) * 11}) scale(0.5)`}
            d="M0 -5 L1.5 -1.5 L5 -1.5 L2 1 L3 5 L0 2.5 L-3 5 L-2 1 L-5 -1.5 L-1.5 -1.5 Z"
            fill="#FFD23F"
          />
        ))}
      </g>

      {/* Glass shine */}
      <path d="M30 54 Q26 78 32 108" stroke="rgba(255,255,255,0.62)" strokeWidth="5" fill="none" strokeLinecap="round" />
      <path d="M74 62 Q78 88 72 112" stroke="rgba(255,255,255,0.18)" strokeWidth="3" fill="none" strokeLinecap="round" />

      <JarBabyFace mood={mood} ink={ink} eyeY={84} />

      {/* Fabric ruffle over shoulders */}
      <path d="M22 48 Q24 56 30 53 Q38 48 44 55 Q50 60 56 55 Q62 48 70 53 Q76 56 78 48 L74 46 Q50 58 26 46 Z"
        fill={fabricDark} stroke={ink} strokeWidth="1.6" strokeLinejoin="round" />
      <path d="M26 50 Q34 54 42 51 Q50 56 58 51 Q66 54 74 50" fill="none" stroke={fabricLight} strokeWidth="1.2" opacity="0.5" />

      {/* Twine — double wrap + bow */}
      <path d="M24 47.5 Q50 54 76 47.5" stroke={twineDark} strokeWidth="2.2" fill="none" strokeLinecap="round" />
      <path d="M24 50.5 Q50 57 76 50.5" stroke={twine} strokeWidth="2.4" fill="none" strokeLinecap="round" />
      <ellipse cx="50" cy="50" rx="3.2" ry="2.4" fill={twineDark} stroke={ink} strokeWidth="1" />
      <path d="M50 50 C44 46 38 48 36 54 C38 52 44 51 50 50 Z" fill={twine} stroke={ink} strokeWidth="1.2" strokeLinejoin="round" />
      <path d="M50 50 C56 46 62 48 64 54 C62 52 56 51 50 50 Z" fill={twine} stroke={ink} strokeWidth="1.2" strokeLinejoin="round" />
      <path d="M48 52 Q46 60 43 66" stroke={twine} strokeWidth="2" fill="none" strokeLinecap="round" />
      <path d="M52 52 Q54 60 57 66" stroke={twine} strokeWidth="2" fill="none" strokeLinecap="round" />

      {/* Puffy fabric cover on top */}
      <ellipse cx="50" cy="30" rx="30" ry="15" fill={fabric} stroke={ink} strokeWidth="2.2" />
      <ellipse cx="46" cy="25" rx="16" ry="7" fill={fabricLight} opacity="0.45" />
      <path d="M22 48 Q20 40 28 34 Q50 26 72 34 Q80 40 78 48" fill={fabric} stroke={ink} strokeWidth="1.8" strokeLinejoin="round" />

      {/* Reward tag on twine */}
      {emoji && (
        <g transform="translate(62, 58) rotate(10)">
          <rect x="0" y="0" width="15" height="15" rx="3" fill="#FFFBF4" stroke={fabricDark} strokeWidth="1.4" />
          <text x="7.5" y="11.5" textAnchor="middle" fontSize="9">{emoji}</text>
          <line x1="7.5" y1="-2" x2="7.5" y2="0" stroke={twineDark} strokeWidth="1.2" />
        </g>
      )}

      {/* Floating sparkles */}
      {showSparkles && [[16, 52], [84, 60], [12, 96], [88, 92]].map(([x, y], i) => (
        <circle key={i} cx={x} cy={y} r={1.2 + (i % 2)} fill="#FFF" opacity="0.75">
          {(mood === 'happy' || mood === 'excited') && (
            <animate attributeName="opacity" values="0.2;0.9;0.2" dur={`${1.2 + i * 0.2}s`} repeatCount="indefinite" />
          )}
        </circle>
      ))}
    </svg>
  );
}

Object.assign(window, { Suri, SuriBubble, fireConfetti, sprinkleStars, StarJar, StarChar, STAR_POSES });
