/* AVATAR: a player's face (a sport ball with a determined little face, from avatarSportFaces() in templates/avatar.js) in a tone circle; --me, --more and --private keep text. The one copy of this CSS (docs/PALETTE.md, "Avatar tints").
   templates/booking.html and prototypes/proto-going.css use it; the design system shows it (page "Avatar").
   Fills and inks are the fixed --avatar-* / --on-avatar-* tokens, the same in both themes. Assign a tone by POSITION in the
   list (lilac, sky, mint, peach, pink), never by hashing a name. Decorative: the names are in text beside the circles.
   Face: <span class="avatar avatar--TONE"> + the svg string from avatarSportFaces(). The svg is aria-hidden and drawn in the tone's own
   ink (currentColor), so it needs no colour of its own.
   Size: --avatar-size (default 36px): .avatar--sm 28, default 36, .avatar--lg 44, .avatar--xl 64.
   Variants: tone (--lilac ... --fog), --face (the football face, see avatar-face.js), --more ("+11"), --guest ("?"), --me (the signed-in player: accent fill, display face).
   A page tunes it through variables, never by restyling .avatar: --avatar-size, --avatar-ring (ground behind a stack),
   --avatar-neutral-bg / --avatar-neutral-ink (the neutral circle on a dark card), --avatar-me-bg (the --me fill on a dark card). */
.avatar{
  --avatar-size:36px;
  width:var(--avatar-size);height:var(--avatar-size);border-radius:50%;flex:none;display:grid;place-items:center;
  font-family:var(--mono);font-size:calc(var(--avatar-size) * .38);font-weight:600;line-height:1;
  position:relative;border:0;padding:0;   /* so a <button class="avatar"> (the header's account button) matches a <span> */
  background:var(--avatar-neutral-bg,var(--surface2));color:var(--avatar-neutral-ink,var(--ink2));   /* no tone class: neutral */
}
.avatar--lilac{background:var(--avatar-lilac);color:var(--on-avatar-lilac)}
.avatar--sky{background:var(--avatar-sky);color:var(--on-avatar-sky)}
.avatar--mint{background:var(--avatar-mint);color:var(--on-avatar-mint)}
.avatar--peach{background:var(--avatar-peach);color:var(--on-avatar-peach)}
.avatar--pink{background:var(--avatar-pink);color:var(--on-avatar-pink)}
.avatar--rose{background:var(--avatar-rose);color:var(--on-avatar-rose)}
.avatar--butter{background:var(--avatar-butter);color:var(--on-avatar-butter)}
.avatar--pistachio{background:var(--avatar-pistachio);color:var(--on-avatar-pistachio)}
.avatar--aqua{background:var(--avatar-aqua);color:var(--on-avatar-aqua)}
.avatar--teal{background:var(--avatar-teal);color:var(--on-avatar-teal)}
.avatar--periwinkle{background:var(--avatar-periwinkle);color:var(--on-avatar-periwinkle)}
.avatar--orchid{background:var(--avatar-orchid);color:var(--on-avatar-orchid)}
.avatar--apricot{background:var(--avatar-apricot);color:var(--on-avatar-apricot)}
.avatar--sage{background:var(--avatar-sage);color:var(--on-avatar-sage)}
.avatar--fog{background:var(--avatar-fog);color:var(--on-avatar-fog)}
.avatar-face{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}   /* seams and face, in the tone's ink */
.avatar--more{font-size:calc(var(--avatar-size) * .34)}                 /* "+11": neutral fill, the count */
.avatar--guest{color:var(--avatar-neutral-ink,var(--ink3))}                                      /* "?": retired as a look (2026-11-26): a guest spot now gets a football face from a seed. Kept for old markup */
/* the football face: the circle is a ball, the face is drawn by templates/avatar-face.js (data-face="<seed>"). Ink is the tone's own. */
.avatar--face{overflow:hidden;font-size:0}
.avatar--face svg{display:block;width:100%;height:100%}
.avatar--sm{--avatar-size:28px}
.avatar--lg{--avatar-size:44px}
.avatar--xl{--avatar-size:64px}
/* the signed-in player: header button and profile card. Accent fill, serif initial. Not for other players. */
.avatar--me{background:var(--avatar-me-bg,var(--accent));color:var(--on-accent);font-family:var(--display);font-weight:400;font-size:calc(var(--avatar-size) * .44)}
/* overlapping row; the ring keeps neighbours apart on any ground (set --avatar-ring to the ground, default --surface) */
.avatar-stack{display:flex;flex:none}
.avatar-stack .avatar{box-shadow:0 0 0 2px var(--avatar-ring,var(--surface))}
.avatar-stack .avatar + .avatar{margin-left:calc(var(--avatar-size) * -.26)}

/* AVATAR PICKER: the 12 faces to choose from, four across; the chosen one gets an accent ring. Markup: <div class="avpick" role="group"><button type="button" class="avatar avatar--xl avatar--face avatar--lilac" aria-pressed="true">…</button>…</div> */
.avpick{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;justify-items:center}
.avpick .avatar{--avatar-size:64px;cursor:pointer;padding:0;border:0}
.avpick .avatar[aria-pressed=true]{outline:3px solid var(--accent-ink);outline-offset:3px}
