// Style B v2 — Botanical Journal, hi-res
// Pressed-specimen / field-journal layout. SVG-illustrated food + scattered produce.
// 1600 x 2200 — print-friendly, dense.

// ─────────────────────────────────────────────────────────────
// SVG ILLUSTRATIONS — produce + food, drawn with simple primitives
// All sit on transparent backgrounds so they can be scattered.
// ─────────────────────────────────────────────────────────────

function Blueberries({ size = 80, style }) {
  // cluster of berries with leaf
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      <defs>
        <radialGradient id="bb" cx="35%" cy="30%" r="70%">
          <stop offset="0%" stopColor="#7a8bbf" />
          <stop offset="55%" stopColor="#3e4a6b" />
          <stop offset="100%" stopColor="#1f2640" />
        </radialGradient>
        <radialGradient id="bbHi" cx="30%" cy="25%" r="20%">
          <stop offset="0%" stopColor="rgba(255,255,255,.9)" />
          <stop offset="100%" stopColor="rgba(255,255,255,0)" />
        </radialGradient>
      </defs>
      {/* leaves */}
      <path d="M50 18 Q 40 8, 28 14 Q 36 22, 50 22 Z" fill="#5E6E45" />
      <path d="M50 18 Q 60 6, 72 12 Q 64 22, 50 22 Z" fill="#7B8B5A" />
      <path d="M50 22 L 50 32" stroke="#3d4a2a" strokeWidth="1.4" fill="none" />
      {/* berries */}
      {[
        [32, 56, 18],
        [60, 50, 20],
        [48, 70, 22],
        [70, 70, 17],
        [22, 74, 15],
      ].map(([cx, cy, r], i) => (
        <g key={i}>
          <circle cx={cx} cy={cy} r={r} fill="url(#bb)" />
          <circle cx={cx - r * 0.25} cy={cy - r * 0.3} r={r * 0.45} fill="url(#bbHi)" />
          <circle cx={cx} cy={cy - r * 0.45} r={r * 0.18} fill="none" stroke="#1f2640" strokeWidth="1" />
          <path d={`M ${cx - 2} ${cy - r * 0.45} L ${cx + 2} ${cy - r * 0.45} M ${cx} ${cy - r * 0.55} L ${cx} ${cy - r * 0.35}`} stroke="#1f2640" strokeWidth=".8" />
        </g>
      ))}
    </svg>
  );
}

function RhubarbStalks({ size = 100, style }) {
  return (
    <svg viewBox="0 0 100 120" width={size} height={size * 1.2} style={style}>
      <defs>
        <linearGradient id="rh" x1="0" y1="0" x2="1" y2="0">
          <stop offset="0%" stopColor="#9c4a4a" />
          <stop offset="50%" stopColor="#c66a6a" />
          <stop offset="100%" stopColor="#7a2c2c" />
        </linearGradient>
      </defs>
      {/* leaf top */}
      <path d="M50 18 C 20 6, 8 28, 22 36 C 14 50, 36 58, 46 46 C 56 56, 76 50, 70 38 C 88 28, 78 8, 50 18 Z"
        fill="#5E6E45" />
      <path d="M50 18 L 50 38" stroke="#3d4a2a" strokeWidth="1" />
      <path d="M30 26 L 46 38 M 70 26 L 54 38 M 30 38 L 46 42" stroke="#3d4a2a" strokeWidth=".8" />
      {/* stalks */}
      <rect x="40" y="38" width="8" height="74" rx="3" fill="url(#rh)" />
      <rect x="52" y="38" width="7" height="74" rx="3" fill="url(#rh)" opacity=".9" />
      <rect x="62" y="42" width="6" height="68" rx="3" fill="url(#rh)" opacity=".75" />
      {/* highlights */}
      <rect x="41.5" y="40" width="1.5" height="68" fill="rgba(255,220,210,.55)" />
      <rect x="53" y="40" width="1.5" height="68" fill="rgba(255,220,210,.45)" />
    </svg>
  );
}

function LemonSlice({ size = 80, style }) {
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      <defs>
        <radialGradient id="lemon" cx="50%" cy="50%" r="50%">
          <stop offset="0%" stopColor="#fff5b8" />
          <stop offset="60%" stopColor="#f1d24a" />
          <stop offset="100%" stopColor="#c69a1f" />
        </radialGradient>
      </defs>
      <circle cx="50" cy="50" r="44" fill="#e6c64a" />
      <circle cx="50" cy="50" r="40" fill="url(#lemon)" />
      {Array.from({ length: 10 }).map((_, i) => {
        const a = (i * Math.PI * 2) / 10;
        const x1 = 50 + Math.cos(a) * 8;
        const y1 = 50 + Math.sin(a) * 8;
        const x2 = 50 + Math.cos(a) * 36;
        const y2 = 50 + Math.sin(a) * 36;
        return <line key={i} x1={x1} y1={y1} x2={x2} y2={y2} stroke="#fff" strokeWidth="2" opacity=".6" />;
      })}
      {Array.from({ length: 10 }).map((_, i) => {
        const a = (i * Math.PI * 2) / 10 + Math.PI / 10;
        const x = 50 + Math.cos(a) * 22;
        const y = 50 + Math.sin(a) * 22;
        return <ellipse key={i} cx={x} cy={y} rx="3" ry="6" fill="#fff7c8" opacity=".75" transform={`rotate(${(a * 180) / Math.PI} ${x} ${y})`} />;
      })}
      <circle cx="50" cy="50" r="6" fill="#fff8c8" stroke="#c69a1f" strokeWidth="1" />
    </svg>
  );
}

