// landing-features.jsx — product mockup cards for the alternating feature blocks.

// ── Reusable card chrome ───────────────────────────────────────────────────
function FCard({ children, style = {} }) {
  return (
    <div style={{
      background: C.white, borderRadius: 22, padding: 18,
      boxShadow: '0 1px 0 rgba(5,5,5,0.03), 0 0 0 1px rgba(5,5,5,0.06), 0 24px 48px -18px rgba(5,5,5,0.22)',
      ...style,
    }}>{children}</div>
  );
}

function AmountChip({ icon = 'cal', color = 'lavender', children }) {
  const glyph = {
    cal: <><rect x="3.5" y="5.5" width="17" height="15" rx="2"/><path d="M3.5 10h17M8 3v4M16 3v4"/></>,
    cash: <><rect x="3" y="6" width="18" height="12" rx="2"/><circle cx="12" cy="12" r="2.4"/></>,
    bolt: <path d="M13 2 4 14h7l-1 8 9-12h-7z"/>,
  }[icon];
  return (
    <span style={{ display: 'inline-flex', alignItems: 'center', gap: 9, padding: '8px 16px 8px 8px', borderRadius: 999, background: C.white, boxShadow: '0 12px 26px -6px rgba(5,5,5,0.28), 0 0 0 1px rgba(5,5,5,0.05)', whiteSpace: 'nowrap' }}>
      <span style={{ width: 30, height: 30, borderRadius: 15, background: C[color], display: 'inline-flex', alignItems: 'center', justifyContent: 'center', boxShadow: `0 2px 0 ${EDGE[color]}` }}>
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#050505" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round">{glyph}</svg>
      </span>
      <span style={{ fontSize: 16, fontWeight: 900, letterSpacing: '-0.3px' }}>{children}</span>
    </span>
  );
}

// ── richer shared atoms ─────────────────────────────────────────────────────
const SOFT = { lime: C.limeSoft, lavender: C.lavenderSoft, cyan: C.cyanSoft, pink: C.pinkSoft };

function CardHead({ title, right }) {
  return (
    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
      <div style={{ fontSize: 16, fontWeight: 800, letterSpacing: '-0.4px' }}>{title}</div>
      {right}
    </div>
  );
}

function DateChip({ children, tone = 'soft' }) {
  const dark = tone === 'dark';
  return (
    <span style={{
      display: 'inline-flex', alignItems: 'center', gap: 5, padding: '3px 9px', borderRadius: 999,
      background: dark ? C.black : 'rgba(5,5,5,0.05)', color: dark ? C.white : C.textMuted,
      fontSize: 10, fontWeight: 800, letterSpacing: '-0.1px', whiteSpace: 'nowrap',
    }}>
      <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round"><rect x="3.5" y="5.5" width="17" height="15" rx="2"/><path d="M3.5 10h17M8 3v4M16 3v4"/></svg>
      {children}
    </span>
  );
}

// A · Cada plan tiene su pote — colourful pote tiles with context
function MockPotesGrid() {
  const items = [
    { n: 'Japón', c: 'lime', p: 0.49, now: '980', goal: '2.000', date: '1 oct' },
    { n: 'Festival', c: 'pink', p: 0.70, now: '210', goal: '300', date: '14 jul' },
    { n: 'Regalo', c: 'cyan', p: 0.35, now: '52', goal: '150', date: '3 dic' },
    { n: 'Emergencia', c: 'lavender', p: 0.58, now: '870', goal: '1.500', date: 'Abierto' },
  ];
  return (
    <FCard style={{ width: 364, maxWidth: '100%', padding: 16 }}>
      <CardHead title="Tus potes" right={<span style={{ fontSize: 11, fontWeight: 800, color: C.black, background: C.paper, padding: '5px 11px', borderRadius: 999, boxShadow: '0 0 0 1px rgba(5,5,5,0.06)' }}>4 activos</span>} />
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, marginTop: 14 }}>
        {items.map((it, i) => (
          <div key={it.n} style={{ background: SOFT[it.c], borderRadius: 18, padding: '14px 13px 13px', position: 'relative', overflow: 'hidden' }}>
            <div style={{ display: 'flex', justifyContent: 'center' }}>
              <PoteOrb color={it.c} progress={it.p} size={68} animate seed={i + 2} showPercent={false} />
            </div>
            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: 11 }}>
              <span style={{ fontSize: 13, fontWeight: 800, letterSpacing: '-0.3px' }}>{it.n}</span>
              <span style={{ fontSize: 12, fontWeight: 900, color: C.black, fontVariantNumeric: 'tabular-nums' }}>{Math.round(it.p * 100)}%</span>
            </div>
            <div style={{ fontSize: 11, fontWeight: 700, color: 'rgba(5,5,5,0.5)', marginTop: 2, fontVariantNumeric: 'tabular-nums' }}>${it.now} <span style={{ opacity: 0.6 }}>/ ${it.goal}</span></div>
            <div style={{ marginTop: 9 }}><DateChip>{it.date}</DateChip></div>
          </div>
        ))}
      </div>
    </FCard>
  );
}

