// Tournament data extracted from the doc
const TEAMS = {
  usa: {
    name: 'TEAM USA',
    hcp: 136,
    players: [
      { name: 'Block', hcp: 4 },
      { name: 'Tom', hcp: 16 },
      { name: 'Jon', hcp: 17 },
      { name: 'Tony', hcp: 18 },
      { name: 'Piero', hcp: 18 },
      { name: 'Vin', hcp: 18 },
      { name: 'Nathan', hcp: 21 },
      { name: 'Giella', hcp: 24 },
    ],
  },
  euro: {
    name: 'TEAM EUROPE',
    hcp: 143,
    players: [
      { name: 'Vince', hcp: 9 },
      { name: 'Andy', hcp: 12 },
      { name: 'Richie', hcp: 18 },
      { name: 'Sam', hcp: 18 },
      { name: 'Greg', hcp: 19 },
      { name: 'Caimin', hcp: 19 },
      { name: 'Borgdan', hcp: 24 },
      { name: 'Tiernan', hcp: 24 },
    ],
  },
};

const SCHEDULE = [
  { when: 'Thu 5/14 AM', round: 'Day 1, Round 1', format: 'Match Play (group\'s choice)', points: 6 },
  { when: 'Thu 5/14 PM', round: 'Day 1, Round 2', format: 'Swap Til You Drop (team scramble)', points: 3 },
  { when: 'Fri 5/15', round: 'Day 2', format: 'Match Play (group\'s choice)', points: 6 },
  { when: 'Sat 5/16', round: 'Day 3', format: 'Match Play (group\'s choice)', points: 12 },
];

