# Team join

> An invite is accepted: a wash of colour blooms over the app, the empty seat in the avatar stack fills, and a card introduces the newcomer.

An app’s top bar shows the team as a stack of ringed avatars and one empty, dashed seat. When the invite is accepted, a soft wash of green, aqua and lavender blooms from the top right over the whole screen and fades; at its height the seat turns into the newcomer’s avatar in a blue ring, and a card slides in under the stack: Joined your team, their drawn portrait with an online dot, name, role and city, Follow and Say hi. The card leaves on its ×, on Escape, or by itself after a while unless the pointer or the focus is on it; the newcomer’s avatar brings it back.

A React component by Bruno Delorence: https://brunodelorence.com/components/team-join. MIT License, Copyright (c) 2026 Bruno Delorence.

Category: Feedback.

## Anatomy

1. **Stage**: The app window: a 54 px top bar over a dotted canvas and a panel of skeleton rows.
2. **Avatar stack**: 34 px avatars, each a 2 px ring in its own colour around a 2 px gap, 26 px apart, the later ones on top.
3. **Seat**: A button. Empty, a dashed circle with a person in it; once taken, the newcomer’s avatar in a blue ring, which reopens the card.
4. **Card**: A section named Joined your team, 320 px wide, 16 px radius, under the stack and flush with the bar’s right edge.
5. **Portrait**: The newcomer at 46 px, with a 12 px green online dot in a 2 px ring of the card’s colour.
6. **Name**: The name in 15 px medium, then the role and the place in 13 px.
7. **Close**: A 28 px round button with a 15 px cross; a grey circle shows on hover.
8. **Actions**: Two 38 px pills sharing the width, 8 px apart: Follow outlined, Say hi solid.

## Properties

### Auto dismiss (`autoDismiss`)

1. **5 s**: A busy screen where the card should get out of the way soon.
2. **8 s (default)**: Time to read a name, a role and a place, and to reach for a button.
3. **Never**: The card stays until its × or Escape.

Keep it long enough to read the card twice. The count stops while the pointer or the focus is on the card and starts over when both leave, so nobody loses it mid-reach.

## When to use

- Telling a team that someone new has just joined, in the place where the team already shows: the avatar stack in the top bar.
- A moment worth marking once: an invite accepted, a first teammate, a seat filled on a shared workspace.
- Offering the one or two things people do next with a newcomer, such as `Follow` and `Say hi`, without leaving the page.

## When not to use

- Routine activity (someone opened a file, changed a setting). Use a quiet toast or the activity feed; the wash is for rare events.
- Several people joining at once. Show one summary (“3 people joined”) in a toast or the members page, not a wash per person.
- Anything the reader must act on or confirm. The card leaves by itself; use a dialog or an inbox item.
- A screen with no avatar stack to land in: the card points at the seat it fills.

### The sequence

- **0 s**: the wash starts at the top right, a quarter of its size and clear.
- **0.58 s**: the wash is near its height; the empty seat crossfades into the newcomer in 0.3 s, with a small spring.
- **1.3 s**: the card comes in under the stack in 0.32 s, unblurring and growing 4% from its top right; the live region says who joined.
- **1.55 s**: the wash has faded out. The card stays until its ×, Escape, or its count runs out.

### Placement

- **Under the stack it fills**, right-aligned with the bar, so the eye goes from the new face to the card about it.
- **Over the content, not in it**: nothing moves while the card is up, and it leaves no gap behind.
- **Once per join**: a second invite accepted while the card is up replays the sequence for the new person.

## Do’s and don’ts

- **Do**: Keep the wash for the one join that matters to this person: their team, their first teammate.
- **Don’t**: Play it for every member of a large workspace. Ten washes a morning is noise; summarise in a toast.
- **Do**: Give the role and the place in a few words: Product designer · Lisbon.
- **Don’t**: Write a bio on the card. It is read in a glance; long text is cut with an ellipsis.

## Content

The words are the eyebrow, the person’s name, role and place, and the two actions.

- **Joined your team** as the eyebrow, in sentence case, without a full stop.
- **The full name**, then the role and the place joined by a middle dot.
- **Verbs on the buttons**: `Follow`, `Say hi`; their done states say what happened: `Following`, `Hi sent`.
- **The announcement** names the person and the event: “Noa Okafor joined your team”.

## Installation

Install it with the shadcn CLI, into components/team-join of any React project:

```sh
npx shadcn@latest add https://brunodelorence.com/r/team-join.json
```

Or add the registry to components.json once, as a namespace that coding agents and the shadcn MCP server search by name:

```json
{
  "registries": {
    "@brunodelorence": "https://brunodelorence.com/r/{name}.json"
  }
}
```

```sh
npx shadcn@latest add @brunodelorence/team-join
```

Or copy all the source files below into one folder of your project. Either way it needs React 19.2 and a bundler with CSS Modules (Next.js, Vite).

It has a dark colour scheme. Its colours are CSS light-dark() pairs, kept inside @supports so that builds which rewrite light-dark() for older browsers leave them alone: it follows your page’s color-scheme (light unless the page sets one) or its colorScheme prop, with nothing to configure. Browsers without light-dark() show it light.

## Usage

```tsx
import { TeamJoin } from './team-join';

export function TeamBar() {
  return (
    <TeamJoin
      person={{ name: 'Noa Okafor', role: 'Product designer', place: 'Lisbon' }}
      onFollowChange={(following) => console.log('following', following)}
      onSayHi={() => console.log('open a chat')}
      autoplay={false}
    />
  );
}
```

## States

- **Invite pending**: Three people in the stack and an empty dashed seat; Accept in the bar plays the join.
- **Joined, card open**: The newcomer in a blue ring at the end of the stack, and the card under it.
- **Following**: Follow turns to Following with a tick, on a grey fill; pressed again, it undoes.
- **Hi sent**: Say hi turns to Hi sent with a waving hand, once; it stays sent.
- **Joined, card closed**: After the card leaves, the newcomer stays in the stack; their avatar brings the card back.
- **Dark**: With `colorScheme="dark"`: a near-black window, a graphite card, a light Say hi; the rings keep their colours.

## How it works

- One clock from the invite being accepted, timed from the reference: the wash runs 1.55 s, the seat changes at 0.58 s, the card comes in at 1.3 s and leaves in 0.2 s.
- The wash is three layers faded in turn by the Web Animations API over the same 1.55 s: a haze (a light veil with a 5 px backdrop blur) up by 0.28 s; green to mint in an ellipse about the top right, at its height from 0.5 to 0.7 s and gone by 1.18 s while it grows 0.9 to 1.12; then aqua, blue and lavender from the middle down, at 0.95 opacity by 0.78 s, sliding 22% down as they fade. So the green leads from the top and the top clears first, as in the reference.
- The wash sits over the window but under the avatar stack, which is lifted to its own layer: the faces stay sharp on the colour, with the bar’s white showing in each avatar’s 2 px gap.
- The seat is the dashed circle and the newcomer’s avatar in one place: the circle fades and shrinks to 90% in 0.3 s while the avatar fades in and grows from 82% on a small overshoot, cubic-bezier(0.34, 1.5, 0.64, 1) over 0.5 s.
- The card enters in 0.32 s from opacity 0, an 8 px blur, 6 px up and 96% size, grown from near its top right corner, on cubic-bezier(0.2, 0.8, 0.2, 1); it leaves in 0.2 s to a 6 px blur at 97%.
- Sizes measured at about 4 video px per CSS px: a 54 px bar, 34 px avatars 26 px apart with a 2 px ring and a 2 px gap, a 320 px card with a 16 px radius and 18 px sides, a 46 px portrait with a 12 px dot, 38 px pills 8 px apart.
- The card counts down 8 s; the count stops while the pointer or the focus is on it and starts over when both leave. The portraits are drawn in SVG on a 40 × 40 grid from a few parameters (tint, skin, hair style, shirt).
- While on screen and untouched, a demo accepts the invite, moves the pointer to the × and closes the card, then empties the seat again, about every five seconds; any input from the reader stops it. Every colour is a token on the root with light-dark(); at night the wash is deeper and translucent.

