// olivia-illustrations.jsx
// Flat illustration set for Olivia — child avatars per age + plant streak + decorative shapes.
// Duolingo-ish: geometric, friendly, flat colors, minimal shading.

// Palette used inside illustrations (matches app palette)
const OLIVIA_ILLO = {
  cream: '#F5EFE6',
  paper: '#FFFCF7',
  terra: '#D97757',
  terraDark: '#B85A3D',
  terraLight: '#F2C4A8',
  sage: '#7A8B6F',
  sageDark: '#4E6147',
  butter: '#F4D58D',
  sky: '#A8C6D6',
  rose: '#E89B8C',
  ink: '#3A2E26',
  inkSoft: '#7A6E66',
  skin1: '#F2D2B6',
  skin2: '#E0B292',
  skin3: '#C68B6F',
  hair1: '#3A2E26', // dark brown
  hair2: '#8C5E3B', // chestnut
  hair3: '#D9A86C', // blond
  hair4: '#1F1612', // black
};

// ─── Child avatars (one per age 3 → 8) ─────────────────────────
// Each draws inside a 120×140 box, transparent background.
// Use <ChildAvatar age={n} size={120} />

function ChildAvatar({ age = 4, size = 120, style }) {
  const Map = {
    3: AgeThree, 4: AgeFour, 5: AgeFive,
    6: AgeSix, 7: AgeSeven, 8: AgeEight,
  };
  const C = Map[age] || AgeFour;
  return (
    <svg width={size} height={size * 140 / 120} viewBox="0 0 120 140" style={style}>
      <C />
    </svg>
  );
}

// Age 3 — toddler: round head, tuft of hair, sitting pose, holding a stuffie
function AgeThree() {
  return (
    <g>
      {/* Shadow */}
      <ellipse cx="60" cy="132" rx="34" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — onesie */}
      <path d="M30 96 Q30 78 60 78 Q90 78 90 96 L90 128 Q90 132 86 132 L34 132 Q30 132 30 128 Z" fill={OLIVIA_ILLO.butter}/>
      {/* Onesie pattern */}
      <circle cx="48" cy="106" r="2" fill={OLIVIA_ILLO.terra} opacity="0.5"/>
      <circle cx="72" cy="114" r="2" fill={OLIVIA_ILLO.terra} opacity="0.5"/>
      <circle cx="60" cy="122" r="2" fill={OLIVIA_ILLO.terra} opacity="0.5"/>
      {/* Arms */}
      <rect x="22" y="86" width="14" height="22" rx="7" fill={OLIVIA_ILLO.butter}/>
      <rect x="84" y="86" width="14" height="22" rx="7" fill={OLIVIA_ILLO.butter}/>
      {/* Hands */}
      <circle cx="29" cy="110" r="6" fill={OLIVIA_ILLO.skin1}/>
      <circle cx="91" cy="110" r="6" fill={OLIVIA_ILLO.skin1}/>
      {/* Head */}
      <circle cx="60" cy="52" r="30" fill={OLIVIA_ILLO.skin1}/>
      {/* Tuft */}
      <path d="M55 22 Q60 14 65 22 Q62 26 55 22 Z" fill={OLIVIA_ILLO.hair3}/>
      {/* Cheeks */}
      <circle cx="42" cy="58" r="5" fill={OLIVIA_ILLO.rose} opacity="0.55"/>
      <circle cx="78" cy="58" r="5" fill={OLIVIA_ILLO.rose} opacity="0.55"/>
      {/* Eyes — closed/happy */}
      <path d="M46 50 Q49 47 52 50" stroke={OLIVIA_ILLO.ink} strokeWidth="2" fill="none" strokeLinecap="round"/>
      <path d="M68 50 Q71 47 74 50" stroke={OLIVIA_ILLO.ink} strokeWidth="2" fill="none" strokeLinecap="round"/>
      {/* Mouth — small smile */}
      <path d="M55 62 Q60 66 65 62" stroke={OLIVIA_ILLO.ink} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
    </g>
  );
}

