// Ingredient illustrations — hand-drawn flat style.
// Each is an SVG component sized via a `size` prop (default 120).

const wobble = (seed) => {
  // tiny deterministic jitter for organic feel
  return ((seed * 9301 + 49297) % 233280) / 233280;
};

const Garlic = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <path d="M50 18 C 35 22, 22 38, 24 60 C 26 82, 42 90, 50 90 C 58 90, 74 82, 76 60 C 78 38, 65 22, 50 18 Z"
        fill="#f5ecdc" stroke="#7a5a3a" strokeWidth="1.6" strokeLinejoin="round" />
      <path d="M50 22 C 48 40, 46 70, 50 88" stroke="#c9b58a" strokeWidth="1.2" fill="none" opacity="0.7" />
      <path d="M38 30 C 36 50, 36 72, 42 88" stroke="#c9b58a" strokeWidth="1.2" fill="none" opacity="0.6" />
      <path d="M62 30 C 64 50, 64 72, 58 88" stroke="#c9b58a" strokeWidth="1.2" fill="none" opacity="0.6" />
      <path d="M50 18 C 48 12, 46 8, 44 6 M50 18 C 52 12, 54 8, 56 6" stroke="#6b8a3a" strokeWidth="2" fill="none" strokeLinecap="round" />
      <ellipse cx="42" cy="50" rx="3" ry="6" fill="#fff" opacity="0.5" />
    </g>
  </svg>
);

const ChiliPepper = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g transform="rotate(-15 50 50)">
      <path d="M30 30 C 28 28, 32 22, 38 22 L 50 22 C 56 22, 58 26, 56 30 Z"
        fill="#6b8a3a" stroke="#4a5e26" strokeWidth="1.4" strokeLinejoin="round" />
      <path d="M44 22 L 42 14 L 46 18" stroke="#4a5e26" strokeWidth="1.6" fill="none" strokeLinecap="round" />
      <path d="M36 30 C 30 40, 28 58, 38 76 C 48 90, 64 86, 68 70 C 70 56, 60 38, 52 30 Z"
        fill="#c0392b" stroke="#7a1f15" strokeWidth="1.6" strokeLinejoin="round" />
      <path d="M44 38 C 42 50, 44 70, 56 78" stroke="#fff" strokeWidth="2" fill="none" opacity="0.35" strokeLinecap="round" />
    </g>
  </svg>
);

const Scallion = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g transform="rotate(20 50 50)">
      <rect x="44" y="58" width="12" height="28" rx="2" fill="#f5ecdc" stroke="#7a5a3a" strokeWidth="1.4" />
      <path d="M44 58 C 44 50, 48 30, 42 10" stroke="#5e7a2e" strokeWidth="5" fill="none" strokeLinecap="round" />
      <path d="M50 58 C 50 48, 54 22, 56 8" stroke="#6b8a3a" strokeWidth="5" fill="none" strokeLinecap="round" />
      <path d="M56 58 C 56 50, 60 32, 68 14" stroke="#5e7a2e" strokeWidth="5" fill="none" strokeLinecap="round" />
      <line x1="44" y1="66" x2="56" y2="66" stroke="#c9b58a" strokeWidth="0.8" />
      <line x1="44" y1="74" x2="56" y2="74" stroke="#c9b58a" strokeWidth="0.8" />
    </g>
  </svg>
);

const Mushroom = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <path d="M18 50 C 18 28, 38 18, 50 18 C 62 18, 82 28, 82 50 C 82 54, 78 56, 70 56 L 30 56 C 22 56, 18 54, 18 50 Z"
        fill="#8a5a3a" stroke="#4a2a1a" strokeWidth="1.6" strokeLinejoin="round" />
      <ellipse cx="36" cy="34" rx="5" ry="3" fill="#a87a5a" opacity="0.6" />
      <ellipse cx="60" cy="30" rx="7" ry="4" fill="#a87a5a" opacity="0.5" />
      <path d="M34 56 L 32 84 C 32 88, 36 90, 50 90 C 64 90, 68 88, 68 84 L 66 56 Z"
        fill="#f5ecdc" stroke="#7a5a3a" strokeWidth="1.6" strokeLinejoin="round" />
      <path d="M40 60 C 40 75, 42 85, 44 88 M 56 60 C 56 75, 58 85, 60 88" stroke="#c9b58a" strokeWidth="1" fill="none" />
    </g>
  </svg>
);

