  /* ── Generate canvas (#16) — modern surface, exempt from terminal idiom ── */
  #gc-overlay {
    display: none; position: fixed; inset: 0; z-index: 9300;
    background: #0d0e12; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
    color: #e6e8ef;
  }
  #gc-overlay.open { display: flex; }
  #gc-header {
    display: flex; align-items: center; gap: 14px;
    height: 52px; padding: 0 18px; flex-shrink: 0;
    background: rgba(16, 17, 23, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  #gc-header button {
    background: rgba(255, 255, 255, 0.06); border: none; color: #c9cddb;
    font: 13px/1 inherit; font-family: inherit; border-radius: 8px;
    padding: 7px 12px; cursor: pointer; transition: background .15s, color .15s;
  }
  #gc-header button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
  #gc-name {
    background: transparent; border: none; outline: none; color: #e6e8ef;
    font: 500 14px/1.2 inherit; font-family: inherit; width: 260px;
    border-radius: 8px; padding: 7px 10px;
  }
  #gc-name:hover, #gc-name:focus { background: rgba(255, 255, 255, 0.05); }
  .gc-spacer { flex: 1; }
  #gc-zoom { font-size: 12px; color: #8a8fa3; min-width: 44px; text-align: right; }
  #gc-viewport {
    flex: 1; position: relative; overflow: hidden; display: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 24px 24px; cursor: default; touch-action: none;
  }
  #gc-viewport.panning { cursor: grabbing; }
  #gc-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
  #gc-hint {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: #6b7085; pointer-events: none;
    background: rgba(16, 17, 23, 0.7); padding: 6px 14px; border-radius: 999px;
    backdrop-filter: blur(8px);
  }
  .gc-node {
    position: absolute; z-index: 2; background: #171922;
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    display: flex; flex-direction: column;
    /* overflow must stay visible — the connect ports live OUTSIDE the box */
    overflow: visible;
    transition: box-shadow .15s, border-color .15s;
  }
  .gc-node:hover { border-color: rgba(255, 255, 255, 0.16); }
  .gc-node.dragging {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    border-color: rgba(124, 140, 255, 0.5);
  }
  .gc-node-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px 4px; cursor: grab; user-select: none;
  }
  .gc-node-kind {
    font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #6b7085;
  }
  .gc-node-del {
    background: none; border: none; color: #6b7085; cursor: pointer;
    font-size: 11px; padding: 2px 4px; border-radius: 6px;
  }
  .gc-node-del:hover { color: #ff7a7a; background: rgba(255, 255, 255, 0.06); }
  .gc-node textarea {
    flex: 1; background: transparent; border: none; outline: none; resize: none;
    color: #e6e8ef; font: 13px/1.55 inherit; font-family: inherit;
    padding: 4px 12px 12px; min-height: 90px;
  }
  .gc-node textarea::placeholder { color: #565b6e; }
  #gc-home { flex: 1; display: none; align-items: flex-start; justify-content: center; overflow-y: auto; }
  #gc-home-inner { width: min(560px, 92vw); padding: 64px 0 40px; }
  #gc-home-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
  #gc-home-sub { font-size: 13px; color: #8a8fa3; margin: 6px 0 26px; }
  #gc-new-btn {
    background: #7c8cff; color: #0d0e12; border: none; border-radius: 10px;
    font: 600 13px/1 inherit; font-family: inherit; padding: 11px 18px;
    cursor: pointer; transition: filter .15s;
  }
  #gc-new-btn:hover { filter: brightness(1.1); }
  #gc-project-list { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
  .gc-project-card {
    display: flex; align-items: center; gap: 12px;
    background: #14151c; border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px; padding: 14px 16px; cursor: pointer;
    transition: border-color .15s, background .15s;
  }
  .gc-project-card:hover { border-color: rgba(124, 140, 255, 0.4); background: #171923; }
  .gc-project-name { font-size: 14px; font-weight: 500; flex: 1; }
  .gc-project-meta { font-size: 11px; color: #6b7085; }
  .gc-project-del {
    background: none; border: none; color: #565b6e; cursor: pointer;
    font-size: 12px; padding: 4px 6px; border-radius: 6px;
  }
  .gc-project-del:hover { color: #ff7a7a; background: rgba(255, 255, 255, 0.06); }
  /* 16.3: toolbar, prompt + media nodes, connectors */
  #gc-toolbar {
    position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 5;
  }
  #gc-toolbar button {
    background: rgba(23, 25, 34, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9cddb; font: 500 12px/1 inherit; font-family: inherit;
    border-radius: 999px; padding: 9px 16px; cursor: pointer;
    backdrop-filter: blur(8px); transition: border-color .15s, color .15s;
  }
  #gc-toolbar button:hover { border-color: rgba(124, 140, 255, 0.5); color: #fff; }
  #gc-links { position: absolute; left: 0; top: 0; width: 0; height: 0;
    overflow: visible; pointer-events: none; }
  .gc-link { fill: none; stroke: rgba(124, 140, 255, 0.35); stroke-width: 1.5; }
  .gc-prompt-actions, .gc-node-actions {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px 10px;
  }
  .gc-prompt-actions button, .gc-node-actions button {
    background: rgba(255, 255, 255, 0.06); border: none; color: #c9cddb;
    font: 500 11px/1 inherit; font-family: inherit; border-radius: 7px;
    padding: 6px 10px; cursor: pointer; transition: background .15s, color .15s;
  }
  .gc-prompt-actions button:hover, .gc-node-actions button:hover {
    background: rgba(124, 140, 255, 0.25); color: #fff;
  }
  .gc-status { font-size: 10px; color: #7c8cff; margin-left: auto;
    animation: gc-pulse 1.4s ease-in-out infinite; }
  @keyframes gc-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
  .gc-prompt textarea { min-height: 64px; }
  .gc-media { line-height: 0; overflow: hidden; }
  .gc-media img, .gc-media video { width: 100%; height: auto; display: block; }
  .gc-media audio { width: 100%; padding: 6px 8px; box-sizing: border-box; }
  .gc-image, .gc-video, .gc-audio { cursor: grab; }
  /* graph rework: ports, wires, run row */
  #gc-wires {
    position: absolute; left: 0; top: 0;
    pointer-events: none; z-index: 1;
  }
  .gc-link {
    fill: none; stroke: rgba(124, 140, 255, 0.7); stroke-width: 2.5;
    pointer-events: visibleStroke; cursor: pointer;
    transition: stroke .15s, stroke-width .15s;
  }
  .gc-link:hover { stroke: rgba(255, 122, 122, 0.85); }
  .gc-link.hot { stroke: #9aa8ff; stroke-width: 3.5; }
  .gc-link-dot { fill: #7c8cff; pointer-events: none; }
  .gc-link-temp { stroke-dasharray: 6 5; pointer-events: none; }
  .gc-port {
    position: absolute; width: 10px; height: 10px; border-radius: 50%;
    background: #262a38; border: 2px solid #7c8cff; z-index: 6;
    top: 50%; transform: translateY(-50%);
    cursor: crosshair; transition: background .12s, box-shadow .12s;
    touch-action: none;
  }
  .gc-port::after { /* invisible generous hit pad */
    content: ""; position: absolute; inset: -10px; border-radius: 50%;
  }
  .gc-port:hover { background: #7c8cff; box-shadow: 0 0 0 4px rgba(124,140,255,.25); }
  .gc-port.armed { background: #7c8cff; box-shadow: 0 0 0 5px rgba(124,140,255,.35); }
  .gc-port-out { right: -6px; }
  .gc-port-in { left: -6px; border-color: #565b6e; cursor: default; }
  .gc-run-row {
    display: flex; gap: 6px; align-items: center; padding: 8px 10px 2px;
  }
  .gc-model {
    flex: 1; background: #1d2029;
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 7px;
    color: #c9cddb; font: 11px/1.2 inherit; font-family: inherit;
    padding: 6px 8px; outline: none; min-width: 0; cursor: pointer;
  }
  .gc-model option { background: #1d2029; color: #c9cddb; }
  .gc-model:focus { border-color: rgba(124, 140, 255, 0.5); }
  .gc-run {
    background: #7c8cff; color: #0d0e12; border: none; border-radius: 7px;
    font: 600 11px/1 inherit; font-family: inherit; padding: 7px 14px;
    cursor: pointer; transition: filter .15s;
  }
  .gc-run:hover { filter: brightness(1.12); }
  .gc-media-empty {
    padding: 26px 12px; text-align: center; font-size: 11px; color: #565b6e;
    letter-spacing: 0.06em; border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px; margin: 8px 10px 0; line-height: 1.4;
  }
  .gc-ref { cursor: grab; }
  .gc-node-foot {
    display: flex; align-items: center; gap: 6px; padding: 7px 10px 9px;
  }
  .gc-foot-spacer { flex: 1; }
  .gc-node-foot button, .cfg-actions button {
    background: rgba(255, 255, 255, 0.06); border: none; color: #c9cddb;
    font: 500 11px/1 inherit; font-family: inherit; border-radius: 7px;
    padding: 6px 11px; cursor: pointer; transition: background .15s, color .15s;
  }
  .gc-node-foot button:hover, .cfg-actions button:hover {
    background: rgba(124, 140, 255, 0.25); color: #fff;
  }
  .gc-node-foot .gc-run, .cfg-actions .primary {
    background: #7c8cff; color: #0d0e12; font-weight: 600;
  }
  .gc-node-foot .gc-run:hover, .cfg-actions .primary:hover { filter: brightness(1.12); background: #7c8cff; color: #0d0e12; }
  #gc-nodecfg {
    position: fixed; z-index: 9400; width: 320px;
    background: rgba(20, 21, 28, 0.96); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    font-family: inherit; color: #e6e8ef;
  }
  #gc-nodecfg-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px 8px;
  }
  #gc-nodecfg-title { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #9aa3b8; text-transform: uppercase; }
  #gc-nodecfg-close {
    background: none; border: none; color: #6b7085; cursor: pointer;
    font-size: 12px; padding: 4px; border-radius: 6px;
  }
  #gc-nodecfg-close:hover { color: #fff; }
  #gc-nodecfg-body { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
  .cfg-row { display: flex; flex-direction: column; gap: 5px; }
  .cfg-row label { font-size: 11px; color: #8a8fa3; }
  .cfg-hint { color: #565b6e; font-size: 10px; }
  .cfg-row select, .cfg-row textarea {
    background: #1d2029; border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; color: #e6e8ef; font: 12px/1.4 inherit; font-family: inherit;
    padding: 8px 10px; outline: none;
  }
  .cfg-row select { cursor: pointer; }
  .cfg-row select option { background: #1d2029; }
  .cfg-row textarea { min-height: 60px; resize: vertical; }
  .cfg-row select:focus, .cfg-row textarea:focus { border-color: rgba(124, 140, 255, 0.5); }
  .cfg-actions { display: flex; gap: 8px; align-items: center; padding-top: 2px; }
  .cfg-note {
    font-size: 10px; color: #7c8cff; letter-spacing: .02em;
    background: rgba(124,140,255,0.08); border-radius: 7px; padding: 6px 9px;
  }
  .gc-llm-out {
    flex: 1; background: transparent; border: none; outline: none; resize: none;
    color: #d9dcff; font: 12px/1.55 inherit; font-family: inherit;
    padding: 4px 12px 6px; min-height: 110px;
  }
  .gc-llm .gc-node-bar .gc-node-kind { color: #9aa8ff; }
  .gc-resize {
    position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px;
    cursor: nwse-resize; z-index: 5; opacity: 0.45; transition: opacity .15s;
    background:
      linear-gradient(135deg, transparent 52%, #6b7085 53%, transparent 57%,
                      transparent 68%, #6b7085 69%, transparent 73%) no-repeat;
  }
  .gc-node:hover .gc-resize { opacity: 0.9; }
  #gc-debug {
    position: absolute; bottom: 14px; left: 16px; z-index: 6;
    font-size: 11px; color: #9aa3ff; opacity: 0; transition: opacity .3s;
    background: rgba(16, 17, 23, 0.75); padding: 5px 12px; border-radius: 8px;
    pointer-events: none; backdrop-filter: blur(6px);
  }