function LavenderSprig({ size = 90, style }) {
  return (
    <svg viewBox="0 0 100 140" width={size * 0.7} height={size} style={style}>
      <path d="M50 130 Q 50 90, 50 30" stroke="#586B43" strokeWidth="1.4" fill="none" strokeLinecap="round" />
      <path d="M44 110 L 38 102 M 56 100 L 62 92 M 44 88 L 38 80" stroke="#586B43" strokeWidth="1" fill="none" />
      {[18, 26, 34, 42, 50, 58, 66, 74].map((y, i) => (
        <ellipse key={i} cx={50 + (i % 2 ? 4 : -4)} cy={y} rx="6" ry="4" fill="#9786b8" opacity=".85" />
      ))}
      <ellipse cx="50" cy="14" rx="8" ry="6" fill="#b7a8c4" />
    </svg>
  );
}

function VioletViola({ size = 70, style }) {
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      {/* 5 petals */}
      {[
        { rot: -60, fill: '#b7a8c4' },
        { rot: 60, fill: '#b7a8c4' },
        { rot: -130, fill: '#e2dba8' },
        { rot: 130, fill: '#e2dba8' },
        { rot: 180, fill: '#8d6fa6' },
      ].map((p, i) => (
        <ellipse key={i} cx="50" cy="30" rx="14" ry="20"
          fill={p.fill} stroke="#5e4674" strokeWidth=".8"
          transform={`rotate(${p.rot} 50 50)`} />
      ))}
      <circle cx="50" cy="50" r="6" fill="#f1d24a" stroke="#a1741a" strokeWidth="1" />
      {/* face stripes */}
      <path d="M44 50 Q 42 60, 38 64 M 56 50 Q 58 60, 62 64 M 50 56 L 50 64" stroke="#3a2545" strokeWidth=".8" fill="none" />
    </svg>
  );
}

function MicroBasil({ size = 80, style }) {
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      {[
        { x: 30, y: 50, r: -30 },
        { x: 50, y: 35, r: 0 },
        { x: 70, y: 50, r: 30 },
        { x: 40, y: 65, r: -10 },
        { x: 60, y: 65, r: 10 },
      ].map((l, i) => (
        <g key={i} transform={`translate(${l.x} ${l.y}) rotate(${l.r})`}>
          <ellipse cx="0" cy="0" rx="9" ry="14" fill="#5E6E45" />
          <ellipse cx="0" cy="-2" rx="5" ry="9" fill="#7B8B5A" opacity=".8" />
          <line x1="0" y1="-12" x2="0" y2="12" stroke="#3d4a2a" strokeWidth=".6" />
        </g>
      ))}
      <line x1="50" y1="50" x2="50" y2="92" stroke="#3d4a2a" strokeWidth="1" />
    </svg>
  );
}

function HeritageTomatoes({ size = 90, style }) {
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      <defs>
        <radialGradient id="tRed" cx="35%" cy="30%"><stop offset="0%" stopColor="#ff8060"/><stop offset="100%" stopColor="#9c2f1a"/></radialGradient>
        <radialGradient id="tYel" cx="35%" cy="30%"><stop offset="0%" stopColor="#ffe28a"/><stop offset="100%" stopColor="#c08a1a"/></radialGradient>
        <radialGradient id="tGrn" cx="35%" cy="30%"><stop offset="0%" stopColor="#cfd99a"/><stop offset="100%" stopColor="#5e6a32"/></radialGradient>
        <radialGradient id="tPur" cx="35%" cy="30%"><stop offset="0%" stopColor="#9c6a7a"/><stop offset="100%" stopColor="#3a1f2a"/></radialGradient>
      </defs>
      <circle cx="30" cy="62" r="20" fill="url(#tRed)"/>
      <circle cx="62" cy="40" r="22" fill="url(#tYel)"/>
      <circle cx="72" cy="68" r="16" fill="url(#tGrn)"/>
      <circle cx="42" cy="32" r="14" fill="url(#tPur)"/>
      {/* stems */}
      <path d="M30 42 L 30 50 M 28 44 L 34 48 M 62 18 L 62 26 M 58 22 L 66 22" stroke="#5E6E45" strokeWidth="1.2" fill="none"/>
    </svg>
  );
}

// Coriander leaf
function Coriander({ size = 80, style }) {
  return (
    <svg viewBox="0 0 100 100" width={size} height={size} style={style}>
      <line x1="50" y1="92" x2="50" y2="40" stroke="#3d4a2a" strokeWidth="1" />
      <path d="M50 40 Q 30 30, 24 14 Q 36 22, 50 28 Q 64 22, 76 14 Q 70 30, 50 40 Z" fill="#7B8B5A" />
      <path d="M50 28 Q 35 24, 30 18 M 50 28 Q 65 24, 70 18" stroke="#3d4a2a" strokeWidth=".7" fill="none"/>
    </svg>
  );
}

// ─────────────────────────────────────────────────────────────
// FOOD ILLUSTRATIONS — drawn with SVG, more detail than placeholders
// ─────────────────────────────────────────────────────────────

function ScenePlate({ children, style, label }) {
  return (
    <div style={{
      position:'relative',
      background:'#FBF7E9',
      padding:14,
      border:'1px solid rgba(80,70,40,.18)',
      boxShadow:'0 2px 8px rgba(60,50,30,.18)',
      ...style,
    }}>
      {children}
      {label && <div style={{
        marginTop:10, fontFamily:'"Cormorant Garamond", serif',
        fontSize:20, fontWeight:600, color:'#2d2a20',
      }}>{label}</div>}
    </div>
  );
}

