#088 style light mobile: native-first Playful & Hand-Drawn

Excalidraw Sketchbook Ink

Hand-drawn sketchy whiteboard aesthetic with wobbly ink strokes, pastel highlighters, and tactile notebook grids.

Inspired by Excalidraw ↗

Download .html
Fullscreen ↗

WHY THIS AESTHETIC IS UNIQUE

Replaces sterile corporate polish with charming, slightly imperfect hand-drawn borders, handwritten labels, and an inviting live sketchpad that makes technical ideas feel human and approachable.

BEST FOR

Collaborative whiteboards & diagramming toolsDeveloper explainers & system-design blogsInteractive education & note-taking appsFriendly indie SaaS & creator utilities

TAGS

COLOR PALETTE (CLICK TO COPY HEX)

TYPOGRAPHY

Display
Caveat, cursive
Body
Patrick Hand, -apple-system, sans-serif
Mono
JetBrains Mono, ui-monospace, monospace
Scale
Expressive Caveat headings (34–52px) paired with super-legible Patrick Hand annotations (17–19px) and crisp mono tool shortcuts.

Google Fonts Stylesheet ↗

ARCHITECTURE & MOBILE NOTES

LAYOUT

Floating hand-bordered toolbar over an infinite dot-grid sketchbook canvas, paired with wobbly-border sticky cards and annotated SVG arrow callouts.

INTERACTION

Real interactive Canvas 2D sketchpad supporting pointer/touch freehand drawing, pastel highlighter color picker, template diagram presets, and undo/clear actions.

MOBILE

Touch-enabled drawing canvas with `touch-action: none` inside the pad, >=44px floating tool buttons, and scrollable toolbar strip on 390px screens.

AI AGENT GUARDRAILS

DO

  • Use organic asymmetric border-radii (e.g., 255px 15px 225px 15px / 15px 225px 15px 255px) and rough SVG paths for authentic hand-drawn feel.
  • Keep handwriting fonts large enough (17px+) with generous line-height so notes remain effortless to read.
  • Provide pastel highlighter fills behind key callouts instead of heavy solid dark blocks.

DON'T

  • Do not mix ultra-slick glossy 3D buttons with sketchy hand-drawn borders.
  • Do not make the background dot grid so dense that it visually competes with ink strokes.