// Age 4 — bowl-cut, overall straps, big smile
function AgeFour() {
  return (
    <g>
      <ellipse cx="60" cy="132" rx="32" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — overalls */}
      <path d="M32 92 L32 132 L88 132 L88 92 Q88 80 60 80 Q32 80 32 92 Z" fill={OLIVIA_ILLO.terra}/>
      {/* Straps */}
      <rect x="42" y="74" width="6" height="14" fill={OLIVIA_ILLO.terra}/>
      <rect x="72" y="74" width="6" height="14" fill={OLIVIA_ILLO.terra}/>
      {/* Buttons */}
      <circle cx="45" cy="92" r="2" fill={OLIVIA_ILLO.butter}/>
      <circle cx="75" cy="92" r="2" fill={OLIVIA_ILLO.butter}/>
      {/* Shirt under */}
      <path d="M40 74 Q40 70 50 70 L70 70 Q80 70 80 74 L80 80 L40 80 Z" fill={OLIVIA_ILLO.paper}/>
      {/* Arms */}
      <rect x="20" y="84" width="14" height="26" rx="7" fill={OLIVIA_ILLO.paper}/>
      <rect x="86" y="84" width="14" height="26" rx="7" fill={OLIVIA_ILLO.paper}/>
      <circle cx="27" cy="112" r="6" fill={OLIVIA_ILLO.skin2}/>
      <circle cx="93" cy="112" r="6" fill={OLIVIA_ILLO.skin2}/>
      {/* Head */}
      <circle cx="60" cy="48" r="28" fill={OLIVIA_ILLO.skin2}/>
      {/* Bowl cut */}
      <path d="M32 46 Q32 22 60 22 Q88 22 88 46 Q88 38 78 36 L42 36 Q32 38 32 46 Z" fill={OLIVIA_ILLO.hair2}/>
      <path d="M32 46 Q34 56 40 56 L80 56 Q86 56 88 46 L88 38 L32 38 Z" fill={OLIVIA_ILLO.hair2}/>
      {/* Cheeks */}
      <circle cx="42" cy="56" r="4.5" fill={OLIVIA_ILLO.rose} opacity="0.5"/>
      <circle cx="78" cy="56" r="4.5" fill={OLIVIA_ILLO.rose} opacity="0.5"/>
      {/* Eyes */}
      <circle cx="50" cy="50" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="70" cy="50" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="51" cy="49" r="0.8" fill={OLIVIA_ILLO.paper}/>
      <circle cx="71" cy="49" r="0.8" fill={OLIVIA_ILLO.paper}/>
      {/* Smile */}
      <path d="M52 60 Q60 67 68 60" stroke={OLIVIA_ILLO.ink} strokeWidth="2" fill="none" strokeLinecap="round"/>
    </g>
  );
}

// Age 5 — pigtails, sweater, neutral pose
function AgeFive() {
  return (
    <g>
      <ellipse cx="60" cy="132" rx="32" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — sweater */}
      <path d="M30 92 L30 132 L90 132 L90 92 Q90 78 60 78 Q30 78 30 92 Z" fill={OLIVIA_ILLO.sage}/>
      {/* Sweater stripe */}
      <rect x="30" y="108" width="60" height="6" fill={OLIVIA_ILLO.paper} opacity="0.4"/>
      {/* Arms */}
      <rect x="20" y="84" width="14" height="26" rx="7" fill={OLIVIA_ILLO.sage}/>
      <rect x="86" y="84" width="14" height="26" rx="7" fill={OLIVIA_ILLO.sage}/>
      <circle cx="27" cy="112" r="6" fill={OLIVIA_ILLO.skin1}/>
      <circle cx="93" cy="112" r="6" fill={OLIVIA_ILLO.skin1}/>
      {/* Head */}
      <circle cx="60" cy="50" r="28" fill={OLIVIA_ILLO.skin1}/>
      {/* Hair base */}
      <path d="M32 50 Q32 24 60 24 Q88 24 88 50 L88 42 Q82 36 60 36 Q38 36 32 42 Z" fill={OLIVIA_ILLO.hair1}/>
      {/* Pigtails */}
      <ellipse cx="28" cy="58" rx="8" ry="12" fill={OLIVIA_ILLO.hair1}/>
      <ellipse cx="92" cy="58" rx="8" ry="12" fill={OLIVIA_ILLO.hair1}/>
      {/* Bows */}
      <path d="M22 48 L34 48 L30 54 L26 54 Z" fill={OLIVIA_ILLO.terra}/>
      <path d="M86 48 L98 48 L94 54 L90 54 Z" fill={OLIVIA_ILLO.terra}/>
      {/* Bangs */}
      <path d="M40 36 Q50 32 60 36 Q70 32 80 36 L80 44 Q60 42 40 44 Z" fill={OLIVIA_ILLO.hair1}/>
      {/* Cheeks */}
      <circle cx="42" cy="58" r="4" fill={OLIVIA_ILLO.rose} opacity="0.5"/>
      <circle cx="78" cy="58" r="4" fill={OLIVIA_ILLO.rose} opacity="0.5"/>
      {/* Eyes */}
      <circle cx="50" cy="52" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="70" cy="52" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="51" cy="51" r="0.8" fill={OLIVIA_ILLO.paper}/>
      <circle cx="71" cy="51" r="0.8" fill={OLIVIA_ILLO.paper}/>
      {/* Mouth — gentle smile */}
      <path d="M54 62 Q60 65 66 62" stroke={OLIVIA_ILLO.ink} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
    </g>
  );
}