const CrispyPorkBelly = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <rect x="20" y="28" width="60" height="44" rx="10" fill="#f3a08a" stroke="#a8493a" strokeWidth="1.6" />
      <path d="M24 34 C 34 22, 50 22, 60 34" stroke="#b77258" strokeWidth="6" fill="none" strokeLinecap="round" />
      <path d="M24 46 C 36 38, 50 38, 64 46" stroke="#a8493a" strokeWidth="6" fill="none" strokeLinecap="round" />
      <path d="M24 58 C 36 50, 50 50, 64 58" stroke="#b77258" strokeWidth="6" fill="none" strokeLinecap="round" />
      <path d="M24 70 C 34 62, 50 62, 64 70" stroke="#a8493a" strokeWidth="6" fill="none" strokeLinecap="round" />
      <rect x="22" y="74" width="56" height="10" rx="5" fill="#deb989" />
    </g>
  </svg>
);

const Rice = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <path d="M22 54 C 22 38, 34 28, 50 28 C 66 28, 78 38, 78 54 C 78 66, 72 74, 64 80 C 56 86, 44 86, 36 80 C 28 74, 22 66, 22 54 Z"
        fill="#fdf6e3" stroke="#d9b88a" strokeWidth="1.6" />
      <path d="M30 46 C 34 42, 42 42, 46 46" stroke="#f5ecdc" strokeWidth="3" fill="none" strokeLinecap="round" />
      <path d="M28 54 C 34 50, 42 50, 46 54 C 50 58, 58 58, 62 54" stroke="#f5ecdc" strokeWidth="3" fill="none" strokeLinecap="round" />
      <path d="M32 62 C 36 58, 44 58, 48 62 C 52 66, 56 66, 60 62" stroke="#f5ecdc" strokeWidth="3" fill="none" strokeLinecap="round" />
      <path d="M38 70 C 42 66, 48 66, 52 70" stroke="#f5ecdc" strokeWidth="3" fill="none" strokeLinecap="round" />
    </g>
  </svg>
);

const SoySauce = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <rect x="40" y="12" width="20" height="10" rx="2" fill="#7a5a3a" stroke="#3a2a1a" strokeWidth="1.4" />
      <path d="M38 22 L 36 30 L 32 32 C 28 34, 26 38, 26 46 L 26 80 C 26 86, 30 90, 36 90 L 64 90 C 70 90, 74 86, 74 80 L 74 46 C 74 38, 72 34, 68 32 L 64 30 L 62 22 Z"
        fill="#2a1b15" stroke="#0a0604" strokeWidth="1.6" strokeLinejoin="round" />
      <rect x="32" y="48" width="36" height="26" fill="#c0392b" stroke="#7a1f15" strokeWidth="1.2" />
      <text x="50" y="64" textAnchor="middle" fontFamily="serif" fontSize="9" fill="#fdf6e3" fontWeight="700">SOY</text>
      <ellipse cx="38" cy="38" rx="3" ry="6" fill="#fff" opacity="0.18" />
    </g>
  </svg>
);

const LaoGanMa = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      {/* lid */}
      <rect x="32" y="14" width="36" height="12" rx="3" fill="#b8302a" stroke="#6e1610" strokeWidth="1.6" />
      {/* jar of chili oil */}
      <rect x="30" y="26" width="40" height="60" rx="6" fill="#a82817" stroke="#4a1009" strokeWidth="1.6" />
      {/* cream label */}
      <rect x="34" y="46" width="32" height="30" rx="2" fill="#f4e7c9" stroke="#caa85f" strokeWidth="1.2" />
      <circle cx="50" cy="58" r="6" fill="#e8c79a" stroke="#a8763a" strokeWidth="1" />
      <rect x="38" y="68" width="24" height="5" rx="1" fill="#c0392b" />
      {/* glass shine */}
      <ellipse cx="37" cy="38" rx="2.4" ry="6" fill="#fff" opacity="0.18" />
    </g>
  </svg>
);

