{
  "id": 99,
  "slug": "warp-records-archive",
  "name": "Warp Records Archive",
  "kind": "style",
  "family": "Kinetic, Film & Creative Studio",
  "sourceSite": {
    "name": "Warp Records",
    "url": "https://warp.net/",
    "verifiedStatus": 200
  },
  "tagline": "Experimental Sheffield/London electronic music label archive with stark sleeve grids, catalog numbers, and live spectral decks.",
  "whyUnique": "Honors three decades of avant-garde electronic sleeve art with razor-sharp 1px monochrome grids, WARP catalog codes, electric-amber signal accents, and an interactive spectral listening deck.",
  "theme": "dark",
  "mobileStrength": "native-first",
  "tags": [
    "electronic-music",
    "record-label",
    "sleeve-archive",
    "spectral-visualizer",
    "brutalist-catalog",
    "signal-amber"
  ],
  "bestFor": [
    "Independent record labels & electronic imprints",
    "Sound-design studios & synth instrument makers",
    "Music discographies & vinyl archive shops",
    "Audiovisual festival & club night portals"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#09090B",
      "name": "Pressing Pitch Black"
    },
    {
      "role": "surface",
      "hex": "#141418",
      "name": "Sleeve Matte Slate"
    },
    {
      "role": "ink",
      "hex": "#F4F4F6",
      "name": "Liner Note White"
    },
    {
      "role": "accent",
      "hex": "#FF9F1C",
      "name": "Oscillator Amber"
    },
    {
      "role": "muted",
      "hex": "#858592",
      "name": "Catalog Index Gray"
    }
  ],
  "typography": {
    "display": "Archivo Black, sans-serif",
    "body": "Space Grotesk, -apple-system, sans-serif",
    "mono": "Space Mono, ui-monospace, monospace",
    "googleFontsUrl": "https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap",
    "scaleNotes": "Stark condensed-impact Archivo Black artist titles (28–50px) paired with rigid uppercase Space Mono catalog codes (WARP021–WARP362) and BPM/format tags."
  },
  "layoutNotes": "Persistent top spectral listening deck with Canvas 2D animated frequency bars above a razor-bordered 1:1 geometric sleeve archive and a slide-over liner-notes tracklist drawer.",
  "interactionNotes": "Clicking any vinyl sleeve loads its release into the live Canvas 2D spectral deck, toggles Play/Pause animation, filters by era/format (12\" Vinyl / LP / Tape), and opens its full liner-notes drawer.",
  "mobileNotes": "Listening deck compacts cleanly at 390px with >=44px Play/Pause and format filter pills above a responsive 1-column sleeve catalog.",
  "agentGuardrails": {
    "do": [
      "Keep sleeve frames square (1:1) with crisp 0px corners and 1px hairline borders.",
      "Surface authentic catalog metadata (WARP code, pressing format, release year, track duration).",
      "Use Oscillator Amber (#FF9F1C) strictly for active playback states and live spectral peaks."
    ],
    "dont": [
      "Do not round vinyl sleeves into soft pill cards.",
      "Do not autoplay loud audio without explicit user interaction."
    ]
  },
  "demoFile": "demos/warp-records-archive.html",
  "thumbDesktop": "thumbs/warp-records-archive-desktop.webp",
  "thumbMobile": "thumbs/warp-records-archive-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/warp-records-archive",
    "markdown": "https://templates.michaelpitts.net/t/warp-records-archive.md",
    "api": "https://templates.michaelpitts.net/api/templates/warp-records-archive",
    "demo": "https://templates.michaelpitts.net/demos/warp-records-archive.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/warp-records-archive-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/warp-records-archive-mobile.webp"
  },
  "agentPrompt": "Design & build using template #099 \"Warp Records Archive\" (style / Kinetic, Film & Creative Studio, dark theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/warp-records-archive.md\nLive demo: https://templates.michaelpitts.net/demos/warp-records-archive.html\nReal-world inspiration: Warp Records (https://warp.net/)\n\nCore aesthetic: Honors three decades of avant-garde electronic sleeve art with razor-sharp 1px monochrome grids, WARP catalog codes, electric-amber signal accents, and an interactive spectral listening deck.\nPalette: canvas: #09090B (Pressing Pitch Black), surface: #141418 (Sleeve Matte Slate), ink: #F4F4F6 (Liner Note White), accent: #FF9F1C (Oscillator Amber), muted: #858592 (Catalog Index Gray)\nTypography: Display=\"Archivo Black, sans-serif\", Body=\"Space Grotesk, -apple-system, sans-serif\", Mono=\"Space Mono, ui-monospace, monospace\"\nLayout: Persistent top spectral listening deck with Canvas 2D animated frequency bars above a razor-bordered 1:1 geometric sleeve archive and a slide-over liner-notes tracklist drawer.\nInteractions: Clicking any vinyl sleeve loads its release into the live Canvas 2D spectral deck, toggles Play/Pause animation, filters by era/format (12\" Vinyl / LP / Tape), and opens its full liner-notes drawer.\nMobile: Listening deck compacts cleanly at 390px with >=44px Play/Pause and format filter pills above a responsive 1-column sleeve catalog.\n\nGuardrails:\n- DO: Keep sleeve frames square (1:1) with crisp 0px corners and 1px hairline borders.\n- DO: Surface authentic catalog metadata (WARP code, pressing format, release year, track duration).\n- DO: Use Oscillator Amber (#FF9F1C) strictly for active playback states and live spectral peaks.\n- DON'T: Do not round vinyl sleeves into soft pill cards.\n- DON'T: Do not autoplay loud audio without explicit user interaction.",
  "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>WARP — Experimental Electronic Catalogue Archive</title>\n  <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n  <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n  <link href=\"https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap\" rel=\"stylesheet\">\n  <style>\n    :root {\n      --canvas: #09090B;\n      --surface: #141418;\n      --ink: #F4F4F6;\n      --accent: #FF9F1C;\n      --muted: #858592;\n      --rule: rgba(244, 244, 246, 0.16);\n    }\n\n    *, *::before, *::after { box-sizing: border-box; }\n\n    html, body {\n      margin: 0;\n      padding: 0;\n      background: var(--canvas);\n      color: var(--ink);\n      font-family: 'Space Grotesk', -apple-system, sans-serif;\n      overflow-x: hidden;\n    }\n\n    .deck-bar {\n      position: sticky;\n      top: 0;\n      z-index: 30;\n      background: #050507;\n      border-bottom: 1px solid var(--rule);\n      display: grid;\n      grid-template-columns: auto 1fr auto;\n      align-items: center;\n      gap: 16px;\n      padding: 10px 20px;\n    }\n\n    .deck-left {\n      display: flex;\n      align-items: center;\n      gap: 12px;\n    }\n\n    .play-btn {\n      min-width: 44px;\n      min-height: 44px;\n      border: 1px solid var(--accent);\n      background: var(--accent);\n      color: #09090B;\n      font-family: 'Space Mono', monospace;\n      font-weight: 700;\n      font-size: 12px;\n      cursor: pointer;\n      padding: 0 14px;\n    }\n\n    .play-btn.paused {\n      background: transparent;\n      color: var(--accent);\n    }\n\n    .now-meta {\n      display: flex;\n      flex-direction: column;\n      gap: 2px;\n      min-width: 0;\n    }\n\n    .now-code {\n      font-family: 'Space Mono', monospace;\n      font-size: 10px;\n      color: var(--accent);\n      letter-spacing: 0.12em;\n    }\n\n    .now-title {\n      font-size: 13px;\n      font-weight: 700;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n\n    #specCanvas {\n      width: 100%;\n      height: 36px;\n      display: block;\n    }\n\n    .deck-time {\n      font-family: 'Space Mono', monospace;\n      font-size: 11px;\n      color: var(--muted);\n    }\n\n    .masthead {\n      padding: 36px 24px 28px;\n      border-bottom: 1px solid var(--rule);\n      display: flex;\n      justify-content: space-between;\n      align-items: flex-end;\n      flex-wrap: wrap;\n      gap: 20px;\n    }\n\n    .label-mark {\n      font-family: 'Archivo Black', sans-serif;\n      font-size: clamp(2.4rem, 6vw, 4.4rem);\n      line-height: 0.92;\n      letter-spacing: -0.02em;\n      margin: 0;\n    }\n\n    .label-sub {\n      font-family: 'Space Mono', monospace;\n      font-size: 11px;\n      color: var(--muted);\n      letter-spacing: 0.1em;\n      text-transform: uppercase;\n      margin: 8px 0 0;\n    }\n\n    .format-filters {\n      display: flex;\n      gap: 6px;\n      flex-wrap: wrap;\n    }\n\n    .fmt-btn {\n      min-height: 44px;\n      padding: 0 14px;\n      border: 1px solid var(--rule);\n      background: transparent;\n      color: var(--ink);\n      font-family: 'Space Mono', monospace;\n      font-size: 11px;\n      cursor: pointer;\n    }\n\n    .fmt-btn.active {\n      border-color: var(--accent);\n      color: var(--accent);\n      background: rgba(255, 159, 28, 0.1);\n    }\n\n    .archive-grid {\n      display: grid;\n      grid-template-columns: repeat(3, 1fr);\n      border-bottom: 1px solid var(--rule);\n    }\n\n    .sleeve-card {\n      border-right: 1px solid var(--rule);\n      border-bottom: 1px solid var(--rule);\n      padding: 20px;\n      background: var(--canvas);\n      display: flex;\n      flex-direction: column;\n      gap: 14px;\n      cursor: pointer;\n      transition: background 0.18s;\n    }\n\n    .sleeve-card:hover { background: var(--surface); }\n\n    .sleeve-card.selected {\n      background: var(--surface);\n      box-shadow: inset 0 0 0 1px var(--accent);\n    }\n\n    .sleeve-art {\n      width: 100%;\n      aspect-ratio: 1 / 1;\n      border: 1px solid var(--rule);\n      background: #0D0D11;\n      overflow: hidden;\n    }\n\n    .sleeve-art svg {\n      width: 100%;\n      height: 100%;\n      display: block;\n    }\n\n    .sleeve-top {\n      display: flex;\n      justify-content: space-between;\n      font-family: 'Space Mono', monospace;\n      font-size: 11px;\n      color: var(--accent);\n    }\n\n    .sleeve-artist {\n      font-family: 'Archivo Black', sans-serif;\n      font-size: 20px;\n      line-height: 1.1;\n      margin: 0;\n    }\n\n    .sleeve-title {\n      font-size: 14px;\n      color: var(--muted);\n      margin: 0;\n    }\n\n    .sleeve-actions {\n      display: flex;\n      gap: 8px;\n      margin-top: auto;\n    }\n\n    .mini-btn {\n      flex: 1;\n      min-height: 44px;\n      border: 1px solid var(--rule);\n      background: transparent;\n      color: var(--ink);\n      font-family: 'Space Mono', monospace;\n      font-size: 11px;\n      cursor: pointer;\n    }\n\n    .mini-btn:hover {\n      border-color: var(--accent);\n      color: var(--accent);\n    }\n\n    .drawer-backdrop {\n      position: fixed;\n      inset: 0;\n      background: rgba(0, 0, 0, 0.72);\n      display: none;\n      justify-content: flex-end;\n      z-index: 60;\n    }\n\n    .drawer-backdrop.open { display: flex; }\n\n    .liner-drawer {\n      width: min(420px, 100%);\n      height: 100%;\n      background: #0D0D10;\n      border-left: 1px solid var(--rule);\n      padding: 24px;\n      overflow-y: auto;\n      display: flex;\n      flex-direction: column;\n      gap: 18px;\n    }\n\n    .drawer-top {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      border-bottom: 1px solid var(--rule);\n      padding-bottom: 14px;\n    }\n\n    .tracklist {\n      list-style: none;\n      margin: 0;\n      padding: 0;\n      border-top: 1px solid var(--rule);\n    }\n\n    .tracklist li {\n      display: flex;\n      justify-content: space-between;\n      padding: 10px 0;\n      border-bottom: 1px solid var(--rule);\n      font-family: 'Space Mono', monospace;\n      font-size: 12px;\n    }\n\n    @media (max-width: 900px) {\n      .archive-grid { grid-template-columns: repeat(2, 1fr); }\n    }\n\n    @media (max-width: 600px) {\n      .deck-bar {\n        grid-template-columns: 1fr auto;\n        padding: 10px 14px;\n      }\n      #specCanvas { grid-column: 1 / -1; height: 28px; }\n      .masthead { padding: 24px 16px 20px; }\n      .archive-grid { grid-template-columns: 1fr; }\n      .sleeve-card { border-right: none; padding: 16px; }\n    }\n  </style>\n</head>\n<body>\n  <div class=\"deck-bar\">\n    <div class=\"deck-left\">\n      <button class=\"play-btn\" id=\"playBtn\" type=\"button\">PLAY</button>\n      <div class=\"now-meta\">\n        <span class=\"now-code\" id=\"nowCode\">WARP021 · 12\" LP · 1994</span>\n        <span class=\"now-title\" id=\"nowTitle\">Autechre — Amber (Foil)</span>\n      </div>\n    </div>\n    <canvas id=\"specCanvas\" width=\"360\" height=\"36\" aria-label=\"Spectral frequency visualizer\"></canvas>\n    <div class=\"deck-time\" id=\"deckTime\">01:42 / 06:04</div>\n  </div>\n\n  <header class=\"masthead\">\n    <div>\n      <h1 class=\"label-mark\">WARP ARCHIVE</h1>\n      <p class=\"label-sub\">SHEFFIELD / LONDON · ELECTRONIC CATALOGUE 1989–2026</p>\n    </div>\n    <div class=\"format-filters\" role=\"group\" aria-label=\"Filter by format\">\n      <button class=\"fmt-btn active\" data-fmt=\"all\" type=\"button\">ALL (6)</button>\n      <button class=\"fmt-btn\" data-fmt=\"LP\" type=\"button\">2×LP VINYL</button>\n      <button class=\"fmt-btn\" data-fmt=\"12\" type=\"button\">12\" SINGLE</button>\n      <button class=\"fmt-btn\" data-fmt=\"TAPE\" type=\"button\">CASSETTE</button>\n    </div>\n  </header>\n\n  <main class=\"archive-grid\" id=\"archiveGrid\"></main>\n\n  <div class=\"drawer-backdrop\" id=\"drawerBackdrop\">\n    <aside class=\"liner-drawer\" aria-label=\"Release Liner Notes\">\n      <div class=\"drawer-top\">\n        <span class=\"now-code\" id=\"drawerCode\">WARP021</span>\n        <button class=\"fmt-btn\" id=\"closeDrawer\" type=\"button\">CLOSE</button>\n      </div>\n      <h2 class=\"sleeve-artist\" id=\"drawerArtist\">Autechre</h2>\n      <p class=\"sleeve-title\" id=\"drawerRelease\">Amber</p>\n      <p id=\"drawerNotes\" style=\"font-size:14px;line-height:1.6;color:var(--muted);margin:0;\"></p>\n      <ul class=\"tracklist\" id=\"drawerTracks\"></ul>\n    </aside>\n  </div>\n\n  <script>\n    const releases = [\n      {\n        code: 'WARP021', year: 1994, fmt: 'LP', artist: 'Autechre', title: 'Amber',\n        lead: 'Foil', dur: '06:04', bpm: 118,\n        notes: 'Recorded in Rochdale on analog polysynths and early digital samplers; pressed on 180g heavyweight black vinyl with die-cut typography.',\n        tracks: [['A1. Foil', '06:04'], ['A2. Montreal', '07:15'], ['B1. Silverside', '05:31'], ['B2. Slip', '06:21']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#0D0D11\"/><polygon points=\"20,210 120,34 220,210\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2\"/><polygon points=\"56,210 120,96 184,210\" fill=\"none\" stroke=\"#F4F4F6\" stroke-width=\"1.2\"/><line x1=\"20\" y1=\"150\" x2=\"220\" y2=\"150\" stroke=\"#858592\" stroke-dasharray=\"4 4\"/></svg>`\n      },\n      {\n        code: 'WARP055', year: 1998, fmt: 'LP', artist: 'Boards of Canada', title: 'Music Has the Right to Children',\n        lead: 'Roygbiv', dur: '02:31', bpm: 84,\n        notes: 'Warm tape-saturated melodies recorded at Hexagon Sun studios; iconic desaturated turquoise horizon geometry.',\n        tracks: [['A1. Wildlife Analysis', '01:17'], ['A2. An Eagle in Your Mind', '06:23'], ['B3. Roygbiv', '02:31'], ['C1. Turquoise Hexagon Sun', '05:09']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#132226\"/><circle cx=\"120\" cy=\"112\" r=\"64\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2\"/><polygon points=\"120,54 170,83 170,141 120,170 70,141 70,83\" fill=\"none\" stroke=\"#7AD3C8\" stroke-width=\"1.6\"/><line x1=\"20\" y1=\"186\" x2=\"220\" y2=\"186\" stroke=\"#F4F4F6\" opacity=\"0.5\"/></svg>`\n      },\n      {\n        code: 'WARP105', year: 2001, fmt: '12', artist: 'Aphex Twin', title: 'Windowlicker (12\" Cut)',\n        lead: 'Formula [Equation]', dur: '05:42', bpm: 126,\n        notes: 'High-contrast spiral groove etching with spectrogram hidden frequencies embedded in the final 40 seconds.',\n        tracks: [['A1. Windowlicker', '06:07'], ['B1. Formula [Equation]', '05:42'], ['B2. Nannou', '04:13']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#101014\"/><circle cx=\"120\" cy=\"120\" r=\"82\" fill=\"none\" stroke=\"#F4F4F6\" stroke-width=\"1.5\"/><circle cx=\"120\" cy=\"120\" r=\"56\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2\"/><circle cx=\"120\" cy=\"120\" r=\"28\" fill=\"none\" stroke=\"#F4F4F6\" stroke-dasharray=\"6 4\"/><line x1=\"30\" y1=\"120\" x2=\"210\" y2=\"120\" stroke=\"#FF9F1C\" opacity=\"0.6\"/></svg>`\n      },\n      {\n        code: 'WARP248', year: 2014, fmt: 'LP', artist: 'Flying Lotus', title: 'You’re Dead!',\n        lead: 'Never Catch Me', dur: '03:54', bpm: 104,\n        notes: 'Cosmic jazz-fusion electronics stitched into a continuous 38-minute suite with dense rhythmic percussion.',\n        tracks: [['01. Theme', '01:23'], ['02. Tesla', '01:54'], ['05. Never Catch Me', '03:54'], ['09. Coronus, the Terminator', '02:40']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#16111B\"/><path d=\"M24 120 Q72 30 120 120 T216 120\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2.4\"/><path d=\"M24 140 Q72 50 120 140 T216 140\" fill=\"none\" stroke=\"#F4F4F6\" stroke-width=\"1.2\" opacity=\"0.7\"/></svg>`\n      },\n      {\n        code: 'WARP319', year: 2021, fmt: 'TAPE', artist: 'Oneohtrix Point Never', title: 'Magic OPN (Chrome Tape)',\n        lead: 'Long Road Home', dur: '03:28', bpm: 96,\n        notes: 'Limited cobalt-shell cassette edition mimicking late-night FM radio station collages and baroque synth arpeggios.',\n        tracks: [['A1. Cross Talk I', '01:02'], ['A2. Auto & Allo', '03:11'], ['A3. Long Road Home', '03:28'], ['B1. No Nightmares', '04:01']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#0E0E12\"/><rect x=\"34\" y=\"64\" width=\"172\" height=\"112\" fill=\"none\" stroke=\"#F4F4F6\" stroke-width=\"1.6\"/><circle cx=\"88\" cy=\"120\" r=\"22\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2\"/><circle cx=\"152\" cy=\"120\" r=\"22\" fill=\"none\" stroke=\"#FF9F1C\" stroke-width=\"2\"/><line x1=\"88\" y1=\"98\" x2=\"152\" y2=\"98\" stroke=\"#858592\"/></svg>`\n      },\n      {\n        code: 'WARP362', year: 2025, fmt: '12', artist: 'Kelela', title: 'Raven (Club Reworks 12\")',\n        lead: 'Contact (Dub)', dur: '05:18', bpm: 132,\n        notes: 'Deep sub-bass dub architecture mastered at half-speed for club sound systems in London and Berlin.',\n        tracks: [['A1. Contact (Dub)', '05:18'], ['A2. Happy Ending (Break)', '04:46'], ['B1. Closure (Sub Mix)', '06:02']],\n        svg: `<svg viewBox=\"0 0 240 240\"><rect width=\"240\" height=\"240\" fill=\"#0B0C10\"/><g stroke=\"#FF9F1C\" stroke-width=\"1.5\">${Array.from({length: 9}, (_, i) => `<line x1=\"${36 + i*21}\" y1=\"36\" x2=\"${36 + i*21}\" y2=\"204\" opacity=\"${(i+2)/11}\"/>`).join('')}</g><rect x=\"64\" y=\"88\" width=\"112\" height=\"64\" fill=\"#09090B\" stroke=\"#F4F4F6\" stroke-width=\"1.5\"/></svg>`\n      }\n    ];\n\n    let activeRel = releases[0];\n    let playing = true;\n    let phase = 0;\n\n    const grid = document.getElementById('archiveGrid');\n    function renderGrid(fmt = 'all') {\n      const items = releases.filter(r => fmt === 'all' || r.fmt === fmt);\n      grid.innerHTML = '';\n      items.forEach(r => {\n        const card = document.createElement('article');\n        card.className = 'sleeve-card' + (r.code === activeRel.code ? ' selected' : '');\n        card.innerHTML = `\n          <div class=\"sleeve-top\"><span>${r.code}</span><span>${r.fmt} · ${r.year}</span></div>\n          <div class=\"sleeve-art\">${r.svg}</div>\n          <h2 class=\"sleeve-artist\">${r.artist}</h2>\n          <p class=\"sleeve-title\">${r.title}</p>\n          <div class=\"sleeve-actions\">\n            <button class=\"mini-btn\" type=\"button\" data-play=\"${r.code}\">LOAD DECK</button>\n            <button class=\"mini-btn\" type=\"button\" data-notes=\"${r.code}\">LINER NOTES</button>\n          </div>\n        `;\n        card.querySelector('[data-play]').addEventListener('click', e => {\n          e.stopPropagation();\n          selectRelease(r);\n        });\n        card.querySelector('[data-notes]').addEventListener('click', e => {\n          e.stopPropagation();\n          openNotes(r);\n        });\n        card.addEventListener('click', () => selectRelease(r));\n        grid.appendChild(card);\n      });\n    }\n\n    function selectRelease(r) {\n      activeRel = r;\n      playing = true;\n      updateDeck();\n      renderGrid(document.querySelector('.fmt-btn.active').dataset.fmt);\n    }\n\n    function updateDeck() {\n      document.getElementById('nowCode').textContent = `${activeRel.code} · ${activeRel.fmt} · ${activeRel.year} · ${activeRel.bpm} BPM`;\n      document.getElementById('nowTitle').textContent = `${activeRel.artist} — ${activeRel.title} (${activeRel.lead})`;\n      document.getElementById('deckTime').textContent = `${playing ? '01:42' : 'PAUSED'} / ${activeRel.dur}`;\n      const btn = document.getElementById('playBtn');\n      btn.textContent = playing ? 'PAUSE' : 'PLAY';\n      btn.classList.toggle('paused', !playing);\n    }\n\n    function openNotes(r) {\n      document.getElementById('drawerCode').textContent = `${r.code} · ${r.year} · ${r.fmt}`;\n      document.getElementById('drawerArtist').textContent = r.artist;\n      document.getElementById('drawerRelease').textContent = r.title;\n      document.getElementById('drawerNotes').textContent = r.notes;\n      document.getElementById('drawerTracks').innerHTML = r.tracks.map(t => `<li><span>${t[0]}</span><span style=\"color:var(--muted)\">${t[1]}</span></li>`).join('');\n      document.getElementById('drawerBackdrop').classList.add('open');\n    }\n\n    document.getElementById('playBtn').addEventListener('click', () => {\n      playing = !playing;\n      updateDeck();\n    });\n\n    document.querySelectorAll('.fmt-btn[data-fmt]').forEach(btn => {\n      btn.addEventListener('click', () => {\n        document.querySelectorAll('.fmt-btn[data-fmt]').forEach(b => b.classList.remove('active'));\n        btn.classList.add('active');\n        renderGrid(btn.dataset.fmt);\n      });\n    });\n\n    const backdrop = document.getElementById('drawerBackdrop');\n    document.getElementById('closeDrawer').addEventListener('click', () => backdrop.classList.remove('open'));\n    backdrop.addEventListener('click', e => { if (e.target === backdrop) backdrop.classList.remove('open'); });\n\n    const canvas = document.getElementById('specCanvas');\n    const ctx = canvas.getContext('2d');\n    function drawSpectrum() {\n      ctx.clearRect(0, 0, canvas.width, canvas.height);\n      const bars = 36;\n      const w = canvas.width / bars;\n      for (let i = 0; i < bars; i++) {\n        const amp = playing\n          ? (Math.sin(phase * 0.08 + i * 0.45) * 0.5 + 0.5) * (Math.cos(phase * 0.03 + i * 0.17) * 0.5 + 0.5)\n          : 0.12;\n        const h = Math.max(3, amp * (canvas.height - 4));\n        ctx.fillStyle = h > 22 ? '#FF9F1C' : '#525260';\n        ctx.fillRect(i * w + 2, canvas.height - h, w - 4, h);\n      }\n      if (playing) phase += 1;\n      requestAnimationFrame(drawSpectrum);\n    }\n\n    updateDeck();\n    renderGrid();\n    drawSpectrum();\n  </script>\n</body>\n</html>\n"
}