// Age 6 — curls, t-shirt, hand raised waving
function AgeSix() {
  return (
    <g>
      <ellipse cx="60" cy="132" rx="32" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — striped tee */}
      <path d="M30 92 L30 132 L90 132 L90 92 Q90 78 60 78 Q30 78 30 92 Z" fill={OLIVIA_ILLO.paper}/>
      <rect x="30" y="96" width="60" height="5" fill={OLIVIA_ILLO.terra}/>
      <rect x="30" y="108" width="60" height="5" fill={OLIVIA_ILLO.terra}/>
      <rect x="30" y="120" width="60" height="5" fill={OLIVIA_ILLO.terra}/>
      {/* Right arm waving up */}
      <rect x="84" y="58" width="14" height="32" rx="7" fill={OLIVIA_ILLO.skin3} transform="rotate(20 91 74)"/>
      <circle cx="100" cy="56" r="7" fill={OLIVIA_ILLO.skin3}/>
      {/* Left arm down */}
      <rect x="20" y="84" width="14" height="26" rx="7" fill={OLIVIA_ILLO.skin3}/>
      <circle cx="27" cy="112" r="6" fill={OLIVIA_ILLO.skin3}/>
      {/* Head */}
      <circle cx="60" cy="50" r="28" fill={OLIVIA_ILLO.skin3}/>
      {/* Curls */}
      <circle cx="36" cy="34" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="48" cy="26" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="60" cy="22" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="72" cy="26" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="84" cy="34" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="40" cy="46" r="9" fill={OLIVIA_ILLO.hair4}/>
      <circle cx="80" cy="46" r="9" fill={OLIVIA_ILLO.hair4}/>
      {/* Face oval over curls */}
      <ellipse cx="60" cy="56" rx="22" ry="22" fill={OLIVIA_ILLO.skin3}/>
      {/* Cheeks */}
      <circle cx="44" cy="60" r="4" fill={OLIVIA_ILLO.rose} opacity="0.45"/>
      <circle cx="76" cy="60" r="4" fill={OLIVIA_ILLO.rose} opacity="0.45"/>
      {/* Eyes */}
      <circle cx="52" cy="54" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="68" cy="54" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="53" cy="53" r="0.8" fill={OLIVIA_ILLO.paper}/>
      <circle cx="69" cy="53" r="0.8" fill={OLIVIA_ILLO.paper}/>
      {/* Smile — open */}
      <path d="M52 64 Q60 72 68 64 Q60 68 52 64 Z" fill={OLIVIA_ILLO.ink}/>
    </g>
  );
}