const MandarinOrange = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <circle cx="50" cy="58" r="30" fill="#f59a2e" stroke="#c46a18" strokeWidth="1.6" />
      <path d="M50 30 L 50 22" stroke="#5e7a2e" strokeWidth="2.6" strokeLinecap="round" />
      <path d="M50 24 C 57 17, 68 17, 72 22 C 65 29, 55 29, 50 24 Z" fill="#6b8a3a" stroke="#4a5e26" strokeWidth="1.2" strokeLinejoin="round" />
      <path d="M44 30 C 46 27, 54 27, 56 30" stroke="#c46a18" strokeWidth="1.4" fill="none" opacity="0.7" />
      <ellipse cx="40" cy="48" rx="4" ry="8" fill="#fff" opacity="0.22" />
    </g>
  </svg>
);

const BubbleWaffle = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <path d="M50 16 L 82 34 L 82 66 L 50 84 L 18 66 L 18 34 Z" fill="#f2c879" stroke="#caa14a" strokeWidth="1.8" strokeLinejoin="round" />
      <g fill="#e6ab50">
        <circle cx="42" cy="38" r="8" />
        <circle cx="58" cy="38" r="8" />
        <circle cx="34" cy="51" r="8" />
        <circle cx="50" cy="51" r="8" />
        <circle cx="66" cy="51" r="8" />
        <circle cx="42" cy="64" r="8" />
        <circle cx="58" cy="64" r="8" />
      </g>
    </g>
  </svg>
);

const EggYolkMoonCake = ({ size = 120 }) => (
  <svg viewBox="0 0 100 100" width={size} height={size}>
    <g>
      <rect x="22" y="30" width="56" height="44" rx="12" fill="#d39a52" stroke="#9a6a30" strokeWidth="1.8" />
      <rect x="28" y="36" width="44" height="32" rx="9" fill="none" stroke="#b07e3c" strokeWidth="1.4" opacity="0.7" />
      <circle cx="50" cy="52" r="11" fill="#f0a52a" stroke="#cf7d15" strokeWidth="1.4" />
      <ellipse cx="46" cy="48" rx="3" ry="4" fill="#fff" opacity="0.3" />
    </g>
  </svg>
);

