/* «Грим» (0.51, club-face.js): an element of its own (.face-art) lies exactly over a face, under the accessory (club-acc.js's
   element comes after it); its drawing (100 × 100 = the face) keeps inside the face, so nothing needs room around it and
   nothing moves. Taps go through it. No animation: a still look, reduced motion or not. */
.face-art { position: absolute; pointer-events: none; }
.face-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* The zones of a face (the drawing's own groups) move per picture: a photo as drawn; Discord's default avatar — the
   whole face onto its logo's (smaller, the eyes 52 % down, as close together as the logo's); initials — the mouth, the
   nose and the cheeks below the letters (a little smaller there), the beard around them, the forehead above them, the
   mask up onto the forehead (like glasses there). */
.face-svg .face-all { transform: var(--face-all, none); }
.face-svg .face-z-mouth { transform: var(--face-mouth, none); }
.face-svg .face-z-jaw { transform: var(--face-jaw, none); }
.face-svg .face-z-nose { transform: var(--face-nose, none); }
.face-svg .face-z-cheeks { transform: var(--face-cheeks, none); }
.face-svg .face-z-brow { transform: var(--face-brow, none); }
.face-svg .face-z-eyes { transform: var(--face-eyes, none); }
.person:has(> .av > img[src*="embed/avatars/"]) > .face-art, .pp-head:has(> .pp-av > img[src*="embed/avatars/"]) > .face-art,
:is(.face-hold, .cacc-box):has(> .club-face > img[src*="embed/avatars/"]) > .face-art, .react-who:has(> img[src*="embed/avatars/"]) > .face-art {
  --face-all: translate(50px, 52.5px) scale(.56) translate(-50px, -44.5px);
}
.person:not(:has(> .av > img)) > .face-art, .pp-head:not(:has(> .pp-av > img)) > .face-art, :is(.face-hold, .cacc-box):not(:has(> .club-face > img)) > .face-art {
  --face-mouth: translate(50px, 75px) scale(.8) translate(-50px, -64px); --face-jaw: translate(50px, 60px) scale(.88) translate(-50px, -58px);
  --face-nose: translate(50px, 75px) scale(.85) translate(-50px, -57px); --face-cheeks: translateY(15px); --face-brow: translateY(-8px); --face-eyes: translateY(-22px);
}
/* Dark details keep a thin light edge: they still read on a dark picture (on a light one it is not seen). */
.face-art:is([data-face="curly"], [data-face="horseshoe"], [data-face="brush"], [data-face="beard"], [data-face="domino"]) > .face-svg { filter: drop-shadow(0 0 .7px rgba(255, 255, 255, .72)); }

/* The domino mask takes the eyes: glasses worn with it (club-acc.js's .cacc-eyes) are not drawn over it. */
.face-art[data-face="domino"] ~ .cacc:has(.cacc-eyes) { display: none; }

/* The participants strip (clubShop.nameAfter): the chip's 22-px face sits 3 px in and in the middle (style.css .person);
   it grows on hover, so does the drawing. On a phone the chip is the face (34 px inside a 2-px edge). */
.person > .face-art { left: 3px; top: calc(50% - 11px); width: 22px; height: 22px; transition: transform .12s ease; }
.person:hover > .face-art { transform: scale(1.06); }
@media (max-width: 760px) { .person > .face-art { left: 0; top: 0; width: 100%; height: 100%; } }

/* A flying reaction's pill (clubShop.sigHtml): on its face (16 px, 18 in a frame); no face, no drawing. */
.react-who:has(> .face-art) { position: relative; }
.react-who > .face-art { left: 2px; top: calc(50% - 8px); width: 16px; height: 16px; }
.react-who[data-club-frame] > .face-art { top: calc(50% - 9px); width: 18px; height: 18px; }
.react-who:not(:has(> img)) > .face-art { display: none; }

/* The games' boards and podiums (clubShop.face): inside the accessory's box when there is one, else in a box of its own
   laid out where the face was (hall-game.css, club-looks.css); it takes the face's own size, whichever .club-face rule
   wins (club-powers.css draws them 30 px), and one's own previews in the shop ask for theirs (.face-me). */
.face-hold { position: relative; display: inline-block; flex: none; vertical-align: middle; }
.face-hold > .club-face { display: block; margin: 0; }
.face-hold > .face-me { width: var(--fs); height: var(--fs); }
:is(.face-hold, .cacc-box) > .face-art { inset: 0; }
.hg-name > .face-hold { margin-right: 6px; vertical-align: -5px; }
div.hg-step > .face-hold { margin: 2px 0; }
div.hg-step > .face-hold > .club-face[data-club-frame] { border-width: 3px; }

/* The mini-profile: on its 56-px face, the first thing in its head. */
.pp-head:has(> .face-art) { position: relative; }
.pp-head > .face-pp { left: 0; top: calc(50% - 28px); width: 56px; height: 56px; }

/* The smallest faces (a reaction's pill, a board's 20-px face, the shop's chip, the strip on a computer): the dots and
   lines bolder, the finest highlights left out — the same drawing still reads at 16–22 px. */
:is(.face-r, .face-fs, .face-c) .face-fine, :is(.face-r, .face-fs, .face-c) .face-dot-x { display: none; }
:is(.face-r, .face-fs, .face-c) .face-dot-k { stroke-width: 6.8; }
:is(.face-r, .face-fs, .face-c) .face-line { stroke-width: 7.6; }
:is(.face-r, .face-fs, .face-c) .face-line-c { stroke-width: 3.6; }
@media (min-width: 761px) {
  .face-p .face-fine, .face-p .face-dot-x { display: none; }
  .face-p .face-dot-k { stroke-width: 6.8; }
  .face-p .face-line { stroke-width: 7.6; }
  .face-p .face-line-c { stroke-width: 3.6; }
}

/* The shop's card: the twelve on one's own face, how the hall sees one (with one's accessory: its room above), the
   tile's picture. «Сейчас» is a line under the name. */
.face-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.face-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 92px; padding: 10px 4px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.face-opt:hover:not(:disabled) { background: var(--line); }
.face-opt.on { border-color: var(--accent); background: rgba(229, 160, 13, .12); }
.face-opt:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.face-opt:disabled { cursor: default; }
.face-opt .club-face[data-club-frame] { border-width: 3px; }
.face-opt-n { line-height: 1.2; text-align: center; }
.face-opt-now { margin-top: -4px; color: var(--ok); font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.face-ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-weight: 700; font-size: calc(var(--fs, 20px) * .36); }
.face-hold > .cacc { inset: 0; } /* one's accessory on one's previews, laid as on any face */
.face-hold:has(> .club-face > img[src*="embed/avatars/"]) > .cacc { --cacc-eyes: 8px; }
.face-hold:not(:has(> .club-face > img)) > .cacc { --cacc-eyes: -22px; }
.face-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 2px 10px; color: var(--muted); font-size: 12.5px; }
.face-demo-k { flex: 1 0 100%; }
.face-demo-acc .face-demo-big { padding-top: 18px; }
.face-demo-acc .face-demo-chip { margin-top: 8px; }
.face-demo-chip { padding-top: 4px; padding-bottom: 4px; }
.face-mask-note { margin: 0 2px 10px; }
.club-tile-pv .face-hold { margin-top: 2px; }
@media (max-width: 380px) { .face-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .person > .face-art { transition: none; } }
