// Fin — Fin45 mascot. Gold round-owl with black over-ear headphones.
// All parts are SVG primitives composed in z-order so any pose / expression /
// accessory can be reconfigured without re-drawing the silhouette.

const FIN = {
  gold:      '#D4A24C',
  goldDeep:  '#B68334',
  goldLight: '#E8C079',
  ink:       '#141414',
  inkSoft:   '#2A2723',
  paper:     '#FAFAF7',
  mute:      '#6B6864',
  beak:      '#C77A1F',
};

const STROKE = 10;       // body / accessory stroke
const STROKE_FINE = 6;   // small parts

// ---------- atomic parts ----------------------------------------------------

function FinHalo({ on = true, intensity = 1 }) {
  if (!on) return null;
  // intensity scales radius + opacity (1 = default, 1.3 = bigger/brighter)
  const r = 430 * (0.92 + 0.18 * intensity);
  return (
    <ellipse cx="512" cy="540" rx={r} ry={r}
      fill="url(#fin-halo)" opacity={Math.min(1, 0.85 + 0.35 * (intensity - 1))} />
  );
}

function FinDefs() {
  return (
    <defs>
      <radialGradient id="fin-halo" cx="50%" cy="50%" r="50%">
        <stop offset="35%" stopColor={FIN.gold} stopOpacity="0" />
        <stop offset="62%" stopColor={FIN.gold} stopOpacity="0.35" />
        <stop offset="78%" stopColor={FIN.gold} stopOpacity="0.18" />
        <stop offset="100%" stopColor={FIN.gold} stopOpacity="0" />
      </radialGradient>
      <radialGradient id="fin-belly" cx="50%" cy="60%" r="55%">
        <stop offset="0%" stopColor={FIN.goldLight} />
        <stop offset="100%" stopColor={FIN.goldLight} stopOpacity="0" />
      </radialGradient>
    </defs>
  );
}

// Round owl body silhouette. Two small ear tufts poke up; small feet at
// bottom. Drawn as one path so the outline reads as one continuous form.
function FinBody({ feet = true, tufts = true }) {
  return (
    <g>
      {/* ear tufts — sit above headphone band so they read as owl horns */}
      {tufts && (
        <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" strokeLinecap="round">
          <path d="M 440 240 Q 410 160 392 60 Q 372 150 360 240 Z" />
          <path d="M 584 240 Q 614 160 632 60 Q 652 150 664 240 Z" />
        </g>
      )}

      {/* body */}
      <ellipse
        cx="512" cy="540" rx="318" ry="338"
        fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE}
      />

      {/* facial disk (subtle lighter oval — owl cue) */}
      <ellipse cx="512" cy="500" rx="240" ry="240" fill="url(#fin-belly)" opacity="0.7" />

      {/* feet */}
      {feet && (
        <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
          <path d="M 410 855 q -38 0 -52 22 q -10 18 4 30 q 30 12 90 4 q 24 -4 22 -28 q -2 -28 -64 -28 z" />
          <path d="M 614 855 q 38 0 52 22 q 10 18 -4 30 q -30 12 -90 4 q -24 -4 -22 -28 q 2 -28 64 -28 z" />
        </g>
      )}
    </g>
  );
}

function FinHeadphones() {
  return (
    <g>
      {/* band — drawn as wide ink stroke arcing over head */}
      <path
        d="M 170 540 C 170 230 360 158 512 158 C 664 158 854 230 854 540"
        fill="none" stroke={FIN.ink} strokeWidth="46" strokeLinecap="round"
      />
      {/* thin highlight along band */}
      <path
        d="M 200 520 C 210 270 380 200 512 200 C 644 200 814 270 824 520"
        fill="none" stroke={FIN.inkSoft} strokeWidth="14" strokeLinecap="round" opacity="0.9"
      />

      {/* left earcup */}
      <g>
        <ellipse cx="178" cy="540" rx="78" ry="108"
          fill={FIN.ink} stroke={FIN.ink} strokeWidth={STROKE} />
        <ellipse cx="178" cy="540" rx="50" ry="78" fill={FIN.inkSoft} />
        <circle cx="178" cy="540" r="22" fill={FIN.gold} opacity="0.85" />
        <circle cx="178" cy="540" r="10" fill={FIN.ink} />
      </g>

      {/* right earcup */}
      <g>
        <ellipse cx="846" cy="540" rx="78" ry="108"
          fill={FIN.ink} stroke={FIN.ink} strokeWidth={STROKE} />
        <ellipse cx="846" cy="540" rx="50" ry="78" fill={FIN.inkSoft} />
        <circle cx="846" cy="540" r="22" fill={FIN.gold} opacity="0.85" />
        <circle cx="846" cy="540" r="10" fill={FIN.ink} />
      </g>
    </g>
  );
}