## API reference

- **person** (`{ name: string; role: string; place: string; face?: FaceId }`, default `Noa Okafor, Product designer, Lisbon`): Who joins: shown on the card and announced; face picks one of the drawn portraits.
- **defaultPhase** (`'pending' | 'joined' | 'card'`, default `'pending'`): Where it starts: the empty seat, the newcomer already in the stack, or the card open too (a still for docs; it turns the demo off).
- **autoDismiss** (`number`, default `8000`): ms before the card leaves by itself, counted again whenever the pointer and the focus leave it; 0 keeps it until closed.
- **onJoin** (`() => void`): Called when the newcomer is in the stack and the card shows.
- **onFollowChange** (`(following: boolean) => void`): Called with the new state when Follow is pressed.
- **onSayHi** (`() => void`): Called once, when Say hi is pressed; the button then reads Hi sent.
- **defaultFollowing** (`boolean`, default `false`): Starts with Follow on.
- **defaultWaved** (`boolean`, default `false`): Starts with the hello already sent.
- **autoplay** (`boolean`, default `true`): While on screen and untouched, a demo plays the join and closes the card in a loop; any input from the reader stops it.
- **colorScheme** (`'light' | 'dark' | 'system'`): Light or dark colours, or the reader’s; without it, the page’s color-scheme.
- **className** (`string`): A class for the stage.

## Accessibility

### Focus and keyboard

- The card never takes the focus: it comes right after the avatar stack in the tab order, so Tab reaches the ×, Follow and Say hi from the seat.
- Escape inside the card closes it. Closing it while the focus is inside puts the focus on the newcomer’s avatar, never on the page.
- The seat is a button: empty, it accepts the invite; taken, it shows and hides the card, with `aria-expanded`.
- Every control shows a 2 px focus ring on keyboard focus.

### Screen readers

- A polite live region says “Noa Okafor joined your team” when the card shows, and the outcome of Follow and Say hi.
- The card is a `section` named by its eyebrow; the name is followed by a hidden “online”, since the dot is only colour.
- Each avatar in the stack is an image named by the person; the stack is a group named by the team’s size. The wash, the skeletons and the demo pointer are hidden.

### Timing

The card leaves by itself after 8 s by default (WCAG 2.2.1): the count stops while the pointer or the focus is on it, starts over when both leave, and `autoDismiss={0}` turns it off. Nothing on it is lost when it goes: the newcomer’s avatar brings it back.

### Motion

With reduced motion there is no wash, no spring and no blur: the newcomer’s avatar fades in, and the card fades in over 0.2 s and out over 0.15 s. The demo does not play.

### In this build

- A polite live region announces “Noa Okafor joined your team” when the card shows, and the outcome of Follow and Say hi.
- The card never takes the focus. It follows the avatar stack in the tab order; Escape inside it closes it, and closing it from inside hands the focus to the newcomer’s avatar.
- The seat is a button: empty, it accepts the invite; taken, it shows or hides the card, with aria-expanded and aria-controls.
- The card is a section named by its title, Joined your team; the green online dot is backed by a hidden “online” after the name.
- The auto dismiss pauses while the pointer or the focus is on the card and can be turned off with autoDismiss={0}; the newcomer’s avatar brings the card back.
- With reduced motion there is no wash, spring or blur: the avatar and the card only fade, and the demo does not play. Every control shows a focus ring on keyboard focus.

## Source

### team-join/team-join.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import {
  useEffect,
  useEffectEvent,
  useId,
  useRef,
  useState,
  type CSSProperties,
  type FocusEvent,
} from 'react';
import { DemoPointer, runDemo, type Point } from './demo-pointer';
import { Face, type FaceId } from './faces';
import { CheckGlyph, CloseGlyph, PersonGlyph, ReplayGlyph, WaveGlyph } from './glyphs';
import { useAutoplay } from './use-autoplay';
import styles from './team-join.module.css';

/*
 * Team join: an app's top bar with the team as a stack of ringed avatars and one empty, dashed
 * seat. When the invite is accepted, a soft wash of colour (green, aqua, then lavender) blooms
 * from the top right over the whole screen and fades; while it is at its height the empty seat
 * turns into the newcomer's avatar, and a card slides in under the stack: “Joined your team”, who
 * they are, Follow and Say hi. The card leaves on its ×, on Escape, or by itself after a while,
 * unless the pointer or the focus is on it.
 *
 * - One clock for the sequence, measured from the reference: the wash plays 1.55 s, the seat
 *   changes 0.58 s in (a 0.3 s crossfade with a small spring), the card comes in at 1.3 s (0.32 s
 *   of fade, unblur and a 4% grow from the top right) and leaves in 0.2 s.
 * - The wash is three layers over the window, faded in turn with the Web Animations API (nothing
 *   runs frame by frame): a blurring haze, then green from the top right, then aqua, blue and
 *   lavender from the middle down, sliding down as they fade, so the top clears first. It sits
 *   under the avatars, which stay sharp on it.
 * - The card never takes the focus; it comes right after the stack in the tab order, and closing
 *   it while the focus is inside hands the focus to the newcomer's avatar.
 */

export type Newcomer = {
  name: string;
  role: string;
  place: string;
  /** Which drawn portrait to show. */
  face?: FaceId;
};

/** Where the stack starts: three people in the team, each with a ring colour of their own. */
const TEAM: { id: FaceId; name: string; ring: string }[] = [
  { id: 'ines', name: 'Ines Duarte', ring: 'var(--ring-1)' },
  { id: 'kai', name: 'Kai Moreno', ring: 'var(--ring-2)' },
  { id: 'priya', name: 'Priya Raman', ring: 'var(--ring-3)' },
];

const NOA: Newcomer = {
  name: 'Noa Okafor',
  role: 'Product designer',
  place: 'Lisbon',
  face: 'noa',
};

/** The sequence, in ms from the invite being accepted. */
const WASH_MS = 1550;
const SEAT_AT = 580;
const CARD_AT = 1300;
const LEAVE_MS = 200;
/** How long the newcomer's avatar takes to go back to the empty seat, on a replay. */
const REVERT_MS = 380;
/** With reduced motion there is no wash: the seat changes at once and the card fades in. */
const STILL_CARD_AT = 250;
const STILL_LEAVE_MS = 150;

type Phase = 'pending' | 'joined';
type CardState = 'hidden' | 'shown' | 'leaving';

export type TeamJoinProps = {
  /** Who joins. */
  person?: Newcomer;
  /**
   * Where it starts: the empty seat (the default), the newcomer already in the stack, or the
   * card open as well, as a still for docs and screenshots (that also turns the demo off).
   */
  defaultPhase?: 'pending' | 'joined' | 'card';
  /** Starts with Follow taken (for stills). */
  defaultFollowing?: boolean;
  /** Starts with the hello sent (for stills). */
  defaultWaved?: boolean;
  /** ms before the card leaves by itself, counted again whenever the pointer and the focus leave it; 0 keeps it. */
  autoDismiss?: number;
  /** Called when the newcomer is in and the card shows. */
  onJoin?: () => void;
  /** Called with the new follow state. */
  onFollowChange?: (following: boolean) => void;
  /** Called when Say hi is pressed. */
  onSayHi?: () => void;
  /** While on screen and untouched, a demo plays the join and closes the card, in a loop. */
  autoplay?: boolean;
  colorScheme?: 'light' | 'dark' | 'system';
  className?: string;
};