// B · Poti te marca el ritmo — planning surface with allocation rows
function MockPoti() {
  const rows = [
    { n: 'Japón', c: 'lime', amt: 75, w: '100%' },
    { n: 'Emergencia', c: 'lavender', amt: 60, w: '80%' },
    { n: 'Curso', c: 'cyan', amt: 50, w: '66%' },
    { n: 'Festival', c: 'pink', amt: 60, w: '80%' },
  ];
  return (
    <FCard style={{ width: 364, maxWidth: '100%', padding: 16 }}>
      <CardHead title="Reparto de mayo" right={<span style={{ fontSize: 13, fontWeight: 900, fontVariantNumeric: 'tabular-nums' }}>$245 <span style={{ fontSize: 11, fontWeight: 700, color: C.textMuted }}>/ $300</span></span>} />
      <div style={{ display: 'flex', alignItems: 'flex-start', gap: 12, marginTop: 14, background: C.paper, borderRadius: 16, padding: 12 }}>
        <div style={{ filter: 'drop-shadow(0 6px 12px rgba(203,232,0,0.4))', flexShrink: 0 }}>
          <PoteOrb color="lime" progress={0.55} size={56} animate withFace shadow={false} seed={11} />
        </div>
        <div style={{ background: C.black, color: C.white, borderRadius: '14px 14px 14px 4px', padding: '10px 13px', boxShadow: '0 6px 14px rgba(5,5,5,0.16)' }}>
          <div style={{ fontSize: 9, fontWeight: 900, letterSpacing: '0.3px', textTransform: 'uppercase', opacity: 0.55 }}>Poti propone</div>
          <div style={{ fontSize: 13, fontWeight: 800, marginTop: 3, lineHeight: '17px' }}>Reparto tu esfuerzo entre <span style={{ color: C.lime }}>4 potes</span> este mes.</div>
        </div>
      </div>
      <div style={{ display: 'flex', flexDirection: 'column', gap: 11, marginTop: 14 }}>
        {rows.map(r => (
          <div key={r.n} style={{ display: 'flex', alignItems: 'center', gap: 11 }}>
            <span style={{ width: 9, height: 9, borderRadius: 5, background: C[r.c], flexShrink: 0, boxShadow: `0 1.5px 0 ${EDGE[r.c]}` }} />
            <span style={{ fontSize: 13, fontWeight: 800, width: 78, flexShrink: 0, letterSpacing: '-0.2px' }}>{r.n}</span>
            <div style={{ flex: 1, height: 7, borderRadius: 4, background: 'rgba(5,5,5,0.06)', overflow: 'hidden' }}>
              <div style={{ width: r.w, height: '100%', background: C[r.c], borderRadius: 4 }} />
            </div>
            <span style={{ fontSize: 13, fontWeight: 900, width: 36, textAlign: 'right', fontVariantNumeric: 'tabular-nums' }}>${r.amt}</span>
          </div>
        ))}
      </div>
      <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: 15, paddingTop: 13, borderTop: '1px solid rgba(5,5,5,0.07)' }}>
        <span style={{ fontSize: 11, fontWeight: 700, color: C.textMuted }}>Editable cuando quieras</span>
        <span style={{ padding: '8px 16px', borderRadius: 999, background: C.lime, color: C.black, fontSize: 12, fontWeight: 900, boxShadow: '0 2px 0 #7C9300' }}>Aplicar reparto</span>
      </div>
    </FCard>
  );
}