// Tomato tartlet on a saucer
function TartletDish({ size = 320 }) {
  return (
    <svg viewBox="0 0 320 240" width="100%" style={{ display:'block', height: size * 0.75 }}>
      <defs>
        <radialGradient id="plateBg" cx="50%" cy="40%"><stop offset="0%" stopColor="#f4ecd6"/><stop offset="100%" stopColor="#cdb98a"/></radialGradient>
        <radialGradient id="tartShell" cx="50%" cy="40%"><stop offset="0%" stopColor="#e6c98a"/><stop offset="80%" stopColor="#a87838"/><stop offset="100%" stopColor="#6b4818"/></radialGradient>
        <radialGradient id="cheese" cx="50%" cy="35%"><stop offset="0%" stopColor="#fffbe5"/><stop offset="100%" stopColor="#e8d9a1"/></radialGradient>
      </defs>
      {/* table */}
      <rect width="320" height="240" fill="#e8e1cc"/>
      <path d="M0 200 Q 160 220 320 200 L 320 240 L 0 240 Z" fill="#d6cdb0"/>
      {/* saucer */}
      <ellipse cx="160" cy="160" rx="135" ry="42" fill="url(#plateBg)" stroke="#a89568" strokeWidth="1"/>
      <ellipse cx="160" cy="155" rx="115" ry="34" fill="#fbf3d8" stroke="#c9b378" strokeWidth=".8"/>
      {/* tart shell */}
      <ellipse cx="160" cy="135" rx="92" ry="26" fill="url(#tartShell)"/>
      <ellipse cx="160" cy="130" rx="88" ry="22" fill="#d4a865"/>
      {/* fluted edge */}
      {Array.from({length: 22}).map((_, i) => {
        const a = (i / 22) * Math.PI;
        const x = 160 + Math.cos(a) * 90;
        const y = 130 - Math.sin(a) * 20;
        return <circle key={i} cx={x} cy={y} r="3.5" fill="#a87838"/>;
      })}
      {/* spinach base */}
      <ellipse cx="160" cy="124" rx="82" ry="18" fill="#5E6E45"/>
      {/* goat cheese rounds */}
      <ellipse cx="130" cy="118" rx="20" ry="9" fill="url(#cheese)"/>
      <ellipse cx="190" cy="120" rx="20" ry="9" fill="url(#cheese)"/>
      <ellipse cx="160" cy="110" rx="18" ry="8" fill="url(#cheese)"/>
      {/* tomato halves on top */}
      <circle cx="118" cy="116" r="9" fill="#d24632"/>
      <circle cx="116" cy="113" r="3" fill="#ff8060"/>
      <circle cx="148" cy="106" r="8" fill="#f1c84a"/>
      <circle cx="146" cy="104" r="3" fill="#fff0a0"/>
      <circle cx="178" cy="106" r="8" fill="#a85060"/>
      <circle cx="176" cy="104" r="3" fill="#cf8090"/>
      <circle cx="208" cy="116" r="9" fill="#d24632"/>
      <circle cx="206" cy="113" r="3" fill="#ff8060"/>
      <circle cx="170" cy="118" r="7" fill="#7e8c46"/>
      {/* micro basil sprinkle */}
      {[[100,118],[140,114],[170,108],[200,114],[220,120],[160,120]].map(([x,y], i) => (
        <g key={i} transform={`translate(${x} ${y}) scale(.4)`}>
          <ellipse cx="0" cy="-4" rx="3" ry="6" fill="#7B8B5A"/>
          <ellipse cx="-3" cy="0" rx="3" ry="5" fill="#5E6E45"/>
          <ellipse cx="3" cy="0" rx="3" ry="5" fill="#5E6E45"/>
        </g>
      ))}
    </svg>
  );
}

// Coronation chicken on focaccia, halved
function FocacciaDish() {
  return (
    <svg viewBox="0 0 320 240" width="100%" style={{ display:'block', height: 240 }}>
      <defs>
        <linearGradient id="bread" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#e6c98a"/><stop offset="100%" stopColor="#a87838"/>
        </linearGradient>
        <linearGradient id="crumb" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#fbe9b8"/><stop offset="100%" stopColor="#d2a85c"/>
        </linearGradient>
      </defs>
      <rect width="320" height="240" fill="#efe6cf"/>
      {/* board */}
      <rect x="20" y="40" width="280" height="180" rx="6" fill="#7a5a30" />
      <rect x="20" y="40" width="280" height="180" rx="6" fill="url(#crumb)" opacity=".15"/>
      {/* board grain */}
      {Array.from({length: 8}).map((_, i) => (
        <line key={i} x1="20" y1={50 + i * 22} x2="300" y2={56 + i * 22} stroke="rgba(60,30,10,.18)" strokeWidth="1"/>
      ))}
      {/* lower half (bottom slice) */}
      <rect x="50" y="120" width="220" height="40" rx="8" fill="url(#bread)"/>
      <rect x="56" y="125" width="208" height="30" rx="6" fill="url(#crumb)"/>
      {/* dimples on top crust visible at edges */}
      {Array.from({length: 8}).map((_, i) => (
        <circle key={i} cx={70 + i * 26} cy="120" r="3" fill="#8a5e22"/>
      ))}
      {/* chicken filling */}
      <path d="M 60 122 Q 80 110, 110 116 Q 140 106, 170 116 Q 200 108, 230 116 Q 250 110, 264 122 Q 240 128, 200 124 Q 160 130, 120 124 Q 80 130, 60 122 Z"
        fill="#e8b65a"/>
      {/* sultanas */}
      {[80, 110, 140, 170, 200, 230, 250].map((x, i) => (
        <ellipse key={i} cx={x} cy={117 + (i % 2) * 2} rx="3" ry="2" fill="#5a3320"/>
      ))}
      {/* spinach leaves peeking */}
      <path d="M70 124 Q 90 116, 110 124" stroke="#5E6E45" strokeWidth="6" fill="none" strokeLinecap="round"/>
      <path d="M150 124 Q 170 116, 190 124" stroke="#5E6E45" strokeWidth="6" fill="none" strokeLinecap="round"/>
      <path d="M210 124 Q 230 116, 250 124" stroke="#5E6E45" strokeWidth="6" fill="none" strokeLinecap="round"/>
      {/* top half */}
      <rect x="50" y="80" width="220" height="40" rx="8" fill="url(#bread)"/>
      <rect x="56" y="85" width="208" height="6" rx="3" fill="#c89c4e" opacity=".7"/>
      {/* dimples */}
      {Array.from({length: 14}).map((_, i) => (
        <ellipse key={i} cx={62 + (i % 7) * 30} cy={88 + Math.floor(i/7) * 14} rx="4" ry="2.5" fill="#8a5e22"/>
      ))}
      {/* rosemary sprigs garnish */}
      <line x1="270" y1="70" x2="295" y2="50" stroke="#3d4a2a" strokeWidth="1"/>
      {[60, 56, 52, 48].map((y, i) => (
        <ellipse key={i} cx={290 - i * 5} cy={y} rx="2.5" ry="5" fill="#5E6E45" transform={`rotate(40 ${290 - i*5} ${y})`}/>
      ))}
      {/* coriander sprig front */}
      <g transform="translate(120 175) rotate(-10)">
        <line x1="0" y1="0" x2="0" y2="-30" stroke="#3d4a2a" strokeWidth="1"/>
        <path d="M0 -30 Q -10 -36, -14 -42 Q -4 -38, 0 -34 Q 4 -38, 14 -42 Q 10 -36, 0 -30 Z" fill="#7B8B5A"/>
      </g>
    </svg>
  );
}