STANDALONE SOURCE · demos/excalidraw-sketchbook-ink.html (36.3 KB)
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sketchpad Ink — Hand-Drawn Whiteboard for Fast Thinkers</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;700&family=JetBrains+Mono:wght@400;500&family=Patrick+Hand&display=swap" rel="stylesheet">
  <style>
    :root {
      --bg: #FDFCF8;
      --surface: #F4F1E8;
      --ink: #1E1E24;
      --accent: #6965DB;
      --accent-soft: #E8E7FA;
      --muted: #7C7A85;
      --mint: #2B9E6F;
      --coral: #E05263;
      --amber: #D9822B;
      --border-w: 2px;
      --radius-rough: 18px 6px 20px 8px / 8px 18px 6px 20px;
      --radius-pill: 255px 15px 225px 15px / 15px 225px 15px 255px;
      --shadow-ink: 4px 4px 0px #1E1E24;
      --shadow-soft: 3px 3px 0px rgba(30, 30, 36, 0.16);
    }

    *, *::before, *::after {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      background-color: var(--bg);
      color: var(--ink);
      font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
      font-size: 18px;
      line-height: 1.5;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    body {
      background-image: radial-gradient(rgba(30, 30, 36, 0.13) 1.2px, transparent 1.2px);
      background-size: 24px 24px;
    }

    h1, h2, h3, .hand-title {
      font-family: 'Caveat', cursive, sans-serif;
      margin: 0;
      line-height: 1.08;
      letter-spacing: -0.01em;
    }

    code, .mono {
      font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
      font-size: 0.82rem;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font-family: inherit;
      cursor: pointer;
      color: var(--ink);
      background: transparent;
      border: none;
    }

    .container {
      width: 100%;
      max-width: 1120px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* Sketchy border helpers */
    .sketch-box {
      background: var(--bg);
      border: 2px solid var(--ink);
      border-radius: var(--radius-rough);
      box-shadow: var(--shadow-ink);
    }

    .sketch-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      min-width: 44px;
      padding: 8px 18px;
      font-size: 1.05rem;
      border: 2px solid var(--ink);
      border-radius: var(--radius-pill);
      background: var(--bg);
      box-shadow: 3px 3px 0px var(--ink);
      transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
    }

    .sketch-btn:hover {
      transform: translate(-1px, -1px);
      box-shadow: 4px 4px 0px var(--ink);
    }

    .sketch-btn:active {
      transform: translate(2px, 2px);
      box-shadow: 1px 1px 0px var(--ink);
    }

    .sketch-btn.primary {
      background: var(--accent);
      color: #FDFCF8;
    }

    .sketch-btn.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: 3px 3px 0px var(--accent);
    }

    /* Header & Mobile Nav */
    header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(253, 252, 248, 0.94);
      backdrop-filter: blur(6px);
      border-bottom: 2px dashed rgba(30, 30, 36, 0.25);
    }

    .nav-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 68px;
      gap: 16px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-family: 'Caveat', cursive;
      font-size: 1.85rem;
      font-weight: 700;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 22px;
    }

    .nav-links a {
      padding: 8px 4px;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      position: relative;
    }

    .nav-links a::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 8px;
      height: 3px;
      background: var(--accent);
      border-radius: 4px;
      transform: scaleX(0) rotate(-1deg);
      transition: transform 0.2s ease;
    }

    .nav-links a:hover::after {
      transform: scaleX(1) rotate(-1deg);
    }

    .mobile-toggle {
      display: none;
      width: 44px;
      height: 44px;
      border: 2px solid var(--ink);
      border-radius: 10px 4px 12px 6px;
      align-items: center;
      justify-content: center;
      background: var(--surface);
      box-shadow: 2px 2px 0 var(--ink);
    }

    .mobile-drawer {
      display: none;
      flex-direction: column;
      gap: 10px;
      padding: 16px 20px 22px;
      background: var(--surface);
      border-bottom: 2px solid var(--ink);
    }

    .mobile-drawer.open {
      display: flex;
    }

    .mobile-drawer a {
      min-height: 44px;
      display: flex;
      align-items: center;
      padding: 6px 12px;
      border: 1.5px dashed rgba(30, 30, 36, 0.3);
      border-radius: 10px;
      background: var(--bg);
    }

    /* Hero */
    .hero {
      padding: 42px 0 28px;
      text-align: center;
    }

    .kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #FFF3BF;
      border: 2px solid var(--ink);
      border-radius: var(--radius-pill);
      padding: 4px 14px;
      font-size: 0.92rem;
      transform: rotate(-1.5deg);
      margin-bottom: 18px;
      box-shadow: 2px 2px 0 var(--ink);
    }

    .hero h1 {
      font-size: clamp(2.6rem, 6vw, 4.4rem);
      max-width: 18ch;
      margin: 0 auto 14px;
    }

    .highlight-word {
      position: relative;
      display: inline-block;
      z-index: 1;
      padding: 0 6px;
    }

    .highlight-word::before {
      content: "";
      position: absolute;
      inset: 52% -4px 4% -4px;
      background: rgba(105, 101, 219, 0.24);
      border-radius: 12px 4px 10px 6px;
      transform: rotate(-1.4deg);
      z-index: -1;
    }

    .hero-sub {
      max-width: 560px;
      margin: 0 auto 24px;
      color: var(--muted);
      font-size: 1.15rem;
    }

    /* Interactive Whiteboard Workbench */
    .workbench-wrap {
      padding: 8px 0 48px;
    }

    .workbench {
      background: var(--surface);
      border: 2.5px solid var(--ink);
      border-radius: 22px 10px 24px 12px / 12px 22px 10px 24px;
      box-shadow: 7px 7px 0 var(--ink);
      padding: 14px;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: var(--bg);
      border: 2px solid var(--ink);
      border-radius: 14px 6px 16px 8px;
      padding: 10px 12px;
      margin-bottom: 12px;
      box-shadow: var(--shadow-soft);
    }

    .tool-group {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .tool-divider {
      width: 2px;
      height: 28px;
      background: repeating-linear-gradient(to bottom, var(--ink) 0 4px, transparent 4px 8px);
      opacity: 0.35;
      margin: 0 4px;
    }

    .swatch {
      width: 34px;
      height: 34px;
      min-width: 44px;
      min-height: 44px;
      padding: 6px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 2px solid transparent;
      transition: transform 0.12s ease;
    }

    .swatch span {
      width: 24px;
      height: 24px;
      border-radius: 50% 45% 55% 48%;
      border: 2px solid var(--ink);
      display: block;
    }

    .swatch.selected {
      border-color: var(--ink);
      background: #FFF3BF;
      transform: scale(1.06);
    }

    .canvas-stage {
      position: relative;
      background: #FDFCF8;
      border: 2px solid var(--ink);
      border-radius: 14px 8px 16px 6px;
      overflow: hidden;
      background-image:
        linear-gradient(to right, rgba(105, 101, 219, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(105, 101, 219, 0.06) 1px, transparent 1px);
      background-size: 28px 28px;
    }

    #sketchCanvas {
      display: block;
      width: 100%;
      height: 420px;
      touch-action: none;
      cursor: crosshair;
    }

    .canvas-hint {
      position: absolute;
      bottom: 12px;
      left: 14px;
      background: rgba(253, 252, 248, 0.92);
      border: 1.5px dashed var(--muted);
      border-radius: 10px;
      padding: 4px 10px;
      font-size: 0.85rem;
      color: var(--muted);
      pointer-events: none;
    }

    .template-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 12px;
      padding: 4px 4px 0;
    }

    .template-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .mini-pill {
      min-height: 44px;
      padding: 6px 14px;
      border: 2px solid var(--ink);
      border-radius: var(--radius-pill);
      background: var(--bg);
      font-size: 0.95rem;
      box-shadow: 2px 2px 0 var(--ink);
      transition: background 0.15s;
    }

    .mini-pill:hover, .mini-pill.active {
      background: #FFF3BF;
    }

    /* Feature Sticky Notes */
    .section {
      padding: 48px 0;
    }

    .section-head {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 28px;
    }

    .section-head h2 {
      font-size: clamp(2rem, 4vw, 3rem);
    }

    .notes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 22px;
    }

    .note-card {
      background: var(--bg);
      border: 2px solid var(--ink);
      border-radius: var(--radius-rough);
      padding: 22px;
      box-shadow: var(--shadow-ink);
      position: relative;
      transition: transform 0.18s ease;
    }

    .note-card:nth-child(2) {
      background: #FFF8DB;
      transform: rotate(0.7deg);
    }

    .note-card:nth-child(3) {
      background: #EDF9F3;
      transform: rotate(-0.8deg);
    }

    .note-card:nth-child(4) {
      background: #F4F1FE;
      transform: rotate(0.5deg);
    }

    .note-card:hover {
      transform: rotate(0deg) translateY(-3px);
    }

    .note-icon {
      width: 48px;
      height: 48px;
      margin-bottom: 12px;
    }

    .note-card h3 {
      font-size: 1.7rem;
      margin-bottom: 8px;
    }

    .note-card p {
      margin: 0;
      color: var(--muted);
    }

    /* Sketch Library Strip */
    .library-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 22px;
    }

    .lib-card {
      background: var(--surface);
      border: 2px solid var(--ink);
      border-radius: 18px 8px 16px 10px;
      padding: 18px;
      box-shadow: 4px 4px 0 var(--ink);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .lib-preview {
      background: var(--bg);
      border: 2px dashed rgba(30, 30, 36, 0.35);
      border-radius: 12px;
      height: 150px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px;
    }

    .lib-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.75rem;
      background: var(--bg);
      border: 1.5px solid var(--ink);
      border-radius: 6px;
      padding: 3px 8px;
    }

    footer {
      border-top: 2px dashed rgba(30, 30, 36, 0.25);
      background: var(--surface);
      padding: 34px 0 44px;
      margin-top: 32px;
    }

    .footer-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    @media (max-width: 760px) {
      .nav-links, .nav-cta {
        display: none;
      }
      .mobile-toggle {
        display: inline-flex;
      }
      .tool-divider {
        display: none;
      }
      #sketchCanvas {
        height: 330px;
      }
    }
  </style>