// Final dish — an over-the-top claypot feast built from every ingredient.
const Dish = ({ size = 320 }) => (
  <svg viewBox="0 0 520 430" width={size} height={size * 430 / 520} role="img" aria-label="A celebratory claypot rice feast with every ingredient">
    <defs>
      <radialGradient id="dishGlow" cx="50%" cy="43%" r="58%">
        <stop offset="0%" stopColor="#ffe8a6" stopOpacity="0.62" />
        <stop offset="68%" stopColor="#f0a52a" stopOpacity="0.14" />
        <stop offset="100%" stopColor="#000" stopOpacity="0" />
      </radialGradient>
      <linearGradient id="potShine" x1="0%" y1="0%" x2="100%" y2="100%">
        <stop offset="0%" stopColor="#2a2a2a" />
        <stop offset="42%" stopColor="#070707" />
        <stop offset="100%" stopColor="#151515" />
      </linearGradient>
      <linearGradient id="riceGlow" x1="18%" y1="12%" x2="84%" y2="88%">
        <stop offset="0%" stopColor="#fff8df" />
        <stop offset="60%" stopColor="#f6dfad" />
        <stop offset="100%" stopColor="#d39a52" />
      </linearGradient>
      <linearGradient id="soyGlaze" x1="0%" y1="0%" x2="100%" y2="0%">
        <stop offset="0%" stopColor="#32140b" />
        <stop offset="52%" stopColor="#7a2a14" />
        <stop offset="100%" stopColor="#2a1008" />
      </linearGradient>
      <filter id="softGlow" x="-30%" y="-30%" width="160%" height="160%">
        <feGaussianBlur stdDeviation="6" result="blur" />
        <feMerge>
          <feMergeNode in="blur" />
          <feMergeNode in="SourceGraphic" />
        </feMerge>
      </filter>
    </defs>

    <ellipse cx="260" cy="352" rx="190" ry="28" fill="#000" opacity="0.2" />
    <ellipse cx="260" cy="208" rx="210" ry="150" fill="url(#dishGlow)" filter="url(#softGlow)" />

    <g className="dish-pot">
      <path d="M68 212 C 38 212, 32 244, 66 254 C 86 260, 102 246, 100 228 C 96 218, 84 212, 68 212 Z"
        fill="#080808" stroke="#171717" strokeWidth="3" />
      <path d="M452 212 C 482 212, 488 244, 454 254 C 434 260, 418 246, 420 228 C 424 218, 436 212, 452 212 Z"
        fill="#080808" stroke="#171717" strokeWidth="3" />
      <path d="M86 205 C 92 310, 140 362, 260 366 C 380 362, 428 310, 434 205 C 430 184, 366 162, 260 162 C 154 162, 90 184, 86 205 Z"
        fill="url(#potShine)" stroke="#050505" strokeWidth="4" />
      <ellipse cx="260" cy="194" rx="178" ry="54" fill="#090909" stroke="#050505" strokeWidth="5" />
      <ellipse cx="260" cy="184" rx="164" ry="38" fill="#1a1a1a" opacity="0.95" />
      <ellipse cx="260" cy="186" rx="146" ry="29" fill="#0b0b0b" />
      <path d="M150 144 C 182 128, 228 127, 258 142 C 296 159, 346 158, 377 139"
        stroke="#fff" strokeWidth="5" fill="none" opacity="0.08" strokeLinecap="round" />
    </g>

    <g className="dish-feast" transform="translate(0 -8)">
      <g>
        <path d="M112 205 C 126 158, 181 132, 260 132 C 338 132, 393 158, 408 205 C 380 246, 315 265, 260 265 C 205 265, 140 246, 112 205 Z"
          fill="url(#riceGlow)" stroke="#c9863a" strokeWidth="2.2" />
        <path d="M126 206 C 165 180, 202 218, 242 188 C 286 156, 326 213, 384 181"
          stroke="#fff4c7" strokeWidth="14" fill="none" opacity="0.8" strokeLinecap="round" />
        <path d="M137 226 C 180 200, 220 237, 263 210 C 306 184, 344 230, 392 204"
          stroke="#f4d696" strokeWidth="11" fill="none" opacity="0.75" strokeLinecap="round" />
        <g fill="#fff9df" stroke="#bd9966" strokeWidth="0.7" opacity="0.95">
          <ellipse cx="153" cy="199" rx="4" ry="2" transform="rotate(-22 153 199)" />
          <ellipse cx="181" cy="181" rx="4" ry="2" transform="rotate(18 181 181)" />
          <ellipse cx="213" cy="218" rx="4" ry="2" transform="rotate(-12 213 218)" />
          <ellipse cx="248" cy="174" rx="4" ry="2" transform="rotate(16 248 174)" />
          <ellipse cx="288" cy="217" rx="4" ry="2" transform="rotate(-20 288 217)" />
          <ellipse cx="326" cy="181" rx="4" ry="2" transform="rotate(22 326 181)" />
          <ellipse cx="365" cy="214" rx="4" ry="2" transform="rotate(-18 365 214)" />
        </g>
      </g>

      <g data-dish-ingredient="soy-sauce" opacity="0.96">
        <path d="M126 197 C 165 167, 205 208, 247 177 C 291 145, 339 201, 398 166"
          stroke="url(#soyGlaze)" strokeWidth="9" fill="none" strokeLinecap="round" />
        <path d="M158 236 C 202 212, 244 249, 291 224 C 330 203, 360 230, 390 215"
          stroke="#5a1f10" strokeWidth="7" fill="none" opacity="0.85" strokeLinecap="round" />
      </g>

      <g data-dish-ingredient="chili-oil">
        <ellipse cx="333" cy="202" rx="43" ry="22" fill="#b32016" opacity="0.5" />
        <ellipse cx="333" cy="202" rx="31" ry="14" fill="#d43a1f" opacity="0.72" />
        <circle cx="310" cy="194" r="5" fill="#ffd06a" opacity="0.75" />
        <circle cx="353" cy="208" r="4" fill="#ffb24a" opacity="0.7" />
      </g>

      <g data-dish-ingredient="chili-pepper">
        <path d="M361 177 C 359 164, 367 153, 379 150 C 392 148, 406 157, 410 172 C 401 163, 389 160, 382 166 C 375 172, 376 186, 386 197 C 373 196, 363 189, 361 177 Z"
          fill="#c0392b" stroke="#7a1f15" strokeWidth="2" strokeLinejoin="round" />
        <path d="M378 151 C 379 144, 384 139, 391 136" stroke="#4a5e26" strokeWidth="4" fill="none" strokeLinecap="round" />
        <path d="M373 166 C 376 175, 381 185, 388 192" stroke="#ffdad2" strokeWidth="2" fill="none" opacity="0.4" strokeLinecap="round" />
      </g>

      <g data-dish-ingredient="crispy-pork-belly" transform="translate(158 162) rotate(-12)">
        <rect x="0" y="0" width="88" height="38" rx="10" fill="#f2a086" stroke="#913c2f" strokeWidth="2" />
        <path d="M8 10 C 24 2, 42 4, 55 12" stroke="#f6d7aa" strokeWidth="7" fill="none" strokeLinecap="round" />
        <path d="M7 22 C 25 14, 44 16, 70 23" stroke="#a8493a" strokeWidth="7" fill="none" strokeLinecap="round" />
        <rect x="8" y="29" width="72" height="9" rx="5" fill="#e7c58b" />
      </g>
      <g data-dish-ingredient="crispy-pork-belly" transform="translate(209 218) rotate(8)">
        <rect x="0" y="0" width="84" height="36" rx="10" fill="#ee9a7e" stroke="#913c2f" strokeWidth="2" />
        <path d="M8 9 C 23 2, 40 4, 54 12" stroke="#f6d7aa" strokeWidth="7" fill="none" strokeLinecap="round" />
        <path d="M7 21 C 26 14, 44 16, 68 23" stroke="#a8493a" strokeWidth="7" fill="none" strokeLinecap="round" />
        <rect x="8" y="27" width="68" height="9" rx="5" fill="#e7c58b" />
      </g>

      <g data-dish-ingredient="shiitake" transform="translate(294 150) rotate(13)">
        <path d="M0 22 C 0 4, 17 -6, 34 -6 C 52 -6, 68 4, 68 22 C 68 28, 61 31, 47 31 L 21 31 C 7 31, 0 28, 0 22 Z"
          fill="#7b4b2e" stroke="#3f2114" strokeWidth="2" />
        <path d="M24 31 L 20 58 C 20 64, 27 66, 34 66 C 42 66, 49 64, 48 58 L 44 31 Z"
          fill="#f2dfbd" stroke="#8a6441" strokeWidth="1.6" />
        <ellipse cx="24" cy="10" rx="6" ry="3" fill="#b98561" opacity="0.6" />
        <ellipse cx="46" cy="6" rx="7" ry="4" fill="#b98561" opacity="0.45" />
      </g>
      <g data-dish-ingredient="shiitake" transform="translate(125 222) rotate(-18) scale(.72)">
        <path d="M0 22 C 0 4, 17 -6, 34 -6 C 52 -6, 68 4, 68 22 C 68 28, 61 31, 47 31 L 21 31 C 7 31, 0 28, 0 22 Z"
          fill="#7b4b2e" stroke="#3f2114" strokeWidth="2" />
        <path d="M24 31 L 20 58 C 20 64, 27 66, 34 66 C 42 66, 49 64, 48 58 L 44 31 Z"
          fill="#f2dfbd" stroke="#8a6441" strokeWidth="1.6" />
      </g>

      <g data-dish-ingredient="egg-yolk-mooncake" transform="translate(112 154) rotate(14)">
        <rect x="0" y="0" width="58" height="46" rx="13" fill="#d39a52" stroke="#8a5a28" strokeWidth="2" />
        <rect x="7" y="7" width="44" height="32" rx="9" fill="none" stroke="#f0c07c" strokeWidth="1.5" opacity="0.75" />
        <circle cx="29" cy="23" r="12" fill="#f0a52a" stroke="#bf6812" strokeWidth="1.8" />
        <ellipse cx="25" cy="19" rx="3" ry="4" fill="#fff6c8" opacity="0.35" />
      </g>

      <g data-dish-ingredient="bubble-waffle" transform="translate(356 232) rotate(16) scale(.72)">
        <path d="M50 0 L 92 24 L 92 72 L 50 96 L 8 72 L 8 24 Z" fill="#f2c879" stroke="#b98734" strokeWidth="2.4" />
        <g fill="#e5a94a" stroke="#c79234" strokeWidth="1">
          <circle cx="38" cy="34" r="10" /><circle cx="62" cy="34" r="10" />
          <circle cx="26" cy="54" r="10" /><circle cx="50" cy="54" r="10" /><circle cx="74" cy="54" r="10" />
          <circle cx="38" cy="74" r="10" /><circle cx="62" cy="74" r="10" />
        </g>
      </g>

      <g data-dish-ingredient="mandarin-orange" transform="translate(365 132) rotate(-16)">
        <path d="M0 24 C 10 6, 32 0, 53 9 C 42 34, 17 43, 0 24 Z" fill="#f59a2e" stroke="#bd6316" strokeWidth="2" />
        <path d="M12 23 C 25 18, 38 17, 49 19" stroke="#ffd48d" strokeWidth="3" fill="none" strokeLinecap="round" />
        <path d="M31 8 L 34 -5" stroke="#5e7a2e" strokeWidth="3" strokeLinecap="round" />
        <path d="M35 -4 C 44 -11, 55 -8, 60 -2 C 52 6, 41 5, 35 -4 Z" fill="#6b8a3a" stroke="#4a5e26" strokeWidth="1.3" />
      </g>

      <g data-dish-ingredient="garlic" transform="translate(103 209) rotate(-24)">
        <path d="M31 0 C 13 5, 1 20, 4 42 C 7 62, 22 70, 31 70 C 40 70, 55 62, 58 42 C 61 20, 49 5, 31 0 Z"
          fill="#f5ecdc" stroke="#7a5a3a" strokeWidth="2" />
        <path d="M31 4 C 29 22, 28 52, 31 68 M20 12 C 18 32, 18 54, 23 68 M43 12 C 45 32, 44 54, 39 68"
          stroke="#c9b58a" strokeWidth="1.3" fill="none" opacity="0.65" />
        <path d="M31 0 C 29 -7, 25 -11, 22 -15 M31 0 C 34 -7, 38 -11, 42 -15" stroke="#6b8a3a" strokeWidth="2.4" fill="none" strokeLinecap="round" />
      </g>

      <g data-dish-ingredient="scallion" strokeLinecap="round">
        <path d="M179 144 C 176 122, 178 99, 166 78" stroke="#5e7a2e" strokeWidth="7" fill="none" />
        <path d="M198 151 C 205 126, 213 105, 211 78" stroke="#6b8a3a" strokeWidth="7" fill="none" />
        <path d="M318 238 C 346 221, 364 206, 389 187" stroke="#5e7a2e" strokeWidth="7" fill="none" />
        <path d="M301 244 C 330 236, 354 233, 386 224" stroke="#6b8a3a" strokeWidth="6" fill="none" />
        <g fill="#f5ecdc" stroke="#7a5a3a" strokeWidth="1.2">
          <rect x="174" y="143" width="16" height="35" rx="4" transform="rotate(-12 182 160)" />
          <rect x="304" y="233" width="16" height="34" rx="4" transform="rotate(64 312 250)" />
        </g>
      </g>
    </g>

    <g className="dish-steam" stroke="#fdf6e3" strokeWidth="9" fill="none" strokeLinecap="round" opacity="0.42">
      <path d="M183 132 C 166 95, 206 78, 190 42" />
      <path d="M260 120 C 284 81, 235 72, 265 33" />
      <path d="M334 134 C 318 97, 358 75, 342 44" />
    </g>
  </svg>
);

