"use strict";(()=>{var _=[];function Ye(...e){return e.map(t=>{if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}).join(" ").slice(0,500)}function D(e,t,...o){let r={ts:new Date().toISOString(),level:e,source:t,msg:Ye(...o)};_.push(r),_.length>50&&_.shift()}function Ze(){if(_.length===0)return;let e=_.splice(0,_.length);try{chrome.runtime.sendMessage({type:"CONSOLE_LOG_BATCH",entries:e}).catch(()=>{})}catch{}}setInterval(Ze,5e3);var i={log:(...e)=>{D("log","cs",...e)},warn:(...e)=>{D("warn","cs",...e)},error:(...e)=>{D("error","cs",...e)}};var Xe=`x${crypto.randomUUID().replace(/-/g,"").slice(0,12)}`,q="data-ib",m=null,A=null;function C(){m&&document.contains(m)||(document.querySelectorAll(`[${q}]`).forEach(e=>{e!==m&&(e.remove(),i.log("[blocker] Removed orphaned blocker from dead context"))}),m=Je(),le(m),A=new MutationObserver(()=>{m&&!document.contains(m)&&(i.warn("[blocker] Host element removed \u2014 re-inserting"),le(m))}),A.observe(document.documentElement,{childList:!0,subtree:!0}),i.warn("[blocker] Injection blocker overlay shown"))}function M(){A&&(A.disconnect(),A=null),m&&(m.remove(),m=null),document.querySelectorAll(`[${q}]`).forEach(e=>{e.remove(),i.log("[blocker] Removed orphaned blocker from dead context")}),i.log("[blocker] Injection blocker overlay hidden")}function V(){return m!==null&&document.contains(m)}function le(e){(document.body||document.documentElement).appendChild(e)}function Je(){let e=document.createElement("div");e.setAttribute(Xe,""),e.setAttribute(q,""),e.style.cssText="position:fixed;inset:0;z-index:2147483647;";let t=e.attachShadow({mode:"closed"});return t.innerHTML=`
    <style>
      :host {
        all: initial;
        position: fixed;
        inset: 0;
        z-index: 2147483647;
        pointer-events: all;
      }
      .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.92);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        color: #fff;
        gap: 20px;
      }
      .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid rgba(255,255,255,0.15);
        border-top-color: #007bff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
      }
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      .title {
        font-size: 18px;
        font-weight: 600;
        letter-spacing: -0.01em;
      }
      .subtitle {
        font-size: 14px;
        color: rgba(255,255,255,0.6);
        max-width: 340px;
        text-align: center;
        line-height: 1.5;
      }
      .retry-btn {
        margin-top: 8px;
        padding: 10px 24px;
        background: #007bff;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.15s;
      }
      .retry-btn:hover {
        background: #0069d9;
      }
    </style>
    <div class="overlay">
      <div class="spinner"></div>
      <div class="title">Reconnecting</div>
      <div class="subtitle">
        Connection lost. Retrying automatically&hellip;
      </div>
      <button class="retry-btn">Reload page</button>
    </div>
  `,t.querySelector(".retry-btn")?.addEventListener("click",()=>{location.reload()}),e.addEventListener("keydown",r=>r.stopPropagation(),!0),e.addEventListener("keyup",r=>r.stopPropagation(),!0),e.addEventListener("keypress",r=>r.stopPropagation(),!0),e}var v={HEALTH_PING:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(0,4),HEALTH_PONG:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(4,8),BRIDGE_PING:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(8,12),BRIDGE_PONG:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(12,16),REQ:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(16,20),RES:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(20,24),WS_REQ:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(24,28),WS_RES:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(28,32),ACTIVATE:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(32,36),DEACTIVATE:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(36,40),BRIDGE_WARNING:"8d84d77d1b8413a0a3e24b41e9efe96b0219d6780faf".slice(40,44)},K=null,ce=!1,I="",X="",Y="",ue="",Z="",J=Promise.resolve();function fe(){return J}var Qe=["auth_token"];function et(e){try{return Storage.prototype.getItem.call(localStorage,e)}catch{return localStorage.getItem(e)}}function ge(e){let t=e?.tokenStorageKeys??Qe,o=e?.id??"unknown";for(let r of t){let n=et(r);if(n&&de(n)){i.log(`Found token in localStorage under "${r}"`),pe(n,o);break}}e?.tokenCookieNames?.length&&chrome.runtime.sendMessage({type:"CHECK_PLATFORM_COOKIES",platformId:o,cookieNames:e.tokenCookieNames,url:window.location.origin},r=>{if(chrome.runtime.lastError){i.error("Cookie check error:",chrome.runtime.lastError.message);return}r?.found&&i.log(`Found session cookie "${r.cookieName}" for ${o}`)}),window.addEventListener("storage",r=>{r.key&&t.includes(r.key)&&r.newValue&&de(r.newValue)&&(i.log(`Detected token change in localStorage ("${r.key}")`),pe(r.newValue,o))})}function de(e){let t=e.trim();return!(t.length<2||t==="null"||t==="undefined")}function Q(e){K=e;let t=e.apiPatterns.map(s=>s.source),o=(e.wsPatterns??[]).map(s=>s.source),r=e.wsEvents??[],n=crypto.randomUUID().replace(/-/g,"").slice(0,16);I=n,X=`${n}${v.REQ}`,Y=`${n}${v.RES}`,ue=`${n}${v.WS_REQ}`,Z=`${n}${v.WS_RES}`;let a=(e.injectPatterns??[]).map(s=>s.source),l=(e.txPatterns??[]).map(s=>s.source),p=(e.binaryWsTradePatterns??[]).map(s=>s.source),g={p:t,k:n,wp:o,we:r,de:e.diagEventName||"",ip:a,le:e.launchEventName||"",tp:l,pi:e.id,bwp:p};J=new Promise(s=>{let c=u=>{u.source===window&&u.data?.type==="bcdef944a3534cfb"&&(window.removeEventListener("message",c),clearTimeout(d),s())};window.addEventListener("message",c),window.postMessage({type:"030299889001443c",cfg:g},"*");let d=setTimeout(()=>{window.removeEventListener("message",c),s()},3e3)}),o.length>0&&(r.length>0||p.length>0)&&ot(),window.addEventListener("message",s=>{s.source===window&&s.data?.type===`${n}${v.BRIDGE_PING}`&&window.postMessage({type:`${n}${v.BRIDGE_PONG}`},"*")}),window.addEventListener("message",s=>{s.source===window&&s.data?.type===`${n}${v.BRIDGE_WARNING}`&&(s.data.dead?C():M())}),i.log(`Interception config prepared for ${e.name} (channel: ${n})`)}async function me(e){ce||(K=e,X||Q(e),await J,document.dispatchEvent(new CustomEvent(`${I}${v.ACTIVATE}`)),tt(),ce=!0,i.log(`API interception active for ${e.name}`))}function tt(){window.addEventListener("message",e=>{if(e.source!==window||e.data?.type!==X)return;let{id:t,url:o,method:r,body:n,headers:a}=e.data,l={type:"API_PROXY",site:K.id,url:o,method:r,body:n,headers:a};chrome.runtime.sendMessage(l,p=>{if(chrome.runtime.lastError){i.error("Proxy bridge error:",chrome.runtime.lastError.message),window.postMessage({type:Y,id:t,status:503,data:{error:"Service unavailable"}},"*");return}window.postMessage({type:Y,id:t,status:p.status,data:p.__fallthrough?{__fallthrough:!0}:p.data},"*")})})}function ot(){window.addEventListener("message",e=>{if(e.source!==window||e.data?.type!==ue)return;let{id:t,event:o,data:r,ackId:n}=e.data,a={type:"WS_PROXY",site:K.id,event:o,data:r,ackId:n};i.log(`[LK:bridge] WS ${o} \u2192 background`),chrome.runtime.sendMessage(a,l=>{if(chrome.runtime.lastError){i.error(`[LK:bridge] WS ${o} \u2190 ERROR: ${chrome.runtime.lastError.message}`),window.postMessage({type:Z,id:t,data:{ok:!1,error:"Service unavailable"}},"*");return}i.log(`[LK:bridge] WS ${o} \u2190 background`,l),window.postMessage({type:Z,id:t,data:l},"*")})})}function R(){if(!I)return Promise.resolve(!1);let e=`${I}${v.HEALTH_PING}`,t=`${I}${v.HEALTH_PONG}`;return new Promise(o=>{let r=a=>{a.source===window&&a.data?.type===t&&(window.removeEventListener("message",r),clearTimeout(n),o(!0))};window.addEventListener("message",r),window.postMessage({type:e},"*");let n=setTimeout(()=>{window.removeEventListener("message",r),o(!1)},500)})}function pe(e,t){chrome.runtime.sendMessage({type:"STORE_PLATFORM_TOKEN",platformId:t,token:e},o=>{if(chrome.runtime.lastError){i.error(`Failed to store token (${t}):`,chrome.runtime.lastError.message);return}o?.success&&i.log(`Site token captured and stored (${t})`)})}var U=null,ee=!1;function te(e){he(e),ut(e),i.log("Branding applied")}function he(e){rt(e.logoSelectors),nt(e.textReplacements),e.linkReplacements&&it(e.linkReplacements),at(e.colorOverrides),e.footerInjection&&st(e.footerInjection),lt(),e.pageTitle&&ct(e.pageTitle),e.sidebarBranding&&pt(e.sidebarBranding)}function rt(e){for(let t of e)document.querySelectorAll(t).forEach(r=>{if(r instanceof HTMLImageElement)r.src=chrome.runtime.getURL("favicon.png"),r.alt="FeeShield",r.style.width="36px",r.style.height="36px";else if(r instanceof HTMLElement){let n=document.createElement("img");n.src=chrome.runtime.getURL("favicon.png"),n.alt="FeeShield",n.style.height=r.offsetHeight?`${r.offsetHeight}px`:"32px",n.style.width="auto",r.replaceWith(n)}})}function nt(e){let t=document.createTreeWalker(document.body||document.documentElement,NodeFilter.SHOW_TEXT,null),o=[],r;for(;r=t.nextNode();){let n=r.nodeValue||"",a=!1;for(let[l,p]of e)n.includes(l)&&(n=n.split(l).join(p),a=!0);a&&o.push({node:r,newValue:n})}for(let{node:n,newValue:a}of o)n.nodeValue=a}function it(e){document.querySelectorAll("a[href]").forEach(o=>{let r=o,n=r.href,a=!1;for(let[l,p]of e)n.includes(l)&&(n=n.split(l).join(p),a=!0);a&&(r.href=n)})}function at(e){if(Object.keys(e).length===0)return;let t=document.getElementById("feeshield-color-overrides");t||(t=document.createElement("style"),t.id="feeshield-color-overrides",(document.head||document.documentElement).appendChild(t));let o=Object.entries(e).map(([r,n])=>`  ${r}: ${n} !important;`).join(`
`);t.textContent=`:root {
${o}
}`}function st(e){if(document.getElementById("feeshield-footer-badge"))return;let t=document.querySelector(e.containerSelector);if(!t)return;let o=document.createElement("div");o.className="h-4 w-px bg-border";let r=document.createElement("div");r.id="feeshield-footer-badge",r.className="flex items-center gap-2",r.innerHTML=`
    <img src="${chrome.runtime.getURL("favicon.png")}" alt="FeeShield" style="width: 14px; height: 14px;" />
  `,t.appendChild(o),t.appendChild(r)}function lt(){let e=chrome.runtime.getURL("favicon.png");document.querySelectorAll('link[rel*="icon"]').forEach(a=>a.remove());let o=document.createElement("link");o.rel="icon",o.type="image/png",o.href=e;let r=document.head||document.documentElement;r.appendChild(o);let n=document.createElement("link");n.rel="shortcut icon",n.href=e,r.appendChild(n)}function ct(e){document.title!==e&&(document.title=e)}function dt(){if(document.getElementById("feeshield-outfit-font"))return;let e=document.createElement("link");e.id="feeshield-outfit-font",e.rel="stylesheet",e.href="https://fonts.googleapis.com/css2?family=Outfit:wght@500;700&display=swap",(document.head||document.documentElement).appendChild(e)}function pt(e){dt(),document.querySelectorAll(e.nameSelector).forEach(o=>{o instanceof HTMLElement&&(o.hasAttribute("data-kol-styled")||(o.setAttribute("data-kol-styled","1"),o.innerHTML=`<span style="font-family:'Outfit',system-ui,sans-serif;font-weight:700;letter-spacing:0.02em;">FEE</span><span style="font-family:'Outfit',system-ui,sans-serif;font-weight:500;color:#007bff;letter-spacing:0.02em;">SHIELD</span>`))})}function ut(e){U&&U.disconnect();let t=null;U=new MutationObserver(()=>{ee||(t&&clearTimeout(t),t=setTimeout(()=>{ee=!0,he(e),ee=!1},300))});let o=document.body||document.documentElement;U.observe(o,{childList:!0,subtree:!0})}async function ye(){return new Promise(e=>{chrome.runtime.sendMessage({type:"AUTH_CHECK"},t=>{if(chrome.runtime.lastError){i.error("Auth check error:",chrome.runtime.lastError.message),e(!1);return}e(t?.isAuthenticated??!1)})})}function F(e){let t=o=>{o.type==="AUTH_STATE_CHANGED"&&e(o.isAuthenticated)};return chrome.runtime.onMessage.addListener(t),()=>{chrome.runtime.onMessage.removeListener(t)}}var oe="https://api.feeshield.dev";var L=class extends Error{constructor(o,r,n){super(o);this.status=r;this.code=n;this.name="AuthApiError"}};async function be(e){if(!e.ok){let t="An error occurred",o;try{let r=await e.json();t=r.message||r.error||t,o=r.code}catch{t=e.statusText||t}throw new L(t,e.status,o)}return e.json()}async function ve(e){let t=await fetch(`${oe}/api/auth/signup`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e&&{inviteCode:e}})});return be(t)}async function xe(e){let t=await fetch(`${oe}/api/auth/recover`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({recoveryKey:e})});return be(t)}var w=`z${crypto.randomUUID().replace(/-/g,"").slice(0,12)}`,we="__am_ids";function ke(){try{let e=sessionStorage.getItem(we);if(e)for(let o of e.split(","))o&&o!==w&&document.getElementById(o)?.remove();let t=e?e.split(",").filter(o=>o&&o!==w):[];t.push(w),sessionStorage.setItem(we,t.slice(-5).join(","))}catch{}}function Se(){return{step:"signup",inviteCode:"",recoveryKeyInput:"",generatedRecoveryKey:"",keyCopied:!1,isLoading:!1,error:null}}var Ee=`data-f${Math.random().toString(36).slice(2,8)}`,_e=`data-i${Math.random().toString(36).slice(2,8)}`;function N(){if(!document.querySelector(`link[${Ee}]`)){let e=document.createElement("link");e.rel="stylesheet",e.href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Sora:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Outfit:wght@400;500;600;700&display=swap",e.setAttribute(Ee,"true"),document.head.appendChild(e)}if(!document.querySelector(`link[${_e}]`)){let e=document.createElement("link");e.rel="stylesheet",e.href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.min.css",e.setAttribute(_e,"true"),document.head.appendChild(e)}}function Ce(){return`
  /* Remixicon font-face (required inside Shadow DOM) */
  @font-face {
    font-family: 'remixicon';
    src: url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.woff') format('woff');
    font-display: swap;
  }

  /* Design Tokens - defined on :host for Shadow DOM scope */
  :host {
    all: initial;
    --kol-bg: #050508;
    --kol-surface: #101010;
    --kol-surface-elevated: #1a1a1a;
    --kol-border: #2a2a2a;
    --kol-border-hover: #3a3a3a;
    --kol-blue: #007bff;
    --kol-blue-hover: #3390ff;
    --kol-green: #00c46b;
    --kol-red: #ff4d4f;
    --kol-text: #ffffff;
    --kol-text-secondary: #b0b0b0;
    --kol-text-muted: #888888;
    --kol-text-tertiary: #666666;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-logo: 'Outfit', system-ui, sans-serif;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* Remixicon base styles (font loaded via document head, but classes need to be in Shadow DOM) */
  [class^="ri-"], [class*=" ri-"] {
    font-family: 'remixicon' !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Icon definitions used in this modal (Remixicon 4.2.0 unicode values) */
  .ri-mail-line:before { content: "\\eef6"; }
  .ri-lock-line:before { content: "\\eece"; }
  .ri-eye-line:before { content: "\\ecb5"; }
  .ri-eye-off-line:before { content: "\\ecb7"; }
  .ri-gift-line:before { content: "\\edbb"; }
  .ri-error-warning-line:before { content: "\\eca1"; }
  .ri-arrow-right-line:before { content: "\\ea6c"; }
  .ri-arrow-left-line:before { content: "\\ea60"; }
  .ri-arrow-left-s-line:before { content: "\\ea64"; }
  .ri-check-line:before { content: "\\eb7b"; }
  .ri-check-double-line:before { content: "\\eb73"; }
  .ri-alert-line:before { content: "\\ea20"; }
  .ri-loader-4-line:before { content: "\\eec6"; }
  .ri-checkbox-circle-fill:before { content: "\\eb80"; }
  .ri-checkbox-circle-line:before { content: "\\eb81"; }
  .ri-checkbox-blank-circle-line:before { content: "\\eb7d"; }
  .ri-close-circle-fill:before { content: "\\eb96"; }
  .ri-mail-check-line:before { content: "\\eeee"; }
  .ri-key-2-line:before { content: "\\ee6f"; }
  .ri-file-copy-line:before { content: "\\ecd5"; }
  .ri-lock-check-line:before { content: "\\f100"; }
  .ri-lock-unlock-line:before { content: "\\eed0"; }

  /* Overlay */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
  }

  /* Modal Container */
  .modal {
    position: relative;
    width: 420px;
    max-width: 95vw;
    max-height: 95vh;
    background: var(--kol-bg);
    border: 1px solid var(--kol-border);
    border-radius: 20px;
    overflow: hidden;
    color: var(--kol-text);
  }

  /* Background Effects */
  .bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .bg-gradient {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 50% -20%, rgba(15, 23, 42, 0.8) 0%, transparent 50%),
      radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 40, 80, 0.3) 0%, transparent 50%);
  }

  .orb-primary {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    opacity: 0.4;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.25) 0%, rgba(0, 123, 255, 0.05) 40%, transparent 70%);
    filter: blur(40px);
    animation: orbFloat 8s ease-in-out infinite;
  }

  .orb-secondary {
    position: absolute;
    bottom: -64px;
    left: -64px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    opacity: 0.25;
    background: radial-gradient(circle, rgba(0, 196, 107, 0.2) 0%, transparent 60%);
    filter: blur(30px);
    animation: orbFloat 10s ease-in-out infinite 2s;
  }

  .grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
      linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 70%);
  }

  .top-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 123, 255, 0.5) 50%, transparent 100%);
    box-shadow: 0 0 20px 2px rgba(0, 123, 255, 0.3);
  }

  /* Content */
  .content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 28px;
    min-height: 540px;
  }

  /* Logo */
  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: fadeSlideDown 0.6s ease-out;
  }

  .logo-banner {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 123, 255, 0.3));
  }

  /* Step Container */
  .step-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .step-container.exiting {
    animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  /* Title Section */
  .title-section {
    text-align: center;
    margin-bottom: 24px;
    animation: fadeSlideUp 0.5s ease-out 0.1s both;
  }

  .title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
  }

  .subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-tertiary);
  }

  .subtitle .highlight {
    color: white;
  }

  /* Icon Badge */
  .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .icon-badge.blue {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
  }

  .icon-badge.green {
    background: rgba(0, 196, 107, 0.1);
    border: 1px solid rgba(0, 196, 107, 0.2);
  }

  .icon-badge i {
    font-size: 32px;
  }

  .icon-badge.blue i {
    color: var(--kol-blue);
  }

  .icon-badge.green i {
    color: var(--kol-green);
  }

  /* Form */
  .form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .form-item {
    animation: fadeSlideUp 0.5s ease-out both;
  }

  .form-item:nth-child(1) { animation-delay: 0.15s; }
  .form-item:nth-child(2) { animation-delay: 0.2s; }
  .form-item:nth-child(3) { animation-delay: 0.25s; }

  /* Input Group */
  .input-group {
    position: relative;
  }

  .input-group .glow {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(to right, rgba(0, 123, 255, 0.2), rgba(0, 196, 107, 0.1));
    opacity: 0;
    filter: blur(16px);
    transition: opacity 0.5s;
    pointer-events: none;
  }

  .input-group:focus-within .glow {
    opacity: 1;
  }

  .input-wrapper {
    position: relative;
  }

  .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--kol-text-muted);
    transition: color 0.3s;
  }

  .input-group:focus-within .input-icon {
    color: var(--kol-blue);
  }

  input[type="text"],
  input[type="email"],
  input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    border-radius: 12px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
  }

  input::placeholder {
    color: var(--kol-text-muted);
  }

  input:focus {
    border-color: var(--kol-blue);
    background: var(--kol-surface-elevated);
  }

  .input-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--kol-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
  }

  .input-toggle:hover {
    color: white;
  }

  /* Error Message */
  .error-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 77, 79, 0.1);
    border: 1px solid rgba(255, 77, 79, 0.2);
    margin-top: 12px;
    animation: fadeSlideUp 0.3s ease-out;
  }

  .error-box i {
    color: var(--kol-red);
    font-size: 16px;
  }

  .error-box span {
    color: var(--kol-red);
    font-size: 14px;
  }

  /* Content Transitions */
  .content {
    transition: opacity 0.15s ease-out;
  }

  .content.transitioning {
    opacity: 0;
  }

  /* Primary Button */
  .btn-primary {
    position: relative;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: none;
    overflow: hidden;
    cursor: pointer;
    margin-top: 16px;
    animation: fadeSlideUp 0.5s ease-out 0.3s both;
  }

  .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn-primary .bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--kol-blue), var(--kol-blue-hover));
    transition: transform 0.3s;
  }

  .btn-primary.green .bg {
    background: linear-gradient(to right, var(--kol-green), #10b981);
  }

  .btn-primary:not(:disabled):hover .bg {
    transform: scale(1.02);
  }

  .btn-primary .shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.3s;
  }

  .btn-primary:not(:disabled):hover .shimmer {
    opacity: 1;
    animation: shimmer 1.5s infinite;
  }

  .btn-primary .btn-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--kol-bg);
  }

  .btn-primary .btn-content i {
    font-size: 18px;
  }

  /* Spinner */
  .spinner {
    animation: spin 1s linear infinite;
  }

  /* Divider */
  .divider {
    position: relative;
    margin: 20px 0;
    animation: fadeSlideUp 0.5s ease-out 0.35s both;
  }

  .divider-line {
    width: 100%;
    border: none;
    border-top: 1px solid var(--kol-border);
  }

  .divider-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0 12px;
    background: var(--kol-bg);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kol-text-muted);
    white-space: nowrap;
  }

  /* Social Buttons */
  .social-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    animation: fadeSlideUp 0.5s ease-out 0.4s both;
  }

  .btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border-radius: 12px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    cursor: pointer;
    transition: all 0.3s;
  }

  .btn-social:hover {
    border-color: var(--kol-border-hover);
    background: var(--kol-surface-elevated);
  }

  .btn-social svg {
    width: 20px;
    height: 20px;
  }

  .btn-social span {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-secondary);
    transition: color 0.3s;
  }

  .btn-social:hover span {
    color: white;
  }

  .btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* Forgot Password Link */
  .forgot-password-link {
    margin-top: 6px;
    text-align: right;
  }

  .forgot-password-link button {
    background: none;
    border: none;
    color: var(--kol-blue);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
  }

  .forgot-password-link button:hover {
    color: var(--kol-blue-hover);
  }

  /* Email Validation Error */
  .email-error {
    margin-top: 4px;
    padding-left: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kol-red);
  }

  input.input-error {
    border-color: var(--kol-red) !important;
  }

  input.input-error:focus {
    border-color: var(--kol-red) !important;
  }

  /* Mode Switch */
  .mode-switch {
    margin-top: auto;
    padding-top: 16px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-muted);
    animation: fadeSlideUp 0.5s ease-out 0.45s both;
  }

  .mode-switch button {
    background: none;
    border: none;
    color: var(--kol-blue);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
  }

  .mode-switch button:hover {
    color: var(--kol-blue-hover);
  }

  /* Header Row (Back Button + Title) */
  .header-row {
    position: relative;
    margin-bottom: 24px;
  }

  .header-row .title-section {
    margin-bottom: 0;
  }

  /* Back Button */
  .back-button {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--kol-text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
    width: fit-content;
    z-index: 1;
  }

  .back-button:hover {
    color: white;
  }

  /* Password Requirements */
  .password-requirements {
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(16, 16, 16, 0.5);
    border: 1px solid var(--kol-border);
  }

  .requirements-title {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kol-text-muted);
    margin-bottom: 8px;
  }

  .requirements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kol-text-muted);
    transition: color 0.3s;
  }

  .requirement.met {
    color: var(--kol-green);
  }

  .requirement i {
    font-size: 14px;
  }

  /* Match Indicator */
  .match-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-family: var(--font-body);
    font-size: 12px;
  }

  .match-indicator.match {
    color: var(--kol-green);
  }

  .match-indicator.no-match {
    color: var(--kol-red);
  }

  .match-indicator i {
    font-size: 14px;
  }

  /* OTP Inputs */
  .otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
  }

  input.otp-input[type="text"] {
    width: 48px;
    height: 52px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all 0.3s;
    padding: 0;
  }

  input.otp-input[type="text"]:focus {
    border-color: var(--kol-blue);
    background: var(--kol-surface-elevated);
  }

  /* Resend Link */
  .resend-link {
    text-align: center;
    margin-bottom: auto;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-muted);
  }

  .resend-link button {
    background: none;
    border: none;
    color: var(--kol-blue);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
  }

  .resend-link button:hover {
    color: var(--kol-blue-hover);
  }

  .resend-link button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* Copy Button */
  .btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    border-radius: 8px;
    background: var(--kol-surface);
    border: 1px solid var(--kol-border);
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
  }

  .btn-copy:hover {
    border-color: var(--kol-border-hover);
  }

  .btn-copy i {
    font-size: 16px;
    color: var(--kol-text-secondary);
  }

  .btn-copy span {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-secondary);
  }

  /* Warning Box */
  .warning-box {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 77, 79, 0.05);
    border: 1px solid rgba(255, 77, 79, 0.2);
    margin-bottom: auto;
  }

  .warning-box i {
    color: var(--kol-red);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .warning-box p {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kol-text-secondary);
    line-height: 1.5;
  }

  /* Back Header */
  .back-header {
    position: relative;
    margin-bottom: 24px;
  }

  .back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--kol-text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 8px;
    margin-left: -8px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 8px;
  }

  .back-btn:hover {
    color: white;
    background: rgba(26, 26, 26, 0.5);
  }

  .back-btn i {
    font-size: 18px;
  }

  /* Recovery Key Grid */
  .recovery-key-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    margin-bottom: 12px;
  }

  .recovery-word {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(16, 16, 16, 0.5);
  }

  .word-number {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--kol-text-muted);
    min-width: 16px;
    text-align: right;
  }

  .word-text {
    font-family: var(--font-mono);
    font-size: 13px;
    color: white;
  }

  /* Copy Button */
  .copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
  }

  .copy-btn:hover {
    border-color: var(--kol-border-hover);
    background: var(--kol-surface-elevated);
  }

  .copy-btn i {
    font-size: 16px;
    color: var(--kol-text-muted);
  }

  .copy-btn i.copied {
    color: var(--kol-green);
  }

  .copy-btn span {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--kol-text-secondary);
  }

  /* Warning Box override for yellow variant on show-key step */
  [data-step="show-key"] .warning-box {
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.2);
  }

  [data-step="show-key"] .warning-box span {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(234, 179, 8, 0.8);
    line-height: 1.5;
  }

  [data-step="show-key"] .warning-box i {
    color: #eab308;
  }

  /* Recovery Key Textarea */
  .recovery-textarea {
    width: 100%;
    padding: 16px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--kol-border);
    border-radius: 12px;
    color: white;
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    resize: none;
  }

  .recovery-textarea::placeholder {
    color: var(--kol-text-muted);
  }

  .recovery-textarea:focus {
    border-color: var(--kol-blue);
    background: var(--kol-surface-elevated);
  }

  /* Spacer */
  .spacer {
    flex: 1;
  }

  /* Animations */
  @keyframes fadeSlideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeSlideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(100px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideOut {
    from {
      opacity: 1;
      transform: translateX(0);
    }
    to {
      opacity: 0;
      transform: translateX(-100px);
    }
  }

  @keyframes orbFloat {
    0%, 100% {
      transform: translate(0, 0) scale(1);
    }
    50% {
      transform: translate(10px, 15px) scale(1.1);
    }
  }

  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(100%);
    }
  }

  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
`}var y=Math.random().toString(36).slice(2,8);function H(){return`
    <div class="logo">
      <svg viewBox="0 0 2203 424" fill="none" xmlns="http://www.w3.org/2000/svg" class="logo-banner">
        <mask id="fsbm-${y}" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="384" height="424">
          <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fsb0-${y})"/>
          <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fsb1-${y})" fill-opacity="0.39"/>
        </mask>
        <g mask="url(#fsbm-${y})">
          <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fsb2-${y})"/>
          <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fsb3-${y})" fill-opacity="0.39" style="mix-blend-mode:plus-lighter"/>
          <rect x="-131.671" y="-20.1866" width="322.986" height="444.106" fill="url(#fsb4-${y})" fill-opacity="0.45" style="mix-blend-mode:overlay"/>
        </g>
        <path d="M603.015 146.068H651.463V200.33H603.015V357.301H542.455V200.33H504.666V146.068H542.455V145.099C542.455 98.5893 580.245 61.2844 626.755 61.2844H651.463V115.062H635.475C618.034 115.062 603.984 129.111 603.015 146.068Z" fill="white"/>
        <path d="M809.645 289.474L856.155 318.543C835.807 345.189 803.347 362.63 767.011 362.63C705.967 362.63 656.066 313.214 656.066 251.685C656.066 190.156 705.967 140.739 767.011 140.739C828.54 140.739 878.442 190.64 878.442 251.685C878.442 266.219 875.05 278.816 875.05 278.816H717.11C726.8 296.741 745.694 308.853 767.011 308.853C783.968 308.853 799.471 301.102 809.645 289.474ZM767.011 194.516C745.694 194.516 726.8 207.113 717.11 224.554H817.397C807.708 207.113 788.813 194.516 767.011 194.516Z" fill="white"/>
        <path d="M1125.4 203.721C1125.4 160.603 1171.43 140.739 1215.52 140.739C1259.12 140.739 1298.36 159.149 1309.51 197.423L1258.15 214.38C1252.82 203.237 1240.23 194.032 1219.39 193.063C1201.95 192.578 1189.84 195.485 1188.87 203.721C1184.51 230.852 1309.51 217.771 1309.51 299.648C1309.51 341.313 1263 362.63 1218.91 362.63C1175.79 362.63 1132.19 339.375 1125.4 307.884L1176.28 287.052C1182.09 300.133 1196.14 310.307 1213.1 312.245C1226.66 313.698 1243.62 310.791 1246.04 302.071C1254.28 272.033 1125.4 288.99 1125.4 203.721Z" fill="#2A92FF"/>
        <path d="M1542.5 245.386C1542.5 256.045 1542.5 357.301 1542.5 357.301H1482.43C1482.43 357.301 1482.43 248.778 1482.43 247.324C1482.43 215.833 1467.41 194.516 1435.92 194.516C1404.43 194.516 1389.41 215.833 1389.41 247.324V357.301H1328.85V66.1292H1389.41V159.149C1405.4 147.522 1424.78 140.739 1446.09 140.739C1507.62 140.739 1542.5 183.858 1542.5 245.386Z" fill="#2A92FF"/>
        <path d="M1800.37 289.474L1846.88 318.543C1826.53 345.189 1794.07 362.63 1757.73 362.63C1696.69 362.63 1646.79 313.214 1646.79 251.685C1646.79 190.156 1696.69 140.739 1757.73 140.739C1819.26 140.739 1869.16 190.64 1869.16 251.685C1869.16 266.219 1865.77 278.816 1865.77 278.816H1707.83C1717.52 296.741 1736.42 308.853 1757.73 308.853C1774.69 308.853 1790.19 301.102 1800.37 289.474ZM1757.73 194.516C1736.42 194.516 1717.52 207.113 1707.83 224.554H1808.12C1798.43 207.113 1779.53 194.516 1757.73 194.516Z" fill="#2A92FF"/>
        <path d="M1888.55 357.301V66.1292H1949.11V357.301H1888.55Z" fill="#2A92FF"/>
        <path d="M2142.92 66.1292H2203V357.301H2142.92V343.251C2125 355.363 2103.2 362.63 2079.46 362.63C2018.41 362.63 1968.51 313.214 1968.51 251.685C1968.51 190.156 2018.41 140.739 2079.46 140.739C2103.2 140.739 2125 148.006 2142.92 160.118V66.1292ZM2085.76 308.853C2117.25 308.853 2142.92 283.176 2142.92 251.685C2142.92 220.194 2117.25 194.516 2085.76 194.516C2054.26 194.516 2029.07 220.194 2029.07 251.685C2029.07 283.176 2054.26 308.853 2085.76 308.853Z" fill="#2A92FF"/>
        <path fill-rule="evenodd" clip-rule="evenodd" d="M1093.19 318.543L1046.68 289.474C1036.51 301.102 1021 308.853 1004.05 308.853C982.729 308.853 963.835 296.741 954.145 278.816H1112.09C1112.09 278.816 1115.48 266.219 1115.48 251.685C1115.48 190.64 1065.58 140.739 1004.05 140.739C943.002 140.739 893.101 190.156 893.101 251.685C893.101 313.214 943.002 362.63 1004.05 362.63C1040.38 362.63 1072.84 345.189 1093.19 318.543ZM954.145 224.554C963.835 207.113 982.729 194.516 1004.05 194.516C1025.85 194.516 1044.74 207.113 1054.43 224.554H954.145Z" fill="white"/>
        <path fill-rule="evenodd" clip-rule="evenodd" d="M1564.52 184.257V357.301H1625.08V184.257H1564.52Z" fill="#2A92FF"/>
        <path d="M1628.63 115.784C1628.63 133.71 1614.1 148.729 1596.17 148.729C1577.76 148.729 1563.23 133.71 1563.23 115.784C1563.23 97.8585 1577.76 83.3241 1596.17 83.3241C1614.1 83.3241 1628.63 97.8585 1628.63 115.784Z" fill="white"/>
        <defs>
          <linearGradient id="fsb0-${y}" x1="191.773" y1="-41.3336" x2="191.773" y2="423.919" gradientUnits="userSpaceOnUse">
            <stop stop-color="#0773FF"/><stop offset="1" stop-color="#0065EA"/>
          </linearGradient>
          <radialGradient id="fsb1-${y}" cx="0" cy="0" r="1" gradientTransform="matrix(-51.7787 450.391 -362.451 -64.3415 260.811 -109.875)" gradientUnits="userSpaceOnUse">
            <stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/>
          </radialGradient>
          <linearGradient id="fsb2-${y}" x1="191.773" y1="-41.3336" x2="191.773" y2="423.919" gradientUnits="userSpaceOnUse">
            <stop stop-color="#0773FF"/><stop offset="1" stop-color="#0065EA"/>
          </linearGradient>
          <radialGradient id="fsb3-${y}" cx="0" cy="0" r="1" gradientTransform="matrix(-51.7787 450.391 -362.451 -64.3415 260.811 -109.875)" gradientUnits="userSpaceOnUse">
            <stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/>
          </radialGradient>
          <linearGradient id="fsb4-${y}" x1="29.8216" y1="-20.1866" x2="29.8216" y2="423.919" gradientUnits="userSpaceOnUse">
            <stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/>
          </linearGradient>
        </defs>
      </svg>
    </div>
  `}var f=Math.random().toString(36).slice(2,8),Wt=`
  <svg width="32" height="35" viewBox="0 0 384 424" fill="none" xmlns="http://www.w3.org/2000/svg" class="logo-svg">
    <mask id="fs-mask-${f}" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="384" height="424">
      <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fs-lg0-${f})"/>
      <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fs-rg1-${f})" fill-opacity="0.39"/>
    </mask>
    <g mask="url(#fs-mask-${f})">
      <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fs-lg2-${f})"/>
      <path d="M191.315 0L0 64.1615L0.433812 64.9564V202.812H0.513724C2.14622 317.894 85.3295 412.099 191.842 423.919C298.354 412.105 381.542 317.9 383.169 202.812V64.8962L383.546 64.2097L191.315 0Z" fill="url(#fs-rg3-${f})" fill-opacity="0.39" style="mix-blend-mode:plus-lighter"/>
      <rect x="-131.671" y="-20.1866" width="322.986" height="444.106" fill="url(#fs-lg4-${f})" fill-opacity="0.45" style="mix-blend-mode:overlay"/>
    </g>
    <defs>
      <linearGradient id="fs-lg0-${f}" x1="191.773" y1="-41.3336" x2="191.773" y2="423.919" gradientUnits="userSpaceOnUse">
        <stop stop-color="#0773FF"/>
        <stop offset="1" stop-color="#0065EA"/>
      </linearGradient>
      <radialGradient id="fs-rg1-${f}" cx="0" cy="0" r="1" gradientTransform="matrix(-51.7787 450.391 -362.451 -64.3415 260.811 -109.875)" gradientUnits="userSpaceOnUse">
        <stop stop-color="white"/>
        <stop offset="1" stop-color="white" stop-opacity="0"/>
      </radialGradient>
      <linearGradient id="fs-lg2-${f}" x1="191.773" y1="-41.3336" x2="191.773" y2="423.919" gradientUnits="userSpaceOnUse">
        <stop stop-color="#0773FF"/>
        <stop offset="1" stop-color="#0065EA"/>
      </linearGradient>
      <radialGradient id="fs-rg3-${f}" cx="0" cy="0" r="1" gradientTransform="matrix(-51.7787 450.391 -362.451 -64.3415 260.811 -109.875)" gradientUnits="userSpaceOnUse">
        <stop stop-color="white"/>
        <stop offset="1" stop-color="white" stop-opacity="0"/>
      </radialGradient>
      <linearGradient id="fs-lg4-${f}" x1="29.8216" y1="-20.1866" x2="29.8216" y2="423.919" gradientUnits="userSpaceOnUse">
        <stop stop-color="white"/>
        <stop offset="1" stop-color="white" stop-opacity="0"/>
      </linearGradient>
    </defs>
  </svg>
`,Le=`
  <svg viewBox="0 0 128 128" fill="none">
    <rect width="128" height="128" rx="26.8" fill="url(#fs-ph1-${f})"/>
    <path d="M110.584 64.9142H99.142C99.142 41.7651 80.173 23 56.7724 23C33.6612 23 14.8716 41.3057 14.4118 64.0583C13.936 87.5709 35.1238 107 58.9462 107H63.0334C83.9845 107 110.584 89.0278 110.584 64.9142Z" fill="url(#fs-ph2-${f})"/>
    <path d="M77.8031 63.4286C77.8031 67.4034 74.5723 70.6251 70.5859 70.6251C66.5995 70.6251 63.3687 67.4034 63.3687 63.4286C63.3687 59.4538 66.5995 56.232 70.5859 56.232C74.5723 56.232 77.8031 59.4538 77.8031 63.4286Z" fill="#fff"/>
    <path d="M50.9697 63.4286C50.9697 67.4034 47.7389 70.6251 43.7525 70.6251C39.7661 70.6251 36.5353 67.4034 36.5353 63.4286C36.5353 59.4538 39.7661 56.232 43.7525 56.232C47.7389 56.232 50.9697 59.4538 50.9697 63.4286Z" fill="#fff"/>
    <defs>
      <linearGradient id="fs-ph1-${f}" x1="64" y1="0" x2="64" y2="128" gradientUnits="userSpaceOnUse">
        <stop stop-color="#534BB1"/>
        <stop offset="1" stop-color="#551BF9"/>
      </linearGradient>
      <linearGradient id="fs-ph2-${f}" x1="62.4982" y1="23" x2="62.4982" y2="107" gradientUnits="userSpaceOnUse">
        <stop stop-color="#fff"/>
        <stop offset="1" stop-color="#fff" stop-opacity="0.82"/>
      </linearGradient>
    </defs>
  </svg>
`;function z(e){return`
    <div class="step-container" data-step="signup">
      <div class="title-section">
        <h1 class="title">Get Started</h1>
        <p class="subtitle">Start saving on every Solana trade</p>
      </div>

      <div class="form">
        <div class="form-item">
          <div class="input-group">
            <div class="input-wrapper">
              <i class="ri-gift-line input-icon"></i>
              <input type="text" id="invite-input" placeholder="Invite code (optional)" value="${e.inviteCode}" />
            </div>
          </div>
        </div>
      </div>

      ${e.error?`
        <div class="error-box">
          <i class="ri-error-warning-line"></i>
          <span>${e.error}</span>
        </div>
      `:""}

      <button class="btn-primary" id="signup-submit" ${e.isLoading?"disabled":""}>
        <div class="bg"></div>
        <div class="shimmer"></div>
        <span class="btn-content">
          ${e.isLoading?'<i class="ri-loader-4-line spinner"></i>':'Create Account <i class="ri-arrow-right-line"></i>'}
        </span>
      </button>

      <div class="divider">
        <hr class="divider-line" />
        <span class="divider-text">or continue with</span>
      </div>

      <div class="social-buttons">
        <button type="button" class="btn-social" data-action="phantom-auth" ${e.isLoading?"disabled":""}>
          ${Le}
          <span>Phantom</span>
        </button>
      </div>

      <div class="mode-switch">
        Already have an account?
        <button type="button" data-action="go-recover">Recover with key</button>
      </div>
    </div>
  `}function re(e){return`
    <div class="step-container" data-step="recovery-key">
      <div class="back-header">
        <button class="back-btn" data-action="go-back">
          <i class="ri-arrow-left-s-line"></i>
          <span>Back</span>
        </button>
        <div class="title-section">
          <div class="icon-badge blue">
            <i class="ri-key-2-line"></i>
          </div>
          <h1 class="title">Recover Account</h1>
          <p class="subtitle">Enter your 12-word recovery key</p>
        </div>
      </div>

      <div class="form">
        <div class="form-item">
          <textarea id="recovery-key-input" placeholder="Enter your 12-word recovery key..." rows="3" class="recovery-textarea">${e.recoveryKeyInput}</textarea>
        </div>
      </div>

      ${e.error?`
        <div class="error-box">
          <i class="ri-error-warning-line"></i>
          <span>${e.error}</span>
        </div>
      `:""}

      <div class="spacer"></div>

      <button class="btn-primary" id="recover-submit" ${e.isLoading||!e.recoveryKeyInput.trim()?"disabled":""}>
        <div class="bg"></div>
        <div class="shimmer"></div>
        <span class="btn-content">
          ${e.isLoading?'<i class="ri-loader-4-line spinner"></i>':'Recover Account <i class="ri-arrow-right-line"></i>'}
        </span>
      </button>
    </div>
  `}function ne(e){return`
    <div class="step-container" data-step="show-key">
      <div class="title-section">
        <div class="icon-badge green">
          <i class="ri-key-2-line"></i>
        </div>
        <h1 class="title">Save Your Recovery Key</h1>
        <p class="subtitle">This is the <strong>only way</strong> to recover your account. Save it somewhere safe.</p>
      </div>

      <div class="recovery-key-grid">
        ${e.generatedRecoveryKey.split(" ").map((o,r)=>`
          <div class="recovery-word">
            <span class="word-number">${r+1}.</span>
            <span class="word-text">${o}</span>
          </div>
        `).join("")}
      </div>

      <button class="copy-btn" data-action="copy-key">
        <i class="${e.keyCopied?"ri-check-line copied":"ri-file-copy-line"}"></i>
        <span>${e.keyCopied?"Copied!":"Copy to clipboard"}</span>
      </button>

      <div class="warning-box">
        <i class="ri-alert-line"></i>
        <span>If you lose this key, you will lose access to your account and funds. We cannot recover it for you.</span>
      </div>

      <div class="spacer"></div>

      <button class="btn-primary green" id="key-saved-submit">
        <div class="bg green"></div>
        <div class="shimmer"></div>
        <span class="btn-content">I've Saved My Key <i class="ri-check-double-line"></i></span>
      </button>
    </div>
  `}function Te(e){switch(e.step){case"signup":return z(e);case"recovery-key":return re(e);case"show-key":return ne(e);default:return z(e)}}function j(e){return`
    <div class="modal">
      <div class="bg-effects">
        <div class="bg-gradient"></div>
        <div class="orb-primary"></div>
        <div class="orb-secondary"></div>
        <div class="grid-pattern"></div>
        <div class="top-glow"></div>
      </div>
      <div class="content">
        ${H()}
        ${Te(e)}
      </div>
    </div>
  `}var ie=class{state;shadowRoot=null;overlay=null;cleanupAuthListener=null;resolvePromise=null;constructor(){this.state=Se()}show(){return new Promise(t=>{this.resolvePromise=t,N(),ke(),document.getElementById(w)?.remove(),this.overlay=document.createElement("div"),this.overlay.id=w,this.shadowRoot=this.overlay.attachShadow({mode:"closed"});let o=document.createElement("style");o.textContent=Ce(),this.shadowRoot.appendChild(o);let r=document.createElement("div");r.className="overlay",r.innerHTML=j(this.state),this.shadowRoot.appendChild(r),this.attachEventListeners(),this.cleanupAuthListener=F(n=>{n&&this.close(!0)}),this.inject()})}inject(){document.body&&this.overlay?document.body.appendChild(this.overlay):requestAnimationFrame(()=>this.inject())}close(t){this.cleanupAuthListener?.(),this.overlay?.remove(),this.resolvePromise?.(t)}render(){if(!this.shadowRoot)return;let t=this.shadowRoot.querySelector(".overlay");t&&(t.innerHTML=j(this.state),this.attachEventListeners())}setLoading(t){if(this.state.isLoading=t,!this.shadowRoot)return;this.shadowRoot.querySelectorAll("#signup-submit, #recover-submit, #key-saved-submit").forEach(n=>{if(!n)return;n.disabled=t;let a=n.querySelector("span");a&&(t?a.innerHTML='<i class="ri-loader-4-line spinner"></i>':n.id==="signup-submit"?a.innerHTML='Create Account <i class="ri-arrow-right-line"></i>':n.id==="recover-submit"?a.innerHTML='Recover Account <i class="ri-arrow-right-line"></i>':n.id==="key-saved-submit"&&(a.innerHTML=`I've Saved My Key <i class="ri-check-double-line"></i>`))}),this.shadowRoot.querySelectorAll(".btn-social").forEach(n=>{n.disabled=t})}setError(t){if(this.state.error=t,!this.shadowRoot)return;let o=this.shadowRoot.querySelector(".error-box");if(t)if(o){let r=o.querySelector("span");r&&(r.textContent=t),o.style.display="flex"}else{let r=this.shadowRoot.querySelector(".btn-primary");if(r){let n=document.createElement("div");n.className="error-box",n.innerHTML=`<i class="ri-error-warning-line"></i><span>${t}</span>`,r.parentNode?.insertBefore(n,r)}}else o&&(o.style.display="none")}transitionToStep(t){if(!this.shadowRoot)return;let o=this.shadowRoot.querySelector(".content");o?(o.classList.add("transitioning"),setTimeout(()=>{this.state={...this.state,...t},this.render();let r=this.shadowRoot?.querySelector(".content");r&&(r.offsetWidth,r.classList.remove("transitioning"))},150)):(this.state={...this.state,...t},this.render())}attachEventListeners(){if(!this.shadowRoot)return;let t=this.shadowRoot.querySelector("#invite-input");t?.addEventListener("input",r=>{this.state.inviteCode=r.target.value}),t?.addEventListener("keydown",r=>{r.key==="Enter"&&this.handleSignup()});let o=this.shadowRoot.querySelector("#recovery-key-input");o?.addEventListener("input",r=>{this.state.recoveryKeyInput=r.target.value,this.updateRecoverButton()}),o?.addEventListener("keydown",r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.handleRecover())}),this.shadowRoot.querySelectorAll("[data-action]").forEach(r=>{let n=r.getAttribute("data-action");r.addEventListener("click",()=>{switch(n){case"go-recover":this.transitionToStep({step:"recovery-key",error:null});break;case"go-back":this.transitionToStep({step:"signup",error:null});break;case"copy-key":this.handleCopyKey();break;case"phantom-auth":this.handlePhantomAuth();break}})}),this.shadowRoot.querySelector("#signup-submit")?.addEventListener("click",()=>this.handleSignup()),this.shadowRoot.querySelector("#recover-submit")?.addEventListener("click",()=>this.handleRecover()),this.shadowRoot.querySelector("#key-saved-submit")?.addEventListener("click",()=>this.handleKeySaved())}updateRecoverButton(){let t=this.shadowRoot?.querySelector("#recover-submit");t&&(t.disabled=this.state.isLoading||!this.state.recoveryKeyInput.trim())}async handleSignup(){this.setError(null),this.setLoading(!0);try{let t=await ve(this.state.inviteCode||void 0);await this.storeTokens(t.accessToken,t.refreshToken),this.setLoading(!1),this.transitionToStep({step:"show-key",generatedRecoveryKey:t.recoveryKey,error:null})}catch(t){let o=t instanceof L?t.message:"An unexpected error occurred. Please try again.";this.setLoading(!1),this.setError(o)}}async handleRecover(){if(this.state.recoveryKeyInput.trim()){this.setError(null),this.setLoading(!0);try{let t=await xe(this.state.recoveryKeyInput.trim());await this.storeTokens(t.accessToken,t.refreshToken),this.close(!0)}catch(t){let o=t instanceof L?t.message:"An unexpected error occurred. Please try again.";this.setLoading(!1),this.setError(o)}}}async handleCopyKey(){try{await navigator.clipboard.writeText(this.state.generatedRecoveryKey)}catch{let o=document.createElement("textarea");o.value=this.state.generatedRecoveryKey,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}this.state.keyCopied=!0;let t=this.shadowRoot?.querySelector('[data-action="copy-key"]');if(t){let o=t.querySelector("i"),r=t.querySelector("span");o&&(o.className="ri-check-line copied"),r&&(r.textContent="Copied!")}setTimeout(()=>{this.state.keyCopied=!1;let o=this.shadowRoot?.querySelector('[data-action="copy-key"]');if(o){let r=o.querySelector("i"),n=o.querySelector("span");r&&(r.className="ri-file-copy-line"),n&&(n.textContent="Copy to clipboard")}},2e3)}handleKeySaved(){this.close(!0)}async handlePhantomAuth(){this.setError(null),this.setLoading(!0);try{let t=await new Promise(o=>{chrome.runtime.sendMessage({type:"PHANTOM_AUTH"},o)});t?.success?this.close(!0):(this.setLoading(!1),this.setError(t?.error||"Phantom authentication failed"))}catch{this.setLoading(!1),this.setError("Failed to connect to Phantom")}}storeTokens(t,o){return new Promise((r,n)=>{chrome.runtime.sendMessage({type:"STORE_TOKENS",accessToken:t,refreshToken:o},a=>{if(chrome.runtime.lastError){i.error("Store tokens error:",chrome.runtime.lastError.message),n(chrome.runtime.lastError);return}a?.success?r():n(new Error("Failed to store tokens"))})})}},P=null;function $(){return P||(P=new ie().show().finally(()=>{P=null}),P)}function ae(){document.getElementById(w)?.remove()}var x=`w${crypto.randomUUID().replace(/-/g,"").slice(0,12)}`,Ae="__wm_ids";function Me(){try{let e=sessionStorage.getItem(Ae);if(e)for(let o of e.split(","))o&&o!==x&&document.getElementById(o)?.remove();let t=e?e.split(",").filter(o=>o&&o!==x):[];t.push(x),sessionStorage.setItem(Ae,t.slice(-5).join(","))}catch{}}function Ie(){return`
  /* Remixicon font-face (required inside Shadow DOM) */
  @font-face {
    font-family: 'remixicon';
    src: url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.woff') format('woff');
    font-display: swap;
  }

  /* Design Tokens */
  :host {
    all: initial;
    --kol-bg: #050508;
    --kol-surface: #101010;
    --kol-surface-elevated: #1a1a1a;
    --kol-border: #2a2a2a;
    --kol-border-hover: #3a3a3a;
    --kol-blue: #007bff;
    --kol-green: #00c46b;
    --kol-red: #ff4d4f;
    --kol-text: #ffffff;
    --kol-text-secondary: #b0b0b0;
    --kol-text-muted: #888888;
    --kol-text-tertiary: #666666;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* Remixicon base styles */
  [class^="ri-"], [class*=" ri-"] {
    font-family: 'remixicon' !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Icon definitions */
  .ri-key-2-line:before { content: "\\ee6f"; }
  .ri-settings-3-line:before { content: "\\f0e6"; }
  .ri-download-2-line:before { content: "\\ec69"; }
  .ri-shield-check-line:before { content: "\\f0f3"; }
  .ri-checkbox-circle-fill:before { content: "\\eb80"; }
  .ri-error-warning-line:before { content: "\\eca1"; }
  .ri-close-line:before { content: "\\eb99"; }
  .ri-arrow-right-line:before { content: "\\ea6c"; }

  /* Overlay */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    animation: fadeIn 0.3s ease-out;
  }

  /* Modal */
  .modal {
    position: relative;
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--kol-bg);
    border: 1px solid var(--kol-border);
    border-radius: 20px;
    overflow: hidden;
    color: var(--kol-text);
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.03),
      0 24px 80px -12px rgba(0, 0, 0, 0.8),
      0 0 60px -20px rgba(0, 123, 255, 0.15);
  }

  /* Background Effects */
  .bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .bg-gradient {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 40, 80, 0.5) 0%, transparent 50%),
      radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 40, 80, 0.2) 0%, transparent 50%);
  }

  .orb-primary {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    opacity: 0.4;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.2) 0%, rgba(0, 123, 255, 0.04) 40%, transparent 70%);
    filter: blur(40px);
    animation: orbFloat 8s ease-in-out infinite;
  }

  .orb-secondary {
    position: absolute;
    bottom: -64px;
    left: -64px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    opacity: 0.25;
    background: radial-gradient(circle, rgba(0, 196, 107, 0.15) 0%, transparent 60%);
    filter: blur(30px);
    animation: orbFloat 10s ease-in-out infinite 2s;
  }

  .grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
      linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 70%);
  }

  .top-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 123, 255, 0.6) 50%, transparent 100%);
    box-shadow: 0 0 24px 4px rgba(0, 123, 255, 0.2);
  }

  /* Content */
  .content {
    position: relative;
    z-index: 10;
    padding: 28px 28px 24px;
    overflow-y: auto;
    max-height: 90vh;
  }

  /* Logo */
  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: fadeSlideDown 0.6s ease-out;
  }

  .logo-banner {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 123, 255, 0.3));
  }

  /* Icon Badge */
  .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 123, 255, 0.05) 100%);
    border: 1px solid rgba(0, 123, 255, 0.25);
    margin-bottom: 12px;
    box-shadow:
      0 0 20px -4px rgba(0, 123, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .icon-badge i {
    font-size: 24px;
    color: var(--kol-blue);
    filter: drop-shadow(0 0 6px rgba(0, 123, 255, 0.4));
  }

  /* Title */
  .title-section {
    text-align: center;
    margin-bottom: 14px;
    animation: fadeSlideUp 0.5s ease-out 0.1s both;
  }

  .title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
  }

  .subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--kol-text-tertiary);
    line-height: 1.55;
    max-width: 320px;
    margin: 0 auto;
  }

  /* Privacy Trust Badge */
  .trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 196, 107, 0.06) 0%, rgba(0, 196, 107, 0.02) 100%);
    border: 1px solid rgba(0, 196, 107, 0.15);
    position: relative;
    overflow: hidden;
  }

  .trust-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 196, 107, 0.2), transparent);
  }

  .trust-badge i {
    color: var(--kol-green);
    font-size: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(0, 196, 107, 0.3));
  }

  .trust-badge span {
    font-size: 12px;
    color: var(--kol-text-secondary);
    line-height: 1.5;
  }

  /* Steps \u2014 connected timeline */
  .steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 14px;
    animation: fadeSlideUp 0.5s ease-out 0.2s both;
    position: relative;
    padding-left: 18px;
  }

  /* Timeline rail */
  .steps::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: linear-gradient(to bottom, rgba(0, 123, 255, 0.3), rgba(0, 123, 255, 0.08));
  }

  .step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 14px 6px 0;
    position: relative;
  }

  .step-number {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--kol-bg);
    border: 1.5px solid rgba(0, 123, 255, 0.35);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--kol-blue);
    flex-shrink: 0;
    box-shadow: 0 0 8px -2px rgba(0, 123, 255, 0.2);
  }

  .step-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(26, 26, 26, 0.4);
    border: 1px solid rgba(42, 42, 42, 0.6);
    transition: border-color 0.2s, background 0.2s;
  }

  .step:hover .step-content {
    border-color: rgba(0, 123, 255, 0.15);
    background: rgba(26, 26, 26, 0.6);
  }

  .step-icon {
    font-size: 14px;
    color: rgba(0, 123, 255, 0.6);
    flex-shrink: 0;
  }

  .step-text {
    font-size: 12px;
    color: var(--kol-text-secondary);
    line-height: 1.4;
  }

  /* Wallet Section */
  .wallet-section {
    margin-bottom: 14px;
    animation: fadeSlideUp 0.5s ease-out 0.3s both;
  }

  .wallet-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--kol-text-muted);
    margin-bottom: 8px;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .wallet-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--kol-border), transparent);
  }

  .wallet-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .wallet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(16, 16, 16, 0.5);
    border: 1px solid var(--kol-border);
    transition: border-color 0.2s;
  }

  .wallet-item:hover {
    border-color: var(--kol-border-hover);
  }

  .wallet-item i {
    font-size: 14px;
    flex-shrink: 0;
  }

  .wallet-item i.ready {
    color: var(--kol-green);
    filter: drop-shadow(0 0 3px rgba(0, 196, 107, 0.3));
  }

  .wallet-item i.missing {
    color: #fbbf24;
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.3));
  }

  .wallet-address {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--kol-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wallet-status {
    font-size: 10px;
    font-family: var(--font-body);
    font-weight: 500;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 6px;
  }

  .wallet-status.ready {
    color: var(--kol-green);
    background: rgba(0, 196, 107, 0.08);
  }

  .wallet-status.missing {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
  }

  /* Button */
  .btn-dismiss {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.12) 0%, rgba(0, 123, 255, 0.04) 100%);
    border: 1px solid rgba(0, 123, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeSlideUp 0.5s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
  }

  .btn-dismiss::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.25s;
  }

  .btn-dismiss:hover {
    border-color: rgba(0, 123, 255, 0.35);
    color: white;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.18) 0%, rgba(0, 123, 255, 0.08) 100%);
    box-shadow: 0 0 24px -8px rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
  }

  .btn-dismiss:hover::before {
    opacity: 1;
  }

  .btn-dismiss:active {
    transform: translateY(0);
  }

  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes scaleIn {
    from {
      opacity: 0;
      transform: scale(0.95) translateY(10px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @keyframes fadeSlideUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeSlideDown {
    from {
      opacity: 0;
      transform: translateY(-16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes orbFloat {
    0%, 100% {
      transform: translate(0, 0) scale(1);
    }
    50% {
      transform: translate(10px, 15px) scale(1.1);
    }
  }

`}var ft="wallet_sync_snapshot_";function gt(e){return e.length<=12?e:`${e.slice(0,4)}...${e.slice(-4)}`}function Re(e){if(!e||typeof e!="object")return[];let{wallets:t}=e;return Array.isArray(t)?t.map(o=>{let r=o;return{public_key:r.public_key??"",name:r.name??"Wallet",type:r.type??"sniper",hasKey:r.private_key!=null&&r.private_key!==""}}):[]}function mt(e,t){let o=e.length>0?e.map(r=>`
      <div class="wallet-item">
        <i class="${r.hasKey?"ri-checkbox-circle-fill ready":"ri-error-warning-line missing"}"></i>
        <span class="wallet-address">${gt(r.public_key)}</span>
        <span class="wallet-status ${r.hasKey?"ready":"missing"}">${r.hasKey?"Ready":"Needs key"}</span>
      </div>
    `).join(""):'<div class="wallet-item"><span class="wallet-address" style="color: var(--kol-text-muted)">No wallets detected yet</span></div>';return`
    <div class="overlay">
      <div class="modal">
        <div class="bg-effects">
          <div class="bg-gradient"></div>
          <div class="orb-primary"></div>
          <div class="orb-secondary"></div>
          <div class="grid-pattern"></div>
          <div class="top-glow"></div>
        </div>

        <div class="content">
          ${H()}

          <div class="title-section">
            <div class="icon-badge">
              <i class="ri-checkbox-circle-fill"></i>
            </div>
            <div class="title">Wallet Import Required</div>
            <div class="subtitle">
              FeeShield needs your private key to sign transactions on your behalf.
              Import your wallet on ${t} to get started.
            </div>
            <div class="trust-badge">
              <i class="ri-shield-check-line"></i>
              <span>Your private key stays completely local on your computer. We never store or transmit it.</span>
            </div>
          </div>

          <div class="steps">
            <div class="step">
              <div class="step-number">1</div>
              <div class="step-content">
                <i class="ri-settings-3-line step-icon"></i>
                <span class="step-text">Open wallet settings on ${t}</span>
              </div>
            </div>
            <div class="step">
              <div class="step-number">2</div>
              <div class="step-content">
                <i class="ri-key-2-line step-icon"></i>
                <span class="step-text">Export your private key</span>
              </div>
            </div>
            <div class="step">
              <div class="step-number">3</div>
              <div class="step-content">
                <i class="ri-download-2-line step-icon"></i>
                <span class="step-text">Re-import the wallet on ${t}</span>
              </div>
            </div>
            <div class="step">
              <div class="step-number">4</div>
              <div class="step-content">
                <i class="ri-shield-check-line step-icon"></i>
                <span class="step-text">FeeShield captures the key automatically</span>
              </div>
            </div>
          </div>

          <div class="wallet-section">
            <div class="wallet-section-title">Wallet Status</div>
            <div class="wallet-list">${o}</div>
          </div>

          <button class="btn-dismiss" data-action="dismiss">I Understand</button>
        </div>
      </div>
    </div>
  `}var W=class{shadowRoot=null;overlay=null;storageListener=null;platformId;platformName;constructor(t,o){this.platformId=t,this.platformName=o}show(){N(),Me(),document.getElementById(x)?.remove(),this.overlay=document.createElement("div"),this.overlay.id=x,this.shadowRoot=this.overlay.attachShadow({mode:"closed"});let t=document.createElement("style");t.textContent=Ie(),this.shadowRoot.appendChild(t);let o=`${ft}${this.platformId}`;chrome.storage.local.get(o,r=>{let n=Re(r[o]);this.renderContent(n)}),this.storageListener=r=>{if(o in r){let n=Re(r[o].newValue);n.some(l=>l.hasKey)?(i.log("[WalletModal] Key captured \u2014 auto-dismissing"),this.dismiss()):this.renderContent(n)}},chrome.storage.onChanged.addListener(this.storageListener),this.inject()}renderContent(t){if(!this.shadowRoot)return;this.shadowRoot.querySelector(".overlay")?.remove();let r=document.createElement("div");r.innerHTML=mt(t,this.platformName);let n=r.firstElementChild;n&&(this.shadowRoot.appendChild(n),this.attachEventListeners())}attachEventListeners(){if(!this.shadowRoot)return;this.shadowRoot.querySelector('[data-action="dismiss"]')?.addEventListener("click",()=>this.dismiss());let o=this.shadowRoot.querySelector(".overlay");o?.addEventListener("click",r=>{r.target===o&&this.dismiss()})}inject(){document.body&&this.overlay?document.body.appendChild(this.overlay):requestAnimationFrame(()=>this.inject())}dismiss(){this.storageListener&&(chrome.storage.onChanged.removeListener(this.storageListener),this.storageListener=null),this.overlay?.remove(),this.overlay=null,this.shadowRoot=null}};var He=null;function Pe(e,t){document.getElementById(x)||(He=new W(e,t),He.show())}var ht=25e3,$e=3,yt=[500,1500,3e3];function Be(e){let t=null,o=null,r=0;function n(){try{t=chrome.runtime.connect({name:`heartbeat_${e}`}),t.onDisconnect.addListener(()=>{if(i.warn(`[heartbeat] Disconnected (${e})`),o&&(clearInterval(o),o=null),t=null,r<$e){let a=yt[r]||1e4;r++,i.log(`[heartbeat] Reconnecting in ${a}ms (attempt ${r}/${$e})`),setTimeout(n,a)}else i.error("[heartbeat] Max reconnect attempts reached \u2014 extension context likely dead")}),r=0,o=setInterval(()=>{try{t?.postMessage({type:"ping"})}catch{}},ht),i.log(`[heartbeat] Connected (${e})`)}catch{i.error(`[heartbeat] Failed to connect (${e})`)}}n()}var Oe=null,G=null,B=!1;function k(e){B=e;try{e?sessionStorage.setItem(se,"1"):sessionStorage.removeItem(se)}catch{}}var De=!1,se="__auth_pending";function S(){De||(De=!0,chrome.runtime.sendMessage({type:"SUPPRESS_DEATH_RECOVERY"},()=>{location.reload()}),setTimeout(()=>location.reload(),200))}var bt=`e${crypto.randomUUID().replace(/-/g,"").slice(0,10)}`;chrome.runtime.onMessage.addListener((e,t,o)=>{if(e.type==="CHECK_INJECTION_HEALTH")return B?(o({alive:!0}),!0):((G?.verifyInjection??R)().then(n=>o({alive:n})),!0);if(e.type==="TRADE_ROUTED"&&vt(),e.type==="AUTH_EXPIRED"){if(B)return;i.log("Auth expired \u2014 showing login modal"),k(!0),$().then(r=>{k(!1),r&&S()})}e.type==="WALLET_REIMPORT_NEEDED"&&G&&Ke(G)});function vt(){let e="data-r",t="Fee saved",o=!1,r=l=>{if(o||l.hasAttribute(e)||l.id===bt)return!1;let p=(l.innerText||"").toLowerCase();if(!/success|confirmed|deployed|completed|executed|sent|swapped|created|launched/.test(p))return!1;let s=getComputedStyle(l),c=s.position==="fixed"||s.position==="absolute",d=parseInt(s.zIndex)>50;if(!c&&!d)return!1;let u=l.getBoundingClientRect();if(u.width<80||u.height<20)return!1;l.setAttribute(e,"");let h=document.createElement("div");h.setAttribute(e,"badge"),h.style.cssText=`
      font-size: 11px;
      opacity: 0.65;
      margin-top: 4px;
      color: inherit;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    `,h.textContent=t;let b=l.querySelectorAll("p, span, div"),T=l;for(let E=b.length-1;E>=0;E--){let O=b[E],qe=(O.innerText||"").toLowerCase();if(/success|confirmed|deployed|completed|executed|sent|swapped|created|launched/.test(qe)){T=O;break}}return T.appendChild(h),o=!0,i.log('Injected "Routed through LaunchKOL" into native notification'),!0},n=l=>{if(!o&&(r(l),!o)){for(let p of l.querySelectorAll("*"))if(p instanceof HTMLElement&&r(p))return}},a=new MutationObserver(l=>{if(o){a.disconnect();return}for(let p of l)for(let g of p.addedNodes)if(g instanceof HTMLElement&&(n(g),o)){a.disconnect();return}});a.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{if(!o){for(let l of document.querySelectorAll('[role="alert"], [role="status"], [class*="toast"], [class*="notification"], [class*="snack"], [class*="Toastify"]'))if(l instanceof HTMLElement&&(n(l),o))break}},300),setTimeout(()=>{o||(a.disconnect(),i.log("Routed branding: no notification found within timeout"))},15e3)}var xt="wallet_sync_snapshot_";function Ke(e){let t=`${xt}${e.id}`;chrome.storage.local.get(t,o=>{let r=o[t];if(!r||!Array.isArray(r.wallets)||r.wallets.length===0)return;r.wallets.some(a=>a.private_key!=null&&a.private_key!=="")||(i.log(`[WalletCheck] All ${r.wallets.length} wallets missing keys on ${e.name} \u2014 showing reimport modal`),Pe(e.id,e.name))})}async function Ue(e){G=e;try{sessionStorage.getItem(se)&&chrome.runtime.sendMessage({type:"SUPPRESS_DEATH_RECOVERY"}).catch(()=>{})}catch{}let t=document.readyState!=="loading";i.log(`Initializing on ${e.name}${t?" (late injection \u2014 skipping reload logic)":""}`),Q(e),await fe();let o=await R();if(!o&&!t){let c="__rc",d=parseInt(sessionStorage.getItem(c)||"0",10);if(d<2){sessionStorage.setItem(c,String(d+1)),i.warn(`MAIN world not injected (attempt ${d+1}) \u2014 refreshing page`),S();return}else i.error(`MAIN world injection failed after ${d} refreshes \u2014 blocking page`),C(),await wt(e)}else if(!o&&t){i.warn("MAIN world not injected (late injection) \u2014 blocking page, will auto-reload in 3s"),C();let c=parseInt(sessionStorage.getItem("__rc")||"0",10);c<2&&setTimeout(()=>{V()&&(sessionStorage.setItem("__rc",String(c+1)),i.warn(`MAIN world still dead after grace period \u2014 refreshing (attempt ${c+1})`),S())},3e3)}else o&&sessionStorage.removeItem("__rc");e.brandingEnabled&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>te(e.branding)):te(e.branding)),ge(e),await kt(e);let r=5e3,n="__rc",a=e.verifyInjection??R,l=!0,p=!0,g=!1;function s(){return new Promise(c=>{let d=setTimeout(()=>c(!1),2e3);try{chrome.runtime.sendMessage({type:"HEALTH_PING"},u=>{if(clearTimeout(d),chrome.runtime.lastError)return i.warn(`[health] Background ping failed: ${chrome.runtime.lastError.message}`),c(!1);c(!!u?.alive)})}catch{clearTimeout(d),c(!1)}})}setInterval(async()=>{let[c,d]=await Promise.all([a(),s()]);if(c!==l&&(i.warn(`[health] MAIN world: ${l?"alive":"dead"} \u2192 ${c?"alive":"dead"}`),l=c),d!==p&&(i.warn(`[health] Background: ${p?"alive":"dead"} \u2192 ${d?"alive":"dead"}`),p=d),c&&d)V()&&(i.log("[health] All layers recovered \u2014 unblocking page"),M()),sessionStorage.removeItem(n);else{let h=[];if(c||h.push("MAIN world"),d||h.push("background"),!c&&!g&&!B){let b=parseInt(sessionStorage.getItem(n)||"0",10);if(b<2){g=!0,sessionStorage.setItem(n,String(b+1)),i.error(`[health] MAIN world injection lost \u2014 refreshing (attempt ${b+1})`),S();return}}!V()&&!B&&(i.error(`[health] Unhealthy (${h.join(" + ")}) \u2014 blocking page`),C())}},r)}async function wt(e){let t=e.verifyInjection??R;return new Promise(o=>{let r=setInterval(async()=>{await t()&&(clearInterval(r),i.log("MAIN world recovered \u2014 unblocking page"),M(),sessionStorage.removeItem("__rc"),o())},3e3)})}async function kt(e){if(St(e),await ye()){setTimeout(()=>Ke(e),2e3),Ve(e,!0);return}k(!0);let o=await $();if(k(!1),o){S();return}else i.log(`User skipped login on ${e.name} \u2014 interception still active`),Ve(e,!1)}function Ve(e,t){Oe?.();let o=t;Oe=F(r=>{r!==o&&(o=r,r?(ae(),k(!1),i.log(`User logged in on ${e.name} \u2014 reloading to sync data`),S()):(i.log(`User logged out on ${e.name} \u2014 interception stays active, trades will be blocked`),k(!0),$().then(n=>{k(!1),n&&S()})))})}function St(e){Be(e.id),me(e),chrome.runtime.sendMessage({type:"SYNC_PLATFORM_WALLETS",platformId:e.id},t=>{if(chrome.runtime.lastError){i.error("Wallet sync failed:",chrome.runtime.lastError.message);return}t?.success&&i.log("Wallets synced to backend")}),e.postActivate?.(),i.log(`Active on ${e.name}`)}function Fe(e,t){window.addEventListener(e,(o=>{try{let r=o.detail;t&&r&&typeof r=="object"&&!r.platform&&(r.platform=t),chrome.runtime.sendMessage({type:"TRADE_DIAGNOSTIC",entry:r})}catch{}}))}function Ne(e){let{storageKey:t,parseAddresses:o,messageType:r,pollIntervalMs:n=2e3,extraStorageKeys:a=[],sendInitial:l=!0,initialDelayMs:p=0,buildMessage:g}=e;function s(d){if(d.length!==0)try{let u=g?{type:r,...g(d)}:{type:r,addresses:d};chrome.runtime.sendMessage(u)}catch{}}window.addEventListener("storage",d=>{if(d.key===t&&d.newValue)s(o(d.newValue));else if(a.includes(d.key))try{s(o(localStorage.getItem(t)))}catch{}});let c=null;try{c=localStorage.getItem(t)}catch{}if(setInterval(()=>{try{let d=localStorage.getItem(t);d!==c&&(c=d,s(o(d)))}catch{}},n),l){let d=()=>{let u=o(c);u.length>0&&s(u)};p>0?setTimeout(d,p):d()}}var ze=!1;function je(){if(ze)return;ze=!0;let e=()=>crypto.randomUUID().replace(/-/g,"").slice(0,13),t={discover:e(),discovered:e(),ping:e(),pong:e(),walletCacheChanged:e()};window.postMessage({type:"707326fe4e02419f",cfg:t},"*"),i.log("[PV-Relay] Initializing Padre Velvet relay (config sent via postMessage)"),window.addEventListener("message",s=>{if(s.source!==window)return;let{type:c}=s.data||{};if(c===t.discovered){let{apiPublicKey:d,apiPrivateKey:u,bundles:h,wallets:b,organizationId:T,error:E}=s.data;if(E&&!d){i.warn("[PV-Relay] Discovery failed:",E);return}if(!u){i.warn("[PV-Relay] Discovery returned no API private key"),b?.length>0&&chrome.runtime.sendMessage({type:"PADRE_VELVET_DISCOVERY",apiPublicKey:d||"",apiPrivateKey:"",bundles:h||[],wallets:b||[],organizationId:T||"",partial:!0},()=>{chrome.runtime.lastError&&i.error("[PV-Relay] Failed to send partial discovery:",chrome.runtime.lastError.message)});return}i.log(`[PV-Relay] Discovered Velvet credential: ${d.slice(0,20)}...`),i.log(`[PV-Relay] Bundles: ${h?.length||0}, Wallets: ${b?.length||0}`),l=!0,chrome.runtime.sendMessage({type:"PADRE_VELVET_DISCOVERY",apiPublicKey:d,apiPrivateKey:u,bundles:h||[],wallets:b||[],organizationId:T||""},O=>{if(chrome.runtime.lastError){i.error("[PV-Relay] Failed to send discovery to background:",chrome.runtime.lastError.message);return}i.log("[PV-Relay] Discovery forwarded to background:",O)})}}),window.addEventListener("message",s=>{if(s.source!==window||s.data?.type!==t.walletCacheChanged)return;let{addresses:c}=s.data;if(!(!Array.isArray(c)||c.length===0)){i.log(`[PV-Relay] Wallet cache changed (instant hook): ${c.length} address(es)`);try{chrome.runtime.sendMessage({type:"PADRE_WALLET_LIST_CHANGED",addresses:c},()=>{chrome.runtime.lastError&&i.error("[PV-Relay] Failed to send wallet change:",chrome.runtime.lastError.message)})}catch{}i.log("[PV-Relay] Triggering re-discovery after wallet import"),window.postMessage({type:t.discover},"*")}});let o=0;window.addEventListener("message",s=>{s.source===window&&s.data?.type===t.pong&&(o=Date.now())});function r(){return new Promise(s=>{let c=o;window.postMessage({type:t.ping},"*"),setTimeout(()=>{s(o>c)},500)})}window.__pvbHealthCheck=r;let n=s=>s+(Math.random()*.5-.25)*s,a=[1500,4e3,8e3,16e3,3e4].map(s=>Math.round(n(s))),l=!1,p=0;function g(){if(l||p>=a.length){!l&&p>=a.length&&i.error("[PV-Relay] Discovery failed after all retries");return}let s=a[p];p++,setTimeout(()=>{l||(i.log(`[PV-Relay] Triggering Velvet discovery (attempt ${p}/${a.length})`),window.postMessage({type:t.discover},"*"),setTimeout(()=>{l||g()},2e3))},s)}g()}function We(){let e=window.__pvbHealthCheck;return e?e():Promise.resolve(!1)}var Ge=`d${crypto.randomUUID().replace(/-/g,"").slice(0,12)}`;Fe(Ge,"padre");function Et(e){if(!e)return[];try{let t=JSON.parse(e),o=[];if(typeof t=="object"&&!Array.isArray(t))for(let r of Object.keys(t)){let n=t[r];if(Array.isArray(n))for(let a of n){let l=a.publicAddress||a.address||a.publicKey;typeof l=="string"&&!l.startsWith("0x")&&o.push(l)}}return o}catch{return[]}}Ne({storageKey:"padreV2-walletsCache",parseAddresses:Et,messageType:"PADRE_WALLET_LIST_CHANGED"});var _t={id:"padre",name:"Padre",hostPatterns:["padre.gg","trade.padre.gg"],brandingEnabled:!1,diagEventName:Ge,apiPatterns:[],wsPatterns:[/backend\d*\.padre\.gg\/_(?:heavy_)?multiplex/],wsEvents:[],binaryWsTradePatterns:[/\/orders\/.*\/create$/],tokenStorageKeys:["padreV2-session"],verifyInjection:()=>We(),postActivate:()=>je(),branding:{logoSelectors:[],textReplacements:[],colorOverrides:{}},apiMapping:{endpoints:[]}};Ue(_t);})();