function SconeDish() {
  return (
    <svg viewBox="0 0 320 240" width="100%" style={{ display:'block', height: 240 }}>
      <defs>
        <radialGradient id="sconeBody" cx="40%" cy="35%">
          <stop offset="0%" stopColor="#fbe5b6"/><stop offset="100%" stopColor="#a8732a"/>
        </radialGradient>
        <radialGradient id="jam" cx="40%" cy="40%">
          <stop offset="0%" stopColor="#5a3a86"/><stop offset="100%" stopColor="#2a1442"/>
        </radialGradient>
      </defs>
      <rect width="320" height="240" fill="#efe6cf"/>
      {/* doily */}
      <ellipse cx="160" cy="160" rx="135" ry="44" fill="#fbf3d8" stroke="#c9b378" strokeWidth="1"/>
      {Array.from({length: 26}).map((_, i) => {
        const a = (i / 26) * Math.PI * 2;
        return <circle key={i} cx={160 + Math.cos(a)*132} cy={160 + Math.sin(a)*42} r="3" fill="#fbf3d8" stroke="#c9b378" strokeWidth=".7"/>;
      })}
      {/* scone bottom */}
      <ellipse cx="160" cy="150" rx="70" ry="16" fill="#8a5e22"/>
      <rect x="92" y="100" width="136" height="50" fill="url(#sconeBody)"/>
      <ellipse cx="160" cy="100" rx="68" ry="14" fill="#d4a865"/>
      {/* split line */}
      <line x1="92" y1="125" x2="228" y2="125" stroke="#7a5320" strokeWidth="2"/>
      {/* jam oozing */}
      <path d="M 100 125 Q 130 132, 160 128 Q 190 132, 220 125 Q 200 138, 160 138 Q 120 138, 100 125 Z" fill="url(#jam)"/>
      {/* clotted cream */}
      <ellipse cx="160" cy="118" rx="55" ry="9" fill="#fffbe5" stroke="#e8d9a1" strokeWidth="1"/>
      {/* lavender on top */}
      <g transform="translate(140 88) rotate(-15)">
        <line x1="0" y1="0" x2="0" y2="20" stroke="#586B43" strokeWidth="1"/>
        {[2, 6, 10, 14].map((y, i) => (
          <ellipse key={i} cx={i % 2 ? 2 : -2} cy={y} rx="3.5" ry="2.5" fill="#9786b8"/>
        ))}
      </g>
      <g transform="translate(180 88) rotate(15)">
        <line x1="0" y1="0" x2="0" y2="20" stroke="#586B43" strokeWidth="1"/>
        {[2, 6, 10, 14].map((y, i) => (
          <ellipse key={i} cx={i % 2 ? 2 : -2} cy={y} rx="3.5" ry="2.5" fill="#b7a8c4"/>
        ))}
      </g>
      {/* berries scattered on plate */}
      <circle cx="60" cy="170" r="5" fill="#3e4a6b"/>
      <circle cx="50" cy="180" r="4" fill="#3e4a6b"/>
      <circle cx="262" cy="172" r="5" fill="#3e4a6b"/>
      <circle cx="270" cy="184" r="4" fill="#3e4a6b"/>
    </svg>
  );
}