const Wok = ({ size = 480, flames = true }) => (
  <svg viewBox="0 0 600 400" width={size} height={size * 400 / 600}>
    {/* Flames */}
    {flames && (
      <g className="flames">
        <path className="flame flame-1" d="M180 300 C 170 260, 200 240, 200 220 C 210 250, 220 270, 210 300 Z" fill="#f5b942" />
        <path className="flame flame-2" d="M240 310 C 230 260, 270 230, 260 210 C 290 240, 290 280, 280 310 Z" fill="#e87a30" />
        <path className="flame flame-3" d="M300 310 C 290 250, 330 220, 320 200 C 360 240, 360 280, 340 310 Z" fill="#f5b942" />
        <path className="flame flame-4" d="M360 310 C 350 260, 390 240, 380 220 C 410 250, 410 280, 400 310 Z" fill="#e87a30" />
        <path className="flame flame-5" d="M420 300 C 410 270, 440 250, 440 230 C 450 260, 450 280, 440 300 Z" fill="#f5b942" />
      </g>
    )}
    {/* Wok body */}
    <ellipse cx="300" cy="320" rx="220" ry="20" fill="#000" opacity="0.3" />
    <path d="M80 220 C 80 320, 200 360, 300 360 C 400 360, 520 320, 520 220 L 510 200 L 90 200 Z"
      fill="#1a0e08" stroke="#000" strokeWidth="2" />
    <ellipse cx="300" cy="210" rx="220" ry="36" fill="#2a1b15" stroke="#000" strokeWidth="2" />
    <ellipse cx="300" cy="200" rx="210" ry="28" fill="#1a0e08" />
    <ellipse cx="280" cy="195" rx="120" ry="14" fill="#3a2a1a" opacity="0.6" />
    {/* Handle */}
    <rect x="500" y="195" width="80" height="14" rx="6" fill="#7a5a3a" stroke="#4a2a1a" strokeWidth="1.5" transform="rotate(-5 540 202)" />
    <rect x="565" y="190" width="14" height="24" rx="3" fill="#4a2a1a" transform="rotate(-5 572 202)" />
  </svg>
);

