# #125 — Interactive Venue/Seat Grid Picker with Zoom & Sticky Summary

> Pan-and-zoom SVG auditorium seat picker with section filters, sightline notes, and a sticky mobile checkout summary.

## Metadata

- **Index**: #125
- **Slug**: `venue-seat-grid-picker`
- **Kind**: `ui`
- **Family**: Spatial Selection
- **Theme**: `dark`
- **Mobile Strength**: `high`
- **Tags**: `seat-picker`, `pan-zoom`, `venue-map`, `sticky-summary`, `spatial-ui`
- **Best For**: Concert & theater ticketing, Airline & train seat selection, Cinema booking flows, Conference & desk booking
- **Real-World Inspiration**: [Seats.io](https://www.seats.io)
- **Detail Page**: https://templates.michaelpitts.net/t/venue-seat-grid-picker
- **Live Demo**: https://templates.michaelpitts.net/demos/venue-seat-grid-picker.html
- **JSON API**: https://templates.michaelpitts.net/api/templates/venue-seat-grid-picker

## Why This Aesthetic Is Unique

Makes dense spatial selection genuinely usable on 390px touch screens by pairing vector zoom/pan controls with section dimming and a persistent selection summary.

## Color Palette

| Role | Name | Hex |
|------|------|-----|
| `canvas` | Arena Midnight | `#0E1117` |
| `surface` | Booth Slate | `#161B26` |
| `ink` | Stage White | `#F8FAFC` |
| `accent` | Selected Emerald | `#10B981` |
| `muted` | Aisle Silver | `#94A3B8` |

## Typography

- **Display**: `Space Grotesk`
- **Body**: `Inter`
- **Mono**: `JetBrains Mono`
- **Scale Notes**: Compact high-contrast seat numbers inside SVG nodes paired with tabular-nums ticket totals.
- **Google Fonts**: https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@600&family=Space+Grotesk:wght@700&display=swap
  ```html
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@600&family=Space+Grotesk:wght@700&display=swap">
  ```

## Layout Architecture

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.

## Interaction & Micro-Motion Rules

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.

## Mobile & Responsive Rules

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.

## Agent Guardrails

### 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

### DON'T
- Do not rely on tiny unzoomable bitmap seat charts on mobile screens
- Do not allow selecting sold seats without clear disabled visual feedback

## Complete Standalone Starter Code

File: `demos/venue-seat-grid-picker.html`

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Interactive Venue Seat Grid Picker with Zoom & Sticky Summary</title>
<style>
  :root {
    --canvas: #0E1117;
    --surface: #161B26;
    --surface-2: #1E2534;
    --ink: #F8FAFC;
    --accent: #10B981;
    --vip: #F59E0B;
    --balcony: #38BDF8;
    --sold: #334155;
    --muted: #94A3B8;
    --border: rgba(148, 163, 184, 0.16);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    min-height: 100%;
    background: var(--canvas);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }
  header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .event-info h1 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    letter-spacing: -0.02em;
  }
  .event-info p {
    font-size: 0.78rem;
    color: var(--muted);
  }
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--muted);
  }
  .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
  }

  .workspace {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 132px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  @media (min-width: 940px) {
    .workspace {
      grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
      padding: 22px 24px 40px;
      align-items: start;
    }
  }

  .map-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
  }
  .map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(14, 17, 23, 0.5);
  }
  .filter-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filter-pill {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }
  .filter-pill.active {
    background: rgba(16, 185, 129, 0.16);
    border-color: var(--accent);
    color: #6EE7B7;
  }

  .zoom-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }
  .zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
  }
  .zoom-btn:hover { border-color: var(--accent); }

  .viewport {
    position: relative;
    height: clamp(340px, 52vh, 520px);
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #1B253B 0%, #0E1117 75%);
    touch-action: none;
    cursor: grab;
  }
  .viewport.panning { cursor: grabbing; }
  .stage-transform {
    width: 680px;
    height: 460px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    will-change: transform;
  }
  svg#venueSvg {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
  }
  .seat {
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
  }
  .seat:hover { opacity: 0.85; }
  .seat.sold { cursor: not-allowed; opacity: 0.4; }
  .seat.dimmed { opacity: 0.16; }

  .sightline-bar {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--muted);
  }
  .sightline-bar strong { color: var(--ink); }

  /* Desktop right summary panel */
  aside.summary-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    display: none;
    flex-direction: column;
    gap: 14px;
  }
  @media (min-width: 940px) {
    aside.summary-panel { display: flex; }
  }
  aside.summary-panel h2 { font-size: 1rem; }
  .seat-chip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
  }
  .seat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.84rem;
  }
  .seat-row small { display: block; font-size: 0.74rem; color: var(--muted); }
  .remove-seat {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    cursor: pointer;
  }
  .remove-seat:hover { color: #FCA5A5; background: rgba(239, 68, 68, 0.16); }

  .checkout-btn {
    min-height: 48px;
    width: 100%;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #052E16;
    font-weight: 800;
    font-size: 0.94rem;
    cursor: pointer;
  }
  .checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; }

  /* Sticky Bottom Summary Bar on Mobile */
  .mobile-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(22, 27, 38, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  @media (min-width: 940px) {
    .mobile-sticky-bar { display: none; }
  }
  .mobile-meta strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
  .mobile-meta span { font-size: 0.76rem; color: var(--muted); }
  .mobile-cta {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #052E16;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
  }
  .mobile-cta:disabled { opacity: 0.4; cursor: not-allowed; }
</style>
</head>
<body>
  <header>
    <div class="event-info">
      <h1>Philharmonic Hall · Nils Frahm Live</h1>
      <p>Sat, Nov 14 · 8:00 PM · Tap seats to select, drag to pan, + / − to zoom</p>
    </div>
    <div class="legend" aria-label="Seat legend">
      <span class="legend-item"><span class="dot" style="background:var(--vip)"></span>VIP $145</span>
      <span class="legend-item"><span class="dot" style="background:var(--balcony)"></span>Orchestra $95</span>
      <span class="legend-item"><span class="dot" style="background:var(--accent)"></span>Selected</span>
      <span class="legend-item"><span class="dot" style="background:var(--sold)"></span>Sold</span>
    </div>
  </header>

  <main class="workspace">
    <section class="map-card" aria-label="Interactive seating chart">
      <div class="map-toolbar">
        <div class="filter-pills" role="group" aria-label="Filter by section">
          <button class="filter-pill active" data-zone="all" type="button">All Sections</button>
          <button class="filter-pill" data-zone="VIP" type="button">VIP Front ($145)</button>
          <button class="filter-pill" data-zone="Orchestra" type="button">Orchestra ($95)</button>
        </div>
        <div class="zoom-controls">
          <button id="zoomOut" class="zoom-btn" type="button" aria-label="Zoom out">−</button>
          <button id="zoomReset" class="zoom-btn" type="button" aria-label="Reset view" style="font-size:0.76rem">1:1</button>
          <button id="zoomIn" class="zoom-btn" type="button" aria-label="Zoom in">+</button>
        </div>
      </div>

      <div id="viewport" class="viewport">
        <div id="stageTransform" class="stage-transform">
          <svg id="venueSvg" viewBox="0 0 680 460" role="img" aria-label="Venue seat map"></svg>
        </div>
      </div>

      <div class="sightline-bar">
        <span>Sightline: <strong id="sightlineText">Tap any available seat to inspect row & view</strong></span>
        <span id="zoomLabel">Zoom 100%</span>
      </div>
    </section>

    <aside class="summary-panel" aria-label="Selected seats summary">
      <h2>Your Seats (<span id="deskCount">0</span>)</h2>
      <div id="deskSeatList" class="seat-chip-list"></div>
      <div style="display:flex;justify-content:space-between;font-size:0.95rem;font-weight:700;border-top:1px solid var(--border);padding-top:12px;">
        <span>Total (incl. fees)</span>
        <span id="deskTotal">$0</span>
      </div>
      <button id="deskCheckout" class="checkout-btn" type="button" disabled>Continue to Tickets</button>
    </aside>
  </main>

  <div class="mobile-sticky-bar">
    <div class="mobile-meta">
      <strong id="mobTotal">$0 · 0 seats</strong>
      <span id="mobSeats">Tap seats on the map to add</span>
    </div>
    <button id="mobCheckout" class="mobile-cta" type="button" disabled>Checkout</button>
  </div>

<script>
(() => {
  const svg = document.getElementById('venueSvg');
  const viewport = document.getElementById('viewport');
  const stageTransform = document.getElementById('stageTransform');
  const sightlineText = document.getElementById('sightlineText');
  const zoomLabel = document.getElementById('zoomLabel');

  const deskCount = document.getElementById('deskCount');
  const deskSeatList = document.getElementById('deskSeatList');
  const deskTotal = document.getElementById('deskTotal');
  const deskCheckout = document.getElementById('deskCheckout');
  const mobTotal = document.getElementById('mobTotal');
  const mobSeats = document.getElementById('mobSeats');
  const mobCheckout = document.getElementById('mobCheckout');

  const seats = [];
  const selectedIds = new Set(['B-5', 'B-6']);
  let zoneFilter = 'all';
  let scale = 0.88;
  let panX = 0, panY = 0;

  // Generate curved auditorium rows
  const rows = [
    { row: 'A', zone: 'VIP', price: 145, count: 10, y: 126, radius: 320, view: 'Front-row acoustic sweet spot' },
    { row: 'B', zone: 'VIP', price: 145, count: 12, y: 162, radius: 360, view: 'Direct eye-level piano sightline' },
    { row: 'C', zone: 'VIP', price: 145, count: 12, y: 198, radius: 400, view: 'Balanced center stage view' },
    { row: 'D', zone: 'Orchestra', price: 95, count: 14, y: 248, radius: 440, view: 'Elevated orchestra mezzanine' },
    { row: 'E', zone: 'Orchestra', price: 95, count: 14, y: 286, radius: 480, view: 'Wide panoramic stage framing' },
    { row: 'F', zone: 'Orchestra', price: 95, count: 16, y: 324, radius: 520, view: 'Full-hall reverberation clarity' },
    { row: 'G', zone: 'Orchestra', price: 95, count: 16, y: 362, radius: 560, view: 'Rear aisle quick-exit access' }
  ];

  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']);

  rows.forEach(r => {
    for (let i = 1; i <= r.count; i++) {
      const id = `${r.row}-${i}`;
      const norm = (i - (r.count + 1) / 2) / (r.count / 2);
      const x = 340 + norm * (r.count * 18.5);
      const curveY = r.y + Math.pow(norm, 2) * 26;
      seats.push({
        id, row: r.row, num: i, zone: r.zone, price: r.price, view: r.view,
        x, y: curveY, sold: soldSet.has(id)
      });
    }
  });

  function renderMap() {
    let html = `
      <defs>
        <linearGradient id="stageGrad" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stop-color="#334155"/><stop offset="100%" stop-color="#1E293B"/>
        </linearGradient>
      </defs>
      <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)"/>
      <text x="340" y="68" text-anchor="middle" fill="#CBD5E1" font-size="13" font-weight="700" letter-spacing="4">MAIN STAGE</text>
      <text x="340" y="232" text-anchor="middle" fill="#64748B" font-size="10" font-weight="700" letter-spacing="2">CROSS AISLE</text>
    `;

    rows.forEach(r => {
      html += `<text x="36" y="${r.y + 18}" fill="#64748B" font-size="11" font-weight="700">${r.row}</text>`;
      html += `<text x="644" y="${r.y + 18}" fill="#64748B" font-size="11" font-weight="700" text-anchor="end">${r.row}</text>`;
    });

    seats.forEach(s => {
      const isSel = selectedIds.has(s.id);
      const dimmed = zoneFilter !== 'all' && s.zone !== zoneFilter;
      const fill = s.sold ? '#334155' : isSel ? '#10B981' : (s.zone === 'VIP' ? '#F59E0B' : '#38BDF8');
      const stroke = isSel ? '#FFFFFF' : 'rgba(14,17,23,0.7)';
      const cls = `seat${s.sold ? ' sold' : ''}${dimmed ? ' dimmed' : ''}`;
      html += `
        <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' : ''}">
          <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}"/>
          <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>
        </g>
      `;
    });

    svg.innerHTML = html;
  }

  function renderSummary() {
    const picked = seats.filter(s => selectedIds.has(s.id));
    const total = picked.reduce((acc, s) => acc + s.price, 0);

    deskCount.textContent = picked.length;
    deskTotal.textContent = '$' + total;
    deskCheckout.disabled = picked.length === 0;
    mobCheckout.disabled = picked.length === 0;

    mobTotal.textContent = `$${total} · ${picked.length} ${picked.length === 1 ? 'seat' : 'seats'}`;
    mobSeats.textContent = picked.length ? picked.map(s => s.id).join(', ') : 'Tap seats on the map to add';

    if (picked.length === 0) {
      deskSeatList.innerHTML = '<div style="font-size:0.82rem;color:var(--muted);padding:10px 0;">No seats selected yet. Tap seats on the chart.</div>';
    } else {
      deskSeatList.innerHTML = picked.map(s => `
        <div class="seat-row">
          <div>
            <strong>Row ${s.row} · Seat ${s.num}</strong>
            <small>${s.zone} · $${s.price}</small>
          </div>
          <button class="remove-seat" data-remove="${s.id}" type="button" aria-label="Remove ${s.id}">✕</button>
        </div>
      `).join('');
      deskSeatList.querySelectorAll('.remove-seat').forEach(btn => {
        btn.addEventListener('click', () => {
          selectedIds.delete(btn.dataset.remove);
          renderMap();
          renderSummary();
        });
      });
    }
  }

  function applyTransform() {
    stageTransform.style.transform = `translate(calc(-50% + ${panX}px), calc(-50% + ${panY}px)) scale(${scale.toFixed(2)})`;
    zoomLabel.textContent = `Zoom ${Math.round(scale * 100)}%`;
  }

  svg.addEventListener('click', (e) => {
    const g = e.target.closest('.seat');
    if (!g || g.classList.contains('sold')) return;
    const id = g.dataset.id;
    const s = seats.find(x => x.id === id);
    if (selectedIds.has(id)) selectedIds.delete(id);
    else if (selectedIds.size < 6) selectedIds.add(id);
    sightlineText.textContent = `Row ${s.row} Seat ${s.num} (${s.zone} $${s.price}) — ${s.view}`;
    renderMap();
    renderSummary();
  });

  document.querySelectorAll('.filter-pill').forEach(btn => {
    btn.addEventListener('click', () => {
      zoneFilter = btn.dataset.zone;
      document.querySelectorAll('.filter-pill').forEach(b => b.classList.toggle('active', b === btn));
      renderMap();
    });
  });

  document.getElementById('zoomIn').addEventListener('click', () => { scale = Math.min(1.85, scale + 0.2); applyTransform(); });
  document.getElementById('zoomOut').addEventListener('click', () => { scale = Math.max(0.52, scale - 0.2); applyTransform(); });
  document.getElementById('zoomReset').addEventListener('click', () => {
    scale = window.innerWidth < 500 ? 0.56 : 0.88;
    panX = 0; panY = 0;
    applyTransform();
  });

  // Pointer pan on viewport
  let panning = false, startX = 0, startY = 0, baseX = 0, baseY = 0;
  viewport.addEventListener('pointerdown', (e) => {
    if (e.target.closest('.seat')) return;
    panning = true;
    viewport.classList.add('panning');
    startX = e.clientX; startY = e.clientY;
    baseX = panX; baseY = panY;
    viewport.setPointerCapture(e.pointerId);
  });
  viewport.addEventListener('pointermove', (e) => {
    if (!panning) return;
    panX = Math.max(-240, Math.min(240, baseX + (e.clientX - startX)));
    panY = Math.max(-180, Math.min(180, baseY + (e.clientY - startY)));
    applyTransform();
  });
  function stopPan() { panning = false; viewport.classList.remove('panning'); }
  viewport.addEventListener('pointerup', stopPan);
  viewport.addEventListener('pointercancel', stopPan);

  function triggerCheckout(btn) {
    const orig = btn.textContent;
    btn.textContent = '✓ Seats Held (08:00)';
    setTimeout(() => { btn.textContent = orig; }, 1800);
  }
  deskCheckout.addEventListener('click', () => triggerCheckout(deskCheckout));
  mobCheckout.addEventListener('click', () => triggerCheckout(mobCheckout));

  if (window.innerWidth < 500) scale = 0.56;
  renderMap();
  renderSummary();
  applyTransform();
})();
</script>
</body>
</html>
```