function RhubarbCakeDish() {
  return (
    <svg viewBox="0 0 320 240" width="100%" style={{ display:'block', height: 240 }}>
      <defs>
        <linearGradient id="cakeBody" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#fbe9b8"/><stop offset="100%" stopColor="#d8a85a"/>
        </linearGradient>
        <linearGradient id="icing" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#fffdf2"/><stop offset="100%" stopColor="#f1e6b0"/>
        </linearGradient>
      </defs>
      <rect width="320" height="240" fill="#efe6cf"/>
      {/* cake stand pedestal */}
      <rect x="148" y="180" width="24" height="30" fill="#bda77a"/>
      <ellipse cx="160" cy="180" rx="80" ry="10" fill="#a89568"/>
      <ellipse cx="160" cy="178" rx="80" ry="6" fill="#fbf3d8"/>
      {/* cake square front */}
      <rect x="100" y="100" width="120" height="78" fill="url(#cakeBody)" stroke="#a8732a" strokeWidth="1"/>
      {/* rhubarb chunks visible in crumb */}
      {[[120,140],[150,155],[180,138],[200,160],[135,170],[195,128]].map(([x,y], i) => (
        <ellipse key={i} cx={x} cy={y} rx="6" ry="3" fill="#c66a6a" transform={`rotate(${i*20} ${x} ${y})`}/>
      ))}
      {/* icing drip */}
      <path d="M 100 100 L 220 100 L 220 112 Q 200 122, 180 110 Q 160 122, 140 110 Q 120 122, 100 112 Z" fill="url(#icing)"/>
      {/* lemon zest curl */}
      <path d="M 130 96 Q 138 90, 146 94" stroke="#f1d24a" strokeWidth="3" fill="none" strokeLinecap="round"/>
      <path d="M 175 96 Q 184 88, 195 94" stroke="#f1d24a" strokeWidth="3" fill="none" strokeLinecap="round"/>
      {/* viola crown */}
      <g transform="translate(160 92)">
        {[
          { rot: -60, fill: '#b7a8c4' },
          { rot: 60, fill: '#b7a8c4' },
          { rot: -130, fill: '#e2dba8' },
          { rot: 130, fill: '#e2dba8' },
          { rot: 180, fill: '#8d6fa6' },
        ].map((p, i) => (
          <ellipse key={i} cx="0" cy="-8" rx="6" ry="9" fill={p.fill} stroke="#5e4674" strokeWidth=".5" transform={`rotate(${p.rot})`}/>
        ))}
        <circle cx="0" cy="0" r="2.5" fill="#f1d24a"/>
      </g>
      {/* viola small side */}
      <g transform="translate(120 95) scale(.6)">
        {[
          { rot: -60, fill: '#b7a8c4' },
          { rot: 60, fill: '#b7a8c4' },
          { rot: -130, fill: '#e2dba8' },
          { rot: 130, fill: '#e2dba8' },
          { rot: 180, fill: '#8d6fa6' },
        ].map((p, i) => (
          <ellipse key={i} cx="0" cy="-8" rx="6" ry="9" fill={p.fill} stroke="#5e4674" strokeWidth=".5" transform={`rotate(${p.rot})`}/>
        ))}
        <circle cx="0" cy="0" r="2.5" fill="#f1d24a"/>
      </g>
      <g transform="translate(200 95) scale(.6)">
        {[
          { rot: -60, fill: '#e2dba8' },
          { rot: 60, fill: '#e2dba8' },
          { rot: -130, fill: '#b7a8c4' },
          { rot: 130, fill: '#b7a8c4' },
          { rot: 180, fill: '#8d6fa6' },
        ].map((p, i) => (
          <ellipse key={i} cx="0" cy="-8" rx="6" ry="9" fill={p.fill} stroke="#5e4674" strokeWidth=".5" transform={`rotate(${p.rot})`}/>
        ))}
        <circle cx="0" cy="0" r="2.5" fill="#f1d24a"/>
      </g>
    </svg>
  );
}

function ThreeTierStand() {
  return (
    <svg viewBox="0 0 360 460" width="100%" style={{ display:'block', height: 460 }}>
      <defs>
        <linearGradient id="brass" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#d8b266"/><stop offset="100%" stopColor="#8a6320"/>
        </linearGradient>
        <radialGradient id="plate" cx="50%" cy="40%"><stop offset="0%" stopColor="#fffaf0"/><stop offset="100%" stopColor="#d8c894"/></radialGradient>
      </defs>
      <rect width="360" height="460" fill="#efe6cf"/>
      {/* center rod */}
      <rect x="178" y="40" width="4" height="380" fill="url(#brass)"/>
      {/* top finial */}
      <circle cx="180" cy="34" r="10" fill="url(#brass)"/>
      <circle cx="180" cy="22" r="6" fill="url(#brass)"/>
      {/* base */}
      <ellipse cx="180" cy="430" rx="80" ry="10" fill="url(#brass)"/>
      <ellipse cx="180" cy="426" rx="60" ry="6" fill="#a8862c"/>
      {/* tier 3 (top) */}
      <ellipse cx="180" cy="120" rx="65" ry="14" fill="url(#plate)" stroke="#a89568" strokeWidth=".8"/>
      {/* scones on top */}
      <ellipse cx="155" cy="110" rx="14" ry="6" fill="#a8732a"/>
      <rect x="142" y="98" width="26" height="14" fill="#d4a865"/>
      <ellipse cx="155" cy="98" rx="13" ry="4" fill="#e6c98a"/>
      <ellipse cx="180" cy="110" rx="14" ry="6" fill="#a8732a"/>
      <rect x="167" y="98" width="26" height="14" fill="#d4a865"/>
      <ellipse cx="180" cy="98" rx="13" ry="4" fill="#e6c98a"/>
      <ellipse cx="205" cy="110" rx="14" ry="6" fill="#a8732a"/>
      <rect x="192" y="98" width="26" height="14" fill="#d4a865"/>
      <ellipse cx="205" cy="98" rx="13" ry="4" fill="#e6c98a"/>
      {/* tier 2 (mid) */}
      <ellipse cx="180" cy="240" rx="90" ry="16" fill="url(#plate)" stroke="#a89568" strokeWidth=".8"/>
      {/* tartlets */}
      <circle cx="140" cy="226" r="14" fill="#a8732a"/>
      <circle cx="140" cy="226" r="11" fill="#5E6E45"/>
      <circle cx="135" cy="222" r="3" fill="#d24632"/>
      <circle cx="145" cy="220" r="3" fill="#f1c84a"/>
      <circle cx="142" cy="228" r="2.5" fill="#a85060"/>
      <circle cx="180" cy="226" r="14" fill="#a8732a"/>
      <circle cx="180" cy="226" r="11" fill="#5E6E45"/>
      <circle cx="175" cy="222" r="3" fill="#d24632"/>
      <circle cx="185" cy="220" r="3" fill="#f1c84a"/>
      <circle cx="220" cy="226" r="14" fill="#a8732a"/>
      <circle cx="220" cy="226" r="11" fill="#5E6E45"/>
      <circle cx="215" cy="222" r="3" fill="#a85060"/>
      <circle cx="225" cy="220" r="3" fill="#f1c84a"/>
      {/* tier 1 (bottom) */}
      <ellipse cx="180" cy="370" rx="115" ry="20" fill="url(#plate)" stroke="#a89568" strokeWidth=".8"/>
      {/* focaccia squares + cake squares */}
      <rect x="100" y="346" width="40" height="24" rx="4" fill="#d4a865"/>
      <rect x="103" y="349" width="34" height="6" rx="2" fill="#e8b65a"/>
      <rect x="148" y="346" width="40" height="24" rx="4" fill="#d4a865"/>
      <rect x="151" y="349" width="34" height="6" rx="2" fill="#e8b65a"/>
      <rect x="196" y="346" width="38" height="24" rx="4" fill="#fbe9b8"/>
      <ellipse cx="215" cy="350" rx="6" ry="3" fill="#c66a6a"/>
      <ellipse cx="225" cy="358" rx="5" ry="2.5" fill="#c66a6a"/>
      <rect x="240" y="346" width="38" height="24" rx="4" fill="#fbe9b8"/>
      <ellipse cx="259" cy="354" rx="6" ry="3" fill="#c66a6a"/>
    </svg>
  );
}