</head>
<body>
  <header>
    <div class="container nav-bar">
      <a href="#top" class="brand" aria-label="Sketchpad Ink Home">
        <svg width="34" height="34" viewBox="0 0 36 36" fill="none" aria-hidden="true">
          <rect x="4" y="5" width="27" height="26" rx="5" fill="#E8E7FA" stroke="#1E1E24" stroke-width="2.2" stroke-linecap="round"/>
          <path d="M10 24L22 11M22 11L25 14L13 27L9 28L10 24Z" fill="#6965DB" stroke="#1E1E24" stroke-width="2" stroke-linejoin="round"/>
          <path d="M8 12C11 9 14 14 17 11" stroke="#1E1E24" stroke-width="2" stroke-linecap="round"/>
        </svg>
        <span>Sketchpad Ink</span>
      </a>

      <nav class="nav-links" aria-label="Primary">
        <a href="#board">Live Board</a>
        <a href="#why-rough">Why Rough?</a>
        <a href="#stencils">Stencil Packs</a>
      </nav>

      <div class="nav-cta">
        <a href="#board" class="sketch-btn primary">Start Drawing</a>
      </div>

      <button class="mobile-toggle" id="menuBtn" aria-expanded="false" aria-controls="mobileDrawer" aria-label="Toggle navigation">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#1E1E24" stroke-width="2.4" stroke-linecap="round">
          <path d="M4 7h16M4 12h15M4 17h16"/>
        </svg>
      </button>
    </div>

    <div class="mobile-drawer" id="mobileDrawer">
      <a href="#board">Live Board</a>
      <a href="#why-rough">Why Rough?</a>
      <a href="#stencils">Stencil Packs</a>
      <a href="#board" class="sketch-btn primary">Start Drawing</a>
    </div>
  </header>

  <main id="top">
    <section class="hero">
      <div class="container">
        <div class="kicker">
          <span class="mono">v2.8</span>
          <span>No login required &bull; Saved locally in your browser</span>
        </div>
        <h1>Think out loud on a <span class="highlight-word">hand-drawn</span> whiteboard.</h1>
        <p class="hero-sub">
          Skip pixel-perfect boxes. Sketch architecture diagrams, product flows, and messy brainstorms with wobbly ink strokes that invite feedback instead of bike-shedding.
        </p>
      </div>
    </section>

    <section class="workbench-wrap" id="board" aria-label="Interactive Sketch Whiteboard">
      <div class="container">
        <div class="workbench">
          <div class="toolbar" role="toolbar" aria-label="Drawing tools">
            <div class="tool-group">
              <button class="sketch-btn active" data-tool="pen" aria-pressed="true" title="Freehand Doodle">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M4 20l4-1 11-11-3-3L5 16l-1 4z"/></svg>
                <span>Doodle</span>
              </button>
              <button class="sketch-btn" data-tool="box" aria-pressed="false" title="Sketchy Box">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><rect x="4" y="5" width="16" height="14" rx="2"/></svg>
                <span>Box</span>
              </button>
              <button class="sketch-btn" data-tool="arrow" aria-pressed="false" title="Sketchy Arrow">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M5 19L19 5M19 5h-7M19 5v7"/></svg>
                <span>Arrow</span>
              </button>
            </div>

            <div class="tool-divider" aria-hidden="true"></div>

            <div class="tool-group" role="radiogroup" aria-label="Ink color">
              <button class="swatch selected" data-color="#1E1E24" aria-label="Charcoal Ink" aria-checked="true"><span style="background:#1E1E24"></span></button>
              <button class="swatch" data-color="#6965DB" aria-label="Sketchy Violet" aria-checked="false"><span style="background:#6965DB"></span></button>
              <button class="swatch" data-color="#2B9E6F" aria-label="Mint Marker" aria-checked="false"><span style="background:#2B9E6F"></span></button>
              <button class="swatch" data-color="#E05263" aria-label="Coral Red" aria-checked="false"><span style="background:#E05263"></span></button>
              <button class="swatch" data-color="#D9822B" aria-label="Amber Highlighter" aria-checked="false"><span style="background:#D9822B"></span></button>
            </div>

            <div class="tool-divider" aria-hidden="true"></div>

            <div class="tool-group">
              <button class="sketch-btn" id="undoBtn" title="Undo last stroke">Undo</button>
              <button class="sketch-btn" id="clearBtn" title="Clear board">Clear</button>
            </div>
          </div>

          <div class="canvas-stage">
            <canvas id="sketchCanvas" aria-label="Interactive hand-drawn canvas"></canvas>
            <div class="canvas-hint mono" id="statusHint">Drag to draw &bull; Mode: DOODLE</div>
          </div>

          <div class="template-bar">
            <span class="mono" style="color:var(--muted);">Quick Templates:</span>
            <div class="template-pills">
              <button class="mini-pill active" data-template="flow">API Request Flow</button>
              <button class="mini-pill" data-template="mindmap">Launch Mindmap</button>
              <button class="mini-pill" data-template="wireframe">Lo-Fi Wireframe</button>
            </div>
          </div>
        </div>
      </div>
    </section>

    <section class="section" id="why-rough">
      <div class="container">
        <div class="section-head">
          <h2>Why messy lines beat polished slides</h2>
          <span class="mono" style="color:var(--muted);">// built for half-baked ideas</span>
        </div>

        <div class="notes-grid">
          <article class="note-card">
            <svg class="note-icon" viewBox="0 0 48 48" fill="none" aria-hidden="true">
              <path d="M8 34C14 14 26 10 39 14" stroke="#6965DB" stroke-width="3" stroke-linecap="round"/>
              <path d="M10 37C17 20 27 16 40 19" stroke="#1E1E24" stroke-width="2.2" stroke-linecap="round" stroke-dasharray="4 4"/>
              <circle cx="38" cy="15" r="4" fill="#FFF3BF" stroke="#1E1E24" stroke-width="2"/>
            </svg>
            <h3>Double-Pass Wobble</h3>
            <p>Every rectangle and arrow is rendered with gentle organic jitter so stakeholders focus on architecture, not border radius.</p>
          </article>

          <article class="note-card">
            <svg class="note-icon" viewBox="0 0 48 48" fill="none" aria-hidden="true">
              <rect x="9" y="16" width="30" height="22" rx="4" fill="#FDFCF8" stroke="#1E1E24" stroke-width="2.4"/>
              <path d="M16 16v-4a8 8 0 0116 0v4" stroke="#1E1E24" stroke-width="2.4" stroke-linecap="round"/>
              <circle cx="24" cy="27" r="3" fill="#6965DB"/>
            </svg>
            <h3>End-to-End Local</h3>
            <p>Your diagrams live in memory and local storage by default. Share a live room link with encrypted payloads only when you choose.</p>
          </article>

          <article class="note-card">
            <svg class="note-icon" viewBox="0 0 48 48" fill="none" aria-hidden="true">
              <rect x="6" y="10" width="16" height="12" rx="3" fill="#E8E7FA" stroke="#1E1E24" stroke-width="2.2"/>
              <rect x="26" y="26" width="16" height="12" rx="3" fill="#FDFCF8" stroke="#1E1E24" stroke-width="2.2"/>
              <path d="M22 16h8v10" stroke="#2B9E6F" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
            </svg>
            <h3>Zero-Friction Arrows</h3>
            <p>Connect thoughts in a single drag. Snap ideas into rough flowcharts, sequence diagrams, or napkin-level system maps.</p>
          </article>

          <article class="note-card">
            <svg class="note-icon" viewBox="0 0 48 48" fill="none" aria-hidden="true">
              <path d="M12 10h18l8 8v20H12V10z" fill="#FDFCF8" stroke="#1E1E24" stroke-width="2.2" stroke-linejoin="round"/>
              <path d="M30 10v8h8" stroke="#1E1E24" stroke-width="2.2" stroke-linejoin="round"/>
              <path d="M18 26h12M18 32h8" stroke="#6965DB" stroke-width="2.4" stroke-linecap="round"/>
            </svg>
            <h3>Crisp SVG &amp; PNG</h3>
            <p>Drop hand-drawn diagrams straight into engineering RFCs, Notion docs, or GitHub READMEs with transparent backgrounds.</p>
          </article>
        </div>
      </div>
    </section>

    <section class="section" id="stencils">
      <div class="container">
        <div class="section-head">
          <h2>Community Stencil Packs</h2>
          <span class="mono" style="color:var(--muted);">Click any pack to load its sketch above</span>
        </div>

        <div class="library-grid">
          <div class="lib-card">
            <div class="lib-preview">
              <svg width="210" height="110" viewBox="0 0 210 110" fill="none">
                <rect x="10" y="32" width="54" height="40" rx="5" fill="#E8E7FA" stroke="#1E1E24" stroke-width="2.2"/>
                <text x="37" y="57" text-anchor="middle" font-family="Patrick Hand" font-size="14" fill="#1E1E24">Client</text>
                <path d="M68 52 C85 48, 100 56, 122 51" stroke="#6965DB" stroke-width="2.2" stroke-linecap="round"/>
                <path d="M115 45 L124 51 L115 58" stroke="#6965DB" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
                <ellipse cx="164" cy="40" rx="28" ry="10" fill="#FFF3BF" stroke="#1E1E24" stroke-width="2.2"/>
                <path d="M136 40v28c0 6 12 10 28 10s28-4 28-10V40" fill="#FFF3BF" stroke="#1E1E24" stroke-width="2.2"/>
                <text x="164" y="64" text-anchor="middle" font-family="Patrick Hand" font-size="13" fill="#1E1E24">Postgres</text>
              </svg>
            </div>
            <div class="lib-meta">
              <div>
                <strong style="font-size:1.15rem;">Cloud &amp; Backend Primitives</strong>
                <div class="mono" style="color:var(--muted);">42 sketchy icons</div>
              </div>
              <button class="sketch-btn" data-load-template="flow">Load</button>
            </div>
          </div>

          <div class="lib-card">
            <div class="lib-preview">
              <svg width="210" height="110" viewBox="0 0 210 110" fill="none">
                <ellipse cx="105" cy="55" rx="34" ry="20" fill="#EDF9F3" stroke="#1E1E24" stroke-width="2.2"/>
                <text x="105" y="60" text-anchor="middle" font-family="Patrick Hand" font-size="14" fill="#1E1E24">v3 Launch</text>
                <path d="M72 48 L38 26M74 64 L40 84M138 48 L174 28M136 65 L172 86" stroke="#2B9E6F" stroke-width="2.2" stroke-linecap="round"/>
                <circle cx="32" cy="22" r="10" fill="#FFF3BF" stroke="#1E1E24" stroke-width="2"/>
                <circle cx="34" cy="88" r="10" fill="#FCE8EB" stroke="#1E1E24" stroke-width="2"/>
                <circle cx="178" cy="24" r="10" fill="#E8E7FA" stroke="#1E1E24" stroke-width="2"/>
                <circle cx="176" cy="88" r="10" fill="#FFF3BF" stroke="#1E1E24" stroke-width="2"/>
              </svg>
            </div>
            <div class="lib-meta">
              <div>
                <strong style="font-size:1.15rem;">Brainstorm &amp; Sticky Maps</strong>
                <div class="mono" style="color:var(--muted);">28 organic nodes</div>
              </div>
              <button class="sketch-btn" data-load-template="mindmap">Load</button>
            </div>
          </div>

          <div class="lib-card">
            <div class="lib-preview">
              <svg width="210" height="110" viewBox="0 0 210 110" fill="none">
                <rect x="28" y="14" width="154" height="84" rx="6" fill="#FDFCF8" stroke="#1E1E24" stroke-width="2.2"/>
                <line x1="28" y1="30" x2="182" y2="30" stroke="#1E1E24" stroke-width="2"/>
                <circle cx="40" cy="22" r="3" fill="#E05263"/>
                <circle cx="50" cy="22" r="3" fill="#D9822B"/>
                <circle cx="60" cy="22" r="3" fill="#2B9E6F"/>
                <rect x="42" y="42" width="56" height="42" rx="4" fill="#F4F1E8" stroke="#1E1E24" stroke-width="1.8"/>
                <path d="M42 42L98 84M98 42L42 84" stroke="#7C7A85" stroke-width="1.4"/>
                <path d="M110 48h54M110 60h42M110 74h34" stroke="#6965DB" stroke-width="2.5" stroke-linecap="round"/>
              </svg>
            </div>
            <div class="lib-meta">
              <div>
                <strong style="font-size:1.15rem;">Lo-Fi UI Wireframes</strong>
                <div class="mono" style="color:var(--muted);">36 browser blocks</div>
              </div>
              <button class="sketch-btn" data-load-template="wireframe">Load</button>
            </div>
          </div>
        </div>
      </div>
    </section>
  </main>

  <footer>
    <div class="container footer-inner">
      <div>
        <strong class="hand-title" style="font-size:1.7rem;">Sketchpad Ink</strong>
        <div style="color:var(--muted);">Open-source hand-drawn diagramming &bull; MIT Licensed</div>
      </div>
      <div class="mono" style="color:var(--muted);">Press Undo or switch tools anytime &bull; Made with wobbly strokes</div>
    </div>
  </footer>

  <script>
    // Mobile nav toggle
    const menuBtn = document.getElementById('menuBtn');
    const mobileDrawer = document.getElementById('mobileDrawer');
    menuBtn.addEventListener('click', () => {
      const isOpen = mobileDrawer.classList.toggle('open');
      menuBtn.setAttribute('aria-expanded', String(isOpen));
    });
    mobileDrawer.querySelectorAll('a').forEach(a => {
      a.addEventListener('click', () => {
        mobileDrawer.classList.remove('open');
        menuBtn.setAttribute('aria-expanded', 'false');
      });
    });

    // Interactive Rough Whiteboard Canvas
    const canvas = document.getElementById('sketchCanvas');
    const ctx = canvas.getContext('2d');
    const statusHint = document.getElementById('statusHint');

    let tool = 'pen';
    let color = '#1E1E24';
    let drawing = false;
    let startPt = null;
    let currentShape = null;
    let shapes = [];

    function resizeCanvas() {
      const rect = canvas.getBoundingClientRect();
      const dpr = Math.min(window.devicePixelRatio || 1, 2);
      canvas.width = Math.floor(rect.width * dpr);
      canvas.height = Math.floor(rect.height * dpr);
      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
      renderAll();
    }

    function seededJitter(seed, amp) {
      const x = Math.sin(seed * 127.1) * 43758.5453;
      return ((x - Math.floor(x)) - 0.5) * 2 * amp;
    }

    function roughLine(x1, y1, x2, y2, strokeColor, seed) {
      ctx.strokeStyle = strokeColor;
      ctx.lineCap = 'round';
      ctx.lineJoin = 'round';
      for (let pass = 0; pass < 2; pass++) {
        const s = seed + pass * 19;
        const mx = (x1 + x2) / 2 + seededJitter(s + 1, 2.4);
        const my = (y1 + y2) / 2 + seededJitter(s + 2, 2.4);
        ctx.lineWidth = pass === 0 ? 2.5 : 1.7;
        ctx.beginPath();
        ctx.moveTo(x1 + seededJitter(s + 3, 1.5), y1 + seededJitter(s + 4, 1.5));
        ctx.quadraticCurveTo(mx, my, x2 + seededJitter(s + 5, 1.5), y2 + seededJitter(s + 6, 1.5));
        ctx.stroke();
      }
    }

    function roughBox(x, y, w, h, strokeColor, fill, seed) {
      if (fill) {
        ctx.fillStyle = fill;
        ctx.fillRect(x + 2, y + 2, w - 4, h - 4);
      }
      roughLine(x, y, x + w, y, strokeColor, seed + 1);
      roughLine(x + w, y, x + w, y + h, strokeColor, seed + 7);
      roughLine(x + w, y + h, x, y + h, strokeColor, seed + 13);
      roughLine(x, y + h, x, y, strokeColor, seed + 23);
    }

    function roughArrow(x1, y1, x2, y2, strokeColor, seed) {
      roughLine(x1, y1, x2, y2, strokeColor, seed);
      const angle = Math.atan2(y2 - y1, x2 - x1);
      const len = 14;
      roughLine(x2, y2, x2 - len * Math.cos(angle - 0.5), y2 - len * Math.sin(angle - 0.5), strokeColor, seed + 31);
      roughLine(x2, y2, x2 - len * Math.cos(angle + 0.5), y2 - len * Math.sin(angle + 0.5), strokeColor, seed + 41);
    }

    function drawShape(s) {
      if (s.type === 'pen') {
        if (s.points.length < 2) return;
        ctx.strokeStyle = s.color;
        ctx.lineWidth = 2.6;
        ctx.lineCap = 'round';
        ctx.lineJoin = 'round';
        ctx.beginPath();
        ctx.moveTo(s.points[0].x, s.points[0].y);
        for (let i = 1; i < s.points.length; i++) {
          ctx.lineTo(s.points[i].x, s.points[i].y);
        }
        ctx.stroke();
      } else if (s.type === 'box') {
        roughBox(s.x, s.y, s.w, s.h, s.color, s.fill || null, s.seed);
      } else if (s.type === 'arrow') {
        roughArrow(s.x1, s.y1, s.x2, s.y2, s.color, s.seed);
      } else if (s.type === 'label') {
        ctx.font = '700 21px "Caveat", cursive';
        ctx.fillStyle = s.color;
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';
        ctx.fillText(s.text, s.x, s.y);
      }
    }

    function renderAll() {
      const rect = canvas.getBoundingClientRect();
      ctx.clearRect(0, 0, rect.width, rect.height);
      shapes.forEach(drawShape);
      if (currentShape) drawShape(currentShape);
    }

    function loadTemplate(name) {
      const w = canvas.getBoundingClientRect().width;
      const h = canvas.getBoundingClientRect().height;
      const cx = w / 2;
      const cy = h / 2;
      const compact = w < 560;
      shapes = [];

      if (name === 'flow') {
        const bw = compact ? 96 : 138;
        const bh = 64;
        const gap = compact ? 22 : 66;
        const leftX = cx - bw * 1.5 - gap;
        const midX = cx - bw / 2;
        const rightX = cx + bw / 2 + gap;
        const y = cy - bh / 2;
        shapes.push(
          { type: 'box', x: leftX, y, w: bw, h: bh, color: '#1E1E24', fill: '#E8E7FA', seed: 11 },
          { type: 'label', x: leftX + bw / 2, y: y + bh / 2, text: 'Browser', color: '#1E1E24' },
          { type: 'arrow', x1: leftX + bw + 4, y1: cy, x2: midX - 6, y2: cy, color: '#6965DB', seed: 19 },
          { type: 'box', x: midX, y, w: bw, h: bh, color: '#1E1E24', fill: '#FFF3BF', seed: 29 },
          { type: 'label', x: midX + bw / 2, y: y + bh / 2, text: 'Edge API', color: '#1E1E24' },
          { type: 'arrow', x1: midX + bw + 4, y1: cy, x2: rightX - 6, y2: cy, color: '#2B9E6F', seed: 37 },
          { type: 'box', x: rightX, y, w: bw, h: bh, color: '#1E1E24', fill: '#EDF9F3', seed: 47 },
          { type: 'label', x: rightX + bw / 2, y: y + bh / 2, text: 'Cache DB', color: '#1E1E24' },
          { type: 'label', x: cx, y: y - 34, text: 'Draft: draw your own boxes anywhere!', color: '#7C7A85' }
        );
      } else if (name === 'mindmap') {
        const dx = compact ? 105 : 165;
        const dy = 86;
        shapes.push(
          { type: 'box', x: cx - 64, y: cy - 30, w: 128, h: 60, color: '#6965DB', fill: '#E8E7FA', seed: 5 },
          { type: 'label', x: cx, y: cy, text: 'Launch v3', color: '#1E1E24' },
          { type: 'arrow', x1: cx - 50, y1: cy - 26, x2: cx - dx + 42, y2: cy - dy + 22, color: '#1E1E24', seed: 12 },
          { type: 'box', x: cx - dx - 48, y: cy - dy - 22, w: 96, h: 46, color: '#2B9E6F', fill: '#EDF9F3', seed: 17 },
          { type: 'label', x: cx - dx, y: cy - dy, text: 'Docs', color: '#1E1E24' },
          { type: 'arrow', x1: cx + 50, y1: cy - 26, x2: cx + dx - 42, y2: cy - dy + 22, color: '#1E1E24', seed: 22 },
          { type: 'box', x: cx + dx - 48, y: cy - dy - 22, w: 96, h: 46, color: '#D9822B', fill: '#FFF3BF', seed: 27 },
          { type: 'label', x: cx + dx, y: cy - dy, text: 'Demo Video', color: '#1E1E24' },
          { type: 'arrow', x1: cx + 48, y1: cy + 28, x2: cx + dx - 42, y2: cy + dy - 22, color: '#E05263', seed: 33 },
          { type: 'box', x: cx + dx - 48, y: cy + dy - 22, w: 96, h: 46, color: '#E05263', fill: '#FCE8EB', seed: 39 },
          { type: 'label', x: cx + dx, y: cy + dy, text: 'Changelog', color: '#1E1E24' }
        );
      } else if (name === 'wireframe') {
        const fw = Math.min(w - 52, 420);
        const fh = 240;
        const fx = cx - fw / 2;
        const fy = cy - fh / 2;
        shapes.push(
          { type: 'box', x: fx, y: fy, w: fw, h: fh, color: '#1E1E24', fill: '#FDFCF8', seed: 9 },
          { type: 'box', x: fx + 16, y: fy + 16, w: fw - 32, h: 36, color: '#6965DB', fill: '#E8E7FA', seed: 15 },
          { type: 'label', x: cx, y: fy + 34, text: 'Header + Search Bar', color: '#1E1E24' },
          { type: 'box', x: fx + 16, y: fy + 66, w: (fw - 44) * 0.45, h: 154, color: '#1E1E24', fill: '#F4F1E8', seed: 21 },
          { type: 'label', x: fx + 16 + (fw - 44) * 0.225, y: fy + 142, text: 'Hero Sketch', color: '#7C7A85' },
          { type: 'box', x: fx + 28 + (fw - 44) * 0.45, y: fy + 66, w: (fw - 44) * 0.55, h: 68, color: '#2B9E6F', fill: '#EDF9F3', seed: 28 },
          { type: 'label', x: fx + 28 + (fw - 44) * 0.725, y: fy + 100, text: 'Value Prop', color: '#1E1E24' },
          { type: 'box', x: fx + 28 + (fw - 44) * 0.45, y: fy + 148, w: (fw - 44) * 0.55, h: 72, color: '#D9822B', fill: '#FFF3BF', seed: 34 },
          { type: 'label', x: fx + 28 + (fw - 44) * 0.725, y: fy + 184, text: 'Primary CTA', color: '#1E1E24' }
        );
      }

      document.querySelectorAll('.mini-pill').forEach(btn => {
        btn.classList.toggle('active', btn.dataset.template === name);
      });
      renderAll();
    }

    function getPos(e) {
      const rect = canvas.getBoundingClientRect();
      return { x: e.clientX - rect.left, y: e.clientY - rect.top };
    }

    canvas.addEventListener('pointerdown', (e) => {
      canvas.setPointerCapture(e.pointerId);
      drawing = true;
      startPt = getPos(e);
      const seed = Math.floor(Math.random() * 1000);
      if (tool === 'pen') {
        currentShape = { type: 'pen', color, points: [startPt] };
      } else if (tool === 'box') {
        currentShape = { type: 'box', x: startPt.x, y: startPt.y, w: 0, h: 0, color, seed };
      } else if (tool === 'arrow') {
        currentShape = { type: 'arrow', x1: startPt.x, y1: startPt.y, x2: startPt.x, y2: startPt.y, color, seed };
      }
      renderAll();
    });

    canvas.addEventListener('pointermove', (e) => {
      if (!drawing || !currentShape) return;
      const pt = getPos(e);
      if (tool === 'pen') {
        currentShape.points.push(pt);
      } else if (tool === 'box') {
        currentShape.x = Math.min(startPt.x, pt.x);
        currentShape.y = Math.min(startPt.y, pt.y);
        currentShape.w = Math.abs(pt.x - startPt.x);
        currentShape.h = Math.abs(pt.y - startPt.y);
      } else if (tool === 'arrow') {
        currentShape.x2 = pt.x;
        currentShape.y2 = pt.y;
      }
      renderAll();
    });

    function endDraw() {
      if (!drawing) return;
      drawing = false;
      if (currentShape) {
        shapes.push(currentShape);
        currentShape = null;
        renderAll();
      }
    }
    canvas.addEventListener('pointerup', endDraw);
    canvas.addEventListener('pointercancel', endDraw);

    // Toolbar controls
    document.querySelectorAll('[data-tool]').forEach(btn => {
      btn.addEventListener('click', () => {
        tool = btn.dataset.tool;
        document.querySelectorAll('[data-tool]').forEach(b => {
          const active = b === btn;
          b.classList.toggle('active', active);
          b.setAttribute('aria-pressed', String(active));
        });
        statusHint.textContent = `Drag to draw • Mode: ${tool.toUpperCase()}`;
      });
    });

    document.querySelectorAll('.swatch').forEach(btn => {
      btn.addEventListener('click', () => {
        color = btn.dataset.color;
        document.querySelectorAll('.swatch').forEach(b => {
          const sel = b === btn;
          b.classList.toggle('selected', sel);
          b.setAttribute('aria-checked', String(sel));
        });
      });
    });

    document.getElementById('undoBtn').addEventListener('click', () => {
      shapes.pop();
      renderAll();
    });

    document.getElementById('clearBtn').addEventListener('click', () => {
      shapes = [];
      renderAll();
    });

    document.querySelectorAll('[data-template]').forEach(btn => {
      btn.addEventListener('click', () => loadTemplate(btn.dataset.template));
    });

    document.querySelectorAll('[data-load-template]').forEach(btn => {
      btn.addEventListener('click', () => {
        loadTemplate(btn.dataset.loadTemplate);
        document.getElementById('board').scrollIntoView({ behavior: 'smooth' });
      });
    });

    window.addEventListener('resize', () => {
      resizeCanvas();
    });

    resizeCanvas();
    loadTemplate('flow');
  </script>
</body>
</html>