// V2: WORKSHOP — a diegetic maker workstation.
// Draggable windows, live G-code print, devotional CLI, fake-real print progress on projects.

const { useState: useStateW, useEffect: useEffectW, useRef: useRefW } = React;

const Window = ({ title, x, y, w, h, color='cyan', children, z=1 }) => {
  const [pos, setPos] = useStateW({ x, y });
  const ref = useRefW(null);
  const drag = useRefW(null);

  const onDown = (e) => {
    drag.current = { sx: e.clientX, sy: e.clientY, px: pos.x, py: pos.y };
    const mv = (m) => setPos({ x: drag.current.px + (m.clientX - drag.current.sx), y: drag.current.py + (m.clientY - drag.current.sy) });
    const up = () => { window.removeEventListener('mousemove', mv); window.removeEventListener('mouseup', up); };
    window.addEventListener('mousemove', mv);
    window.addEventListener('mouseup', up);
  };

  return (
    <div ref={ref} style={{
      position: 'absolute', left: pos.x, top: pos.y, width: w, minHeight: h, zIndex: z,
      background: 'rgba(10,10,20,0.92)', border: '1px solid var(--line)', borderRadius: 10,
      backdropFilter: 'blur(14px)', boxShadow: '0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset',
      overflow: 'hidden', display: 'flex', flexDirection: 'column',
    }}>
      <div onMouseDown={onDown} style={{
        display: 'flex', alignItems: 'center', gap: 8, padding: '8px 12px', cursor: 'grab',
        background: 'rgba(255,255,255,0.03)', borderBottom: '1px solid var(--line)',
        fontFamily: 'var(--mono)', fontSize: 10, letterSpacing: '0.18em', textTransform: 'uppercase',
        color: color === 'cyan' ? 'var(--cyan)' : 'var(--magenta)', userSelect: 'none',
      }}>
        <span style={{ width: 8, height: 8, borderRadius: 8, background: '#ff5f57' }} />
        <span style={{ width: 8, height: 8, borderRadius: 8, background: '#ffbd2e' }} />
        <span style={{ width: 8, height: 8, borderRadius: 8, background: '#28c840' }} />
        <span style={{ marginLeft: 10 }}>{title}</span>
      </div>
      <div style={{ padding: 14, flex: 1, overflow: 'auto' }}>{children}</div>
    </div>
  );
};