const DAYS = [
  {
    id: 'd1am',
    short: 'Day 1 AM',
    label: 'Day 1 · Round 1',
    date: 'Thursday, May 14',
    holes: 18,
    points: 6,
    course: {
      name: 'True Blue Golf Club',
      tee: '7:42 AM',
      url: 'truebluegolf.com',
      blurb: 'Mike Strantz\'s fourth signature design, opened to rave reviews in 1998. Strantz won Architect of the Year that same year for True Blue and its sister course Caledonia next door. Echoes of Pine Valley and Pinehurst #2 — natural, sandy, no two holes alike.',
      art: 'pine',
      photo: 'images/course-1.jpeg',
    },
    note: 'Match play. Group\'s choice of scramble, best ball, or shamble. 1.5 points per match.',
    matchups: [
      { usa: 'Tom + Nathan', euro: 'Greg + Borgdan', tee: '7:42 AM', scrHcp: '9 vs 10', strokes: '—', bb: 'Tom 0 / Nathan 4 / Greg 2 / Borgdan 6' },
      { usa: 'Jon + Tony', euro: 'Vince + Sam', tee: '7:51 AM', scrHcp: '9 vs 5', strokes: 'Euro gives 1', bb: 'Vince 0 / Jon 6 / Tony 7 / Sam 7' },
      { usa: 'Vin + Giella', euro: 'Caimin + Tiernan', tee: '8:00 AM', scrHcp: '10 vs 10', strokes: '—', bb: 'Vin 0 / Caimin 1 / Giella 5 / Tiernan 5' },
      { usa: 'Block + Piero', euro: 'Andy + Richie', tee: '8:09 AM', scrHcp: '4 vs 7', strokes: '—', bb: 'Block 0 / Piero 11 / Andy 6 / Richie 11' },
    ],
  },
  {
    id: 'd1pm',
    short: 'Day 1 PM',
    label: 'Swap Til You Drop',
    date: 'Thursday, May 14 · Day 1, Round 2',
    holes: 18,
    points: 3,
    course: {
      name: 'Caledonia Golf & Fish Club',
      tee: '2:18 PM',
      url: 'caledoniagolfandfishclub.com',
      blurb: 'Strantz\'s first solo design (1994) and one of the most photographed finishing holes in America. Live oaks, tidal flowers, large creative greens guarded by ponds and bunkers. Often described as a beautiful day in a floral nature park.',
      art: 'marsh',
      photo: 'images/course-2.jpg',
      photoPosition: 'center 30%',
    },
    swap: true,
    intro: 'Custom team-bonding scramble. Played scratch — no handicap. 3 points: 1 Front / 1 Back / 1 Full 18 (lowest team gross score wins each).',
    front: [
      { team: 'USA G1', tee: '2:18 PM', start: 'Hole 1', players: 'Block (4), Piero (18), Nathan (21), Giella (24)' },
      { team: 'USA G2', tee: '2:27 PM', start: 'Hole 1', players: 'Jon (17), Tom (16), Tony (18), Vin (18)' },
      { team: 'Euro G1', tee: '2:18 PM', start: 'Hole 10', players: 'Vince (9), Sam (18), Tiernan (24), Borgdan (24)' },
      { team: 'Euro G2', tee: '2:27 PM', start: 'Hole 10', players: 'Andy (12), Richie (18), Greg (19), Caimin (19)' },
    ],
    back: [
      { team: 'USA G1', players: 'Block (4), Nathan (21), Jon (17), Tony (18)' },
      { team: 'USA G2', players: 'Giella (24), Piero (18), Tom (16), Vin (18)' },
      { team: 'Euro G1', players: 'Vince (9), Sam (18), Andy (12), Caimin (19)' },
      { team: 'Euro G2', players: 'Borgdan (24), Tiernan (24), Richie (18), Greg (19)' },
    ],
    rules: [
      'Each foursome is all same team — no mixed groups.',
      '2-man scramble inside the foursome. Every hole, the 4 split into two pairs (2v2).',
      'Partners rotate every hole. No back-to-back same partners.',
      'Hole score = sum of both pairs\' scramble scores. Pair A makes 4, Pair B makes 5 → foursome posts a 9.',
      'After 9 holes, each team reshuffles into the back-9 foursomes above.',
    ],
    scoring: [
      { pts: '1 pt', what: 'Front', detail: 'each team\'s first 9, before the swap.' },
      { pts: '1 pt', what: 'Back', detail: 'each team\'s second 9, after the swap.' },
      { pts: '1 pt', what: 'Full 18', detail: 'each team\'s total across all 18 holes (both foursomes, both nines).' },
    ],
  },
  {
    id: 'd2',
    short: 'Day 2',
    label: 'Day 2',
    date: 'Friday, May 15',
    holes: 18,
    points: 6,
    course: {
      name: 'Pawleys Plantation',
      tee: '9:03 AM',
      url: 'pawleysplantation.com',
      blurb: 'Jack Nicklaus design weaving through moss-draped oaks and along a stunning tidal marsh. The opening nine winds through maritime forest; the back nine is the most memorable in Myrtle Beach with six holes playing right along the water. Reward bold play, punish careless play. Bring an extra sleeve.',
      art: 'coastal',
      photo: 'images/course-3.jpg',
    },
    note: 'Match play. Group\'s choice of scramble, best ball, or shamble. 1.5 points per match.',
    matchups: [
      { usa: 'Block + Giella', euro: 'Caimin + Borgdan', tee: '9:03 AM · Hole 1', scrHcp: '2 vs 10', strokes: 'USA gives 5', bb: 'Block 0 / Giella 16 / Caimin 12 / Borgdan 16' },
      { usa: 'Tom + Tony', euro: 'Andy + Sam', tee: '9:03 AM · Hole 10', scrHcp: '8 vs 7', strokes: '—', bb: 'Andy 0 / Tom 3 / Tony 5 / Sam 5' },
      { usa: 'Jon + Vin', euro: 'Richie + Greg', tee: '9:12 AM · Hole 1', scrHcp: '9 vs 9', strokes: '—', bb: 'Jon 0 / Vin 1 / Richie 1 / Greg 2' },
      { usa: 'Piero + Nathan', euro: 'Vince + Tiernan', tee: '9:39 AM · Hole 1', scrHcp: '9 vs 5', strokes: 'Euro gives 1', bb: 'Vince 0 / Piero 7 / Nathan 10 / Tiernan 12' },
    ],
  },
  {
    id: 'd3',
    short: 'Day 3',
    label: 'Day 3 · The Decider',
    date: 'Saturday, May 16',
    holes: 18,
    points: 12,
    decider: true,
    course: {
      name: 'Kings North at Myrtle Beach National',
      tee: '12:46 PM',
      url: 'myrtlebeachnational.com/new-kings-north',
      blurb: 'The spirit of Arnold Palmer\'s iconic design still defines Kings North, but a two-year renovation by architect Brandon Johnson (front nine 2024, back nine reopened October 2025) has given the course new greens, refined contours, and refreshed scenery. Honors the original vision; plays modern.',
      art: 'royal',
      photo: 'images/course-4.jpg',
    },
    note: 'Match play. Group\'s choice of scramble, best ball, or shamble. 3 points per match.',
    intro: 'Lazy morning at the beach and pool. Stretch the backs. Tell a few jokes about the day/night before. Then we settle this.',
    matchups: [
      { usa: 'Jon + Nathan', euro: 'Richie + Caimin', tee: '12:46 PM', scrHcp: '9 vs 9', strokes: '—', bb: 'Jon 0 / Nathan 3 / Richie 1 / Caimin 2' },
      { usa: 'Piero + Giella', euro: 'Sam + Borgdan', tee: '12:55 PM', scrHcp: '10 vs 10', strokes: '—', bb: 'Piero 0 / Sam 0 / Giella 5 / Borgdan 5' },
      { usa: 'Block + Tom', euro: 'Andy + Vince', tee: '1:04 PM', scrHcp: '4 vs 5', strokes: '—', bb: 'Block 0 / Tom 10 / Andy 6 / Vince 4' },
      { usa: 'Tony + Vin', euro: 'Greg + Tiernan', tee: '1:13 PM', scrHcp: '9 vs 10', strokes: '—', bb: 'Tony 0 / Vin 0 / Greg 1 / Tiernan 5' },
    ],
  },
];

Object.assign(window, { TEAMS, SCHEDULE, DAYS });
