{
  "streamed": true,
  "usage": {
    "prompt_tokens": 106,
    "completion_tokens": 22276,
    "total_tokens": 22382,
    "cost": 0.02858112,
    "is_byok": false,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0,
      "audio_tokens": 0,
      "video_tokens": 0
    },
    "cost_details": {
      "upstream_inference_cost": 0.02858112,
      "upstream_inference_prompt_cost": 0.00006784,
      "upstream_inference_completions_cost": 0.02851328
    },
    "completion_tokens_details": {
      "reasoning_tokens": 12605,
      "image_tokens": 0,
      "audio_tokens": 0
    }
  },
  "finishReason": "stop",
  "content": "```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Big Mac - 3D Visualization</title>\n    <style>\n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n        }\n        body {\n            width: 100vw;\n            height: 100vh;\n            overflow: hidden;\n            background: #3a3228;\n            font-family: sans-serif;\n        }\n        canvas {\n            display: block;\n        }\n        #loading {\n            position: fixed;\n            top: 50%;\n            left: 50%;\n            transform: translate(-50%, -50%);\n            color: #c9b99a;\n            font-size: 1.2em;\n            pointer-events: none;\n            z-index: 10;\n            transition: opacity 0.5s;\n        }\n    </style>\n</head>\n<body>\n    <div id=\"loading\">Loading Big Mac...</div>\n    <script type=\"importmap\">\n        {\n            \"imports\": {\n                \"three\": \"https://unpkg.com/three@0.160.0/build/three.module.js\",\n                \"three/addons/\": \"https://unpkg.com/three@0.160.0/examples/jsm/\"\n            }\n        }\n    </script>\n    <script type=\"module\">\n        import * as THREE from 'three';\n        import { OrbitControls } from 'three/addons/controls/OrbitControls.js';\n\n        document.getElementById('loading').style.opacity = '0';\n        setTimeout(() => {\n            const ld = document.getElementById('loading');\n            if (ld) ld.remove();\n        }, 600);\n\n        // ─────────────────────────────────────\n        // SCENE, CAMERA, RENDERER\n        // ─────────────────────────────────────\n        const scene = new THREE.Scene();\n        scene.background = new THREE.Color('#3a3228');\n        scene.fog = new THREE.Fog('#3a3228', 3.5, 12);\n\n        const camera = new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 0.15, 25);\n        camera.position.set(2.8, 2.0, 3.6);\n        camera.lookAt(0, 0.7, 0);\n\n        const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: false });\n        renderer.setSize(window.innerWidth, window.innerHeight);\n        renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));\n        renderer.shadowMap.enabled = true;\n        renderer.shadowMap.type = THREE.PCFSoftShadowMap;\n        renderer.toneMapping = THREE.ACESFilmicToneMapping;\n        renderer.toneMappingExposure = 1.1;\n        renderer.outputColorSpace = THREE.SRGBColorSpace;\n        document.body.appendChild(renderer.domElement);\n\n        // ─────────────────────────────────────\n        // ORBIT CONTROLS\n        // ─────────────────────────────────────\n        const controls = new OrbitControls(camera, renderer.domElement);\n        controls.target.set(0, 0.72, 0);\n        controls.enableDamping = true;\n        controls.dampingFactor = 0.08;\n        controls.minDistance = 1.8;\n        controls.maxDistance = 7;\n        controls.maxPolarAngle = Math.PI * 0.75;\n        controls.minPolarAngle = 0.2;\n        controls.autoRotate = false;\n        controls.update();\n\n        // ─────────────────────────────────────\n        // LIGHTING\n        // ─────────────────────────────────────\n        const ambientLight = new THREE.AmbientLight('#f5ede0', 1.8);\n        scene.add(ambientLight);\n\n        const hemisphereLight = new THREE.HemisphereLight('#fff8e7', '#5c4a35', 0.9);\n        scene.add(hemisphereLight);\n\n        const keyLight = new THREE.DirectionalLight('#ffffff', 6.5);\n        keyLight.position.set(5, 4.5, 3);\n        keyLight.castShadow = true;\n        keyLight.shadow.mapSize.width = 2048;\n        keyLight.shadow.mapSize.height = 2048;\n        keyLight.shadow.camera.near = 0.2;\n        keyLight.shadow.camera.far = 20;\n        keyLight.shadow.camera.left = -5;\n        keyLight.shadow.camera.right = 5;\n        keyLight.shadow.camera.top = 5;\n        keyLight.shadow.camera.bottom = -5;\n        keyLight.shadow.bias = -0.00015;\n        keyLight.shadow.normalBias = 0.02;\n        keyLight.shadow.radius = 1.5;\n        scene.add(keyLight);\n\n        const fillLight = new THREE.DirectionalLight('#d4e4ff', 2.8);\n        fillLight.position.set(-3, 2.5, -1.5);\n        fillLight.castShadow = true;\n        fillLight.shadow.mapSize.width = 1024;\n        fillLight.shadow.mapSize.height = 1024;\n        fillLight.shadow.camera.near = 0.2;\n        fillLight.shadow.camera.far = 18;\n        fillLight.shadow.camera.left = -4;\n        fillLight.shadow.camera.right = 4;\n        fillLight.shadow.camera.top = 4;\n        fillLight.shadow.camera.bottom = -4;\n        fillLight.shadow.bias = -0.0002;\n        fillLight.shadow.radius = 2;\n        fillLight.intensity = 2.8;\n        scene.add(fillLight);\n\n        const rimLight = new THREE.DirectionalLight('#ffe8d0', 4.5);\n        rimLight.position.set(0, 1.8, -4.5);\n        rimLight.castShadow = true;\n        rimLight.shadow.mapSize.width = 1024;\n        rimLight.shadow.mapSize.height = 1024;\n        rimLight.shadow.camera.near = 0.2;\n        rimLight.shadow.camera.far = 20;\n        rimLight.shadow.camera.left = -4;\n        rimLight.shadow.camera.right = 4;\n        rimLight.shadow.camera.top = 4;\n        rimLight.shadow.camera.bottom = -4;\n        rimLight.shadow.bias = -0.0002;\n        rimLight.shadow.radius = 2.5;\n        scene.add(rimLight);\n\n        const topLight = new THREE.DirectionalLight('#ffffff', 1.5);\n        topLight.position.set(0, 5.5, 0.3);\n        scene.add(topLight);\n\n        // ─────────────────────────────────────\n        // TEXTURE GENERATORS\n        // ─────────────────────────────────────\n        function createPattyBumpTexture(size = 512) {\n            const canvas = document.createElement('canvas');\n            canvas.width = size;\n            canvas.height = size;\n            const ctx = canvas.getContext('2d');\n            ctx.fillStyle = '#808080';\n            ctx.fillRect(0, 0, size, size);\n            for (let i = 0; i < 3500; i++) {\n                const x = Math.random() * size;\n                const y = Math.random() * size;\n                const r = Math.random() * 4 + 0.8;\n                const shade = 128 + (Math.random() - 0.5) * 90;\n                ctx.fillStyle = `rgb(${shade},${shade},${shade})`;\n                ctx.beginPath();\n                ctx.arc(x, y, r, 0, Math.PI * 2);\n                ctx.fill();\n            }\n            for (let i = 0; i < 600; i++) {\n                const x = Math.random() * size;\n                const y = Math.random() * size;\n                const r = Math.random() * 6 + 1.5;\n                const shade = 128 + (Math.random() - 0.5) * 110;\n                ctx.fillStyle = `rgba(${shade},${shade},${shade},0.7)`;\n                ctx.beginPath();\n                ctx.arc(x, y, r, 0, Math.PI * 2);\n                ctx.fill();\n            }\n            return new THREE.CanvasTexture(canvas);\n        }\n\n        function createBunBumpTexture(size = 256) {\n            const canvas = document.createElement('canvas');\n            canvas.width = size;\n            canvas.height = size;\n            const ctx = canvas.getContext('2d');\n            ctx.fillStyle = '#808080';\n            ctx.fillRect(0, 0, size, size);\n            for (let i = 0; i < 5000; i++) {\n                const x = Math.random() * size;\n                const y = Math.random() * size;\n                const r = Math.random() * 2.5 + 0.3;\n                const shade = 128 + (Math.random() - 0.5) * 40;\n                ctx.fillStyle = `rgb(${shade},${shade},${shade})`;\n                ctx.beginPath();\n                ctx.arc(x, y, r, 0, Math.PI * 2);\n                ctx.fill();\n            }\n            const tex = new THREE.CanvasTexture(canvas);\n            tex.wrapS = THREE.RepeatWrapping;\n            tex.wrapT = THREE.RepeatWrapping;\n            return tex;\n        }\n\n        function createBunTopColorTexture(size = 512) {\n            const canvas = document.createElement('canvas');\n            canvas.width = size;\n            canvas.height = size;\n            const ctx = canvas.getContext('2d');\n            const gradient = ctx.createRadialGradient(size / 2, size / 2, size * 0.05, size / 2, size / 2, size * 0.55);\n            gradient.addColorStop(0, '#e8c98b');\n            gradient.addColorStop(0.55, '#d4a85c');\n            gradient.addColorStop(0.85, '#c4913d');\n            gradient.addColorStop(1, '#b0782a');\n            ctx.fillStyle = gradient;\n            ctx.fillRect(0, 0, size, size);\n            for (let i = 0; i < 2000; i++) {\n                const x = Math.random() * size;\n                const y = Math.random() * size;\n                const r = Math.random() * 3 + 0.5;\n                const alpha = Math.random() * 0.15;\n                ctx.fillStyle = `rgba(180,120,50,${alpha})`;\n                ctx.beginPath();\n                ctx.arc(x, y, r, 0, Math.PI * 2);\n                ctx.fill();\n            }\n            return new THREE.CanvasTexture(canvas);\n        }\n\n        const pattyBumpTex = createPattyBumpTexture();\n        pattyBumpTex.wrapS = THREE.RepeatWrapping;\n        pattyBumpTex.wrapT = THREE.RepeatWrapping;\n        const bunBumpTex = createBunBumpTexture();\n        const bunTopColorTex = createBunTopColorTexture();\n\n        // ─────────────────────────────────────\n        // MATERIALS\n        // ─────────────────────────────────────\n        const bunSideMaterial = new THREE.MeshStandardMaterial({\n            color: '#c8944a',\n            roughness: 0.62,\n            metalness: 0.02,\n            bumpMap: bunBumpTex,\n            bumpScale: 0.015,\n            name: 'bunSide',\n        });\n\n        const bunTopMaterial = new THREE.MeshStandardMaterial({\n            color: '#d4a855',\n            roughness: 0.48,\n            metalness: 0.03,\n            bumpMap: bunBumpTex,\n            bumpScale: 0.012,\n            map: bunTopColorTex,\n            name: 'bunTop',\n        });\n\n        const bunBottomMaterial = new THREE.MeshStandardMaterial({\n            color: '#b8833c',\n            roughness: 0.68,\n            metalness: 0.02,\n            bumpMap: bunBumpTex,\n            bumpScale: 0.018,\n            name: 'bunBottom',\n        });\n\n        const bunClubMaterial = new THREE.MeshStandardMaterial({\n            color: '#c49145',\n            roughness: 0.6,\n            metalness: 0.02,\n            bumpMap: bunBumpTex,\n            bumpScale: 0.014,\n            name: 'bunClub',\n        });\n\n        const pattyMaterial = new THREE.MeshStandardMaterial({\n            color: '#3d2217',\n            roughness: 0.82,\n            metalness: 0.04,\n            bumpMap: pattyBumpTex,\n            bumpScale: 0.06,\n            name: 'patty',\n        });\n\n        const cheeseMaterial = new THREE.MeshStandardMaterial({\n            color: '#f5b842',\n            roughness: 0.28,\n            metalness: 0.05,\n            name: 'cheese',\n        });\n\n        const cheeseEdgeMaterial = new THREE.MeshStandardMaterial({\n            color: '#e8a330',\n            roughness: 0.32,\n            metalness: 0.04,\n            name: 'cheeseEdge',\n        });\n\n        const lettuceMaterial = new THREE.MeshStandardMaterial({\n            color: '#5a8a2a',\n            roughness: 0.55,\n            metalness: 0.01,\n            name: 'lettuce',\n        });\n\n        const lettuceHighlightMaterial = new THREE.MeshStandardMaterial({\n            color: '#6d9e35',\n            roughness: 0.5,\n            metalness: 0.01,\n            name: 'lettuceHighlight',\n        });\n\n        const sauceMaterial = new THREE.MeshStandardMaterial({\n            color: '#f08c6a',\n            roughness: 0.22,\n            metalness: 0.03,\n            name: 'sauce',\n        });\n\n        const pickleMaterial = new THREE.MeshStandardMaterial({\n            color: '#7a8c3a',\n            roughness: 0.35,\n            metalness: 0.02,\n            name: 'pickle',\n        });\n\n        const onionMaterial = new THREE.MeshStandardMaterial({\n            color: '#faf5ed',\n            roughness: 0.5,\n            metalness: 0.01,\n            name: 'onion',\n        });\n\n        const sesameMaterial = new THREE.MeshStandardMaterial({\n            color: '#f5e6c8',\n            roughness: 0.45,\n            metalness: 0.02,\n            name: 'sesame',\n        });\n\n        const plateMaterial = new THREE.MeshStandardMaterial({\n            color: '#3c3732',\n            roughness: 0.3,\n            metalness: 0.15,\n            name: 'plate',\n        });\n\n        const plateRimMaterial = new THREE.MeshStandardMaterial({\n            color: '#4a4540',\n            roughness: 0.25,\n            metalness: 0.2,\n            name: 'plateRim',\n        });\n\n        // ─────────────────────────────────────\n        // HELPER: displace cylinder edge vertices\n        // ─────────────────────────────────────\n        function addEdgeWaviness(geometry, radius, amplitude = 0.03, frequency = 5, verticalDisplace = 0.0) {\n            const pos = geometry.attributes.position;\n            const tempVec = new THREE.Vector3();\n            for (let i = 0; i < pos.count; i++) {\n                tempVec.set(pos.getX(i), pos.getY(i), pos.getZ(i));\n                const dist = Math.sqrt(tempVec.x * tempVec.x + tempVec.z * tempVec.z);\n                if (dist > radius * 0.85 && tempVec.y > 0) {\n                    const angle = Math.atan2(tempVec.z, tempVec.x);\n                    const wave = Math.sin(angle * frequency) * amplitude + Math.cos(angle * frequency * 1.7) * amplitude * 0.7;\n                    const newDist = dist + wave;\n                    const scale = newDist / dist;\n                    pos.setX(i, tempVec.x * scale);\n                    pos.setZ(i, tempVec.z * scale);\n                    if (verticalDisplace !== 0) {\n                        pos.setY(i, tempVec.y + Math.abs(wave) * verticalDisplace);\n                    }\n                }\n            }\n            geometry.computeVertexNormals();\n            geometry.attributes.position.needsUpdate = true;\n        }\n\n        function addPattyIrregularity(geometry, radius, intensity = 0.04) {\n            const pos = geometry.attributes.position;\n            const tempVec = new THREE.Vector3();\n            for (let i = 0; i < pos.count; i++) {\n                tempVec.set(pos.getX(i), pos.getY(i), pos.getZ(i));\n                const dist = Math.sqrt(tempVec.x * tempVec.x + tempVec.z * tempVec.z);\n                if (dist > radius * 0.7) {\n                    const angle = Math.atan2(tempVec.z, tempVec.x);\n                    const noise =\n                        Math.sin(angle * 3.7) * intensity * 1.2 +\n                        Math.cos(angle * 7.1) * intensity * 0.8 +\n                        Math.sin(angle * 11.3) * intensity * 0.5 +\n                        Math.cos(angle * 17.9) * intensity * 0.3;\n                    const newDist = dist + noise;\n                    const scale = Math.max(0.85, Math.min(1.12, newDist / dist));\n                    pos.setX(i, tempVec.x * scale);\n                    pos.setZ(i, tempVec.z * scale);\n                    pos.setY(i, tempVec.y + (Math.random() - 0.5) * intensity * 0.6);\n                }\n            }\n            geometry.computeVertexNormals();\n            geometry.attributes.position.needsUpdate = true;\n        }\n\n        // ─────────────────────────────────────\n        // MAIN BURGER GROUP (auto-rotates)\n        // ─────────────────────────────────────\n        const burgerGroup = new THREE.Group();\n        scene.add(burgerGroup);\n\n        // ─────────────────────────────────────\n        // PLATE\n        // ─────────────────────────────────────\n        const plateGroup = new THREE.Group();\n        plateGroup.position.y = -0.06;\n        burgerGroup.add(plateGroup);\n\n        const plateMainGeo = new THREE.CylinderGeometry(1.7, 1.7, 0.06, 80);\n        const plateMain = new THREE.Mesh(plateMainGeo, plateMaterial);\n        plateMain.position.y = 0;\n        plateMain.castShadow = true;\n        plateMain.receiveShadow = true;\n        plateGroup.add(plateMain);\n\n        const plateRimGeo = new THREE.TorusGeometry(1.68, 0.04, 16, 80);\n        const plateRim = new THREE.Mesh(plateRimGeo, plateRimMaterial);\n        plateRim.position.y = 0.03;\n        plateRim.rotation.x = Math.PI / 2;\n        plateRim.castShadow = true;\n        plateRim.receiveShadow = true;\n        plateGroup.add(plateRim);\n\n        const plateBaseGeo = new THREE.CylinderGeometry(1.2, 1.35, 0.08, 64);\n        const plateBase = new THREE.Mesh(plateBaseGeo, plateMaterial);\n        plateBase.position.y = -0.07;\n        plateBase.castShadow = true;\n        plateBase.receiveShadow = true;\n        plateGroup.add(plateBase);\n\n        const plateFootGeo = new THREE.CylinderGeometry(0.85, 0.95, 0.05, 48);\n        const plateFoot = new THREE.Mesh(plateFootGeo, plateRimMaterial);\n        plateFoot.position.y = -0.12;\n        plateFoot.castShadow = true;\n        plateFoot.receiveShadow = true;\n        plateGroup.add(plateFoot);\n\n        // Contact shadow disc\n        const shadowGeo = new THREE.CylinderGeometry(1.05, 1.0, 0.003, 48);\n        const shadowMat = new THREE.MeshBasicMaterial({ color: '#1a1510', transparent: true, opacity: 0.55,\n            depthWrite: false });\n        const shadowDisc = new THREE.Mesh(shadowGeo, shadowMat);\n        shadowDisc.position.y = 0.031;\n        shadowDisc.renderOrder = 1;\n        shadowDisc.material.depthTest = true;\n        plateGroup.add(shadowDisc);\n\n        // ─────────────────────────────────────\n        // BOTTOM BUN (HEEL)\n        // ─────────────────────────────────────\n        const bottomBunGroup = new THREE.Group();\n        bottomBunGroup.position.y = 0.05;\n        burgerGroup.add(bottomBunGroup);\n\n        const bottomBunGeoSide = new THREE.CylinderGeometry(0.95, 1.06, 0.3, 72, 1, true);\n        const bottomBunSide = new THREE.Mesh(bottomBunGeoSide, bunBottomMaterial);\n        bottomBunSide.position.y = 0.15;\n        bottomBunSide.castShadow = true;\n        bottomBunSide.receiveShadow = true;\n        bottomBunGroup.add(bottomBunSide);\n\n        const bottomBunGeoTop = new THREE.CylinderGeometry(0.95, 0.95, 0.02, 72);\n        const bottomBunTop = new THREE.Mesh(bottomBunGeoTop, bunSideMaterial);\n        bottomBunTop.position.y = 0.3;\n        bottomBunTop.castShadow = true;\n        bottomBunTop.receiveShadow = true;\n        bottomBunGroup.add(bottomBunTop);\n\n        const bottomBunGeoBottom = new THREE.CylinderGeometry(1.06, 1.06, 0.02, 72);\n        const bottomBunBottom = new THREE.Mesh(bottomBunGeoBottom, bunBottomMaterial);\n        bottomBunBottom.position.y = 0.0;\n        bottomBunBottom.castShadow = true;\n        bottomBunBottom.receiveShadow = true;\n        bottomBunGroup.add(bottomBunBottom);\n\n        // Slight dome on bottom bun top\n        const bottomBunDomeGeo = new THREE.SphereGeometry(1.0, 64, 32, 0, Math.PI * 2, 0, Math.PI / 4.5);\n        const bottomBunDome = new THREE.Mesh(bottomBunDomeGeo, bunSideMaterial);\n        bottomBunDome.position.y = 0.3;\n        bottomBunDome.scale.set(0.95, 0.12, 0.95);\n        bottomBunDome.castShadow = true;\n        bottomBunDome.receiveShadow = true;\n        bottomBunGroup.add(bottomBunDome);\n\n        // ─────────────────────────────────────\n        // CHEESE SLICE 1\n        // ─────────────────────────────────────\n        const cheese1Group = new THREE.Group();\n        cheese1Group.position.y = 0.32;\n        burgerGroup.add(cheese1Group);\n\n        const cheese1Geo = new THREE.CylinderGeometry(1.02, 1.02, 0.05, 72);\n        addEdgeWaviness(cheese1Geo, 1.02, 0.04, 6.5, -0.3);\n        const cheese1 = new THREE.Mesh(cheese1Geo, cheeseMaterial);\n        cheese1.position.y = 0.025;\n        cheese1.castShadow = true;\n        cheese1.receiveShadow = true;\n        cheese1Group.add(cheese1);\n\n        // Slight edge highlight ring\n        const cheese1EdgeGeo = new THREE.TorusGeometry(1.01, 0.018, 12, 72);\n        const cheese1Edge = new THREE.Mesh(cheese1EdgeGeo, cheeseEdgeMaterial);\n        cheese1Edge.position.y = 0.025;\n        cheese1Edge.rotation.x = Math.PI / 2;\n        cheese1Edge.castShadow = true;\n        cheese1Group.add(cheese1Edge);\n\n        // ─────────────────────────────────────\n        // PATTY 1\n        // ─────────────────────────────────────\n        const patty1Group = new THREE.Group();\n        patty1Group.position.y = 0.39;\n        burgerGroup.add(patty1Group);\n\n        const patty1Geo = new THREE.CylinderGeometry(0.96, 0.98, 0.21, 72, 3);\n        addPattyIrregularity(patty1Geo, 0.97, 0.045);\n        const patty1 = new THREE.Mesh(patty1Geo, pattyMaterial);\n        patty1.position.y = 0.105;\n        patty1.castShadow = true;\n        patty1.receiveShadow = true;\n        patty1Group.add(patty1);\n\n        // ─────────────────────────────────────\n        // MIDDLE BUN (CLUB)\n        // ─────────────────────────────────────\n        const middleBunGroup = new THREE.Group();\n        middleBunGroup.position.y = 0.54;\n        burgerGroup.add(middleBunGroup);\n\n        const middleBunGeoSide = new THREE.CylinderGeometry(0.92, 0.96, 0.16, 64, 1, true);\n        const middleBunSide = new THREE.Mesh(middleBunGeoSide, bunClubMaterial);\n        middleBunSide.position.y = 0.08;\n        middleBunSide.castShadow = true;\n        middleBunSide.receiveShadow = true;\n        middleBunGroup.add(middleBunSide);\n\n        const middleBunGeoTop = new THREE.CylinderGeometry(0.92, 0.92, 0.015, 64);\n        const middleBunTop = new THREE.Mesh(middleBunGeoTop, bunSideMaterial);\n        middleBunTop.position.y = 0.16;\n        middleBunTop.castShadow = true;\n        middleBunTop.receiveShadow = true;\n        middleBunGroup.add(middleBunTop);\n\n        const middleBunGeoBottom = new THREE.CylinderGeometry(0.96, 0.96, 0.015, 64);\n        const middleBunBottom = new THREE.Mesh(middleBunGeoBottom, bunClubMaterial);\n        middleBunBottom.position.y = 0.0;\n        middleBunBottom.castShadow = true;\n        middleBunBottom.receiveShadow = true;\n        middleBunGroup.add(middleBunBottom);\n\n        const middleBunDomeGeo = new THREE.SphereGeometry(0.96, 48, 24, 0, Math.PI * 2, 0, Math.PI / 5);\n        const middleBunDome = new THREE.Mesh(middleBunDomeGeo, bunSideMaterial);\n        middleBunDome.position.y = 0.16;\n        middleBunDome.scale.set(0.92, 0.08, 0.92);\n        middleBunDome.castShadow = true;\n        middleBunDome.receiveShadow = true;\n        middleBunGroup.add(middleBunDome);\n\n        // ─────────────────────────────────────\n        // LETTUCE LAYER\n        // ─────────────────────────────────────\n        const lettuceGroup = new THREE.Group();\n        lettuceGroup.position.y = 0.655;\n        burgerGroup.add(lettuceGroup);\n\n        for (let i = 0; i < 10; i++) {\n            const angle = (i / 10) * Math.PI * 2 + (Math.random() - 0.5) * 0.3;\n            const outward = 0.25 + Math.random() * 0.35;\n            const cx = Math.cos(angle) * (0.88 + Math.random() * 0.1);\n            const cz = Math.sin(angle) * (0.88 + Math.random() * 0.1);\n\n            const leafGroup = new THREE.Group();\n            leafGroup.position.set(cx, 0, cz);\n            leafGroup.rotation.y = angle + Math.PI / 2 + (Math.random() - 0.5) * 0.5;\n            leafGroup.rotation.z = (Math.random() - 0.5) * 0.5;\n            leafGroup.rotation.x = -0.2 + Math.random() * 0.4;\n\n            const leafGeo = new THREE.BoxGeometry(0.08, 0.03, 0.35 + Math.random() * 0.3, 4, 2, 2);\n            const leaf = new THREE.Mesh(leafGeo, i % 3 === 0 ? lettuceHighlightMaterial : lettuceMaterial);\n            leaf.position.z = 0.1 + Math.random() * 0.1;\n            leaf.castShadow = true;\n            leaf.receiveShadow = true;\n            leafGroup.add(leaf);\n\n            const leafGeo2 = new THREE.BoxGeometry(0.06, 0.025, 0.25 + Math.random() * 0.25, 3, 2, 2);\n            const leaf2 = new THREE.Mesh(leafGeo2, lettuceMaterial);\n            leaf2.position.z = 0.05;\n            leaf2.position.x = (Math.random() - 0.5) * 0.08;\n            leaf2.rotation.y = (Math.random() - 0.5) * 0.6;\n            leaf2.castShadow = true;\n            leaf2.receiveShadow = true;\n            leafGroup.add(leaf2);\n\n            lettuceGroup.add(leafGroup);\n        }\n\n        // ─────────────────────────────────────\n        // SPECIAL SAUCE BLOBS\n        // ─────────────────────────────────────\n        const sauceGroup = new THREE.Group();\n        sauceGroup.position.y = 0.665;\n        burgerGroup.add(sauceGroup);\n\n        for (let i = 0; i < 7; i++) {\n            const angle = (i / 7) * Math.PI * 2 + Math.random() * 0.4;\n            const dist = 0.82 + Math.random() * 0.2;\n            const sx = Math.cos(angle) * dist;\n            const sz = Math.sin(angle) * dist;\n            const blobGeo = new THREE.SphereGeometry(0.06 + Math.random() * 0.08, 16, 12);\n            const blob = new THREE.Mesh(blobGeo, sauceMaterial);\n            blob.position.set(sx, 0.01, sz);\n            blob.scale.set(1, 0.35 + Math.random() * 0.25, 1);\n            blob.castShadow = true;\n            blob.receiveShadow = true;\n            sauceGroup.add(blob);\n\n            if (Math.random() > 0.5) {\n                const blob2Geo = new THREE.SphereGeometry(0.04 + Math.random() * 0.05, 12, 8);\n                const blob2 = new THREE.Mesh(blob2Geo, sauceMaterial);\n                blob2.position.set(sx + (Math.random() - 0.5) * 0.12, 0.005, sz + (Math.random() - 0.5) * 0.12);\n                blob2.scale.set(1, 0.3 + Math.random() * 0.3, 1);\n                blob2.castShadow = true;\n                blob2.receiveShadow = true;\n                sauceGroup.add(blob2);\n            }\n        }\n\n        // ─────────────────────────────────────\n        // PICKLES\n        // ─────────────────────────────────────\n        const picklesGroup = new THREE.Group();\n        picklesGroup.position.y = 0.67;\n        burgerGroup.add(picklesGroup);\n\n        const picklePositions = [\n            { angle: 0.3, dist: 0.6 },\n            { angle: 2.2, dist: 0.55 },\n            { angle: 4.0, dist: 0.62 },\n            { angle: 5.3, dist: 0.5 },\n        ];\n\n        picklePositions.forEach((pp) => {\n            const px = Math.cos(pp.angle) * pp.dist;\n            const pz = Math.sin(pp.angle) * pp.dist;\n            const pickleGeo = new THREE.CylinderGeometry(0.15, 0.15, 0.025, 32);\n            const pickle = new THREE.Mesh(pickleGeo, pickleMaterial);\n            pickle.position.set(px, 0.005, pz);\n            pickle.rotation.x = (Math.random() - 0.5) * 0.3;\n            pickle.rotation.z = (Math.random() - 0.5) * 0.3;\n            pickle.castShadow = true;\n            pickle.receiveShadow = true;\n            picklesGroup.add(pickle);\n\n            // Subtle pickle center dot\n            const dotGeo = new THREE.CylinderGeometry(0.06, 0.06, 0.026, 24);\n            const dot = new THREE.Mesh(dotGeo, new THREE.MeshStandardMaterial({\n                color: '#9aac50',\n                roughness: 0.4,\n                metalness: 0.01,\n            }));\n            dot.position.set(px, 0.006, pz);\n            dot.castShadow = true;\n            picklesGroup.add(dot);\n        });\n\n        // ─────────────────────────────────────\n        // ONIONS (scattered)\n        // ─────────────────────────────────────\n        const onionsGroup = new THREE.Group();\n        onionsGroup.position.y = 0.67;\n        burgerGroup.add(onionsGroup);\n\n        for (let i = 0; i < 40; i++) {\n            const angle = Math.random() * Math.PI * 2;\n            const dist = Math.random() * 0.85;\n            const ox = Math.cos(angle) * dist;\n            const oz = Math.sin(angle) * dist;\n            const onionGeo = new THREE.SphereGeometry(0.018 + Math.random() * 0.025, 6, 4);\n            const onion = new THREE.Mesh(onionGeo, onionMaterial);\n            onion.position.set(ox, Math.random() * 0.04, oz);\n            onion.scale.set(1, 0.5 + Math.random() * 0.5, 1);\n            onion.castShadow = true;\n            onion.receiveShadow = true;\n            onionsGroup.add(onion);\n        }\n\n        // ─────────────────────────────────────\n        // PATTY 2\n        // ─────────────────────────────────────\n        const patty2Group = new THREE.Group();\n        patty2Group.position.y = 0.72;\n        burgerGroup.add(patty2Group);\n\n        const patty2Geo = new THREE.CylinderGeometry(0.96, 0.98, 0.21, 72, 3);\n        addPattyIrregularity(patty2Geo, 0.97, 0.045);\n        const patty2 = new THREE.Mesh(patty2Geo, pattyMaterial);\n        patty2.position.y = 0.105;\n        patty2.castShadow = true;\n        patty2.receiveShadow = true;\n        patty2Group.add(patty2);\n\n        // ─────────────────────────────────────\n        // CHEESE SLICE 2\n        // ─────────────────────────────────────\n        const cheese2Group = new THREE.Group();\n        cheese2Group.position.y = 0.87;\n        burgerGroup.add(cheese2Group);\n\n        const cheese2Geo = new THREE.CylinderGeometry(1.02, 1.02, 0.05, 72);\n        addEdgeWaviness(cheese2Geo, 1.02, 0.045, 7, -0.35);\n        const cheese2 = new THREE.Mesh(cheese2Geo, cheeseMaterial);\n        cheese2.position.y = 0.025;\n        cheese2.castShadow = true;\n        cheese2.receiveShadow = true;\n        cheese2Group.add(cheese2);\n\n        const cheese2EdgeGeo = new THREE.TorusGeometry(1.01, 0.018, 12, 72);\n        const cheese2Edge = new THREE.Mesh(cheese2EdgeGeo, cheeseEdgeMaterial);\n        cheese2Edge.position.y = 0.025;\n        cheese2Edge.rotation.x = Math.PI / 2;\n        cheese2Edge.castShadow = true;\n        cheese2Group.add(cheese2Edge);\n\n        // ─────────────────────────────────────\n        // TOP BUN BASE (cylinder)\n        // ─────────────────────────────────────\n        const topBunBaseGroup = new THREE.Group();\n        topBunBaseGroup.position.y = 0.93;\n        burgerGroup.add(topBunBaseGroup);\n\n        const topBunBaseGeoSide = new THREE.CylinderGeometry(0.99, 1.0, 0.14, 72, 1, true);\n        const topBunBaseSide = new THREE.Mesh(topBunBaseGeoSide, bunSideMaterial);\n        topBunBaseSide.position.y = 0.07;\n        topBunBaseSide.castShadow = true;\n        topBunBaseSide.receiveShadow = true;\n        topBunBaseGroup.add(topBunBaseSide);\n\n        const topBunBaseGeoBottom = new THREE.CylinderGeometry(1.0, 1.0, 0.015, 72);\n        const topBunBaseBottom = new THREE.Mesh(topBunBaseGeoBottom, bunBottomMaterial);\n        topBunBaseBottom.position.y = 0.0;\n        topBunBaseBottom.castShadow = true;\n        topBunBaseBottom.receiveShadow = true;\n        topBunBaseGroup.add(topBunBaseBottom);\n\n        // ─────────────────────────────────────\n        // TOP BUN DOME\n        // ─────────────────────────────────────\n        const topBunDomeGroup = new THREE.Group();\n        topBunDomeGroup.position.y = 1.0;\n        burgerGroup.add(topBunDomeGroup);\n\n        const domeGeo = new THREE.SphereGeometry(1.0, 80, 48);\n        const dome = new THREE.Mesh(domeGeo, bunTopMaterial);\n        dome.scale.set(1.0, 0.5, 1.0);\n        dome.position.y = 0.25;\n        dome.castShadow = true;\n        dome.receiveShadow = true;\n        topBunDomeGroup.add(dome);\n\n        // ─────────────────────────────────────\n        // SESAME SEEDS\n        // ─────────────────────────────────────\n        const seedsGroup = new THREE.Group();\n        seedsGroup.position.y = 1.0;\n        burgerGroup.add(seedsGroup);\n\n        const seedGeoTemplate = new THREE.SphereGeometry(1, 12, 8);\n        const domeCenterY = 0.25;\n        const domeScaleY = 0.5;\n        const domeRadius = 1.0;\n\n        const seedCount = 65;\n        const usedPhi = [];\n\n        for (let i = 0; i < seedCount; i++) {\n            let phi, theta;\n            let attempts = 0;\n            let validPlacement = false;\n\n            while (!validPlacement && attempts < 100) {\n                phi = Math.random() * 0.95 + 0.12;\n                theta = Math.random() * Math.PI * 2;\n                validPlacement = true;\n                for (const up of usedPhi) {\n                    const dPhi = Math.abs(phi - up.phi);\n                    const dTheta = Math.abs(theta - up.theta);\n                    const dThetaWrapped = Math.min(dTheta, Math.PI * 2 - dTheta);\n                    if (dPhi < 0.12 && dThetaWrapped < 0.25) {\n                        validPlacement = false;\n                        break;\n                    }\n                }\n                attempts++;\n            }\n            if (!validPlacement && attempts >= 100) continue;\n            usedPhi.push({ phi, theta });\n\n            const sinPhi = Math.sin(phi);\n            const cosPhi = Math.cos(phi);\n            const lx = sinPhi * Math.cos(theta);\n            const ly = cosPhi;\n            const lz = sinPhi * Math.sin(theta);\n\n            const worldX = lx * domeRadius;\n            const worldY = domeCenterY + ly * domeScaleY * domeRadius;\n            const worldZ = lz * domeRadius;\n\n            const nx = lx;\n            const ny = ly / (domeScaleY * domeScaleY);\n            const nz = lz;\n            const nLen = Math.sqrt(nx * nx + ny * ny + nz * nz);\n            const normal = new THREE.Vector3(nx / nLen, ny / nLen, nz / nLen);\n\n            const seedMesh = new THREE.Mesh(seedGeoTemplate, sesameMaterial);\n            seedMesh.position.set(worldX, worldY, worldZ);\n            seedMesh.scale.set(0.013, 0.007, 0.032);\n\n            const upVec = normal.clone();\n            const randomDir = new THREE.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);\n            const tangent = new THREE.Vector3().crossVectors(upVec, randomDir).normalize();\n            const bitangent = new THREE.Vector3().crossVectors(upVec, tangent).normalize();\n            const rotAngle = Math.random() * Math.PI * 2;\n            const longAxis = tangent.clone().multiplyScalar(Math.cos(rotAngle)).add(\n                bitangent.clone().multiplyScalar(Math.sin(rotAngle))\n            ).normalize();\n\n            const m4 = new THREE.Matrix4();\n            const xAxis = new THREE.Vector3().crossVectors(upVec, longAxis).normalize();\n            m4.makeBasis(xAxis, upVec, longAxis);\n            seedMesh.setRotationFromMatrix(m4);\n\n            seedMesh.castShadow = true;\n            seedMesh.receiveShadow = true;\n            seedsGroup.add(seedMesh);\n        }\n\n        // ─────────────────────────────────────\n        // GROUND SHADOW (soft, large)\n        // ─────────────────────────────────────\n        const groundShadowGeo = new THREE.PlaneGeometry(4.5, 4.5);\n        const groundShadowMat = new THREE.ShadowMaterial({ opacity: 0.35 });\n        const groundShadow = new THREE.Mesh(groundShadowGeo, groundShadowMat);\n        groundShadow.rotation.x = -Math.PI / 2;\n        groundShadow.position.y = 0.032;\n        groundShadow.receiveShadow = true;\n        groundShadow.renderOrder = 0;\n        burgerGroup.add(groundShadow);\n\n        // ─────────────────────────────────────\n        // ANIMATION LOOP\n        // ─────────────────────────────────────\n        const clock = new THREE.Clock();\n\n        function animate() {\n            requestAnimationFrame(animate);\n\n            const dt = Math.min(clock.getDelta(), 0.1);\n            const rotationSpeed = 0.22;\n            burgerGroup.rotation.y += rotationSpeed * dt;\n\n            controls.update();\n\n            renderer.render(scene, camera);\n        }\n\n        // ─────────────────────────────────────\n        // RESPONSIVE HANDLING\n        // ─────────────────────────────────────\n        window.addEventListener('resize', () => {\n            camera.aspect = window.innerWidth / window.innerHeight;\n            camera.updateProjectionMatrix();\n            renderer.setSize(window.innerWidth, window.innerHeight);\n        });\n\n        // ─────────────────────────────────────\n        // START\n        // ─────────────────────────────────────\n        animate();\n\n        console.log('🍔 Big Mac ready! Drag to orbit, scroll to zoom.');\n    </script>\n</body>\n</html>\n```"
}