{
  "id": 125,
  "slug": "venue-seat-grid-picker",
  "name": "Interactive Venue/Seat Grid Picker with Zoom & Sticky Summary",
  "kind": "ui",
  "family": "Spatial Selection",
  "sourceSite": {
    "name": "Seats.io",
    "url": "https://www.seats.io",
    "verifiedStatus": 200
  },
  "tagline": "Pan-and-zoom SVG auditorium seat picker with section filters, sightline notes, and a sticky mobile checkout summary.",
  "whyUnique": "Makes dense spatial selection genuinely usable on 390px touch screens by pairing vector zoom/pan controls with section dimming and a persistent selection summary.",
  "theme": "dark",
  "mobileStrength": "high",
  "tags": [
    "seat-picker",
    "pan-zoom",
    "venue-map",
    "sticky-summary",
    "spatial-ui"
  ],
  "bestFor": [
    "Concert & theater ticketing",
    "Airline & train seat selection",
    "Cinema booking flows",
    "Conference & desk booking"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#0E1117",
      "name": "Arena Midnight"
    },
    {
      "role": "surface",
      "hex": "#161B26",
      "name": "Booth Slate"
    },
    {
      "role": "ink",
      "hex": "#F8FAFC",
      "name": "Stage White"
    },
    {
      "role": "accent",
      "hex": "#10B981",
      "name": "Selected Emerald"
    },
    {
      "role": "muted",
      "hex": "#94A3B8",
      "name": "Aisle Silver"
    }
  ],
  "typography": {
    "display": "Space Grotesk",
    "body": "Inter",
    "mono": "JetBrains Mono",
    "googleFontsUrl": "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@600&family=Space+Grotesk:wght@700&display=swap",
    "scaleNotes": "Compact high-contrast seat numbers inside SVG nodes paired with tabular-nums ticket totals."
  },
  "layoutNotes": "Interactive pan/zoom SVG stage viewport with top section-filter pills and zoom controls, paired with a sticky right summary rail on desktop and a fixed bottom summary bar on mobile.",
  "interactionNotes": "Tap available seats to select/deselect (up to 6), drag background to pan, use +/−/1:1 controls to zoom, filter by price tier, and inspect live sightline descriptions per row.",
  "mobileNotes": "Auto-fits initial zoom scale to 390px viewports, uses touch-action: none on the map viewport for crisp panning, and keeps checkout total pinned at the bottom.",
  "agentGuardrails": {
    "do": [
      "Always include explicit +, -, and Reset (1:1) zoom buttons alongside touch/pointer pan controls",
      "Differentiate Available, Selected, VIP/Tier, and Sold seats clearly with both color and contrast/opacity",
      "Keep selected seat IDs and running total persistently visible in a sticky bar so users never lose track while zoomed in"
    ],
    "dont": [
      "Do not rely on tiny unzoomable bitmap seat charts on mobile screens",
      "Do not allow selecting sold seats without clear disabled visual feedback"
    ]
  },
  "demoFile": "demos/venue-seat-grid-picker.html",
  "thumbDesktop": "thumbs/venue-seat-grid-picker-desktop.webp",
  "thumbMobile": "thumbs/venue-seat-grid-picker-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/venue-seat-grid-picker",
    "markdown": "https://templates.michaelpitts.net/t/venue-seat-grid-picker.md",
    "api": "https://templates.michaelpitts.net/api/templates/venue-seat-grid-picker",
    "demo": "https://templates.michaelpitts.net/demos/venue-seat-grid-picker.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/venue-seat-grid-picker-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/venue-seat-grid-picker-mobile.webp"
  },
  "agentPrompt": "Design & build using template #125 \"Interactive Venue/Seat Grid Picker with Zoom & Sticky Summary\" (ui / Spatial Selection, dark theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/venue-seat-grid-picker.md\nLive demo: https://templates.michaelpitts.net/demos/venue-seat-grid-picker.html\nReal-world inspiration: Seats.io (https://www.seats.io)\n\nCore aesthetic: Makes dense spatial selection genuinely usable on 390px touch screens by pairing vector zoom/pan controls with section dimming and a persistent selection summary.\nPalette: canvas: #0E1117 (Arena Midnight), surface: #161B26 (Booth Slate), ink: #F8FAFC (Stage White), accent: #10B981 (Selected Emerald), muted: #94A3B8 (Aisle Silver)\nTypography: Display=\"Space Grotesk\", Body=\"Inter\", Mono=\"JetBrains Mono\"\nLayout: Interactive pan/zoom SVG stage viewport with top section-filter pills and zoom controls, paired with a sticky right summary rail on desktop and a fixed bottom summary bar on mobile.\nInteractions: Tap available seats to select/deselect (up to 6), drag background to pan, use +/−/1:1 controls to zoom, filter by price tier, and inspect live sightline descriptions per row.\nMobile: Auto-fits initial zoom scale to 390px viewports, uses touch-action: none on the map viewport for crisp panning, and keeps checkout total pinned at the bottom.\n\nGuardrails:\n- DO: Always include explicit +, -, and Reset (1:1) zoom buttons alongside touch/pointer pan controls\n- DO: Differentiate Available, Selected, VIP/Tier, and Sold seats clearly with both color and contrast/opacity\n- DO: Keep selected seat IDs and running total persistently visible in a sticky bar so users never lose track while zoomed in\n- DON'T: Do not rely on tiny unzoomable bitmap seat charts on mobile screens\n- DON'T: Do not allow selecting sold seats without clear disabled visual feedback",
  "sourceCode": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Interactive Venue Seat Grid Picker with Zoom & Sticky Summary</title>\n<style>\n  :root {\n    --canvas: #0E1117;\n    --surface: #161B26;\n    --surface-2: #1E2534;\n    --ink: #F8FAFC;\n    --accent: #10B981;\n    --vip: #F59E0B;\n    --balcony: #38BDF8;\n    --sold: #334155;\n    --muted: #94A3B8;\n    --border: rgba(148, 163, 184, 0.16);\n  }\n  * { box-sizing: border-box; margin: 0; padding: 0; }\n  html, body {\n    min-height: 100%;\n    background: var(--canvas);\n    color: var(--ink);\n    font-family: -apple-system, BlinkMacSystemFont, \"Inter\", \"Segoe UI\", Roboto, sans-serif;\n    overflow-x: hidden;\n    -webkit-font-smoothing: antialiased;\n  }\n  header {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    padding: 14px 18px;\n    background: var(--surface);\n    border-bottom: 1px solid var(--border);\n  }\n  .event-info h1 {\n    font-size: clamp(1rem, 2.5vw, 1.25rem);\n    letter-spacing: -0.02em;\n  }\n  .event-info p {\n    font-size: 0.78rem;\n    color: var(--muted);\n  }\n  .legend {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 12px;\n    font-size: 0.75rem;\n    color: var(--muted);\n  }\n  .legend-item {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n  }\n  .dot {\n    width: 11px;\n    height: 11px;\n    border-radius: 50%;\n    display: inline-block;\n  }\n\n  .workspace {\n    max-width: 1200px;\n    margin: 0 auto;\n    padding: 16px 16px 132px;\n    display: grid;\n    grid-template-columns: 1fr;\n    gap: 16px;\n  }\n  @media (min-width: 940px) {\n    .workspace {\n      grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);\n      padding: 22px 24px 40px;\n      align-items: start;\n    }\n  }\n\n  .map-card {\n    background: var(--surface);\n    border: 1px solid var(--border);\n    border-radius: 18px;\n    overflow: hidden;\n    position: relative;\n  }\n  .map-toolbar {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 8px;\n    padding: 10px 14px;\n    border-bottom: 1px solid var(--border);\n    background: rgba(14, 17, 23, 0.5);\n  }\n  .filter-pills {\n    display: flex;\n    gap: 6px;\n    overflow-x: auto;\n    scrollbar-width: none;\n  }\n  .filter-pill {\n    min-height: 36px;\n    padding: 0 12px;\n    border-radius: 999px;\n    border: 1px solid var(--border);\n    background: var(--surface-2);\n    color: var(--muted);\n    font-size: 0.76rem;\n    font-weight: 700;\n    cursor: pointer;\n    white-space: nowrap;\n  }\n  .filter-pill.active {\n    background: rgba(16, 185, 129, 0.16);\n    border-color: var(--accent);\n    color: #6EE7B7;\n  }\n\n  .zoom-controls {\n    display: flex;\n    gap: 6px;\n    flex-shrink: 0;\n  }\n  .zoom-btn {\n    width: 40px;\n    height: 40px;\n    border-radius: 10px;\n    border: 1px solid var(--border);\n    background: var(--surface-2);\n    color: var(--ink);\n    font-size: 1.05rem;\n    font-weight: 700;\n    cursor: pointer;\n    display: grid;\n    place-items: center;\n  }\n  .zoom-btn:hover { border-color: var(--accent); }\n\n  .viewport {\n    position: relative;\n    height: clamp(340px, 52vh, 520px);\n    overflow: hidden;\n    background: radial-gradient(circle at 50% 0%, #1B253B 0%, #0E1117 75%);\n    touch-action: none;\n    cursor: grab;\n  }\n  .viewport.panning { cursor: grabbing; }\n  .stage-transform {\n    width: 680px;\n    height: 460px;\n    position: absolute;\n    left: 50%;\n    top: 50%;\n    transform-origin: center center;\n    will-change: transform;\n  }\n  svg#venueSvg {\n    width: 100%;\n    height: 100%;\n    display: block;\n    user-select: none;\n  }\n  .seat {\n    cursor: pointer;\n    transition: transform 0.12s ease, opacity 0.15s ease;\n  }\n  .seat:hover { opacity: 0.85; }\n  .seat.sold { cursor: not-allowed; opacity: 0.4; }\n  .seat.dimmed { opacity: 0.16; }\n\n  .sightline-bar {\n    padding: 10px 14px;\n    border-top: 1px solid var(--border);\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    font-size: 0.78rem;\n    color: var(--muted);\n  }\n  .sightline-bar strong { color: var(--ink); }\n\n  /* Desktop right summary panel */\n  aside.summary-panel {\n    background: var(--surface);\n    border: 1px solid var(--border);\n    border-radius: 18px;\n    padding: 18px;\n    display: none;\n    flex-direction: column;\n    gap: 14px;\n  }\n  @media (min-width: 940px) {\n    aside.summary-panel { display: flex; }\n  }\n  aside.summary-panel h2 { font-size: 1rem; }\n  .seat-chip-list {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n    max-height: 250px;\n    overflow-y: auto;\n  }\n  .seat-row {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 10px;\n    background: var(--surface-2);\n    border: 1px solid var(--border);\n    padding: 10px 12px;\n    border-radius: 12px;\n    font-size: 0.84rem;\n  }\n  .seat-row small { display: block; font-size: 0.74rem; color: var(--muted); }\n  .remove-seat {\n    width: 32px;\n    height: 32px;\n    border-radius: 8px;\n    border: none;\n    background: rgba(255,255,255,0.06);\n    color: var(--muted);\n    cursor: pointer;\n  }\n  .remove-seat:hover { color: #FCA5A5; background: rgba(239, 68, 68, 0.16); }\n\n  .checkout-btn {\n    min-height: 48px;\n    width: 100%;\n    border-radius: 12px;\n    border: none;\n    background: var(--accent);\n    color: #052E16;\n    font-weight: 800;\n    font-size: 0.94rem;\n    cursor: pointer;\n  }\n  .checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n  /* Sticky Bottom Summary Bar on Mobile */\n  .mobile-sticky-bar {\n    position: fixed;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    z-index: 40;\n    background: rgba(22, 27, 38, 0.96);\n    backdrop-filter: blur(12px);\n    border-top: 1px solid var(--border);\n    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 12px;\n  }\n  @media (min-width: 940px) {\n    .mobile-sticky-bar { display: none; }\n  }\n  .mobile-meta strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }\n  .mobile-meta span { font-size: 0.76rem; color: var(--muted); }\n  .mobile-cta {\n    min-height: 46px;\n    padding: 0 20px;\n    border-radius: 12px;\n    border: none;\n    background: var(--accent);\n    color: #052E16;\n    font-weight: 800;\n    font-size: 0.9rem;\n    cursor: pointer;\n  }\n  .mobile-cta:disabled { opacity: 0.4; cursor: not-allowed; }\n</style>\n</head>\n<body>\n  <header>\n    <div class=\"event-info\">\n      <h1>Philharmonic Hall · Nils Frahm Live</h1>\n      <p>Sat, Nov 14 · 8:00 PM · Tap seats to select, drag to pan, + / − to zoom</p>\n    </div>\n    <div class=\"legend\" aria-label=\"Seat legend\">\n      <span class=\"legend-item\"><span class=\"dot\" style=\"background:var(--vip)\"></span>VIP $145</span>\n      <span class=\"legend-item\"><span class=\"dot\" style=\"background:var(--balcony)\"></span>Orchestra $95</span>\n      <span class=\"legend-item\"><span class=\"dot\" style=\"background:var(--accent)\"></span>Selected</span>\n      <span class=\"legend-item\"><span class=\"dot\" style=\"background:var(--sold)\"></span>Sold</span>\n    </div>\n  </header>\n\n  <main class=\"workspace\">\n    <section class=\"map-card\" aria-label=\"Interactive seating chart\">\n      <div class=\"map-toolbar\">\n        <div class=\"filter-pills\" role=\"group\" aria-label=\"Filter by section\">\n          <button class=\"filter-pill active\" data-zone=\"all\" type=\"button\">All Sections</button>\n          <button class=\"filter-pill\" data-zone=\"VIP\" type=\"button\">VIP Front ($145)</button>\n          <button class=\"filter-pill\" data-zone=\"Orchestra\" type=\"button\">Orchestra ($95)</button>\n        </div>\n        <div class=\"zoom-controls\">\n          <button id=\"zoomOut\" class=\"zoom-btn\" type=\"button\" aria-label=\"Zoom out\">−</button>\n          <button id=\"zoomReset\" class=\"zoom-btn\" type=\"button\" aria-label=\"Reset view\" style=\"font-size:0.76rem\">1:1</button>\n          <button id=\"zoomIn\" class=\"zoom-btn\" type=\"button\" aria-label=\"Zoom in\">+</button>\n        </div>\n      </div>\n\n      <div id=\"viewport\" class=\"viewport\">\n        <div id=\"stageTransform\" class=\"stage-transform\">\n          <svg id=\"venueSvg\" viewBox=\"0 0 680 460\" role=\"img\" aria-label=\"Venue seat map\"></svg>\n        </div>\n      </div>\n\n      <div class=\"sightline-bar\">\n        <span>Sightline: <strong id=\"sightlineText\">Tap any available seat to inspect row & view</strong></span>\n        <span id=\"zoomLabel\">Zoom 100%</span>\n      </div>\n    </section>\n\n    <aside class=\"summary-panel\" aria-label=\"Selected seats summary\">\n      <h2>Your Seats (<span id=\"deskCount\">0</span>)</h2>\n      <div id=\"deskSeatList\" class=\"seat-chip-list\"></div>\n      <div style=\"display:flex;justify-content:space-between;font-size:0.95rem;font-weight:700;border-top:1px solid var(--border);padding-top:12px;\">\n        <span>Total (incl. fees)</span>\n        <span id=\"deskTotal\">$0</span>\n      </div>\n      <button id=\"deskCheckout\" class=\"checkout-btn\" type=\"button\" disabled>Continue to Tickets</button>\n    </aside>\n  </main>\n\n  <div class=\"mobile-sticky-bar\">\n    <div class=\"mobile-meta\">\n      <strong id=\"mobTotal\">$0 · 0 seats</strong>\n      <span id=\"mobSeats\">Tap seats on the map to add</span>\n    </div>\n    <button id=\"mobCheckout\" class=\"mobile-cta\" type=\"button\" disabled>Checkout</button>\n  </div>\n\n<script>\n(() => {\n  const svg = document.getElementById('venueSvg');\n  const viewport = document.getElementById('viewport');\n  const stageTransform = document.getElementById('stageTransform');\n  const sightlineText = document.getElementById('sightlineText');\n  const zoomLabel = document.getElementById('zoomLabel');\n\n  const deskCount = document.getElementById('deskCount');\n  const deskSeatList = document.getElementById('deskSeatList');\n  const deskTotal = document.getElementById('deskTotal');\n  const deskCheckout = document.getElementById('deskCheckout');\n  const mobTotal = document.getElementById('mobTotal');\n  const mobSeats = document.getElementById('mobSeats');\n  const mobCheckout = document.getElementById('mobCheckout');\n\n  const seats = [];\n  const selectedIds = new Set(['B-5', 'B-6']);\n  let zoneFilter = 'all';\n  let scale = 0.88;\n  let panX = 0, panY = 0;\n\n  // Generate curved auditorium rows\n  const rows = [\n    { row: 'A', zone: 'VIP', price: 145, count: 10, y: 126, radius: 320, view: 'Front-row acoustic sweet spot' },\n    { row: 'B', zone: 'VIP', price: 145, count: 12, y: 162, radius: 360, view: 'Direct eye-level piano sightline' },\n    { row: 'C', zone: 'VIP', price: 145, count: 12, y: 198, radius: 400, view: 'Balanced center stage view' },\n    { row: 'D', zone: 'Orchestra', price: 95, count: 14, y: 248, radius: 440, view: 'Elevated orchestra mezzanine' },\n    { row: 'E', zone: 'Orchestra', price: 95, count: 14, y: 286, radius: 480, view: 'Wide panoramic stage framing' },\n    { row: 'F', zone: 'Orchestra', price: 95, count: 16, y: 324, radius: 520, view: 'Full-hall reverberation clarity' },\n    { row: 'G', zone: 'Orchestra', price: 95, count: 16, y: 362, radius: 560, view: 'Rear aisle quick-exit access' }\n  ];\n\n  const soldSet = new Set(['A-4','A-5','A-6','B-3','B-4','C-6','C-7','D-8','D-9','E-5','E-6','F-10','F-11','G-2']);\n\n  rows.forEach(r => {\n    for (let i = 1; i <= r.count; i++) {\n      const id = `${r.row}-${i}`;\n      const norm = (i - (r.count + 1) / 2) / (r.count / 2);\n      const x = 340 + norm * (r.count * 18.5);\n      const curveY = r.y + Math.pow(norm, 2) * 26;\n      seats.push({\n        id, row: r.row, num: i, zone: r.zone, price: r.price, view: r.view,\n        x, y: curveY, sold: soldSet.has(id)\n      });\n    }\n  });\n\n  function renderMap() {\n    let html = `\n      <defs>\n        <linearGradient id=\"stageGrad\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0%\" stop-color=\"#334155\"/><stop offset=\"100%\" stop-color=\"#1E293B\"/>\n        </linearGradient>\n      </defs>\n      <path d=\"M160 32 Q340 78 520 32 L540 74 Q340 116 140 74 Z\" fill=\"url(#stageGrad)\" stroke=\"rgba(255,255,255,0.18)\"/>\n      <text x=\"340\" y=\"68\" text-anchor=\"middle\" fill=\"#CBD5E1\" font-size=\"13\" font-weight=\"700\" letter-spacing=\"4\">MAIN STAGE</text>\n      <text x=\"340\" y=\"232\" text-anchor=\"middle\" fill=\"#64748B\" font-size=\"10\" font-weight=\"700\" letter-spacing=\"2\">CROSS AISLE</text>\n    `;\n\n    rows.forEach(r => {\n      html += `<text x=\"36\" y=\"${r.y + 18}\" fill=\"#64748B\" font-size=\"11\" font-weight=\"700\">${r.row}</text>`;\n      html += `<text x=\"644\" y=\"${r.y + 18}\" fill=\"#64748B\" font-size=\"11\" font-weight=\"700\" text-anchor=\"end\">${r.row}</text>`;\n    });\n\n    seats.forEach(s => {\n      const isSel = selectedIds.has(s.id);\n      const dimmed = zoneFilter !== 'all' && s.zone !== zoneFilter;\n      const fill = s.sold ? '#334155' : isSel ? '#10B981' : (s.zone === 'VIP' ? '#F59E0B' : '#38BDF8');\n      const stroke = isSel ? '#FFFFFF' : 'rgba(14,17,23,0.7)';\n      const cls = `seat${s.sold ? ' sold' : ''}${dimmed ? ' dimmed' : ''}`;\n      html += `\n        <g class=\"${cls}\" data-id=\"${s.id}\" tabindex=\"${s.sold ? '-1' : '0'}\" role=\"button\" aria-label=\"Row ${s.row} Seat ${s.num}, ${s.zone}, $${s.price}${s.sold ? ', Sold' : isSel ? ', Selected' : ''}\">\n          <circle cx=\"${s.x.toFixed(1)}\" cy=\"${s.y.toFixed(1)}\" r=\"${isSel ? 12.5 : 10.5}\" fill=\"${fill}\" stroke=\"${stroke}\" stroke-width=\"${isSel ? 2.5 : 1.5}\"/>\n          <text x=\"${s.x.toFixed(1)}\" y=\"${(s.y + 3.5).toFixed(1)}\" text-anchor=\"middle\" fill=\"${s.sold ? '#64748B' : '#0B1120'}\" font-size=\"8.5\" font-weight=\"800\" pointer-events=\"none\">${s.num}</text>\n        </g>\n      `;\n    });\n\n    svg.innerHTML = html;\n  }\n\n  function renderSummary() {\n    const picked = seats.filter(s => selectedIds.has(s.id));\n    const total = picked.reduce((acc, s) => acc + s.price, 0);\n\n    deskCount.textContent = picked.length;\n    deskTotal.textContent = '$' + total;\n    deskCheckout.disabled = picked.length === 0;\n    mobCheckout.disabled = picked.length === 0;\n\n    mobTotal.textContent = `$${total} · ${picked.length} ${picked.length === 1 ? 'seat' : 'seats'}`;\n    mobSeats.textContent = picked.length ? picked.map(s => s.id).join(', ') : 'Tap seats on the map to add';\n\n    if (picked.length === 0) {\n      deskSeatList.innerHTML = '<div style=\"font-size:0.82rem;color:var(--muted);padding:10px 0;\">No seats selected yet. Tap seats on the chart.</div>';\n    } else {\n      deskSeatList.innerHTML = picked.map(s => `\n        <div class=\"seat-row\">\n          <div>\n            <strong>Row ${s.row} · Seat ${s.num}</strong>\n            <small>${s.zone} · $${s.price}</small>\n          </div>\n          <button class=\"remove-seat\" data-remove=\"${s.id}\" type=\"button\" aria-label=\"Remove ${s.id}\">✕</button>\n        </div>\n      `).join('');\n      deskSeatList.querySelectorAll('.remove-seat').forEach(btn => {\n        btn.addEventListener('click', () => {\n          selectedIds.delete(btn.dataset.remove);\n          renderMap();\n          renderSummary();\n        });\n      });\n    }\n  }\n\n  function applyTransform() {\n    stageTransform.style.transform = `translate(calc(-50% + ${panX}px), calc(-50% + ${panY}px)) scale(${scale.toFixed(2)})`;\n    zoomLabel.textContent = `Zoom ${Math.round(scale * 100)}%`;\n  }\n\n  svg.addEventListener('click', (e) => {\n    const g = e.target.closest('.seat');\n    if (!g || g.classList.contains('sold')) return;\n    const id = g.dataset.id;\n    const s = seats.find(x => x.id === id);\n    if (selectedIds.has(id)) selectedIds.delete(id);\n    else if (selectedIds.size < 6) selectedIds.add(id);\n    sightlineText.textContent = `Row ${s.row} Seat ${s.num} (${s.zone} $${s.price}) — ${s.view}`;\n    renderMap();\n    renderSummary();\n  });\n\n  document.querySelectorAll('.filter-pill').forEach(btn => {\n    btn.addEventListener('click', () => {\n      zoneFilter = btn.dataset.zone;\n      document.querySelectorAll('.filter-pill').forEach(b => b.classList.toggle('active', b === btn));\n      renderMap();\n    });\n  });\n\n  document.getElementById('zoomIn').addEventListener('click', () => { scale = Math.min(1.85, scale + 0.2); applyTransform(); });\n  document.getElementById('zoomOut').addEventListener('click', () => { scale = Math.max(0.52, scale - 0.2); applyTransform(); });\n  document.getElementById('zoomReset').addEventListener('click', () => {\n    scale = window.innerWidth < 500 ? 0.56 : 0.88;\n    panX = 0; panY = 0;\n    applyTransform();\n  });\n\n  // Pointer pan on viewport\n  let panning = false, startX = 0, startY = 0, baseX = 0, baseY = 0;\n  viewport.addEventListener('pointerdown', (e) => {\n    if (e.target.closest('.seat')) return;\n    panning = true;\n    viewport.classList.add('panning');\n    startX = e.clientX; startY = e.clientY;\n    baseX = panX; baseY = panY;\n    viewport.setPointerCapture(e.pointerId);\n  });\n  viewport.addEventListener('pointermove', (e) => {\n    if (!panning) return;\n    panX = Math.max(-240, Math.min(240, baseX + (e.clientX - startX)));\n    panY = Math.max(-180, Math.min(180, baseY + (e.clientY - startY)));\n    applyTransform();\n  });\n  function stopPan() { panning = false; viewport.classList.remove('panning'); }\n  viewport.addEventListener('pointerup', stopPan);\n  viewport.addEventListener('pointercancel', stopPan);\n\n  function triggerCheckout(btn) {\n    const orig = btn.textContent;\n    btn.textContent = '✓ Seats Held (08:00)';\n    setTimeout(() => { btn.textContent = orig; }, 1800);\n  }\n  deskCheckout.addEventListener('click', () => triggerCheckout(deskCheckout));\n  mobCheckout.addEventListener('click', () => triggerCheckout(mobCheckout));\n\n  if (window.innerWidth < 500) scale = 0.56;\n  renderMap();\n  renderSummary();\n  applyTransform();\n})();\n</script>\n</body>\n</html>\n"
}