// G-code print animation
const GCodePrint = () => {
  const [layer, setLayer] = useStateW(0);
  useEffectW(() => {
    const id = setInterval(() => {
      const mo = (+(document.body.dataset.motion ?? 80)) / 100;
      if (mo === 0) return;
      setLayer(l => (l + 1) % 100);
    }, 120);
    return () => clearInterval(id);
  }, []);
  return (
    <div>
      <div style={{ fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--muted)', marginBottom: 8, display: 'flex', justifyContent: 'space-between' }}>
        <span>PRINTER // BambuLab X1C</span>
        <span style={{ color: 'var(--cyan)' }}>● LIVE</span>
      </div>
      <svg viewBox="0 0 200 160" style={{ width: '100%', height: 140, background: 'rgba(0,0,0,0.3)', borderRadius: 6 }}>
        <defs>
          <linearGradient id="layerGrad" x1="0" y1="1" x2="0" y2="0">
            <stop offset="0%" stopColor="var(--magenta)" stopOpacity="0.8"/>
            <stop offset="100%" stopColor="var(--cyan)" stopOpacity="0.8"/>
          </linearGradient>
        </defs>
        {/* bed */}
        <rect x="20" y="140" width="160" height="4" fill="var(--line)" />
        {/* printed layers */}
        {Array.from({length: Math.floor(layer / 2)}).map((_, i) => (
          <rect key={i} x={30 + Math.sin(i*0.3)*2} y={138 - i*1.2} width={140 + Math.cos(i*0.4)*6} height={1.2} fill="url(#layerGrad)" opacity={0.4 + Math.min(i/60, 0.6)} />
        ))}
        {/* nozzle */}
        <g transform={`translate(${90 + Math.sin(layer*0.3)*40}, ${138 - Math.floor(layer/2)*1.2 - 10})`}>
          <rect x="-4" y="-10" width="8" height="10" fill="var(--cyan)" />
          <polygon points="-4,0 4,0 0,5" fill="var(--cyan)" />
          <circle cx="0" cy="6" r="1" fill="var(--magenta)" />
        </g>
      </svg>
      <div style={{ marginTop: 10, fontFamily: 'var(--mono)', fontSize: 10, lineHeight: 1.6, color: 'var(--muted)' }}>
        <div>G1 X{(90 + Math.sin(layer*0.3)*40).toFixed(2)} Y{layer.toFixed(2)} Z{(Math.floor(layer/2)*0.2).toFixed(2)} F1500</div>
        <div>Layer {Math.floor(layer/2)}/50 · Nozzle 215°C · Bed 60°C</div>
        <div style={{ marginTop: 6, height: 3, background: 'var(--line)', borderRadius: 3, overflow: 'hidden' }}>
          <div style={{ height: '100%', width: `${layer}%`, background: 'var(--cyan)', transition: 'width .1s' }} />
        </div>
      </div>
    </div>
  );
};

// Devotional CLI
const DevotionalCLI = () => {
  const lines = [
    "$ snail devotional --today",
    "> fetching verse ...",
    `> ${window.DEVOTIONALS[0].verse}`,
    `> "${window.DEVOTIONALS[0].quote}"`,
    `> reflection: ${window.DEVOTIONALS[0].ref}`,
    "$ _",
  ];
  const [n, setN] = useStateW(0);
  useEffectW(() => {
    const id = setInterval(() => setN(x => (x < lines.length ? x+1 : x)), 600);
    return () => clearInterval(id);
  }, []);
  return (
    <div style={{ fontFamily: 'var(--mono)', fontSize: 12, lineHeight: 1.7, color: 'var(--fg)' }}>
      {lines.slice(0, n).map((l, i) => {
        const isPrompt = l.startsWith('$');
        return <div key={i} style={{ color: isPrompt ? 'var(--cyan)' : l.startsWith('> "') ? 'var(--fg)' : 'var(--muted)', whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>{l}{i === n-1 && l.endsWith('_') && <span style={{ animation: 'blink 1s infinite' }}>█</span>}</div>;
      })}
    </div>
  );
};

const ProjectQueue = () => {
  const items = window.PROJECTS.slice(0, 7);
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
      {items.map((p, i) => {
        const pct = [100, 100, 82, 65, 47, 30, 12][i];
        const status = pct === 100 ? 'DONE' : pct > 50 ? 'PRINT' : 'QUEUE';
        const color = status === 'DONE' ? '#28c840' : status === 'PRINT' ? 'var(--cyan)' : 'var(--muted)';
        return (
          <a key={p.name} href={p.url} target="_blank" rel="noreferrer" style={{
            display: 'grid', gridTemplateColumns: '48px 1fr 60px', gap: 10, alignItems: 'center',
            padding: '8px 10px', border: '1px solid var(--line)', borderRadius: 6,
            textDecoration: 'none', color: 'var(--fg)', fontSize: 12,
          }}>
            <span style={{ fontFamily: 'var(--mono)', fontSize: 9, color, letterSpacing: '0.15em' }}>{status}</span>
            <div>
              <div style={{ fontWeight: 600, marginBottom: 4 }}>{p.name}</div>
              <div style={{ height: 2, background: 'var(--line)', borderRadius: 2, overflow: 'hidden' }}>
                <div style={{ height: '100%', width: `${pct}%`, background: color }} />
              </div>
            </div>
            <span style={{ fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--muted)', textAlign: 'right' }}>{pct}%</span>
          </a>
        );
      })}
    </div>
  );
};

const SysMeter = ({ label, val, color }) => (
  <div style={{ marginBottom: 8 }}>
    <div style={{ display: 'flex', justifyContent: 'space-between', fontFamily: 'var(--mono)', fontSize: 10, marginBottom: 4 }}>
      <span style={{ color: 'var(--muted)', letterSpacing: '0.15em', textTransform: 'uppercase' }}>{label}</span>
      <span style={{ color }}>{val}%</span>
    </div>
    <div style={{ height: 2, background: 'var(--line)', borderRadius: 2, overflow: 'hidden' }}>
      <div style={{ height: '100%', width: `${val}%`, background: color }} />
    </div>
  </div>
);

const WorkshopMobile = () => {
  const Card = ({ title, color = 'cyan', children }) => (
    <div style={{
      margin: '14px 16px', border: '1px solid var(--line)', borderRadius: 10,
      background: 'rgba(10,10,20,0.85)', overflow: 'hidden',
    }}>
      <div style={{
        padding: '10px 14px', borderBottom: '1px solid var(--line)',
        fontFamily: 'var(--mono)', fontSize: 10, letterSpacing: '0.2em', textTransform: 'uppercase',
        color: `var(--${color})`, display: 'flex', justifyContent: 'space-between',
      }}>
        <span>{title}</span>
        <span style={{ color: 'var(--muted)' }}>● LIVE</span>
      </div>
      <div style={{ padding: 16 }}>{children}</div>
    </div>
  );
  return (
    <div style={{ position: 'relative', minHeight: '100dvh', padding: '80px 0 80px' }}>
      <div style={{
        padding: '8px 20px', display: 'flex', justifyContent: 'space-between', alignItems: 'center',
        fontFamily: 'var(--mono)', fontSize: 10, letterSpacing: '0.18em', textTransform: 'uppercase',
      }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
          <SnailGlyph size={18} stroke="var(--cyan)" />
          <span>Snail<b style={{ color: 'var(--magenta)' }}>3D</b> // OS</span>
        </div>
        <span style={{ color: 'var(--cyan)' }}>● OPERATIONAL</span>
      </div>
      <div style={{ padding: '20px 20px 4px' }}>
        <h1 style={{
          fontFamily: 'var(--serif)', fontStyle: 'italic', fontWeight: 400,
          fontSize: 'clamp(48px, 16vw, 96px)', lineHeight: 0.92, margin: 0, letterSpacing: '-0.02em',
        }}>make.<br/>print.<br/><span style={{ color: 'var(--cyan)' }}>pray.</span></h1>
        <p style={{ fontSize: 14, lineHeight: 1.55, color: 'var(--muted)', marginTop: 18 }}>
          A workshop OS. Live print feed, devotional CLI, build queue, AI arcade — all in one console.
        </p>
      </div>
      <Card title="PRINT.01 · Live Nozzle"><GCodePrint /></Card>
      <Card title="DEVOTIONAL.SH · Today" color="magenta"><DevotionalCLI /></Card>
      <Card title="QUEUE.JSON · Build Pipeline"><ProjectQueue /></Card>
      <Card title="IDENTITY.MD" color="magenta">
        <h2 style={{ fontFamily: 'var(--serif)', fontStyle: 'italic', fontSize: 32, margin: '0 0 14px', lineHeight: 1.05, fontWeight: 400 }}>
          Maker. Father. <span style={{ color: 'var(--cyan)' }}>Evangelist.</span>
        </h2>
        <p style={{ fontSize: 13, lineHeight: 1.6, color: 'var(--muted)', margin: '0 0 12px' }}>
          I build practical things in public — 3D prints, agentic tools, tiny ESP32 projects — and I keep the Lord at the center.
        </p>
        <p style={{ fontSize: 12, lineHeight: 1.5, color: 'var(--muted)', fontStyle: 'italic', fontFamily: 'var(--serif)', margin: 0 }}>
          "Whatever you do, work heartily, as for the Lord." — Col 3:23
        </p>
        <div style={{ display: 'flex', gap: 6, marginTop: 14, flexWrap: 'wrap' }}>
          <a href={LINKS.github} target="_blank" style={tinyBtn}>GH</a>
          <a href={LINKS.youtube} target="_blank" style={tinyBtn}>YT</a>
          <a href={LINKS.discord} target="_blank" style={tinyBtn}>DC</a>
          <a href={LINKS.makerworld} target="_blank" style={tinyBtn}>MW</a>
          <a href="/gita/" style={{ ...tinyBtn, background: 'var(--cyan)', color: 'var(--bg)', borderColor: 'var(--cyan)' }}>GITA ↗</a>
        </div>
      </Card>
      <Card title="ARCADE.BIN · AI Benchmark">
        <div style={{ fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--magenta)', letterSpacing: '0.2em', marginBottom: 6 }}>
          SAME PROMPT // {window.GAMES.length} AGENTS
        </div>
        <div style={{ fontSize: 11, color: 'var(--muted)', marginBottom: 12, lineHeight: 1.45 }}>
          A living scoreboard of AI progress.
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 6 }}>
          {window.GAMES.slice(0, 6).map(g => (
            <a key={g.name} href={g.url} target="_blank" rel="noreferrer" style={{
              padding: '10px 10px', border: '1px solid var(--line)', borderRadius: 4,
              textDecoration: 'none', color: 'var(--fg)', fontSize: 12,
              display: 'flex', flexDirection: 'column', gap: 2,
            }}>
              <span style={{ fontWeight: 600 }}>{g.name}</span>
              <span style={{ fontFamily: 'var(--mono)', fontSize: 9, color: 'var(--muted)', letterSpacing: '0.15em', textTransform: 'uppercase' }}>{g.tag}</span>
            </a>
          ))}
        </div>
      </Card>
      <Card title="TRANSMIT.LOG" color="magenta">
        {window.VIDEOS.slice(0, 4).map(v => (
          <a key={v.id} href={v.url} target="_blank" rel="noreferrer" style={{
            display: 'flex', gap: 10, padding: '8px 0', borderBottom: '1px solid var(--line)',
            textDecoration: 'none', color: 'var(--fg)',
          }}>
            <img src={`https://i.ytimg.com/vi/${v.id}/default.jpg`} alt="" style={{ width: 56, height: 42, objectFit: 'cover', borderRadius: 3, opacity: 0.8 }} />
            <div style={{ fontSize: 11, lineHeight: 1.3, flex: 1 }}>{v.title}</div>
          </a>
        ))}
      </Card>
      <Card title="SYS.MON">
        <SysMeter label="3D Printer 01" val={82} color="var(--cyan)" />
        <SysMeter label="3D Printer 02" val={47} color="var(--cyan)" />
        <SysMeter label="GITA Agent" val={94} color="var(--magenta)" />
        <SysMeter label="Coffee" val={23} color="#f4a14a" />
      </Card>
      <Card title="CONTACT.SH" color="magenta">
        <p style={{ fontSize: 13, lineHeight: 1.55, color: 'var(--muted)', margin: '0 0 14px' }}>
          Collab, commission, or prayer request? Come say hi.
        </p>
        <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>
          <a href={LINKS.discord} target="_blank" style={{ ...tinyBtn, background: 'var(--cyan)', color: 'var(--bg)', borderColor: 'var(--cyan)', padding: '10px 14px' }}>Discord</a>
          <a href={LINKS.github} target="_blank" style={{ ...tinyBtn, padding: '10px 14px' }}>GitHub</a>
          <a href={LINKS.youtube} target="_blank" style={{ ...tinyBtn, padding: '10px 14px' }}>YouTube</a>
        </div>
      </Card>
      <ScriptureTicker />
    </div>
  );
};

const useIsMobileW = () => {
  const [m, setM] = useStateW(() => typeof window !== 'undefined' && window.matchMedia('(max-width: 900px)').matches);
  useEffectW(() => {
    const mq = window.matchMedia('(max-width: 900px)');
    const on = () => setM(mq.matches);
    mq.addEventListener('change', on);
    return () => mq.removeEventListener('change', on);
  }, []);
  return m;
};

const WorkshopRoot = () => {
  const isMobile = useIsMobileW();
  if (isMobile) return <WorkshopMobile />;
  return (
    <div style={{ position: 'relative', minHeight: '100dvh', overflow: 'hidden', padding: '70px 0 80px' }}>
      {/* Grid bg */}
      <div style={{
        position: 'absolute', inset: 0, opacity: 0.15, pointerEvents: 'none',
        backgroundImage: 'linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px)',
        backgroundSize: '40px 40px',
      }} />
      {/* Header strip */}
      <div style={{
        position: 'absolute', top: 68, left: 32, right: 32, display: 'flex', justifyContent: 'space-between', alignItems: 'center',
        fontFamily: 'var(--mono)', fontSize: 11, letterSpacing: '0.2em', textTransform: 'uppercase',
      }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
          <SnailGlyph size={22} stroke="var(--cyan)" />
          <span>Snail<b style={{ color: 'var(--magenta)' }}>3D</b> // Workshop OS</span>
        </div>
        <div style={{ display: 'flex', gap: 20, color: 'var(--muted)' }}>
          <span>UPTIME 247d</span>
          <span>REV 4.12.0</span>
          <span style={{ color: 'var(--cyan)' }}>● OPERATIONAL</span>
        </div>
      </div>

      {/* Giant headline */}
      <div style={{ position: 'absolute', top: 120, left: 32, right: 32, pointerEvents: 'none' }}>
        <h1 style={{
          fontFamily: 'var(--serif)', fontSize: 'clamp(70px, 13vw, 200px)', fontWeight: 400, fontStyle: 'italic',
          lineHeight: 0.9, margin: 0, color: 'var(--fg)', letterSpacing: '-0.02em', opacity: 0.08,
        }}>
          make. print. pray.
        </h1>
      </div>

      {/* Floating windows */}
      <div style={{ position: 'relative', width: '100%', height: 'calc(100dvh + 400px)' }}>
        <Window title="PRINT.01 · Live Nozzle" x={40} y={180} w={360} h={300} z={3}>
          <GCodePrint />
        </Window>

        <Window title="DEVOTIONAL.SH · Today" x={440} y={180} w={420} h={300} color="magenta" z={5}>
          <DevotionalCLI />
        </Window>

        <Window title="QUEUE.JSON · Build Pipeline" x={900} y={180} w={380} h={380} z={4}>
          <ProjectQueue />
        </Window>

        <Window title="IDENTITY.MD" x={60} y={520} w={480} h={360} color="magenta" z={2}>
          <h2 style={{ fontFamily: 'var(--serif)', fontStyle: 'italic', fontSize: 42, margin: '0 0 16px', lineHeight: 1, fontWeight: 400 }}>
            Maker. Father. <span style={{ color: 'var(--cyan)' }}>Evangelist.</span>
          </h2>
          <p style={{ fontSize: 14, lineHeight: 1.6, color: 'var(--muted)', margin: '0 0 16px' }}>
            I build practical things in public — 3D prints, agentic tools, tiny ESP32 projects — and
            I keep the Lord at the center. Every layer printed, every commit pushed, every prayer spoken is practice.
          </p>
          <p style={{ fontSize: 13, lineHeight: 1.5, color: 'var(--muted)', margin: 0, fontStyle: 'italic', fontFamily: 'var(--serif)' }}>
            "Whatever you do, work heartily, as for the Lord." — Colossians 3:23
          </p>
          <div style={{ display: 'flex', gap: 8, marginTop: 20, flexWrap: 'wrap' }}>
            <a href={LINKS.github} target="_blank" style={tinyBtn}>GH</a>
            <a href={LINKS.youtube} target="_blank" style={tinyBtn}>YT</a>
            <a href={LINKS.discord} target="_blank" style={tinyBtn}>DC</a>
            <a href={LINKS.makerworld} target="_blank" style={tinyBtn}>MW</a>
            <a href="/gita/" style={{ ...tinyBtn, background: 'var(--cyan)', color: 'var(--bg)', borderColor: 'var(--cyan)' }}>GITA ↗</a>
          </div>
        </Window>

        <Window title="ARCADE.BIN · AI Benchmark" x={580} y={520} w={400} h={340} z={1}>
          <div style={{ fontFamily: 'var(--mono)', fontSize: 11, color: 'var(--magenta)', letterSpacing: '0.2em', marginBottom: 4 }}>
            SAME PROMPT // {window.GAMES.length} AGENTS TESTED
          </div>
          <div style={{ fontSize: 11, color: 'var(--muted)', marginBottom: 12, lineHeight: 1.45 }}>
            Each cartridge is a different coding agent's attempt — a living scoreboard of AI progress.
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 6 }}>
            {window.GAMES.slice(0, 6).map(g => (
              <a key={g.name} href={g.url} target="_blank" rel="noreferrer" style={{
                padding: '10px 12px', border: '1px solid var(--line)', borderRadius: 4,
                textDecoration: 'none', color: 'var(--fg)', fontSize: 12,
                display: 'flex', flexDirection: 'column', gap: 2,
              }}>
                <span style={{ fontWeight: 600 }}>{g.name}</span>
                <span style={{ fontFamily: 'var(--mono)', fontSize: 9, color: 'var(--muted)', letterSpacing: '0.15em', textTransform: 'uppercase' }}>{g.tag}</span>
              </a>
            ))}
          </div>
          <a href={LINKS.arcade} target="_blank" rel="noreferrer" style={{ display: 'block', marginTop: 10, fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--cyan)', letterSpacing: '0.15em', textDecoration: 'none' }}>
            VIEW ALL →
          </a>
        </Window>

        <Window title="TRANSMIT.LOG" x={1020} y={600} w={300} h={280} color="magenta" z={2}>
          {window.VIDEOS.slice(0, 4).map(v => (
            <a key={v.id} href={v.url} target="_blank" rel="noreferrer" style={{
              display: 'flex', gap: 10, padding: '8px 0', borderBottom: '1px solid var(--line)',
              textDecoration: 'none', color: 'var(--fg)',
            }}>
              <img src={`https://i.ytimg.com/vi/${v.id}/default.jpg`} alt="" style={{ width: 56, height: 42, objectFit: 'cover', borderRadius: 3, opacity: 0.8 }} />
              <div style={{ fontSize: 11, lineHeight: 1.3, flex: 1 }}>{v.title}</div>
            </a>
          ))}
        </Window>

        <Window title="SYS.MON" x={40} y={920} w={360} h={220} z={1}>
          <SysMeter label="3D Printer 01" val={82} color="var(--cyan)" />
          <SysMeter label="3D Printer 02" val={47} color="var(--cyan)" />
          <SysMeter label="GITA Agent" val={94} color="var(--magenta)" />
          <SysMeter label="Coffee" val={23} color="#f4a14a" />
          <div style={{ marginTop: 14, fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--muted)', letterSpacing: '0.1em', lineHeight: 1.5 }}>
            247 days uptime. 41 repos shipped. Family time: PROTECTED.
          </div>
        </Window>

        <Window title="CONTACT.SH" x={440} y={920} w={520} h={220} z={1} color="magenta">
          <p style={{ fontSize: 14, lineHeight: 1.55, color: 'var(--muted)', margin: '0 0 16px' }}>
            Collab, commission, or prayer request? Come say hi in the Discord.
          </p>
          <div style={{ display: 'flex', gap: 10, flexWrap: 'wrap' }}>
            <a href={LINKS.discord} target="_blank" style={{ ...tinyBtn, background: 'var(--cyan)', color: 'var(--bg)', borderColor: 'var(--cyan)', padding: '10px 16px', fontSize: 12 }}>discord.gg/GH7FWzyTGc</a>
            <a href={LINKS.github} target="_blank" style={{ ...tinyBtn, padding: '10px 16px', fontSize: 12 }}>GitHub</a>
            <a href={LINKS.youtube} target="_blank" style={{ ...tinyBtn, padding: '10px 16px', fontSize: 12 }}>YouTube</a>
          </div>
          <div style={{ marginTop: 18, fontFamily: 'var(--mono)', fontSize: 10, color: 'var(--muted)', letterSpacing: '0.15em', textTransform: 'uppercase' }}>
            ◆ Faithful in little. Faithful in much.
          </div>
        </Window>
      </div>

      <ScriptureTicker />
    </div>
  );
};

const tinyBtn = {
  padding: '6px 12px', fontSize: 11, fontFamily: 'var(--mono)', letterSpacing: '0.15em',
  textTransform: 'uppercase', border: '1px solid var(--line)', borderRadius: 4,
  textDecoration: 'none', color: 'var(--fg)', background: 'rgba(255,255,255,0.03)',
};

window.WorkshopRoot = WorkshopRoot;