// Age 7 — book reader, side ponytail
function AgeSeven() {
  return (
    <g>
      <ellipse cx="60" cy="132" rx="32" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — cardigan over shirt */}
      <path d="M30 92 L30 132 L90 132 L90 92 Q90 78 60 78 Q30 78 30 92 Z" fill={OLIVIA_ILLO.sky}/>
      {/* Open cardigan strip */}
      <path d="M58 80 L58 132 L62 132 L62 80 Z" fill={OLIVIA_ILLO.paper}/>
      {/* Arms — folded holding book */}
      <rect x="22" y="98" width="34" height="14" rx="7" fill={OLIVIA_ILLO.sky}/>
      <rect x="64" y="98" width="34" height="14" rx="7" fill={OLIVIA_ILLO.sky}/>
      {/* Book between hands */}
      <rect x="38" y="100" width="44" height="20" rx="2" fill={OLIVIA_ILLO.terraDark}/>
      <rect x="40" y="102" width="40" height="16" rx="1" fill={OLIVIA_ILLO.paper}/>
      <line x1="60" y1="102" x2="60" y2="118" stroke={OLIVIA_ILLO.inkSoft} strokeWidth="1" opacity="0.4"/>
      <line x1="44" y1="106" x2="56" y2="106" stroke={OLIVIA_ILLO.inkSoft} strokeWidth="0.8" opacity="0.5"/>
      <line x1="44" y1="110" x2="55" y2="110" stroke={OLIVIA_ILLO.inkSoft} strokeWidth="0.8" opacity="0.5"/>
      <line x1="64" y1="106" x2="76" y2="106" stroke={OLIVIA_ILLO.inkSoft} strokeWidth="0.8" opacity="0.5"/>
      <line x1="64" y1="110" x2="75" y2="110" stroke={OLIVIA_ILLO.inkSoft} strokeWidth="0.8" opacity="0.5"/>
      {/* Head */}
      <circle cx="60" cy="48" r="28" fill={OLIVIA_ILLO.skin2}/>
      {/* Hair — full coverage with side pony */}
      <path d="M32 50 Q32 22 60 22 Q88 22 88 50 L88 44 Q80 32 60 32 Q40 32 32 44 Z" fill={OLIVIA_ILLO.hair2}/>
      <path d="M32 48 L32 64 Q34 70 40 70 L46 70 Q44 60 36 56 Z" fill={OLIVIA_ILLO.hair2}/>
      <ellipse cx="92" cy="62" rx="8" ry="14" fill={OLIVIA_ILLO.hair2} transform="rotate(20 92 62)"/>
      {/* Hair tie */}
      <circle cx="87" cy="52" r="3" fill={OLIVIA_ILLO.terra}/>
      {/* Bangs */}
      <path d="M38 42 Q44 36 50 40 Q56 36 62 40 L62 50 L38 48 Z" fill={OLIVIA_ILLO.hair2}/>
      {/* Cheeks */}
      <circle cx="44" cy="58" r="3.5" fill={OLIVIA_ILLO.rose} opacity="0.45"/>
      <circle cx="76" cy="58" r="3.5" fill={OLIVIA_ILLO.rose} opacity="0.45"/>
      {/* Eyes — focused, looking down at book */}
      <path d="M48 54 Q51 56 54 54" stroke={OLIVIA_ILLO.ink} strokeWidth="2" fill="none" strokeLinecap="round"/>
      <path d="M66 54 Q69 56 72 54" stroke={OLIVIA_ILLO.ink} strokeWidth="2" fill="none" strokeLinecap="round"/>
      {/* Smile — small content */}
      <path d="M56 64 Q60 66 64 64" stroke={OLIVIA_ILLO.ink} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
    </g>
  );
}

