<!-- LIVE · part 99 -->
radius:8px;' +
    'background:rgba(255,255,255,0.06);border:1px solid #444;color:' + TEXT + ';font-size:15px;box-sizing:border-box;" />' +
    '</div>' +

    '<div style="margin-bottom:10px;">' +
    '<div style="font-size:13px;color:' + DIM + ';margin-bottom:4px;">Authentication</div>' +
    '<select id="ai-authtype" style="width:100%;padding:12px;border-radius:8px;' +
    'background:rgba(255,255,255,0.06);border:1px solid #444;color:' + TEXT + ';font-size:15px;box-sizing:border-box;">' +
    '<option value="api_key">API Key</option><option value="token">Token</option>' +
    '<option value="oauth">OAuth</option><option value="none">None</option></select>' +
    '</div>' +

    '<div style="margin-bottom:12px;">' +
    '<div style="font-size:13px;color:' + DIM + ';margin-bottom:4px;">Credential</div>' +
    '<input id="ai-credential" type="password" placeholder="••••••••" style="width:100%;padding:12px;border-radius:8px;' +
    'background:rgba(255,255,255,0.06);border:1px solid #444;color:' + TEXT + ';font-size:15px;box-sizing:border-box;" />' +
    '<div style="font-size:11px;color:' + DIM + ';margin-top:4px;">Stored server-side only. Never shown again.</div>' +
    '</div>' +

    '<div style="margin-bottom:12px;">' +
    '<div style="font-size:13px;color:' + DIM + ';margin-bottom:6px;">ALLOW THIS AI TO CONTROL MY AVATAR</div>' +
    '<label style="display:flex;align-items:center;padding:10px;background:rgba(200,168,96,0.08);border-radius:8px;margin-bottom:6px;cursor:pointer;">' +
    '<input type="checkbox" id="ai-perm-walk" checked style="width:20px;height:20px;margin-right:10px;accent-color:' + GOLD + ';" />' +
    '<span style="font-size:15px;">Walk & Turn</span></label>' +
    '<label style="display:flex;align-items:center;padding:10px;background:rgba(255,255,255,0.03);border-radius:8px;margin-bottom:6px;opacity:0.4;">' +
    '<input type="checkbox" disabled style="width:20px;height:20px;margin-right:10px;" />' +
    '<span style="font-size:15px;">Look / Camera <span style="font-size:11px;">— soon</span></span></label>' +
    '<label style="display:flex;align-items:center;padding:10px;background:rgba(255,255,255,0.03);border-radius:8px;margin-bottom:6px;opacity:0.4;">' +
    '<input type="checkbox" disabled style="width:20px;height:20px;margin-right:10px;" />' +
    '<span style="font-size:15px;">Jump <span style="font-size:11px;">— soon</span></span></label>' +
    '<label style="display:flex;align-items:center;padding:10px;background:rgba(255,255,255,0.03);border-radius:8px;margin-bottom:6px;opacity:0.4;">' +
    '<input type="checkbox" disabled style="width:20px;height:20px;margin-right:10px;" />' +
    '<span style="font-size:15px;">Interact <span style="font-size:11px;">— soon</span></span></label>' +
    '<label style="display:flex;align-items:center;padding:10px;background:rgba(255,255,255,0.03);border-radius:8px;margin-bottom:6px;opacity:0.4;">' +
    '<input type="checkbox" disabled style="width:20px;height:20px;margin-right:10px;" />' +
    '<span style="font-size:15px;">Fly / Hyper <span style="font-size:11px;">— not in V1</span></span></label>' +
    '</div>' +

    '<button id="cockpit-aiconnect" style="width:100%;padding:16px;border-radius:12px;border:1px solid ' + GOLD + ';' +
    'background:rgba(200,168,96,0.12);color:' + GOLD + ';font-size:16px;font-weight:600;cursor:pointer;margin-bottom:12px;">' +
    'CONNECT AI</button>' +

    '<div style="font-size:12px;font-weight:600;letter-spacing:2px;color:' + DIM + ';margin-bottom:8px;">MY AI AGENTS</div>' +
    '<div id="cockpit-agent-list" style="margin-bottom:8px;"><div style="color:' + DIM + ';font-size:13px;">Loading…</div></div>' +
    '</div>' +

    /* SAFETY section */
    '<div style="margin-bottom:20px;">' +
    '<div style="font-size:12px;font-weight:600;letter-spacing:2px;color:' + DIM + ';margin-bottom:8px;">SAFETY</div>' +
    '<div id="cockpit-safety" style="padding:12px;border-radius:12px;background:rgba(255,255,255,0.04);font-size:13px;line-height:1.8;">' +
    '<div>Supervisor: <span id="ck-safety-state" style="color:' + DIM + ';">—</span></div>' +
    '<div>Authority: <span id="ck-authority" style="color:' + DIM + ';">—</span></div>' +
    '<div>Control: <span id="ck-owner" style="color:' + DIM + ';">—</span></div>' +
    '</div></div>' +

    /* TEST section (collapsible) */
    '<div style="margin-bottom:20px;">' +
    '<div id="cockpit-test-toggle" style="font-size:12px;font-weight:600;letter-spacing:2px;color:' + DIM + ';margin-bottom:8px;cursor:pointer;">' +
    '▸ MOVEMENT TEST</div>' +
    '<div id="cockpit-test-body" style="display:none;">' +
    '<button id="cockpit-v219run" style="width:100%;padding:14px;border-radius:12px;border:1px solid #555;' +
    'background:rgba(255,255,255,0.06);color:' + TEXT + ';font-size:15px;cursor:pointer;margin-bottom:8px;">' +
    'Run V219 1-Second Test</button>' +
    '<div id="cockpit-v219out" style="font-family:monospace;font-size:11px;color: