/* ── Memory ────────────────────────────────────────────────────────────────
   A flat 2x2 board, not a hand or a cascade — the only CARDS-row icon that
   isn't fanned or stacked, because Memory's board is a grid you tap into,
   not cards you hold. Two backs and two faces sit on the diagonal: hidden
   top-right/bottom-left, revealed top-left/bottom-right, so the read is
   "two of these are still hidden, two turned out to match" without needing
   motion. Backs use the real default deck's own pattern (server/shared/
   cards/cards.css .pback-classic: #B91C1C base, white diagonal crosshatch —
   already reused for Kings Corner's center pile card above). Faces use
   Memory's own default look instead of suits — a colored tile (server/games/
   memory/game.js nextColor(), golden-angle hues) with an actual little
   avatar drawn on it: a skin-tone oval (shared/avatar/render.js default
   skin #EFBD91), dot eyes, a small smile, and three spiky hair tufts —
   which is what actually tells this apart from Euchre/Kings Corner/
   Solitaire's shared white-card vocabulary. The matched pair carries the
   game's own found-it ring (memory.css .memory-score-row.current /
   .memory-phone-status.mine: #7C3AED). */
.game-art--memory .gm-card {
  position: absolute;
  width: 32%;
  height: 45%;
  border-radius: max(1px, 4cqmin);
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}
.game-art--memory .gm-a, .game-art--memory .gm-b { top: 23%; }
.game-art--memory .gm-c, .game-art--memory .gm-d { top: 77%; }
.game-art--memory .gm-a, .game-art--memory .gm-c { left: 30%; }
.game-art--memory .gm-b, .game-art--memory .gm-d { left: 70%; }

.game-art--memory .gm-back {
  background-color: #B91C1C;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0, rgba(255, 255, 255, .35) max(1px, .6cqmin), transparent max(1px, .6cqmin), transparent max(2px, 2.4cqmin)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .35) 0, rgba(255, 255, 255, .35) max(1px, .6cqmin), transparent max(1px, .6cqmin), transparent max(2px, 2.4cqmin));
  border: max(1px, 2.6cqmin) solid #fff;
}
.game-art--memory .gm-face {
  /* server/games/memory/game.js nextColor(): hsl(idx * 137.508deg, 62%, 42%) — this is idx 1's hue. */
  background-color: hsl(138, 62%, 42%);
  border: max(1px, 1.4cqmin) solid var(--border);
  box-shadow: 0 0 0 max(1px, 2.4cqmin) #7C3AED;
}
/* Face assembly (hair + oval) is centered as one block: the hair band
   (19%-33%) plus the oval (33%-81%) together span 19%-81% of the card,
   centered top-to-bottom — not the oval alone, which would sit too high
   once the hair's height is added above it. */
.game-art--memory .gm-oval {
  position: absolute;
  left: 19%;
  top: 33%;
  width: 62%;
  height: 48%;
  border-radius: 50%;
  background: #EFBD91;
}
.game-art--memory .gm-eye {
  position: absolute;
  top: 42%;
  width: 3.6cqmin;
  height: 3.6cqmin;
  border-radius: 50%;
  background: #111827;
  transform: translate(-50%, -50%);
}
.game-art--memory .gm-eye-l { left: 32%; }
.game-art--memory .gm-eye-r { left: 68%; }
.game-art--memory .gm-mouth {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 9.5cqmin;
  height: 4.7cqmin;
  border-bottom-left-radius: 4.7cqmin;
  border-bottom-right-radius: 4.7cqmin;
  background: #111827;
  transform: translateX(-50%);
}
/* Lines, not spikes: each is a straight rounded-cap stroke, bottom-anchored
   exactly on the oval's top edge (top 19% + height 14% = 33%, the oval's own
   top) so it visibly grows out of the head instead of floating above it.
   Rotation pivots on that anchored bottom point (transform-origin), so the
   base stays welded to the head while the tip fans outward. */
.game-art--memory .gm-hair {
  position: absolute;
  top: 19%;
  left: 50%;
  height: 14%;
  width: max(1px, 2.2cqmin);
  background: #111827;
  border-radius: 999px;
  transform-origin: 50% 100%;
}
.game-art--memory .gm-hair-c { transform: translateX(-50%); }
.game-art--memory .gm-hair-l { left: 36%; transform: translateX(-50%) rotate(-22deg); }
.game-art--memory .gm-hair-r { left: 64%; transform: translateX(-50%) rotate(22deg); }
/* Thumbnail tier: the crosshatch and the face are the fine detail — two
   plain red backs beside two plain color-and-ring fronts still reads as
   "two hidden, two matched." */
@container ga-stage (max-width: 100px) {
  .game-art--memory .gm-back { background-image: none; }
  .game-art--memory .gm-oval, .game-art--memory .gm-hair { display: none; }
}
@container ga-stage (max-width: 70px) {
  .game-art--memory .gm-face { box-shadow: none; }
}