// C · El progreso se ve — hero orb + recent contributions timeline
function MockProgress() {
  const bars = [
    { m: 'Feb', h: 30 }, { m: 'Mar', h: 46 }, { m: 'Abr', h: 38 }, { m: 'May', h: 62 }, { m: 'Jun', h: 78, on: true },
  ];
  return (
    <div style={{ position: 'relative', width: 364, maxWidth: '100%' }}>
      <FCard style={{ padding: 16 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
          <div style={{ position: 'relative', filter: 'drop-shadow(0 14px 28px rgba(203,232,0,0.35))', flexShrink: 0 }}>
            <PoteOrb color="lime" progress={0.82} size={116} animate seed={3} />
          </div>
          <div style={{ flex: 1 }}>
            <div style={{ fontSize: 11, fontWeight: 900, letterSpacing: '0.4px', color: C.textMuted }}>JAPÓN</div>
            <div style={{ fontSize: 28, fontWeight: 800, letterSpacing: '-1px', fontVariantNumeric: 'tabular-nums', marginTop: 2 }}>$1.640</div>
            <div style={{ fontSize: 12, fontWeight: 700, color: C.textMuted }}>de $2.000</div>
            <span style={{ display: 'inline-flex', alignItems: 'center', gap: 5, marginTop: 9, padding: '4px 10px', borderRadius: 999, background: C.lime, color: C.black, fontSize: 10, fontWeight: 900, letterSpacing: '0.3px', textTransform: 'uppercase' }}><span style={{ width: 5, height: 5, borderRadius: 3, background: C.black }} />A ritmo</span>
          </div>
        </div>

        <div style={{ marginTop: 16, paddingTop: 14, borderTop: '1px solid rgba(5,5,5,0.07)' }}>
          <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
            <span style={{ fontSize: 11, fontWeight: 900, letterSpacing: '0.3px', textTransform: 'uppercase', color: C.textMuted }}>Aportes</span>
            <span style={{ fontSize: 11, fontWeight: 800, color: C.black }}>+$320 este trimestre</span>
          </div>
          <div style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', height: 64, gap: 10 }}>
            {bars.map(b => (
              <div key={b.m} style={{ flex: 1, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 6 }}>
                <div style={{ width: '100%', maxWidth: 30, height: b.h, borderRadius: 7, background: b.on ? C.lime : 'rgba(5,5,5,0.08)', boxShadow: b.on ? '0 2px 0 #B6D300' : 'none' }} />
                <span style={{ fontSize: 9, fontWeight: 800, color: b.on ? C.black : C.textMuted }}>{b.m}</span>
              </div>
            ))}
          </div>
        </div>
      </FCard>
      <div style={{ position: 'absolute', right: -14, top: -16 }}>
        <span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: '8px 14px', borderRadius: 999, background: C.black, color: C.white, fontSize: 12, fontWeight: 800, boxShadow: '0 12px 26px -6px rgba(5,5,5,0.4)' }}>
          <span style={{ fontSize: 13 }}>✦</span> ¡Vas genial!
        </span>
      </div>
    </div>
  );
}

function Milestone({ label, value, sub }) {
  return (
    <div style={{ textAlign: 'center' }}>
      <div style={{ fontSize: 9, fontWeight: 900, letterSpacing: '0.3px', textTransform: 'uppercase', color: C.textMuted }}>{label}</div>
      <div style={{ fontSize: 16, fontWeight: 800, marginTop: 2, letterSpacing: '-0.3px' }}>{value}</div>
      <div style={{ fontSize: 10, fontWeight: 700, color: C.textMuted }}>{sub}</div>
    </div>
  );
}