// ---------- expression parts -----------------------------------------------

// Eyes: 'open' | 'wide' | 'lookup' | 'lookdown' | 'wink-l' | 'wink-r' | 'smile'
function FinEyes({ state = 'open' }) {
  const L = { cx: 432, cy: 470 };
  const R = { cx: 592, cy: 470 };

  // pupil offset by direction
  const off = {
    open:     [0, 6],
    wide:     [0, 0],
    lookup:   [4, -14],
    lookdown: [0, 18],
    'wink-l': [0, 6],
    'wink-r': [0, 6],
    smile:    [0, 6],
  }[state] || [0, 6];

  const closedL = state === 'wink-l' || state === 'smile';
  const closedR = state === 'wink-r' || state === 'smile';

  const r = state === 'wide' ? 100 : 78;
  const pr = state === 'wide' ? 56 : 42;

  return (
    <g>
      {/* whites */}
      {!closedL && (
        <ellipse cx={L.cx} cy={L.cy} rx={r * 0.92} ry={r}
          fill={FIN.paper} stroke={FIN.ink} strokeWidth={STROKE} />
      )}
      {!closedR && (
        <ellipse cx={R.cx} cy={R.cy} rx={r * 0.92} ry={r}
          fill={FIN.paper} stroke={FIN.ink} strokeWidth={STROKE} />
      )}

      {/* pupils */}
      {!closedL && (
        <g>
          <circle cx={L.cx + off[0]} cy={L.cy + off[1]} r={pr} fill={FIN.ink} />
          <circle cx={L.cx + off[0] + pr * 0.35} cy={L.cy + off[1] - pr * 0.35}
                  r={pr * 0.28} fill={FIN.paper} />
          <circle cx={L.cx + off[0] - pr * 0.5} cy={L.cy + off[1] + pr * 0.4}
                  r={pr * 0.16} fill={FIN.paper} opacity="0.8" />
        </g>
      )}
      {!closedR && (
        <g>
          <circle cx={R.cx + off[0]} cy={R.cy + off[1]} r={pr} fill={FIN.ink} />
          <circle cx={R.cx + off[0] + pr * 0.35} cy={R.cy + off[1] - pr * 0.35}
                  r={pr * 0.28} fill={FIN.paper} />
          <circle cx={R.cx + off[0] - pr * 0.5} cy={R.cy + off[1] + pr * 0.4}
                  r={pr * 0.16} fill={FIN.paper} opacity="0.8" />
        </g>
      )}

      {/* closed-lid crescents */}
      {closedL && (
        <path d={`M ${L.cx - 70} ${L.cy + 10} Q ${L.cx} ${L.cy - 40} ${L.cx + 70} ${L.cy + 10}`}
          fill="none" stroke={FIN.ink} strokeWidth="14" strokeLinecap="round" />
      )}
      {closedR && (
        <path d={`M ${R.cx - 70} ${R.cy + 10} Q ${R.cx} ${R.cy - 40} ${R.cx + 70} ${R.cy + 10}`}
          fill="none" stroke={FIN.ink} strokeWidth="14" strokeLinecap="round" />
      )}
    </g>
  );
}