const Steam = () => (
  <svg viewBox="0 0 200 200" width="200" height="200" style={{ position: 'absolute', pointerEvents: 'none' }}>
    <g className="steam-group">
      <path className="steam steam-1" d="M60 180 C 50 150, 80 130, 70 100 C 60 70, 90 50, 80 20" stroke="#fff" strokeWidth="14" fill="none" strokeLinecap="round" opacity="0.5" />
      <path className="steam steam-2" d="M100 180 C 110 140, 80 120, 100 80 C 120 50, 90 30, 110 10" stroke="#fff" strokeWidth="14" fill="none" strokeLinecap="round" opacity="0.4" />
      <path className="steam steam-3" d="M140 180 C 130 150, 160 130, 150 100 C 140 70, 170 50, 160 20" stroke="#fff" strokeWidth="14" fill="none" strokeLinecap="round" opacity="0.4" />
    </g>
  </svg>
);

const INGREDIENTS = [
  { id: 'garlic', name: 'Garlic', friend: 'Jobi', Icon: Garlic, tossDx: -280, tossDy: -300, tossR: -380, hue: '#f5ecdc' },
  { id: 'mandarin-orange', name: 'Mandarin orange', friend: 'Johnny', Icon: MandarinOrange, tossDx: -120, tossDy: -400, tossR: 320, hue: '#f7c98a' },
  { id: 'scallion', name: 'Scallion', friend: 'Max', Icon: Scallion, tossDx: 120, tossDy: -400, tossR: -260, hue: '#dfe9c4' },
  { id: 'bubble-waffle', name: 'Bubble waffle', friend: 'Josh', Icon: BubbleWaffle, tossDx: 280, tossDy: -300, tossR: 460, hue: '#f3d79a' },
  { id: 'crispy-pork-belly', name: 'Crispy pork belly', friend: 'Brice', Icon: CrispyPorkBelly, tossDx: 0, tossDy: -440, tossR: 360, hue: '#f3b28a' },
  { id: 'egg-yolk-mooncake', name: 'Egg yolk mooncake', friend: 'Amber', Icon: EggYolkMoonCake, tossDx: -240, tossDy: -320, tossR: 160, hue: '#e8c79a' },
  { id: 'shiitake', name: 'Shiitake mushroom', friend: 'Jason', Icon: Mushroom, tossDx: 240, tossDy: -320, tossR: -150, hue: '#d8c8a4' },
  { id: 'soy-sauce', name: 'Soy sauce', friend: 'Michael', Icon: SoySauce, tossDx: -120, tossDy: -500, tossR: 220, hue: '#f5e1d2' },
  { id: 'chili-pepper', name: 'Chili pepper', friend: 'Valerie', Icon: ChiliPepper, tossDx: 120, tossDy: -500, tossR: -220, hue: '#fbd9d2' },
  { id: 'chili-oil', name: 'Lao Gan Ma', friend: 'Gaby', Icon: LaoGanMa, tossDx: -40, tossDy: -460, tossR: 300, hue: '#f3b8a6' },
];

Object.assign(window, { Garlic, ChiliPepper, Scallion, Mushroom, SoySauce, CrispyPorkBelly, Rice, LaoGanMa, MandarinOrange, BubbleWaffle, EggYolkMoonCake, Dish, Wok, Steam, INGREDIENTS });