// ─────────────────────────────────────────────────────────────
// SPECIMEN CARD — pinned card containing an SVG illustration
// ─────────────────────────────────────────────────────────────
function Specimen({ name, latin, h = 220, rotate = 0, tape, children, taglines = [] }) {
  return (
    <div style={{
      position:'relative',
      transform: `rotate(${rotate}deg)`,
      filter: 'drop-shadow(0 4px 10px rgba(60,50,30,.18))',
    }}>
      {tape && (
        <div style={{
          position:'absolute', top:-12, left:'50%', transform:'translateX(-50%) rotate(-3deg)',
          width:96, height:22,
          background:'rgba(220,210,170,.7)',
          border:'1px dashed rgba(120,100,60,.35)',
          zIndex:2,
        }} />
      )}
      <div style={{
        background:'#FBF7E9',
        padding:14,
        border:'1px solid rgba(80,70,40,.18)',
      }}>
        <div style={{
          width:'100%', height:h, background:'#f4ecd6',
          position:'relative', overflow:'hidden',
          border:'1px solid rgba(80,70,40,.1)',
        }}>
          {children}
        </div>
        <div style={{ paddingTop:10, fontFamily:'"Cormorant Garamond", serif', position:'relative' }}>
          <div style={{ fontSize:22, fontWeight:600, color:'#2d2a20', lineHeight:1.2 }}>{name}</div>
          {latin && <div style={{ fontStyle:'italic', fontSize:16, color:'#6b6045', marginTop:8, lineHeight:1.3 }}>{latin}</div>}
          {taglines.length > 0 && (
            <div style={{ marginTop:6, fontFamily:'"Caveat", cursive', fontSize:20, color:'#586B43', lineHeight:1.2 }}>
              {taglines.map((t, i) => <div key={i}>· {t}</div>)}
            </div>
          )}
        </div>
      </div>
    </div>
  );
}

function Dotted({ w = 80 }) {
  return (
    <svg width={w} height="8" viewBox={`0 0 ${w} 8`} style={{ display:'block' }}>
      {Array.from({ length: Math.floor(w / 10) }).map((_, i) => (
        <circle key={i} cx={5 + i * 10} cy="4" r="1.4" fill="#6b6045" />
      ))}
    </svg>
  );
}

// ─────────────────────────────────────────────────────────────
// MAIN BOARD — 1600 x 2200 (hi-res, print-friendly)
// ─────────────────────────────────────────────────────────────

const palette = [
  { name: 'Cream',     hex: '#F1ECDD', note: 'paper' },
  { name: 'Sage',      hex: '#A7B091', note: 'leaf' },
  { name: 'Moss',      hex: '#586B43', note: 'stem' },
  { name: 'Lavender',  hex: '#B7A8C4', note: 'viola' },
  { name: 'Rhubarb',   hex: '#C36A6A', note: 'pink' },
  { name: 'Blueberry', hex: '#3E4A6B', note: 'ink' },
  { name: 'Lemon',     hex: '#F1D24A', note: 'zest' },
];