// Age 8 — taller, slight hand-on-hip, confident
function AgeEight() {
  return (
    <g>
      <ellipse cx="60" cy="132" rx="32" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.08"/>
      {/* Body — hoodie */}
      <path d="M28 92 L28 132 L92 132 L92 92 Q92 78 60 78 Q28 78 28 92 Z" fill={OLIVIA_ILLO.terraDark}/>
      {/* Hoodie pocket */}
      <path d="M40 110 L80 110 L76 122 L44 122 Z" fill={OLIVIA_ILLO.ink} opacity="0.12"/>
      {/* Hoodie strings */}
      <line x1="56" y1="80" x2="56" y2="92" stroke={OLIVIA_ILLO.paper} strokeWidth="1.5"/>
      <line x1="64" y1="80" x2="64" y2="92" stroke={OLIVIA_ILLO.paper} strokeWidth="1.5"/>
      {/* Arms */}
      <rect x="18" y="84" width="14" height="32" rx="7" fill={OLIVIA_ILLO.terraDark}/>
      <rect x="88" y="84" width="14" height="22" rx="7" fill={OLIVIA_ILLO.terraDark}/>
      <circle cx="25" cy="118" r="6" fill={OLIVIA_ILLO.skin2}/>
      <circle cx="95" cy="106" r="6" fill={OLIVIA_ILLO.skin2}/>
      {/* Head */}
      <circle cx="60" cy="48" r="28" fill={OLIVIA_ILLO.skin2}/>
      {/* Hair — short, parted */}
      <path d="M32 48 Q32 22 60 22 Q88 22 88 48 Q86 36 78 32 L42 32 Q34 36 32 48 Z" fill={OLIVIA_ILLO.hair1}/>
      <path d="M32 48 Q32 42 36 38 L52 38 Q48 44 46 50 L32 50 Z" fill={OLIVIA_ILLO.hair1}/>
      <path d="M50 38 Q66 36 80 42 Q72 36 60 36 Q54 36 50 38 Z" fill={OLIVIA_ILLO.hair1} opacity="0.7"/>
      {/* Cheeks */}
      <circle cx="44" cy="58" r="3.5" fill={OLIVIA_ILLO.rose} opacity="0.4"/>
      <circle cx="76" cy="58" r="3.5" fill={OLIVIA_ILLO.rose} opacity="0.4"/>
      {/* Eyes */}
      <circle cx="50" cy="52" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="70" cy="52" r="2.5" fill={OLIVIA_ILLO.ink}/>
      <circle cx="51" cy="51" r="0.8" fill={OLIVIA_ILLO.paper}/>
      <circle cx="71" cy="51" r="0.8" fill={OLIVIA_ILLO.paper}/>
      {/* Mouth — confident closed smile */}
      <path d="M54 62 Q60 66 66 62" stroke={OLIVIA_ILLO.ink} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
    </g>
  );
}

// ─── The growing plant — streak metaphor ──────────────────────
// stage 0..n: more days = taller, more leaves, eventually a flower.
// Renders into a fixed viewBox; pass `stage` from 0 → ~30.
function StreakPlant({ stage = 12, size = 200, style }) {
  const s = Math.max(0, stage);
  // Stem height grows
  const stemTop = Math.max(120, 160 - s * 3.5);
  const leafCount = Math.min(8, Math.floor(s / 2));
  const showBud = s >= 6;
  const showFlower = s >= 14;
  const showSecondFlower = s >= 21;

  const leaves = [];
  for (let i = 0; i < leafCount; i++) {
    const t = i / Math.max(1, leafCount - 1);
    const y = 155 - i * 7 - s * 0.6;
    const left = i % 2 === 0;
    leaves.push(
      <Leaf key={i} x={100} y={y} left={left} size={10 + i * 0.6}/>
    );
  }

  return (
    <svg width={size} height={size} viewBox="0 0 200 200" style={style}>
      {/* Soil shadow */}
      <ellipse cx="100" cy="186" rx="44" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.1"/>
      {/* Pot */}
      <path d="M62 158 L138 158 L130 184 Q130 188 126 188 L74 188 Q70 188 70 184 Z" fill={OLIVIA_ILLO.terra}/>
      <path d="M62 158 L138 158 L136 164 L64 164 Z" fill={OLIVIA_ILLO.terraDark}/>
      {/* Soil */}
      <ellipse cx="100" cy="160" rx="36" ry="3" fill={OLIVIA_ILLO.ink} opacity="0.35"/>
      {/* Stem */}
      <path d={`M100 160 Q98 ${(stemTop + 160) / 2} 100 ${stemTop}`}
        stroke={OLIVIA_ILLO.sageDark} strokeWidth="3" fill="none" strokeLinecap="round"/>
      {/* Leaves */}
      {leaves}
      {/* Bud */}
      {showBud && !showFlower && (
        <g transform={`translate(100 ${stemTop})`}>
          <ellipse cx="0" cy="-4" rx="5" ry="8" fill={OLIVIA_ILLO.sage}/>
          <ellipse cx="0" cy="-6" rx="3" ry="4" fill={OLIVIA_ILLO.terraLight}/>
        </g>
      )}
      {/* Flower */}
      {showFlower && (
        <g transform={`translate(100 ${stemTop - 4})`}>
          {[0, 72, 144, 216, 288].map(a => (
            <ellipse key={a} cx="0" cy="-9" rx="6" ry="8" fill={OLIVIA_ILLO.terra}
              transform={`rotate(${a})`}/>
          ))}
          <circle r="4" fill={OLIVIA_ILLO.butter}/>
        </g>
      )}
      {showSecondFlower && (
        <g transform={`translate(120 ${stemTop + 10})`}>
          {[0, 72, 144, 216, 288].map(a => (
            <ellipse key={a} cx="0" cy="-6" rx="4" ry="6" fill={OLIVIA_ILLO.rose}
              transform={`rotate(${a})`}/>
          ))}
          <circle r="2.5" fill={OLIVIA_ILLO.butter}/>
        </g>
      )}
    </svg>
  );
}