// Brows: 'neutral' | 'angry' | 'raised' | 'asym' | 'sad'
function FinBrows({ state = 'neutral' }) {
  const sw = 18;
  const paths = {
    neutral: [
      'M 358 360 Q 432 332 504 360',
      'M 520 360 Q 592 332 666 360',
    ],
    angry: [
      'M 358 380 Q 432 348 502 370',
      'M 522 370 Q 592 348 666 380',
    ],
    raised: [
      'M 358 330 Q 432 304 504 330',
      'M 520 330 Q 592 304 666 330',
    ],
    asym: [
      'M 358 360 Q 432 332 504 360',
      'M 520 376 Q 592 356 666 384',
    ],
    sad: [
      'M 358 348 Q 432 372 504 360',
      'M 520 360 Q 592 372 666 348',
    ],
  }[state];
  return (
    <g fill="none" stroke={FIN.ink} strokeWidth={sw} strokeLinecap="round">
      <path d={paths[0]} />
      <path d={paths[1]} />
    </g>
  );
}

// Beak: 'closed' | 'small' | 'wide' | 'pursed' | 'smile'
function FinBeak({ state = 'closed' }) {
  const cx = 512;
  const cy = 590;
  if (state === 'wide') {
    // wide open shouting — show ink interior + tongue
    return (
      <g>
        <ellipse cx={cx} cy={cy + 22} rx="62" ry="58"
          fill={FIN.ink} stroke={FIN.ink} strokeWidth={STROKE} />
        <ellipse cx={cx} cy={cy + 48} rx="34" ry="22" fill={FIN.beak} />
        {/* upper beak ridge */}
        <path d={`M ${cx - 50} ${cy - 24} L ${cx} ${cy - 6} L ${cx + 50} ${cy - 24}`}
          fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
      </g>
    );
  }
  if (state === 'small') {
    return (
      <g>
        <path d={`M ${cx - 36} ${cy - 8} Q ${cx} ${cy - 20} ${cx + 36} ${cy - 8}
                  Q ${cx + 20} ${cy + 26} ${cx} ${cy + 30}
                  Q ${cx - 20} ${cy + 26} ${cx - 36} ${cy - 8} Z`}
          fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
        <path d={`M ${cx - 24} ${cy + 6} Q ${cx} ${cy + 14} ${cx + 24} ${cy + 6}`}
          stroke={FIN.ink} strokeWidth="6" fill="none" strokeLinecap="round" />
      </g>
    );
  }
  if (state === 'pursed') {
    return (
      <path d={`M ${cx - 32} ${cy - 4} L ${cx} ${cy + 18} L ${cx + 32} ${cy - 4} Z`}
        fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
    );
  }
  if (state === 'smile') {
    return (
      <g>
        <path d={`M ${cx - 40} ${cy - 6} Q ${cx} ${cy - 16} ${cx + 40} ${cy - 6}
                  Q ${cx} ${cy + 36} ${cx - 40} ${cy - 6} Z`}
          fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
      </g>
    );
  }
  if (state === 'frown') {
    // closed, downturned corners
    return (
      <g>
        <path d={`M ${cx - 28} ${cy - 4} L ${cx + 28} ${cy - 4} L ${cx} ${cy + 30} Z`}
          fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
        <path d={`M ${cx - 34} ${cy + 36} Q ${cx} ${cy + 24} ${cx + 34} ${cy + 36}`}
          fill="none" stroke={FIN.ink} strokeWidth="8" strokeLinecap="round" />
      </g>
    );
  }
  // closed (default — diamond beak)
  return (
    <path d={`M ${cx - 32} ${cy - 6} L ${cx + 32} ${cy - 6} L ${cx} ${cy + 32} Z`}
      fill={FIN.beak} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
  );
}

// Tiny blush dots (used on a couple of friendlier poses)
function FinBlush({ on = false }) {
  if (!on) return null;
  return (
    <g fill={FIN.goldDeep} opacity="0.5">
      <ellipse cx="320" cy="600" rx="28" ry="14" />
      <ellipse cx="704" cy="600" rx="28" ry="14" />
    </g>
  );
}

// ---------- accessories / hands --------------------------------------------