const reducedMotion = () =>
  typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;

export function TeamJoin({
  person = NOA,
  defaultPhase = 'pending',
  defaultFollowing = false,
  defaultWaved = false,
  autoDismiss = 8000,
  onJoin,
  onFollowChange,
  onSayHi,
  autoplay = true,
  colorScheme,
  className = '',
}: TeamJoinProps) {
  const { ref: root, playing, take } = useAutoplay<HTMLDivElement>();
  const [phase, setPhase] = useState<Phase>(defaultPhase === 'pending' ? 'pending' : 'joined');
  const [card, setCard] = useState<CardState>(defaultPhase === 'card' ? 'shown' : 'hidden');
  const [following, setFollowing] = useState(defaultFollowing);
  const [waved, setWaved] = useState(defaultWaved);
  const [message, setMessage] = useState('');
  const [hovered, setHovered] = useState(false);
  const [focused, setFocused] = useState(false);

  const veil = useRef<HTMLDivElement>(null);
  const washTop = useRef<HTMLDivElement>(null);
  const washLow = useRef<HTMLDivElement>(null);
  const seat = useRef<HTMLButtonElement>(null);
  const cardBox = useRef<HTMLElement>(null);
  const closeButton = useRef<HTMLButtonElement>(null);
  const pointer = useRef<HTMLSpanElement>(null);
  const timers = useRef(new Set<number>());
  const cardId = useId();
  const titleId = useId();

  const first = person.name.split(' ')[0];

  /** Runs `fn` after `ms`, on a timer the next sequence (or unmounting) cancels. */
  const later = (fn: () => void, ms: number) => {
    const timer = window.setTimeout(() => {
      timers.current.delete(timer);
      fn();
    }, ms);
    timers.current.add(timer);
  };
  const cancelSequence = () => {
    timers.current.forEach((timer) => window.clearTimeout(timer));
    timers.current.clear();
  };
  useEffect(() => {
    const pending = timers.current;
    return () => pending.forEach((timer) => window.clearTimeout(timer));
  }, []);

  const playWash = () => {
    const layers = [veil.current, washTop.current, washLow.current];
    if (layers.some((layer) => !layer)) return;
    const [haze, top, low] = layers as HTMLDivElement[];
    layers.forEach((layer) => layer?.getAnimations().forEach((animation) => animation.cancel()));
    const timing = { duration: WASH_MS, easing: 'ease-in-out' };
    // The haze is up within 0.3 s and holds until the colours have gone.
    haze.animate(
      [{ opacity: 0 }, { opacity: 1, offset: 0.18 }, { opacity: 1, offset: 0.7 }, { opacity: 0 }],
      timing,
    );
    // The green leads from the top right: at its height by 0.6 s, gone by 1.15 s, growing a little.
    top.animate(
      [
        { opacity: 0, transform: 'scale(0.9)' },
        { opacity: 1, offset: 0.32 },
        { opacity: 1, offset: 0.46 },
        { opacity: 0, offset: 0.76, transform: 'scale(1.12)' },
        { opacity: 0, transform: 'scale(1.12)' },
      ],
      timing,
    );
    // Aqua, blue and lavender follow from the middle down, sliding down 12% as they fade.
    low.animate(
      [
        { opacity: 0, transform: 'translateY(-10%)' },
        { opacity: 0, offset: 0.16, transform: 'translateY(-10%)' },
        { opacity: 0.95, offset: 0.5 },
        { opacity: 0.8, offset: 0.72 },
        { opacity: 0, transform: 'translateY(12%)' },
      ],
      timing,
    );
  };

  /** Back to the empty seat, at once: nothing in flight, no card, nothing announced. */
  const revert = () => {
    cancelSequence();
    setCard('hidden');
    setPhase('pending');
    setFollowing(false);
    setWaved(false);
    setMessage('');
  };

  /** The invite is accepted: the wash, the newcomer in the stack, then the card. */
  const join = () => {
    const still = reducedMotion();
    const start = () => {
      if (!still) playWash();
      later(() => setPhase('joined'), still ? 0 : SEAT_AT);
      later(
        () => {
          setCard('shown');
          setMessage(`${person.name} joined your team`);
          onJoin?.();
        },
        still ? STILL_CARD_AT : CARD_AT,
      );
    };
    const wasJoined = phase === 'joined';
    revert();
    // A replay first lets the newcomer's avatar fade back to the empty seat.
    if (wasJoined && !still) later(start, REVERT_MS);
    else start();
  };

  const close = () => {
    if (card !== 'shown') return;
    // The card is going: the focus goes to the newcomer's avatar rather than to the page.
    if (cardBox.current?.contains(document.activeElement))
      seat.current?.focus({ preventScroll: true });
    setCard('leaving');
    setHovered(false);
    setFocused(false);
    later(() => setCard('hidden'), reducedMotion() ? STILL_LEAVE_MS : LEAVE_MS);
  };

  const onSeat = () => {
    if (phase === 'pending') join();
    else if (card === 'shown') close();
    else {
      cancelSequence();
      setCard('shown');
    }
  };

  const toggleFollow = () => {
    const next = !following;
    setFollowing(next);
    setMessage(next ? `Following ${person.name}` : `Stopped following ${person.name}`);
    onFollowChange?.(next);
  };

  const sayHi = () => {
    if (waved) return;
    setWaved(true);
    setMessage(`Said hi to ${first}`);
    onSayHi?.();
  };

  // The card leaves by itself, unless the reader is on it; leaving it starts the count over.
  const dismiss = useEffectEvent(() => close());
  useEffect(() => {
    if (card !== 'shown' || !autoDismiss || hovered || focused) return;
    const timer = window.setTimeout(dismiss, autoDismiss);
    return () => window.clearTimeout(timer);
  }, [card, autoDismiss, hovered, focused]);

  // The demo: the invite is accepted, the card comes in, the pointer closes it, the seat empties
  // again; about five seconds a round, like the reference.
  const demo = autoplay && playing && defaultPhase === 'pending';
  const demoJoin = useEffectEvent(() => join());
  const demoClose = useEffectEvent(() => close());
  const demoRevert = useEffectEvent(() => revert());
  useEffect(() => {
    const stage = root.current;
    const arrow = pointer.current;
    if (!demo || !stage || !arrow) return;
    /** The middle of an element, in the stage's own px. */
    const at = (element: Element | null): Point => {
      const frame = stage.getBoundingClientRect();
      const scale = frame.width / stage.offsetWidth || 1;
      const box = element?.getBoundingClientRect();
      if (!box) return { x: stage.offsetWidth * 0.7, y: stage.offsetHeight * 0.4 };
      return {
        x: (box.left - frame.left + box.width / 2) / scale,
        y: (box.top - frame.top + box.height / 2) / scale,
      };
    };
    const rest = (): Point => ({ x: stage.offsetWidth - 70, y: 130 });
    demoRevert();
    const stop = runDemo(stage, arrow, async ({ wait, glide, glyph }) => {
      await glide(rest(), 900);
      for (;;) {
        await wait(450);
        demoJoin();
        await wait(CARD_AT + 380);
        await glide(at(closeButton.current), 620);
        glyph('hand');
        closeButton.current?.setAttribute('data-hover', '');
        await wait(420);
        closeButton.current?.setAttribute('data-pressed', '');
        await wait(130);
        demoClose();
        await wait(300);
        glyph('arrow');
        await glide(rest(), 500);
        await wait(250);
        demoRevert();
        await wait(1100);
      }
    });
    return () => {
      stop();
      const close = stage.querySelector('[data-part="close"]');
      close?.removeAttribute('data-hover');
      close?.removeAttribute('data-pressed');
    };
  }, [demo, root]);

  const onCardBlur = (event: FocusEvent<HTMLElement>) => {
    if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setFocused(false);
  };

  const joined = phase === 'joined';
  const members = joined ? TEAM.length + 1 : TEAM.length;

  return (
    <div
      ref={root}
      className={`${styles.root} ${className}`}
      data-part="stage"
      data-phase={phase}
      data-color-scheme={colorScheme}
      onPointerDownCapture={take}
      onKeyDownCapture={take}
      onPointerMove={(event) => {
        if (event.pointerType !== 'touch') take();
      }}
    >
      <div className={styles.window}>
        <div className={styles.bar} data-part="bar">
          <span className={styles.brand} aria-hidden="true">
            <span className={styles.logo} />
            <span className={styles.crumb} />
          </span>

          <div
            className={styles.stack}
            data-part="stack"
            role="group"
            aria-label={`Team, ${members} members`}
          >
            {TEAM.map((member) => (
              <span
                key={member.id}
                className={styles.avatar}
                style={{ '--ring': member.ring } as CSSProperties}
                role="img"
                aria-label={member.name}
              >
                <Face id={member.id} className={styles.face} />
              </span>
            ))}
            <button
              ref={seat}
              type="button"
              className={styles.seat}
              data-part="seat"
              aria-label={
                joined ? `${person.name}, new in the team` : 'Pending invite: mark it accepted'
              }
              aria-expanded={joined ? card === 'shown' : undefined}
              aria-controls={joined && card !== 'hidden' ? cardId : undefined}
              onClick={onSeat}
            >
              <span className={styles.empty} data-part="empty">
                <PersonGlyph className={styles.emptyGlyph} />
              </span>
              <span className={`${styles.avatar} ${styles.newcomer}`} data-part="newcomer">
                <Face id={person.face ?? 'noa'} className={styles.face} />
              </span>
            </button>
          </div>

          {/* The card comes right after the stack in the tab order; it is placed from the window. */}
          {card !== 'hidden' && (
            // The section only listens: for Escape from its buttons, and for the pointer and the focus
            // that hold its count.
            // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
            <section
              ref={cardBox}
              id={cardId}
              className={styles.card}
              data-part="card"
              data-state={card}
              aria-labelledby={titleId}
              inert={card === 'leaving'}
              onPointerEnter={(event) => {
                if (event.pointerType !== 'touch') setHovered(true);
              }}
              onPointerLeave={() => setHovered(false)}
              onFocus={() => setFocused(true)}
              onBlur={onCardBlur}
              onKeyDown={(event) => {
                if (event.key === 'Escape') {
                  event.stopPropagation();
                  close();
                }
              }}
            >
              <div className={styles.cardHead}>
                <h3 id={titleId} className={styles.eyebrow} data-part="title">
                  Joined your team
                </h3>
                <button
                  ref={closeButton}
                  type="button"
                  className={styles.close}
                  data-part="close"
                  aria-label="Dismiss"
                  onClick={close}
                >
                  <CloseGlyph className={styles.closeGlyph} />
                </button>
              </div>

              <div className={styles.person} data-part="person">
                <span className={styles.portrait} data-part="portrait">
                  <span className={`${styles.avatar} ${styles.big}`}>
                    <Face id={person.face ?? 'noa'} className={styles.face} />
                  </span>
                  <span className={styles.online} data-part="online" aria-hidden="true" />
                </span>
                <span className={styles.who}>
                  <span className={styles.name} data-part="name">
                    {person.name}
                    <span className={styles.hidden}>, online</span>
                  </span>
                  <span className={styles.meta} data-part="meta">
                    {person.role} · {person.place}
                  </span>
                </span>
              </div>

              <div className={styles.lines} aria-hidden="true">
                <span />
                <span />
                <span />
              </div>

              <div className={styles.actions}>
                <button
                  type="button"
                  className={styles.follow}
                  data-part="follow"
                  data-on={following}
                  onClick={toggleFollow}
                >
                  {following && <CheckGlyph className={styles.buttonGlyph} />}
                  {following ? 'Following' : 'Follow'}
                </button>
                <button
                  type="button"
                  className={styles.hi}
                  data-part="say-hi"
                  data-sent={waved}
                  aria-disabled={waved || undefined}
                  onClick={sayHi}
                >
                  {waved && <WaveGlyph className={`${styles.buttonGlyph} ${styles.wave}`} />}
                  {waved ? 'Hi sent' : 'Say hi'}
                </button>
              </div>
            </section>
          )}

          <button
            type="button"
            className={styles.replay}
            data-part="replay"
            aria-label={joined ? 'Replay the join' : 'Accept the invite'}
            onClick={join}
          >
            <ReplayGlyph className={styles.replayGlyph} />
            <span>{joined ? 'Replay' : 'Accept'}</span>
          </button>
        </div>

        <div className={styles.body} aria-hidden="true">
          <div className={styles.canvas} />
          <div className={styles.panel}>
            {[3, 2, 2, 2].map((rows, group) => (
              <div key={group} className={styles.group}>
                <span className={styles.heading} />
                {Array.from({ length: rows }, (_, row) => (
                  <span key={row} className={styles.row}>
                    <span />
                    <span />
                  </span>
                ))}
              </div>
            ))}
          </div>
        </div>
      </div>

      <div className={styles.washLayer} aria-hidden="true">
        <div ref={veil} className={styles.veil} />
        <div ref={washLow} className={styles.washLow} />
        <div ref={washTop} className={styles.washTop} />
      </div>

      <p className={styles.hidden} role="status" aria-live="polite">
        {message}
      </p>
      <div className={styles.pointerLayer} aria-hidden="true">
        <DemoPointer
          ref={pointer}
          className={styles.pointer}
          arrowClass={styles.arrow}
          handClass={styles.hand}
        />
      </div>
    </div>
  );
}
```

### team-join/team-join.module.css

```css
/* Team join (team-join.tsx): a light app window, its top bar with the team's avatar stack and an
   empty dashed seat, a dotted canvas and a panel of skeleton rows. On a join, a wash of colour
   blooms over it, the seat becomes the newcomer, and a card comes in under the stack.

   Sizes are px measured from the reference at about 4 video px per CSS px: a 54 px bar, 34 px
   avatars 26 px apart with a 2 px ring and a 2 px gap, a 320 px card with 18 px padding and a
   16 px radius, a 46 px portrait with a 12 px online dot, 38 px pill buttons 8 px apart.

   Layers: the window (1), the wash (2), the avatar stack lifted over the wash (3) so the faces stay
   sharp on it, the card (4), the demo pointer (5). The bar must not make a stacking context of its
   own, or the stack could not rise above the wash.

   Colours are the tokens below, light-dark(light, dark) where the two differ. */