function Leaf({ x, y, left, size = 10 }) {
  const dir = left ? -1 : 1;
  return (
    <g transform={`translate(${x} ${y})`}>
      <path d={`M0 0 Q${dir * 4} ${-size * 0.6} ${dir * size * 1.6} ${-size * 0.3} Q${dir * size * 1.2} ${size * 0.2} 0 0 Z`}
        fill={OLIVIA_ILLO.sage}/>
      <path d={`M0 0 L${dir * size * 1.4} ${-size * 0.3}`}
        stroke={OLIVIA_ILLO.sageDark} strokeWidth="0.8" fill="none" opacity="0.6"/>
    </g>
  );
}

// ─── Decorative shapes ─────────────────────────────────────────
function Sparkle({ size = 16, color = OLIVIA_ILLO.butter, style }) {
  return (
    <svg width={size} height={size} viewBox="0 0 16 16" style={style}>
      <path d="M8 0 L9 7 L16 8 L9 9 L8 16 L7 9 L0 8 L7 7 Z" fill={color}/>
    </svg>
  );
}

function Sun({ size = 80, color = OLIVIA_ILLO.butter, style }) {
  return (
    <svg width={size} height={size} viewBox="0 0 80 80" style={style}>
      <circle cx="40" cy="40" r="18" fill={color}/>
      {Array.from({ length: 12 }).map((_, i) => {
        const a = (i * 30) * Math.PI / 180;
        const x1 = 40 + Math.cos(a) * 24;
        const y1 = 40 + Math.sin(a) * 24;
        const x2 = 40 + Math.cos(a) * 32;
        const y2 = 40 + Math.sin(a) * 32;
        return <line key={i} x1={x1} y1={y1} x2={x2} y2={y2} stroke={color} strokeWidth="2.5" strokeLinecap="round"/>;
      })}
    </svg>
  );
}

function Wave({ width = 320, height = 30, color = OLIVIA_ILLO.terraLight, style }) {
  return (
    <svg width={width} height={height} viewBox={`0 0 320 30`} preserveAspectRatio="none" style={style}>
      <path d="M0 15 Q40 0 80 15 T160 15 T240 15 T320 15 L320 30 L0 30 Z" fill={color}/>
    </svg>
  );
}

// Tiny logo mark — a sprouting seedling inside a soft round
function OliviaMark({ size = 32, style }) {
  return (
    <svg width={size} height={size} viewBox="0 0 32 32" style={style}>
      <circle cx="16" cy="16" r="16" fill={OLIVIA_ILLO.terra}/>
      <path d="M16 22 L16 14" stroke={OLIVIA_ILLO.paper} strokeWidth="1.8" strokeLinecap="round"/>
      <path d="M16 16 Q10 14 9 9 Q14 10 16 16" fill={OLIVIA_ILLO.paper}/>
      <path d="M16 18 Q22 16 23 12 Q19 13 16 18" fill={OLIVIA_ILLO.paper} opacity="0.85"/>
    </svg>
  );
}

Object.assign(window, {
  ChildAvatar, StreakPlant, Sparkle, Sun, Wave, OliviaMark,
  OLIVIA_ILLO,
});