// All hands are gold mitten-blobs with ink stroke; positioned per pose.
function CupHand() {
  // cupped hand outside the right earcup — for "listening"
  // Palm faces forward, fingers arch up like a "hear better" cup.
  return (
    <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" strokeLinecap="round">
      {/* palm */}
      <path d="M 930 410
               C 980 414 998 460 988 500
               C 982 530 968 552 942 568
               C 916 584 884 580 872 558
               C 866 546 868 530 876 520
               L 902 510
               C 894 500 890 484 894 466
               C 898 446 910 410 930 410 Z" />
      {/* fingertip arches along the top edge */}
      <path d="M 902 414 Q 912 396 924 410" fill="none" strokeWidth="7" />
      <path d="M 928 408 Q 944 388 958 408" fill="none" strokeWidth="7" />
      <path d="M 962 416 Q 978 402 988 426" fill="none" strokeWidth="7" />
      {/* knuckle creases */}
      <path d="M 916 440 C 924 460 924 478 918 496" fill="none" strokeWidth="5" />
      <path d="M 944 444 C 956 466 956 488 950 510" fill="none" strokeWidth="5" />
      <path d="M 972 452 C 982 476 982 498 974 520" fill="none" strokeWidth="5" />
    </g>
  );
}

function Megaphone() {
  // megaphone in right hand extending out right side
  return (
    <g>
      {/* sound bolts */}
      <g fill={FIN.gold} stroke={FIN.ink} strokeWidth="6" strokeLinejoin="round" opacity="0.95">
        <path d="M 980 380 L 940 444 L 968 444 L 938 504 L 998 432 L 970 432 Z" />
        <path d="M 936 280 L 922 326 L 944 320 L 936 358" fill="none" strokeWidth="10" strokeLinecap="round" />
        <path d="M 996 510 L 978 540 L 996 540" fill="none" strokeWidth="10" strokeLinecap="round" />
      </g>
      {/* handle */}
      <rect x="746" y="572" width="46" height="62" rx="10"
        fill={FIN.ink} stroke={FIN.ink} strokeWidth={STROKE} />
      {/* arm holding handle */}
      <path d="M 700 600 C 720 580 770 580 790 600 L 790 660 C 770 678 720 678 700 660 Z"
        fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
      {/* megaphone body */}
      <path d="M 786 470 L 942 388 L 942 588 L 786 506 Z"
        fill={FIN.ink} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round" />
      <ellipse cx="942" cy="488" rx="22" ry="100" fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} />
      <ellipse cx="942" cy="488" rx="12" ry="62" fill={FIN.ink} />
      {/* fist on left arm — pumped */}
      <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
        <path d="M 190 720 C 170 690 174 656 200 642 C 226 626 260 638 270 668
                 C 278 696 260 720 232 728 C 214 732 198 730 190 720 Z" />
        <path d="M 218 658 L 218 678 M 234 654 L 234 676 M 250 658 L 250 676"
          fill="none" strokeWidth="6" strokeLinecap="round" />
      </g>
    </g>
  );
}

function PointHand() {
  // pointing hand in front of body, finger forward
  return (
    <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
      <path d="M 240 700
               C 220 678 220 642 246 626
               C 264 614 286 614 304 624
               L 304 660
               L 372 624
               C 392 620 408 632 408 650
               C 408 666 396 678 380 680
               L 332 700
               L 332 740
               C 332 760 314 774 290 774
               C 264 774 244 758 240 740 Z" />
      <path d="M 320 638 L 320 672" fill="none" strokeWidth="6" strokeLinecap="round" />
      <path d="M 296 680 L 296 720" fill="none" strokeWidth="6" strokeLinecap="round" />
    </g>
  );
}

function HipHand() {
  // hand on hip — left side, paired with PointHand for "pointing" pose
  return (
    <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
      <path d="M 770 740
               C 800 720 832 728 846 752
               C 858 776 844 802 818 808
               C 794 814 770 800 762 780
               C 758 768 760 754 770 740 Z" />
    </g>
  );
}