// D · Planes compartidos — combined pote + members + activity
function MockShared() {
  const members = [
    { n: 'Samu', c: 'lime', amt: '$320', w: '52%' },
    { n: 'Lía', c: 'pink', amt: '$280', w: '46%' },
    { n: 'Marc', c: 'cyan', amt: '$210', w: '34%' },
  ];
  return (
    <FCard style={{ width: 364, maxWidth: '100%', padding: 16 }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 13 }}>
        <div style={{ filter: 'drop-shadow(0 8px 16px rgba(127,189,190,0.4))', flexShrink: 0 }}>
          <PoteOrb color="cyan" progress={0.6} size={64} animate seed={9} showPercent={false} />
        </div>
        <div style={{ flex: 1 }}>
          <div style={{ fontSize: 16, fontWeight: 800, letterSpacing: '-0.4px' }}>Viaje a Lisboa</div>
          <div style={{ fontSize: 12, fontWeight: 700, color: C.textMuted, marginTop: 1, fontVariantNumeric: 'tabular-nums' }}>$810 <span style={{ opacity: 0.6 }}>de $1.350</span></div>
          <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 7 }}>
            <div style={{ display: 'flex' }}>
              {members.map((m, i) => (
                <span key={m.n} style={{ width: 24, height: 24, borderRadius: 12, background: C[m.c], display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 11, fontWeight: 900, color: C.black, marginLeft: i ? -8 : 0, boxShadow: `0 0 0 2.5px ${C.white}, 0 2px 0 ${EDGE[m.c]}` }}>{m.n[0]}</span>
              ))}
            </div>
            <span style={{ fontSize: 11, fontWeight: 800, color: C.textMuted, whiteSpace: 'nowrap' }}>3 personas</span>
          </div>
        </div>
        <span style={{ padding: '7px 13px', borderRadius: 999, background: C.lime, color: C.black, fontSize: 11, fontWeight: 900, boxShadow: '0 2px 0 #7C9300', whiteSpace: 'nowrap', alignSelf: 'flex-start' }}>+ Invitar</span>
      </div>

      <div style={{ display: 'flex', flexDirection: 'column', gap: 11, marginTop: 16, paddingTop: 14, borderTop: '1px solid rgba(5,5,5,0.07)' }}>
        {members.map(m => (
          <div key={m.n} style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
            <div style={{ width: 26, height: 26, borderRadius: 13, background: C[m.c], display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 11, fontWeight: 900, color: C.black, flexShrink: 0, boxShadow: `0 2px 0 ${EDGE[m.c]}` }}>{m.n[0]}</div>
            <span style={{ fontSize: 13, fontWeight: 800, width: 42, flexShrink: 0 }}>{m.n}</span>
            <div style={{ flex: 1, height: 7, borderRadius: 4, background: 'rgba(5,5,5,0.06)', overflow: 'hidden' }}>
              <div style={{ width: m.w, height: '100%', background: C[m.c], borderRadius: 4 }} />
            </div>
            <span style={{ fontSize: 13, fontWeight: 900, width: 42, textAlign: 'right', fontVariantNumeric: 'tabular-nums' }}>{m.amt}</span>
          </div>
        ))}
      </div>

      <div style={{ display: 'flex', alignItems: 'center', gap: 9, marginTop: 14, background: C.paper, borderRadius: 14, padding: '10px 12px' }}>
        <span style={{ width: 22, height: 22, borderRadius: 11, background: C.pink, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 10, fontWeight: 900, color: C.black, flexShrink: 0 }}>L</span>
        <span style={{ fontSize: 12, fontWeight: 700, color: C.black }}><b style={{ fontWeight: 900 }}>Lía</b> añadió $40</span>
        <span style={{ fontSize: 11, fontWeight: 700, color: C.textMuted, marginLeft: 'auto', whiteSpace: 'nowrap' }}>hace 2 h</span>
      </div>
    </FCard>
  );
}