.root {
  --stage: #f2f2f3;
  --window: #f5f5f6;
  --window-edge: rgb(0 0 0 / 0.06);
  --bar: #fff;
  --bar-edge: rgb(0 0 0 / 0.07);
  --dot: #d7d7da;
  --panel: #fff;
  --skeleton: #f1f1f2;
  --skeleton-strong: #ececee;
  --card-skeleton: #f1f1f2;
  --card: #fff;
  --card-edge: rgb(0 0 0 / 0.07);
  --card-shadow: rgb(20 20 30 / 0.1);
  --ink: #1b1b1d;
  --muted: #59595f;
  --faint: #8c8c92;
  --close-hover: #efeff1;
  --ghost: #fff;
  --ghost-edge: rgb(0 0 0 / 0.11);
  --ghost-ink: #1b1b1d;
  --solid: #232325;
  --solid-ink: #fff;
  --seat-edge: #c3c3c8;
  --seat-fill: #f4f4f5;
  --seat-ink: #a3a3a9;
  /* The rings: the team's three, then the newcomer's blue. The same in both schemes. */
  --ring-1: #ec5a3c;
  --ring-2: #8a56ec;
  --ring-3: #1fc07a;
  --ring-new: #3a72ee;
  --online: #2ccf55;
  --focus: #387bff;
  /* The wash, from its middle out: green, mint, aqua, blue, lavender. */
  --wash-1: #a2fbb4;
  --wash-2: #93f3c8;
  --wash-3: #94e6e4;
  --wash-4: #aacbf6;
  --wash-5: #d0c8f7;
  --veil: rgb(255 255 255 / 0.35);
  --pointer: #1c1c1e;
  --pointer-edge: #fff;
  --pointer-shadow: rgb(0 0 0 / 0.25);
  /* A small overshoot for the newcomer's avatar, and the card's quick settle. */
  --pop: cubic-bezier(0.34, 1.5, 0.64, 1);
  --settle: cubic-bezier(0.2, 0.8, 0.2, 1);

  position: relative;
  isolation: isolate;
  width: 100%;
  height: 460px;
  overflow: clip;
  border-radius: 18px;
  background: var(--stage);
  color: var(--ink);
  font:
    400 14px / 1.35 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Inter,
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
@supports (color: light-dark(#fff, #000)) {
  .root {
    --stage: light-dark(#f2f2f3, #0e0e10);
    --window: light-dark(#f5f5f6, #121214);
    --window-edge: light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.07));
    --bar: light-dark(#fff, #19191c);
    --bar-edge: light-dark(rgb(0 0 0 / 0.07), rgb(255 255 255 / 0.07));
    --dot: light-dark(#d7d7da, #2c2c31);
    --panel: light-dark(#fff, #17171a);
    --skeleton: light-dark(#f1f1f2, #222226);
    --skeleton-strong: light-dark(#ececee, #27272c);
    --card-skeleton: light-dark(#f1f1f2, #2e2e34);
    --card: light-dark(#fff, #1f1f23);
    --card-edge: light-dark(rgb(0 0 0 / 0.07), rgb(255 255 255 / 0.09));
    --card-shadow: light-dark(rgb(20 20 30 / 0.1), rgb(0 0 0 / 0.5));
    --ink: light-dark(#1b1b1d, #f2f2f4);
    --muted: light-dark(#59595f, #a9a9b1);
    --faint: light-dark(#8c8c92, #85858d);
    --close-hover: light-dark(#efeff1, #2d2d33);
    --ghost: light-dark(#fff, #1f1f23);
    --ghost-edge: light-dark(rgb(0 0 0 / 0.11), rgb(255 255 255 / 0.14));
    --ghost-ink: light-dark(#1b1b1d, #f2f2f4);
    --solid: light-dark(#232325, #f2f2f4);
    --solid-ink: light-dark(#fff, #18181b);
    --seat-edge: light-dark(#c3c3c8, #4a4a52);
    --seat-fill: light-dark(#f4f4f5, #222226);
    --seat-ink: light-dark(#a3a3a9, #6c6c75);
    /* At night the wash is deeper and less opaque, so it glows instead of flooding the screen
       with pastel. */
    --wash-1: light-dark(#a2fbb4, rgb(40 190 110 / 0.62));
    --wash-2: light-dark(#93f3c8, rgb(30 170 140 / 0.58));
    --wash-3: light-dark(#94e6e4, rgb(30 140 165 / 0.55));
    --wash-4: light-dark(#aacbf6, rgb(55 95 200 / 0.5));
    --wash-5: light-dark(#d0c8f7, rgb(105 80 200 / 0.42));
    --veil: light-dark(rgb(255 255 255 / 0.35), rgb(14 14 16 / 0.3));
  }
}
.root[data-color-scheme='light'] {
  color-scheme: light;
}
.root[data-color-scheme='dark'] {
  color-scheme: dark;
}
.root[data-color-scheme='system'] {
  color-scheme: light dark;
}

/* The app: a bar over a dotted canvas with a panel of rows at the right. */
.window {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--window);
  box-shadow: inset 0 0 0 1px var(--window-edge);
  border-radius: inherit;
}

.bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--bar-edge);
  border-radius: 18px 18px 0 0;
  background: var(--bar);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--skeleton-strong);
}
.crumb {
  width: 64px;
  height: 9px;
  border-radius: 99px;
  background: var(--skeleton);
}

/* The stack: each avatar a step of 26 px, so the next one covers 8 px of the last. Later ones
   sit on top, as in the reference. */
.stack {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
}
.stack > * + * {
  margin-left: -8px;
}

/* An avatar: a 2 px ring, a 2 px gap in the bar's colour, the face. */
.avatar {
  position: relative;
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 2px solid var(--ring);
  border-radius: 50%;
  background: var(--bar);
  box-sizing: border-box;
}
.face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* The seat: the empty dashed circle and the newcomer's avatar in the same place, crossfading. */
.seat {
  all: unset;
  position: relative;
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}
.seat:focus-visible,
.replay:focus-visible,
.close:focus-visible,
.follow:focus-visible,
.hi:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--seat-edge);
  border-radius: 50%;
  background: var(--bar);
  box-sizing: border-box;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.emptyGlyph {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--seat-fill);
  color: var(--seat-ink);
}
.seat:hover .empty {
  border-color: var(--faint);
}
.newcomer {
  --ring: var(--ring-new);
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.82);
  transition:
    opacity 0.3s ease,
    transform 0.5s var(--pop);
}
.root[data-phase='joined'] .empty {
  opacity: 0;
  transform: scale(0.9);
}
.root[data-phase='joined'] .newcomer {
  opacity: 1;
  transform: none;
}

/* The bar's last pill: Accept while the seat is empty, Replay once it is taken. */
.replay {
  all: unset;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 77px;
  height: 34px;
  border-radius: 10px;
  background: var(--skeleton);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}
.replay:hover {
  background: var(--skeleton-strong);
}
.replayGlyph {
  width: 13px;
  height: 13px;
}

.body {
  display: flex;
  flex: 1;
  min-height: 0;
}
/* The canvas: 2 px dots every 21 px. */
.canvas {
  flex: 1;
  background: radial-gradient(circle, var(--dot) 1px, transparent 1.3px) 10px 12px / 21px 21px;
}
.panel {
  flex: none;
  width: min(276px, 72%);
  padding: 18px 14px 0 16px;
  border-left: 1px solid var(--bar-edge);
  background: var(--panel);
  box-sizing: border-box;
  overflow: hidden;
}
.group {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}
.heading {
  width: 67px;
  height: 9px;
  border-radius: 99px;
  background: var(--skeleton);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.row > span {
  height: 30px;
  border-radius: 10px;
  background: var(--skeleton);
}

/* The wash, in three layers that team-join.tsx fades in turn. First a haze: a light veil that
   blurs what is under it. Then the green: an ellipse about the top right, green to mint, which
   leads from the top. Then, as the green goes, the lower colours: aqua, blue and lavender from the
   middle down, sliding down a little as they fade, so the top clears first, as in the reference. */
.washLayer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.veil,
.washTop,
.washLow {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}
.veil {
  inset: 0;
  background: var(--veil);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.washTop {
  inset: -20% -20% 0;
  background: radial-gradient(
    120% 85% at 78% 12%,
    var(--wash-1) 0%,
    var(--wash-1) 38%,
    var(--wash-2) 58%,
    transparent 85%
  );
  transform-origin: 80% 0;
}
.washLow {
  inset: 0 -10% -20%;
  background: linear-gradient(
    to bottom,
    transparent 8%,
    color-mix(in srgb, var(--wash-3) 70%, transparent) 30%,
    var(--wash-3) 44%,
    var(--wash-4) 66%,
    var(--wash-5) 88%
  );
}

/* The card, under the stack and flush with the bar's right edge. */
.card {
  position: absolute;
  top: 64px;
  right: 14px;
  z-index: 4;
  width: min(320px, calc(100% - 28px));
  padding: 14px 18px 18px;
  border-radius: 16px;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--card-edge),
    0 2px 4px rgb(0 0 0 / 0.03),
    0 14px 36px var(--card-shadow);
  box-sizing: border-box;
  transform-origin: 85% 0;
  animation: card-in 0.32s var(--settle) both;
}
.card[data-state='leaving'] {
  animation: card-out 0.2s ease-in both;
}
@keyframes card-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-6px) scale(0.96);
  }
}
@keyframes card-out {
  to {
    opacity: 0;
    filter: blur(6px);
    transform: scale(0.97);
  }
}

.cardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}
.eyebrow {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
}
/* The ×: 24 px drawn, 28 px to hit (the negative margin keeps it in its corner). */
.close {
  all: unset;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: -6px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.12s ease;
}
.close:hover,
.close[data-hover] {
  background: var(--close-hover);
  color: var(--ink);
}
.close:active,
.close[data-pressed] {
  transform: scale(0.9);
}
.closeGlyph {
  width: 15px;
  height: 15px;
}

.person {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 10px;
}
.portrait {
  position: relative;
  flex: none;
}
.big {
  --ring: var(--ring-new);
  width: 46px;
  height: 46px;
  background: var(--card);
}
.online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--online);
}
.who {
  display: grid;
  min-width: 0;
}
.name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* What the card would say about them, still loading: three 8 px lines. */
.lines {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}
.lines > span {
  height: 8px;
  border-radius: 99px;
  background: var(--card-skeleton);
}
.lines > span:nth-child(2) {
  width: 94%;
}
.lines > span:nth-child(3) {
  width: 58%;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.follow,
.hi {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}
.follow {
  background: var(--ghost);
  box-shadow:
    inset 0 0 0 1px var(--ghost-edge),
    0 1px 2px rgb(0 0 0 / 0.04);
  color: var(--ghost-ink);
}
.follow:hover {
  background: var(--seat-fill);
}
.follow[data-on='true'] {
  background: var(--seat-fill);
  box-shadow: inset 0 0 0 1px transparent;
}
.hi {
  background: var(--solid);
  color: var(--solid-ink);
}
.hi:hover {
  filter: brightness(1.15);
}
.hi[data-sent='true'] {
  cursor: default;
  filter: none;
  opacity: 0.85;
}
.follow:active,
.hi:not([data-sent='true']):active {
  transform: scale(0.97);
}
.buttonGlyph {
  width: 14px;
  height: 14px;
  margin-left: -4px;
}
/* The hand waves twice when the hello goes. */
.wave {
  transform-origin: 70% 90%;
  animation: wave 0.9s ease-in-out;
}
@keyframes wave {
  20%,
  60% {
    transform: rotate(16deg);
  }
  40%,
  80% {
    transform: rotate(-8deg);
  }
}

.pointerLayer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.pointer {
  width: 24px;
  height: 24px;
}
.hand {
  visibility: hidden;
}
.pointer[data-glyph='hand'] .arrow {
  visibility: hidden;
}
.pointer[data-glyph='hand'] .hand {
  visibility: visible;
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .root {
    height: 440px;
  }
  .brand .crumb {
    display: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}

/* Reduced motion: no wash (the script skips it), no pop, no blur; the card only fades. */
@media (prefers-reduced-motion: reduce) {
  .empty,
  .newcomer {
    transition: opacity 0.15s linear;
  }
  .newcomer {
    transform: none;
  }
  .card {
    animation: fade-in 0.2s linear both;
  }
  .card[data-state='leaving'] {
    animation: fade-out 0.15s linear both;
  }
  .wave {
    animation: none;
  }
}
```

### team-join/faces.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

/*
 * The team's portraits, drawn here: no photos. Each is a head and shoulders on a soft tint, drawn
 * on a 40 × 40 grid and shown through a 30 × 30 window round the head, so the face fills the
 * avatar as a cropped portrait would; the avatar's own radius cuts it round. A face is a handful
 * of parameters, so a new person is one more line in FACES.
 */

type Hair = 'curly' | 'short' | 'bun' | 'long' | 'cap';

export type FaceId = 'ines' | 'kai' | 'priya' | 'noa' | 'theo';

type Look = {
  tint: string;
  skin: string;
  /** A shade of the skin, for the neck and the ears' insides. */
  shade: string;
  hair: string;
  style: Hair;
  shirt: string;
  glasses?: boolean;
  /** The cap's colour, for the cap style. */
  cap?: string;
};

const FACES: Record<FaceId, Look> = {
  ines: {
    tint: '#f7dccb',
    skin: '#d39a72',
    shade: '#b97f59',
    hair: '#3a2219',
    style: 'curly',
    shirt: '#e9784f',
  },
  kai: {
    tint: '#e4dbf8',
    skin: '#efc6a4',
    shade: '#d6a986',
    hair: '#1f1d24',
    style: 'short',
    shirt: '#6a5fd8',
    glasses: true,
  },
  priya: {
    tint: '#d3efe1',
    skin: '#a86a4b',
    shade: '#8c5538',
    hair: '#21140f',
    style: 'bun',
    shirt: '#2f9d6c',
  },
  noa: {
    tint: '#d8e4fb',
    skin: '#7b4b33',
    shade: '#633a26',
    hair: '#16110e',
    style: 'cap',
    shirt: '#27334c',
    cap: '#f0c548',
  },
  theo: {
    tint: '#fbe6c8',
    skin: '#f0c9a8',
    shade: '#d8ab88',
    hair: '#b4652f',
    style: 'long',
    shirt: '#3d7fd9',
  },
};

/** One portrait, filling its box. Decorative: the avatar around it carries the name. */
export function Face({ id, className }: { id: FaceId; className?: string }) {
  const look = FACES[id];
  const { skin, shade, hair } = look;
  return (
    <svg className={className} viewBox="5 4 30 30" aria-hidden="true" focusable="false">
      <rect width="40" height="40" fill={look.tint} />
      {/* Hair that falls behind the head and the shoulders goes first. */}
      {look.style === 'long' && (
        <path
          d="M11.4 21c-1.3-10.6 4.4-13.4 8.6-13.4 4.8 0 10 2.6 8.6 13.6l.6 8.3H10.8z"
          fill={hair}
        />
      )}
      {look.style === 'bun' && (
        <>
          <circle cx="20" cy="6.6" r="3.7" fill={hair} />
          <path
            d="M12.2 20.5c-.9-8 3.3-11.4 7.8-11.4s8.8 3.4 7.8 11.4l.4 4.6-2.4-1.2z"
            fill={hair}
          />
        </>
      )}
      <path d="M5.5 41c.6-8.2 6.6-12.4 14.5-12.4S33.9 32.8 34.5 41z" fill={look.shirt} />
      <path d="M16.8 23h6.4v6.2c-1 1.3-2.1 1.9-3.2 1.9s-2.2-.6-3.2-1.9z" fill={shade} />
      <circle cx="12.9" cy="19.2" r="1.7" fill={skin} />
      <circle cx="27.1" cy="19.2" r="1.7" fill={skin} />
      <ellipse cx="20" cy="18.2" rx="7.2" ry="8.3" fill={skin} />
      {look.style === 'curly' && (
        <g fill={hair}>
          <circle cx="13.6" cy="13.4" r="3.9" />
          <circle cx="17.3" cy="10.4" r="4.3" />
          <circle cx="22.2" cy="10" r="4.4" />
          <circle cx="26.3" cy="12.6" r="3.9" />
          <circle cx="27.8" cy="16.4" r="2.6" />
          <circle cx="12.2" cy="16.8" r="2.5" />
        </g>
      )}
      {look.style === 'short' && (
        <path
          d="M12.7 17.2c-.8-6.6 3.3-9.4 7.8-9.4 5 0 8.2 2.9 7.2 9.4-1.6-3.4-4.6-4.5-7.6-4.3-3.6.2-6 1.3-7.4 4.3z"
          fill={hair}
        />
      )}
      {(look.style === 'long' || look.style === 'bun') && (
        <path
          d="M12.8 16.4c.7-4.9 4.2-6.6 7.7-6.5 4 .1 6.6 2.5 6.8 6.5-3.3-2.5-6.4-3.7-10.5-2.8-1.8.4-3 1.4-4 2.8z"
          fill={hair}
        />
      )}
      {look.style === 'cap' && (
        <>
          <path d="M12.9 17c-.5-1.6-.2-2.4.5-2.9h13.2c.7.5 1 1.3.5 2.9z" fill={hair} />
          <path d="M12.3 15.6c.2-5.4 3.6-7.8 7.7-7.8s7.5 2.4 7.7 7.8z" fill={look.cap} />
          <path d="M19.6 15.1l11.2.6c.3 1.3-1.6 1.9-3.6 1.6l-14.6-.8z" fill={look.cap} />
          <path
            d="M17.2 11.8h5.6"
            stroke="rgb(0 0 0 / 0.22)"
            strokeWidth="1.1"
            strokeLinecap="round"
          />
        </>
      )}
      <circle cx="16.9" cy="19" r="0.95" fill="#231b18" />
      <circle cx="23.1" cy="19" r="0.95" fill="#231b18" />
      <circle cx="15.2" cy="21.8" r="1.5" fill="#f08a76" opacity="0.3" />
      <circle cx="24.8" cy="21.8" r="1.5" fill="#f08a76" opacity="0.3" />
      <path
        d="M17.7 22.6q2.3 1.8 4.6 0"
        fill="none"
        stroke="#6e3626"
        strokeWidth="0.95"
        strokeLinecap="round"
      />
      {look.glasses && (
        <g fill="none" stroke="#24232a" strokeWidth="0.9">
          <circle cx="16.8" cy="19" r="2.5" />
          <circle cx="23.2" cy="19" r="2.5" />
          <path d="M19.3 18.8h1.4" />
        </g>
      )}
    </svg>
  );
}
```

### team-join/glyphs.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

/*
 * The few icons the component draws, on a 16 × 16 grid in currentColor, so each takes the colour
 * of the control it sits in. All are decorative: the control carries the words.
 */

type GlyphProps = { className?: string };

const svg = { viewBox: '0 0 16 16', 'aria-hidden': true, focusable: false } as const;

/** The close cross. */
export function CloseGlyph({ className }: GlyphProps) {
  return (
    <svg className={className} {...svg}>
      <path
        d="M4.5 4.5l7 7m0-7l-7 7"
        stroke="currentColor"
        strokeWidth="1.6"
        strokeLinecap="round"
        fill="none"
      />
    </svg>
  );
}

/** A head and shoulders, for the empty seat in the stack. */
export function PersonGlyph({ className }: GlyphProps) {
  return (
    <svg className={className} {...svg}>
      <circle cx="8" cy="5.6" r="2.6" fill="currentColor" />
      <path d="M3 13.4c.4-2.9 2.4-4.4 5-4.4s4.6 1.5 5 4.4z" fill="currentColor" />
    </svg>
  );
}

/** A tick, for a follow that took. */
export function CheckGlyph({ className }: GlyphProps) {
  return (
    <svg className={className} {...svg}>
      <path
        d="M3.6 8.4l2.8 2.8 6-6.4"
        stroke="currentColor"
        strokeWidth="1.7"
        strokeLinecap="round"
        strokeLinejoin="round"
        fill="none"
      />
    </svg>
  );
}

/** A raised open hand, for a hello. */
export function WaveGlyph({ className }: GlyphProps) {
  return (
    <svg className={className} {...svg}>
      <path
        d="M5.2 8.6V3.9a.9.9 0 0 1 1.8 0v3.5-4.6a.9.9 0 0 1 1.8 0v4.6-3.9a.9.9 0 0 1 1.8 0v4.4-2.6a.9.9 0 0 1 1.8 0v4.2c0 2.6-1.8 4.5-4.3 4.5-1.6 0-2.7-.7-3.6-2L2.8 9.4a.9.9 0 0 1 1.4-1.1z"
        fill="currentColor"
      />
    </svg>
  );
}

/** A circling arrow, for playing the join again. */
export function ReplayGlyph({ className }: GlyphProps) {
  return (
    <svg className={className} {...svg}>
      <path
        d="M3.4 8a4.6 4.6 0 1 0 1.5-3.4"
        stroke="currentColor"
        strokeWidth="1.6"
        strokeLinecap="round"
        fill="none"
      />
      <path
        d="M3.2 2.6v3.2h3.2"
        stroke="currentColor"
        strokeWidth="1.6"
        strokeLinecap="round"
        strokeLinejoin="round"
        fill="none"
      />
    </svg>
  );
}
```

### team-join/demo-pointer.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import type { CSSProperties, Ref } from 'react';

/*
 * The demo's pointer, and the steps that move it. A demo is a script of awaited steps: wait, or
 * glide the pointer somewhere. Stopping the demo (the reader takes over, or it scrolls away) ends
 * the step in progress at once: its promise rejects, which ends the script right there, and the
 * pointer fades out.
 *
 * Each glide is a curved flight played by the Web Animations API, so nothing runs frame by frame.
 * The points of the flight are handed to whoever wants to move along with it (nothing here uses
 * them yet). The arrow and the hand are HTML boxes
 * that swap by their visibility: a change of style inside an SVG would lay the SVG out again.
 */

export type Point = { x: number; y: number };

/** A glide's path and timing, for an animation that plays along with it. */
export type Flight = { points: Point[]; timing: KeyframeAnimationOptions };

export type Demo = {
  /** Resolves after `ms`. */
  wait: (ms: number) => Promise<void>;
  /** Glides the pointer to `to`, in the stage's own px, in `ms`; `along` gets the flight. */
  glide: (to: Point, ms: number, along?: (flight: Flight) => void) => Promise<void>;
  /** Shows the arrow, or the hand a link shows. */
  glyph: (name: 'arrow' | 'hand') => void;
};

/** What a stopped demo's pending step rejects with. */
class Stopped extends Error {}

/** Where the arrow's tip is, as shares of its box: the point the pointer stands on. */
const TIP: Point = { x: 0.15, y: 0.1 };

/** How many points a flight is drawn through. */
const SAMPLES = 24;

/** Plays `script` with the pointer over `stage`; returns the function that stops it. */
export function runDemo(
  stage: HTMLElement,
  pointer: HTMLElement,
  script: (demo: Demo) => Promise<void>,
): () => void {
  let alive = true;
  let flight: Animation | null = null;
  // The stylesheet sizes the pointer from the stage's width; its tip is where it stands.
  const tip = { x: pointer.offsetWidth * TIP.x, y: pointer.offsetHeight * TIP.y };
  const place = ({ x, y }: Point) => `translate(${x - tip.x}px, ${y - tip.y}px)`;
  const timers = new Set<number>();
  const pending = new Set<() => void>();
  // The pointer comes in from the lower right.
  let at: Point = { x: stage.offsetWidth * 0.8, y: stage.offsetHeight * 0.9 };

  /** Settles like `promise`, or rejects as soon as the demo stops. */
  const step = (promise: Promise<unknown>) =>
    new Promise<void>((resolve, reject) => {
      if (!alive) return reject(new Stopped());
      const cancel = () => reject(new Stopped());
      pending.add(cancel);
      promise.then(
        () => {
          pending.delete(cancel);
          if (alive) resolve();
        },
        () => {
          pending.delete(cancel);
          reject(new Stopped());
        },
      );
    });

  const wait = (ms: number) =>
    step(
      new Promise<void>((resolve) => {
        const timer = window.setTimeout(() => {
          timers.delete(timer);
          resolve();
        }, ms);
        timers.add(timer);
      }),
    );

  const glide: Demo['glide'] = (to, ms, along) => {
    const from = at;
    at = to;
    const dx = to.x - from.x;
    const dy = to.y - from.y;
    // A gentle curve, as a hand moves: the control point sits off the straight line.
    const bend = { x: (from.x + to.x) / 2 - dy * 0.18, y: (from.y + to.y) / 2 + dx * 0.18 };
    const points: Point[] = [];
    for (let i = 0; i <= SAMPLES; i += 1) {
      const t = i / SAMPLES;
      const u = 1 - t;
      points.push({
        x: u * u * from.x + 2 * u * t * bend.x + t * t * to.x,
        y: u * u * from.y + 2 * u * t * bend.y + t * t * to.y,
      });
    }
    const timing: KeyframeAnimationOptions = {
      duration: ms,
      easing: 'cubic-bezier(0.45, 0, 0.25, 1)',
    };
    flight?.cancel();
    // Where it rests once the flight is over.
    pointer.style.transform = place(to);
    flight = pointer.animate(
      points.map((point) => ({ transform: place(point) })),
      timing,
    );
    along?.({ points, timing });
    return step(flight.finished);
  };

  const glyph: Demo['glyph'] = (name) => {
    pointer.dataset.glyph = name;
  };

  pointer.dataset.glyph = 'arrow';
  pointer.style.transform = place(at);
  pointer.style.opacity = '1';
  script({ wait, glide, glyph }).catch((error: unknown) => {
    if (!(error instanceof Stopped)) throw error;
  });

  return () => {
    if (!alive) return;
    alive = false;
    timers.forEach((timer) => window.clearTimeout(timer));
    flight?.cancel();
    pending.forEach((cancel) => cancel());
    pointer.style.opacity = '0';
  };
}

/**
 * The pointer's box: it moves, on a layer of its own. Its size comes from its class, its colours
 * from the stage's tokens (team-join.module.css).
 */
const POINTER: CSSProperties = {
  position: 'absolute',
  top: 0,
  left: 0,
  zIndex: 2,
  display: 'block',
  pointerEvents: 'none',
  opacity: 0,
  transition: 'opacity 0.3s ease',
  filter: 'drop-shadow(0 1px 1.5px var(--pointer-shadow))',
  willChange: 'transform',
};

/** One glyph over the other, each filling the box. */
const GLYPH: CSSProperties = { position: 'absolute', inset: 0, display: 'block' };
const DRAWING: CSSProperties = {
  display: 'block',
  width: '100%',
  height: '100%',
  overflow: 'visible',
};
/** The arrow is dark on a white edge, the hand white on a dark one, as the system draws them. */
const ARROW: CSSProperties = { fill: 'var(--pointer)', stroke: 'var(--pointer-edge)' };
const HAND: CSSProperties = { fill: 'var(--pointer-edge)', stroke: 'var(--pointer)' };

/**
 * The pointer the demo moves around: an arrow, or a pointing hand over a control. It is
 * decorative: what it does shows on the control itself. The stylesheet shows one glyph at a time,
 * from the box's data-glyph.
 */
export function DemoPointer({
  ref,
  className,
  arrowClass,
  handClass,
}: {
  ref: Ref<HTMLSpanElement>;
  className?: string;
  arrowClass?: string;
  handClass?: string;
}) {
  return (
    <span ref={ref} className={className} style={POINTER} aria-hidden="true">
      <span className={arrowClass} style={GLYPH}>
        <svg viewBox="0 0 20 20" style={DRAWING}>
          <path
            d="M3 2v14.5l3.6-3.3 2.6 5.6 2.4-1.1-2.6-5.5h5.2z"
            style={ARROW}
            strokeWidth="1.3"
            strokeLinejoin="round"
          />
        </svg>
      </span>
      <span className={handClass} style={GLYPH}>
        <svg viewBox="0 0 20 20" style={DRAWING}>
          {/* The tip of the finger sits where the arrow's tip is. */}
          <path
            d="M6.4 3.3c0-.8.6-1.4 1.3-1.4S9 2.5 9 3.3v5.5c.2-.5.6-.8 1.2-.8.7 0 1.2.5 1.2 1.2v.5c.2-.5.6-.8 1.2-.8.7 0 1.2.5 1.2 1.2v.7c.2-.4.6-.7 1.1-.7.7 0 1.2.5 1.2 1.2v3.5c0 2.8-1.9 4.9-4.6 4.9h-1.2c-1.8 0-3.1-.8-4.1-2.3l-2.6-3.9c-.4-.6-.2-1.3.4-1.7.6-.3 1.3-.2 1.7.4l.6.9z"
            style={HAND}
            strokeWidth="1.1"
            strokeLinejoin="round"
            transform="translate(-4.7 0.1)"
          />
        </svg>
      </span>
    </span>
  );
}
```

### team-join/use-autoplay.ts

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import { useCallback, useEffect, useRef, useState } from 'react';

/*
 * When a demo may play on its own: while part of it is on screen and the tab is visible, never
 * under reduced motion, and never again once the reader has used it: `take()` hands it to the
 * reader for good (until the component mounts again), so it can't come back on its own.
 */
export function useAutoplay<T extends HTMLElement>() {
  const ref = useRef<T>(null);
  const [visible, setVisible] = useState(false);
  const [reduced, setReduced] = useState(true);
  const [taken, setTaken] = useState(false);

  useEffect(() => {
    const element = ref.current;
    if (!element) return;
    let onScreen = false;
    const update = () => setVisible(onScreen && !document.hidden);
    const observer = new IntersectionObserver(
      ([entry]) => {
        onScreen = entry.isIntersecting;
        update();
      },
      { threshold: 0.3 },
    );
    observer.observe(element);
    document.addEventListener('visibilitychange', update);
    const motion = window.matchMedia('(prefers-reduced-motion: reduce)');
    const readMotion = () => setReduced(motion.matches);
    readMotion();
    motion.addEventListener('change', readMotion);
    return () => {
      observer.disconnect();
      document.removeEventListener('visibilitychange', update);
      motion.removeEventListener('change', readMotion);
    };
  }, []);

  const take = useCallback(() => setTaken(true), []);

  return { ref, take, playing: visible && !reduced && !taken };
}
```