function Newspaper() {
  // Fin holding a small newspaper / report in front, both hands gripping
  return (
    <g>
      {/* paper */}
      <g>
        <rect x="320" y="640" width="384" height="226" rx="14"
          fill={FIN.paper} stroke={FIN.ink} strokeWidth={STROKE} />
        {/* masthead */}
        <text x="512" y="688" textAnchor="middle"
          fill={FIN.ink} fontFamily="Newsreader, serif" fontWeight="700" fontSize="32"
          fontStyle="italic">The Fin Wire</text>
        <line x1="340" y1="708" x2="684" y2="708" stroke={FIN.ink} strokeWidth="3" />
        {/* article lines */}
        <g stroke={FIN.mute} strokeWidth="6" strokeLinecap="round">
          <line x1="344" y1="730" x2="488" y2="730" />
          <line x1="344" y1="752" x2="496" y2="752" />
          <line x1="344" y1="774" x2="472" y2="774" />
          <line x1="344" y1="796" x2="488" y2="796" />
          <line x1="344" y1="818" x2="460" y2="818" />
          <line x1="344" y1="840" x2="486" y2="840" />
        </g>
        {/* chart block */}
        <rect x="510" y="722" width="172" height="124" rx="4"
          fill={FIN.goldLight} stroke={FIN.ink} strokeWidth="3" opacity="0.7" />
        <polyline points="514,830 540,810 570,818 600,776 632,790 678,734"
          fill="none" stroke={FIN.ink} strokeWidth="5" strokeLinejoin="round" />
      </g>
      {/* hands gripping edges */}
      <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
        <path d="M 286 740 C 264 728 264 700 286 692 C 304 686 332 698 332 720
                 L 332 758 C 332 776 314 786 296 778 C 286 774 282 762 286 740 Z" />
        <path d="M 738 740 C 760 728 760 700 738 692 C 720 686 692 698 692 720
                 L 692 758 C 692 776 710 786 728 778 C 738 774 742 762 738 740 Z" />
      </g>
    </g>
  );
}

function CheekHands() {
  // two hands on cheeks — for shocked pose
  return (
    <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
      <path d="M 252 590
               C 226 590 208 612 214 642
               C 220 670 250 686 282 680
               C 312 674 326 648 320 622
               C 314 600 292 588 268 588 Z" />
      <path d="M 772 590
               C 798 590 816 612 810 642
               C 804 670 774 686 742 680
               C 712 674 698 648 704 622
               C 710 600 732 588 756 588 Z" />
      {/* finger creases */}
      <g fill="none" strokeWidth="5" strokeLinecap="round">
        <path d="M 244 620 C 256 626 260 644 254 660" />
        <path d="M 268 612 C 282 622 286 642 280 660" />
        <path d="M 780 620 C 768 626 764 644 770 660" />
        <path d="M 756 612 C 742 622 738 642 744 660" />
      </g>
    </g>
  );
}

function ChinHand() {
  // hand under beak — for thinking pose
  return (
    <g fill={FIN.gold} stroke={FIN.ink} strokeWidth={STROKE} strokeLinejoin="round">
      {/* arm coming up from lower body */}
      <path d="M 462 760
               C 444 738 442 706 458 690
               C 478 670 510 670 528 690
               C 548 712 542 740 524 760
               L 524 820
               C 510 836 478 836 462 820 Z" />
      {/* index pointing up to chin */}
      <path d="M 500 686 C 496 656 500 624 514 612
               C 530 600 552 612 552 634
               C 552 660 542 686 528 700" fill={FIN.gold} />
      <path d="M 514 640 L 514 686" fill="none" strokeWidth="5" strokeLinecap="round" />
    </g>
  );
}

// ---------- pose registry --------------------------------------------------

const POSES = {
  listening: {
    brows: 'asym',
    eyes:  'open',
    beak:  'smile',
    blush: false,
    accessoryFront: () => <CupHand />,
  },
  megaphone: {
    brows: 'angry',
    eyes:  'wide',
    beak:  'wide',
    accessoryFront: () => <Megaphone />,
  },
  pointing: {
    brows: 'raised',
    eyes:  'wink-l',
    beak:  'smile',
    blush: true,
    accessoryFront: () => (<><HipHand /><PointHand /></>),
  },
  reading: {
    brows: 'neutral',
    eyes:  'lookdown',
    beak:  'pursed',
    accessoryFront: () => <Newspaper />,
  },
  shocked: {
    brows: 'raised',
    eyes:  'wide',
    beak:  'wide',
    accessoryFront: () => <CheekHands />,
  },
  thinking: {
    brows: 'asym',
    eyes:  'lookup',
    beak:  'pursed',
    accessoryFront: () => <ChinHand />,
  },
};

// ---------- public mascot --------------------------------------------------