// Three-step "Cómo funciona" mini visuals
function StepVisual({ kind }) {
  const { t } = useT();
  const L = t.mock;
  if (kind === 'crear') {
    return (
      <div style={{ height: 150, display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative' }}>
        <PoteOrb color="lavender" progress={0.12} size={92} animate seed={1} />
        <div style={{ position: 'absolute', left: '50%', bottom: 18, transform: 'translateX(-50%)' }}><NameTag color="lavender">{L.nuevo}</NameTag></div>
      </div>
    );
  }
  if (kind === 'ritmo') {
    return (
      <div style={{ height: 150, display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', gap: 12 }}>
        <div style={{ fontSize: 30, fontWeight: 800, letterSpacing: '-1.5px' }}>$130<span style={{ fontSize: 14, color: C.textMuted, fontWeight: 700 }}>{L.mes}</span></div>
        <div style={{ width: 180, height: 10, borderRadius: 5, background: 'rgba(5,5,5,0.06)', overflow: 'hidden', display: 'flex', gap: 2 }}>
          <div style={{ width: '40%', background: C.lime }} /><div style={{ width: '32%', background: C.lavender }} /><div style={{ width: '20%', background: C.cyan }} />
        </div>
      </div>
    );
  }
  return (
    <div style={{ height: 150, display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative' }}>
      <button className="btn3d" style={{ height: 46, padding: '0 22px', borderRadius: 23, background: C.lime, color: C.black, border: 'none', fontWeight: 900, fontSize: 14, boxShadow: '0 3px 0 #7C9300', fontFamily: 'inherit', display: 'inline-flex', alignItems: 'center', justifyContent: 'center' }}>{L.reg}</button>
      <span style={{ position: 'absolute', top: 26, right: 30, display: 'inline-flex', alignItems: 'center', gap: 4, padding: '4px 9px', borderRadius: 999, background: C.lime, color: C.black, fontSize: 10, fontWeight: 900 }}>+$80</span>
    </div>
  );
}

// ════════════════════════════════════════════════════════════════════════════
// BENTO FEATURE SYSTEM — app UI floats directly on coloured tiles (no nested card)
// ════════════════════════════════════════════════════════════════════════════
function BentoTile({ cls = '', bg, dark, eyebrow, title, body, children }) {
  const muted = dark ? 'rgba(255,255,255,0.62)' : C.textMuted;
  return (
    <div className={'bento ' + cls} style={{ background: bg, color: dark ? '#FAFAF5' : C.black }}>
      <div className="bento-copy">
        <div className="bento-eyebrow" style={{ color: muted }}>{eyebrow}</div>
        <h3 className="bento-title">{title}</h3>
        <p className="bento-body" style={{ color: muted }}>{body}</p>
      </div>
      <div className="bento-stage">{children}</div>
    </div>
  );
}

function Float({ l, r, t, b, rot = 0, z = 1, children }) {
  return <div style={{ position: 'absolute', left: l, right: r, top: t, bottom: b, transform: rot ? `rotate(${rot}deg)` : undefined, zIndex: z }}>{children}</div>;
}

function TagOrb({ name, color, p, size }) {
  return (
    <div style={{ position: 'relative' }}>
      <div style={{ position: 'absolute', left: '50%', top: -11, transform: 'translateX(-50%)', zIndex: 3 }}><NameTag color={color}>{name}</NameTag></div>
      <PoteOrb color={color} progress={p} size={size} animate seed={size + p * 100} />
    </div>
  );
}

function DotPill({ color, label, amt, dark }) {
  return (
    <span style={{
      display: 'inline-flex', alignItems: 'center', gap: 9, padding: '9px 15px', borderRadius: 999,
      background: dark ? 'rgba(255,255,255,0.1)' : C.white, color: dark ? C.white : C.black,
      boxShadow: dark ? 'inset 0 0 0 1px rgba(255,255,255,0.16)' : '0 10px 22px -6px rgba(5,5,5,0.18), 0 0 0 1px rgba(5,5,5,0.04)',
      whiteSpace: 'nowrap', backdropFilter: dark ? 'blur(6px)' : undefined,
    }}>
      <span style={{ width: 10, height: 10, borderRadius: 5, background: C[color], boxShadow: `0 1.5px 0 ${EDGE[color]}` }} />
      <span style={{ fontSize: 14, fontWeight: 800, letterSpacing: '-0.2px' }}>{label}</span>
      <span style={{ fontSize: 14, fontWeight: 900, fontVariantNumeric: 'tabular-nums' }}>{amt}</span>
    </span>
  );
}

function StatusChip({ children, tone = 'lime' }) {
  return (
    <span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: '6px 13px', borderRadius: 999, background: tone === 'lime' ? C.lime : C.black, color: tone === 'lime' ? C.black : C.white, fontSize: 12, fontWeight: 900, letterSpacing: '-0.1px', whiteSpace: 'nowrap', boxShadow: tone === 'lime' ? '0 2px 0 #7C9300' : '0 8px 18px -4px rgba(5,5,5,0.4)' }}>
      {children}
    </span>
  );
}

// A · lavender — cluster of named pote orbs floating on the tile
function VisualPotes() {
  const { t } = useT(); const m = t.mock;
  return (
    <>
      <Float l="1%" t="14%" rot={-5} z={2}><TagOrb name={m.gJapan} color="lime" p={0.49} size={104} /></Float>
      <Float l="34%" t="2%" rot={3} z={3}><TagOrb name={m.gFestival} color="pink" p={0.70} size={86} /></Float>
      <Float r="3%" t="20%" rot={5} z={2}><TagOrb name={m.gGift} color="cyan" p={0.35} size={92} /></Float>
      <Float l="20%" b="2%" rot={-3} z={1}><TagOrb name={m.gEmergency} color="lavender" p={0.58} size={96} /></Float>
      <Float r="6%" b="8%" rot={6} z={4}><DateChip tone="dark">{m.due}</DateChip></Float>
    </>
  );
}

// B · dark — Poti orb + speech bubble + allocation pills
function VisualPoti() {
  const { t } = useT(); const m = t.mock;
  const sp = m.splitMsg.split('*');
  return (
    <>
      <Float l="-2%" b="2%" z={2}><PoteOrb color="lime" progress={0.55} size={92} animate withFace seed={11} /></Float>
      <Float l="30%" t="2%" z={4}>
        <div style={{ background: C.white, color: C.black, borderRadius: '16px 16px 16px 4px', padding: '12px 15px', maxWidth: 210, boxShadow: '0 16px 34px -10px rgba(0,0,0,0.45)' }}>
          <div style={{ fontSize: 9, fontWeight: 900, textTransform: 'uppercase', letterSpacing: '0.3px', color: C.textMuted }}>{m.potiProposes}</div>
          <div style={{ fontSize: 14, fontWeight: 800, marginTop: 3, lineHeight: '18px' }}>{sp[0]}<span style={{ color: '#6f8300' }}>{sp[1]}</span>{sp[2]}</div>
        </div>
      </Float>
      <Float r="0%" b="20%" rot={4} z={5}><DotPill color="lime" label={m.gJapan} amt="$75" dark /></Float>
      <Float r="14%" b="-2%" rot={-4} z={3}><DotPill color="lavender" label={m.gEmergency} amt="$60" dark /></Float>
    </>
  );
}

// C · lime soft — big orb + clean stat (no card) + celebration
function VisualProgress() {
  const { t } = useT(); const m = t.mock;
  const bars = [38, 52, 44, 70, 88];
  return (
    <>
      <Float l="0%" b="0%" z={2}><PoteOrb color="lime" progress={0.82} size={120} animate seed={3} /></Float>
      <Float l="40%" t="6%" z={3}>
        <div>
          <div style={{ fontSize: 11, fontWeight: 900, letterSpacing: '0.4px', color: C.textMuted, textTransform: 'uppercase' }}>{m.gJapan}</div>
          <div style={{ fontSize: 34, fontWeight: 800, letterSpacing: '-1.2px', fontVariantNumeric: 'tabular-nums', lineHeight: 1 }}>$1.640</div>
          <div style={{ fontSize: 13, fontWeight: 700, color: C.textMuted, marginTop: 2 }}>{m.of} $2.000</div>
          <div style={{ marginTop: 10 }}><StatusChip tone="lime"><span style={{ width: 5, height: 5, borderRadius: 3, background: C.black }} />{m.onTrack}</StatusChip></div>
        </div>
      </Float>
      <Float r="4%" t="2%" rot={5} z={4}><StatusChip tone="dark">✦ {m.goingGreat}</StatusChip></Float>
      <Float r="3%" b="6%" rot={-3} z={3}>
        <div style={{ display: 'flex', alignItems: 'flex-end', gap: 5, height: 54, padding: '12px', background: C.white, borderRadius: 16, boxShadow: '0 10px 22px -6px rgba(5,5,5,0.18)' }}>
          {bars.map((h, i) => <span key={i} style={{ width: 9, height: h * 0.30, borderRadius: 4, background: i === bars.length - 1 ? C.lime : 'rgba(5,5,5,0.12)' }} />)}
        </div>
      </Float>
    </>
  );
}

// D · cyan soft — combined pote + avatars + member pills + activity
function VisualShared() {
  const { t } = useT(); const m = t.mock;
  const members = [{ n: 'Samu', c: 'lime' }, { n: 'Lía', c: 'pink' }, { n: 'Marc', c: 'cyan' }];
  return (
    <>
      <Float l="0%" t="8%" z={2}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 13 }}>
          <PoteOrb color="cyan" progress={0.6} size={78} animate seed={9} showPercent={false} />
          <div>
            <div style={{ fontSize: 17, fontWeight: 800, letterSpacing: '-0.4px' }}>{m.trip}</div>
            <div style={{ fontSize: 13, fontWeight: 700, color: C.textMuted, fontVariantNumeric: 'tabular-nums' }}>$810 <span style={{ opacity: 0.6 }}>{m.of} $1.350</span></div>
            <div style={{ display: 'flex', marginTop: 8 }}>
              {members.map((m, i) => (
                <span key={m.n} style={{ width: 28, height: 28, borderRadius: 14, background: C[m.c], display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 12, fontWeight: 900, color: C.black, marginLeft: i ? -9 : 0, boxShadow: `0 0 0 3px ${C.cyanSoft}, 0 2px 0 ${EDGE[m.c]}` }}>{m.n[0]}</span>
              ))}
              <span style={{ width: 28, height: 28, borderRadius: 14, background: C.white, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 12, fontWeight: 900, color: C.black, marginLeft: -9, boxShadow: `0 0 0 3px ${C.cyanSoft}, 0 2px 0 rgba(5,5,5,0.12)` }}>+</span>
            </div>
          </div>
        </div>
      </Float>
      <Float r="2%" t="0%" rot={4} z={4}><DotPill color="lime" label="Samu" amt="$320" /></Float>
      <Float r="16%" b="20%" rot={-3} z={3}><DotPill color="pink" label="Lía" amt="$280" /></Float>
      <Float l="6%" b="2%" rot={3} z={5}>
        <span style={{ display: 'inline-flex', alignItems: 'center', gap: 9, padding: '9px 14px', borderRadius: 999, background: C.black, color: C.white, fontSize: 13, fontWeight: 700, whiteSpace: 'nowrap', boxShadow: '0 12px 26px -6px rgba(5,5,5,0.4)' }}>
          <span style={{ width: 20, height: 20, borderRadius: 10, background: C.pink, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 10, fontWeight: 900, color: C.black }}>L</span>
          <b style={{ fontWeight: 900 }}>Lía</b> {m.added} $40
        </span>
      </Float>
    </>
  );
}

Object.assign(window, { FCard, AmountChip, CardHead, DateChip, MockPotesGrid, MockPoti, MockProgress, Milestone, MockShared, StepVisual, BentoTile, Float, TagOrb, DotPill, StatusChip, VisualPotes, VisualPoti, VisualProgress, VisualShared });