function BotanicalBoardHiRes() {
  const ink = '#2d2a20';
  return (
    <div style={{
      width: 1600, height: 2800,
      background: '#F1ECDD',
      backgroundImage:
        'radial-gradient(circle at 18% 8%, rgba(255,255,255,.6), transparent 38%),' +
        'radial-gradient(circle at 82% 92%, rgba(180,160,100,.14), transparent 50%),' +
        'repeating-linear-gradient(0deg, rgba(110,90,50,.05) 0 2px, transparent 2px 4px),' +
        'repeating-linear-gradient(90deg, rgba(110,90,50,.025) 0 1px, transparent 1px 6px)',
      color: ink,
      fontFamily:'"Cormorant Garamond", serif',
      padding:'80px 90px',
      boxSizing:'border-box',
      position:'relative',
      overflow:'hidden',
    }}>
      {/* SCATTERED PRODUCE — pushed to outer edges so they don't intrude on text */}
      <div style={{ position:'absolute', top: -30, left: -40, transform:'rotate(-12deg)', zIndex:0 }}><Blueberries size={150}/></div>
      <div style={{ position:'absolute', top: -10, right: -40, transform:'rotate(15deg)', zIndex:0 }}><LavenderSprig size={180}/></div>
      <div style={{ position:'absolute', bottom: -30, left: -30, transform:'rotate(-22deg)', zIndex:0 }}><RhubarbStalks size={150}/></div>
      <div style={{ position:'absolute', top: 1100, left: -20, transform:'rotate(-25deg)', zIndex:0 }}><MicroBasil size={120}/></div>
      <div style={{ position:'absolute', top: 2000, right: -20, transform:'rotate(18deg)', zIndex:0 }}><Coriander size={120}/></div>
      <div style={{ position:'absolute', top: 1560, left: -10, transform:'rotate(10deg)', zIndex:0 }}><VioletViola size={100}/></div>
      <div style={{ position:'absolute', top: 600, right: -20, transform:'rotate(-10deg)', zIndex:0 }}><HeritageTomatoes size={130}/></div>

      {/* HEADER */}
      <div style={{ display:'grid', gridTemplateColumns:'1fr auto', alignItems:'end', gap:30, position:'relative', zIndex: 1 }}>
        <div>
          <div style={{ fontFamily:'"Caveat", cursive', fontSize:38, color:'#586B43' }}>
            a field journal of —
          </div>
          <h1 style={{
            margin:'8px 0 0',
            fontFamily:'"Cormorant Garamond", serif',
            fontWeight:500, fontStyle:'italic',
            fontSize:138, lineHeight:.95, letterSpacing:'-.015em',
          }}>
            Spring Afternoon Tea
          </h1>
          <div style={{ marginTop:14, display:'flex', alignItems:'center', gap:14 }}>
            <Dotted w={180}/>
            <span style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:13, letterSpacing:'.24em', textTransform:'uppercase', color:'#6b6045' }}>
              Pressed, sketched &amp; noted
            </span>
            <Dotted w={180}/>
          </div>
        </div>
        {/* Pinned date card */}
        <div style={{
          background:'#FBF7E9', padding:'16px 22px',
          border:'1px solid rgba(80,70,40,.2)', transform:'rotate(2deg)',
          fontFamily:'"Caveat", cursive', fontSize:22, color:ink,
          boxShadow:'0 4px 10px rgba(60,50,30,.15)',
          textAlign:'center',
          position:'relative',
        }}>
          <div style={{
            position:'absolute', top:-10, left:'50%', transform:'translateX(-50%) rotate(-3deg)',
            width:60, height:18, background:'rgba(220,210,170,.7)',
            border:'1px dashed rgba(120,100,60,.35)',
          }}/>
          <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:11, letterSpacing:'.22em', color:'#9a8a5a' }}>ENTRY</div>
          <div style={{ fontSize:32 }}>April · 26</div>
          <div style={{ fontSize:20 }}>The kitchen garden,<br/>just after rain</div>
        </div>
      </div>

      {/* VISION + STAND */}
      <div style={{ marginTop:46, display:'grid', gridTemplateColumns:'1.2fr 1fr', gap:40, alignItems:'start' }}>
        <div>
          <div style={{ display:'grid', gridTemplateColumns:'auto 1fr', gap:20, alignItems:'start' }}>
            <div style={{
              width:62, height:62, borderRadius:'50%', border:`2px solid ${ink}`,
              display:'grid', placeItems:'center',
              fontFamily:'"Cormorant Garamond", serif', fontStyle:'italic', fontSize:38,
            }}>§</div>
            <div>
              <div style={{
                fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:11, letterSpacing:'.3em',
                textTransform:'uppercase', color:'#586B43', marginBottom:8,
              }}>Inspiration for my menu</div>
              <p style={{
                margin:0,
                fontFamily:'"Cormorant Garamond", serif', fontSize:20, lineHeight:1.55, color:ink,
              }}>
                My menu is inspired by spring gardens — colourful flowers, fresh herbs and seasonal
                harvest like blueberries, rhubarb and lemon — combined with traditional British tea
                staples such as scones, finger sandwiches and miniature cakes.
              </p>
            </div>
          </div>
          {/* Why I chose these — tucked notes */}
          <div style={{ marginTop:30, display:'grid', gridTemplateColumns:'1fr 1fr', gap:20 }}>
            {[
              ['Spring gardens', 'Stunning colourful flowers, fresh green herbs and seasonal harvest — blueberries, rhubarb and lemon at their peak.'],
              ['British tea, refreshed', 'Traditional staples — scones, finger sandwiches and miniature cakes — re-imagined for a younger table.'],
              ['Health &amp; balance', 'A nutritiously balanced menu: protein-rich items, fibre, carbohydrates and moderate fat content.'],
              ['Contrast &amp; appeal', 'Contrast in flavours, textures and visuals — designed to appeal to all kinds of people.'],
            ].map(([t, b], i) => (
              <div key={i} style={{
                background:'#FBF7E9', padding:'12px 14px',
                border:'1px solid rgba(80,70,40,.18)',
                transform:`rotate(${i % 2 ? 1 : -1}deg)`,
                boxShadow:'0 2px 4px rgba(60,50,30,.1)',
              }}>
                <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:10, letterSpacing:'.2em', textTransform:'uppercase', color:'#586B43', marginBottom:4 }}>{t}</div>
                <div style={{ fontFamily:'"Cormorant Garamond", serif', fontSize:16, fontStyle:'italic', lineHeight:1.4, color:'#2d2a20' }} dangerouslySetInnerHTML={{__html: b}} />
              </div>
            ))}
          </div>
        </div>
        {/* Tea-scene photograph card */}
        <div style={{ transform:'rotate(1.5deg)', filter:'drop-shadow(0 6px 14px rgba(60,50,30,.2))' }}>
          <div style={{
            position:'absolute', marginTop:-14, marginLeft:'42%',
            width:120, height:24,
            background:'rgba(220,210,170,.7)',
            border:'1px dashed rgba(120,100,60,.35)',
            transform:'rotate(-2deg)',
          }}/>
          <div style={{ background:'#FBF7E9', padding:16, border:'1px solid rgba(80,70,40,.18)' }}>
            <div style={{ background:'#efe6cf', border:'1px solid rgba(80,70,40,.1)', overflow:'hidden' }}>
              <img src="images/tea-scene.png" alt="" style={{ display:'block', width:'100%', height:'auto' }}/>
            </div>
          </div>
        </div>
      </div>

      {/* SAVOURY HEADER */}
      <div style={{ marginTop:50, display:'flex', alignItems:'baseline', gap:14 }}>
        <div style={{ fontFamily:'"Caveat", cursive', fontSize:42, color:'#586B43' }}>The savoury,</div>
        <Dotted w={1100}/>
        <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:11, letterSpacing:'.3em', textTransform:'uppercase', color:'#6b6045' }}>savoury</div>
      </div>
      <div style={{ marginTop:18, display:'grid', gridTemplateColumns:'1fr 1fr', gap:30 }}>
        <Specimen name="Heritage tomato &amp; goat-cheese tartlets"
          latin="garnished with micro basil"
          h={260} rotate={-1} tape
          taglines={['sweet · acid · salt', 'all four colours of tomato']}
        ><img src="images/tartlet.png" alt="Heritage tomato tartlet" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover', background:'#FBF7E9' }}/></Specimen>
        <Specimen name="Coronation chicken on focaccia bread"
          latin="garnished with coriander"
          h={260} rotate={1} tape
          taglines={['the British classic', 'warm bread, gentle spice']}
        ><img src="images/focaccia.png" alt="Coronation chicken on focaccia" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover', background:'#FBF7E9' }}/></Specimen>
      </div>

      {/* SWEET HEADER */}
      <div style={{ marginTop:36, display:'flex', alignItems:'baseline', gap:14 }}>
        <div style={{ fontFamily:'"Caveat", cursive', fontSize:42, color:'#586B43' }}>And the sweet,</div>
        <Dotted w={1100}/>
        <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:11, letterSpacing:'.3em', textTransform:'uppercase', color:'#6b6045' }}>sweet</div>
      </div>
      <div style={{ marginTop:18, display:'grid', gridTemplateColumns:'1fr 1fr', gap:30 }}>
        <Specimen name="Scones with blueberry jam"
          latin="garnished with lavender"
          h={260} rotate={-.8} tape
          taglines={['jam, then cream — Devon-style', 'lavender for the nose']}
        ><img src="images/scone.png" alt="Scone with blueberry jam" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover', background:'#FBF7E9' }}/></Specimen>
        <Specimen name="Miniature rhubarb &amp; lemon cake"
          latin="zesty icing · garnished with violas"
          h={260} rotate={1.2} tape
          taglines={['tart, citrus, soft crumb', 'flowers picked at six']}
        ><img src="images/cake.png" alt="Rhubarb &amp; lemon cake" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover', background:'#FBF7E9' }}/></Specimen>
      </div>

      {/* PRODUCE STRIP — small specimen cards */}
      {/* PALETTE */}
      <div style={{ marginTop:136, marginBottom:100, display:'grid', gridTemplateColumns:'auto 1fr', gap:34, alignItems:'center' }}>
        <div>
          <div style={{ fontFamily:'"Caveat", cursive', fontSize:50, color:'#586B43', lineHeight:1 }}>palette,</div>
        </div>
        <div style={{ display:'grid', gridTemplateColumns:'repeat(7, 1fr)', gap:18 }}>
          {palette.map((c, i) => (
            <div key={c.hex} style={{ textAlign:'center', transform:`rotate(${i % 2 ? 1.4 : -1.4}deg)` }}>
              <div style={{
                width:'100%', aspectRatio:'1', background:c.hex,
                border:'1px solid rgba(80,70,40,.25)', borderRadius:'50%',
                boxShadow:'inset -8px -10px 22px rgba(0,0,0,.22), 0 3px 5px rgba(60,50,30,.18)',
              }}/>
              <div style={{ marginTop:8, fontFamily:'"Cormorant Garamond", serif', fontSize:19, fontWeight:600 }}>{c.name}</div>
              <div style={{ fontFamily:'"Caveat", cursive', fontSize:20, color:'#6b6045', lineHeight:1 }}>— {c.note}</div>
              <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:9, color:'#9a8a5a', marginTop:2 }}>{c.hex}</div>
            </div>
          ))}
        </div>
      </div>

      {/* PRODUCE STRIP — small specimen cards */}
      <div style={{ marginTop:0, display:'flex', alignItems:'baseline', gap:14 }}>
        <div style={{ fontFamily:'"Caveat", cursive', fontSize:36, color:'#586B43' }}>From our garden</div>
        <Dotted w={520}/>
        <div style={{ fontFamily:'"JetBrains Mono", ui-monospace, monospace', fontSize:11, letterSpacing:'.3em', textTransform:'uppercase', color:'#6b6045' }}>seasonal produce</div>
      </div>
      <div style={{ marginTop:14, display:'grid', gridTemplateColumns:'repeat(5, 1fr)', gap:18 }}>
        <Specimen name="Rhubarb"     latin="Rheum rhabarbarum" h={170} rotate={-1.6}>
          <img src="images/rhubarb.png" alt="Rhubarb" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover' }}/>
        </Specimen>
        <Specimen name="Blueberry"   latin="Vaccinium myrtillus" h={170} rotate={1}>
          <img src="images/blueberry.png" alt="Blueberry" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover' }}/>
        </Specimen>
        <Specimen name="Lemon"       latin="Citrus × limon" h={170} rotate={-.8}>
          <img src="images/lemon.png" alt="Lemon" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover' }}/>
        </Specimen>
        <Specimen name="Spring Flowers" latin="from the cutting beds" h={170} rotate={1.4}>
          <img src="images/spring-flowers.png" alt="Spring Flowers" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover' }}/>
        </Specimen>
        <Specimen name="Heart’s-ease viola" latin="Viola tricolor" h={170} rotate={-1.2}>
          <img src="images/viola.png" alt="Viola" style={{ position:'absolute', inset:0, width:'100%', height:'100%', objectFit:'cover' }}/>
        </Specimen>
      </div>

      {/* FOOTER */}
      <div style={{
        marginTop:100, marginLeft:0, marginRight:0,
        display:'flex', justifyContent:'space-between', alignItems:'baseline',
        borderTop:'1px dashed rgba(80,70,40,.4)', paddingTop:18,
        fontFamily:'"Cormorant Garamond", serif', fontStyle:'italic', fontSize:18, color:'#6b6045',
      }}>
        <span style={{ fontFamily:'"Caveat", cursive', fontSize:24, marginLeft:'auto' }}>— from Saleem’s journal, April 2026</span>
      </div>
    </div>
  );
}

window.BotanicalBoardHiRes = BotanicalBoardHiRes;