function Fin({ pose = 'listening', glow = true, bg = FIN.ink, size = 512, style }) {
  const cfg = POSES[pose] || POSES.listening;
  const showFeet = cfg.feet !== false;
  const showTufts = cfg.tufts !== false;
  const haloOn = glow && cfg.halo !== false;
  const haloI = cfg.haloIntensity || 1;
  return (
    <svg viewBox="0 0 1024 1024" width={size} height={size}
         style={{ display: 'block', background: bg, borderRadius: 24, ...style }}>
      <FinDefs />
      <FinHalo on={haloOn} intensity={haloI} />
      {cfg.accessoryBack && cfg.accessoryBack()}
      <FinBody feet={showFeet} tufts={showTufts} />
      <FinBrows state={cfg.brows} />
      <FinEyes state={cfg.eyes} />
      <FinBeak state={cfg.beak} />
      <FinBlush on={!!cfg.blush} />
      <FinHeadphones />
      {cfg.accessoryFront && cfg.accessoryFront()}
      {cfg.accessoryOver && cfg.accessoryOver()}
    </svg>
  );
}

// Compact head-only Fin (logo glyph). Crops body + feet, headphones tight.
function FinGlyph({ size = 200, bg = 'transparent', monochrome = null, style }) {
  // monochrome: pass a hex to render Fin in single ink color (for tight space)
  const gold = monochrome || FIN.gold;
  const ink = monochrome ? monochrome : FIN.ink;
  return (
    <svg viewBox="120 40 784 780" width={size} height={size}
         style={{ display: 'block', background: bg, ...style }}>
      {!monochrome && <FinDefs />}
      {/* tufts */}
      <g fill={gold} stroke={ink} strokeWidth={STROKE} strokeLinejoin="round" strokeLinecap="round">
        <path d="M 440 240 Q 410 160 392 60 Q 372 150 360 240 Z" />
        <path d="M 584 240 Q 614 160 632 60 Q 652 150 664 240 Z" />
      </g>
      {/* head */}
      <ellipse cx="512" cy="520" rx="318" ry="328"
        fill={gold} stroke={ink} strokeWidth={STROKE} />
      {/* brows neutral */}
      <g fill="none" stroke={ink} strokeWidth="18" strokeLinecap="round">
        <path d="M 358 360 Q 432 332 504 360" />
        <path d="M 520 360 Q 592 332 666 360" />
      </g>
      {/* eyes */}
      <g>
        <ellipse cx="432" cy="470" rx="72" ry="78" fill={monochrome ? gold : FIN.paper}
          stroke={ink} strokeWidth={STROKE} />
        <ellipse cx="592" cy="470" rx="72" ry="78" fill={monochrome ? gold : FIN.paper}
          stroke={ink} strokeWidth={STROKE} />
        <circle cx="432" cy="476" r="40" fill={ink} />
        <circle cx="592" cy="476" r="40" fill={ink} />
        {!monochrome && <>
          <circle cx="446" cy="462" r="11" fill={FIN.paper} />
          <circle cx="606" cy="462" r="11" fill={FIN.paper} />
        </>}
      </g>
      {/* beak */}
      <path d="M 480 588 L 544 588 L 512 622 Z"
        fill={monochrome ? gold : FIN.beak} stroke={ink} strokeWidth={STROKE} strokeLinejoin="round" />
      {/* headphones */}
      <path d="M 170 540 C 170 230 360 158 512 158 C 664 158 854 230 854 540"
        fill="none" stroke={ink} strokeWidth="46" strokeLinecap="round" />
      <ellipse cx="178" cy="540" rx="78" ry="108" fill={ink} stroke={ink} strokeWidth={STROKE} />
      <ellipse cx="846" cy="540" rx="78" ry="108" fill={ink} stroke={ink} strokeWidth={STROKE} />
      {!monochrome && <>
        <ellipse cx="178" cy="540" rx="50" ry="78" fill={FIN.inkSoft} />
        <ellipse cx="846" cy="540" rx="50" ry="78" fill={FIN.inkSoft} />
        <circle cx="178" cy="540" r="22" fill={gold} opacity="0.85" />
        <circle cx="846" cy="540" r="22" fill={gold} opacity="0.85" />
      </>}
    </svg>
  );
}

Object.assign(window, { Fin, FinGlyph, FIN, POSES });
