/* ── Who Done It ───────────────────────────────────────────────────────────
   Everyone answers the same prompt, then the room matches every anonymous
   answer back to its author — that match is the whole game, so the icon
   draws it directly rather than any one phase of play. Two prompt tags
   (WHO / IT, lifted straight from the game's own name) sit over two tiny
   avatars, corner to corner, with one clean diagonal joining the pair that
   landed. Accent is this game's own wine (gameChooser.js ACCENTS.whodoneit /
   whodoneit.css --wdi-accent: #BE185D); anything filled solid with it takes
   fixed #111827 ink per the Ink-on-Bright-Fill rule. Faces are Memory's own
   hair+oval+eyes+mouth assembly (public/shared/games/memory/cardArt.css),
   asked for by name, moved onto a circle to match this game's real avatar
   shape (.wdi-avatar-fallback: border-radius 50%). */

.game-art--whodoneit .wdi-chip {
  position: absolute;
  top: 25%;
  height: 24%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
  font-size: 9cqmin;
  line-height: 1;
  z-index: 2;
}
.game-art--whodoneit .wdi-chip-who { left: 25%; width: 40%; }
.game-art--whodoneit .wdi-chip-it { left: 75%; width: 26%; }

/* The matched tag: full accent fill, ink text — this is the guess that hit. */
.game-art--whodoneit .wdi-chip.wdi-hit {
  background: #BE185D;
  color: #111827;
}
/* The other tag: a plain resting card, dimmed — still unmatched. */
.game-art--whodoneit .wdi-chip:not(.wdi-hit) {
  background: var(--surface);
  border: max(1px, 2cqmin) solid var(--border);
  color: var(--muted);
  opacity: .6;
}

.game-art--whodoneit .wdi-avatar {
  position: absolute;
  top: 75%;
  width: 34%;
  height: 34%;
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.game-art--whodoneit .wdi-avatar-a { left: 25%; }
.game-art--whodoneit .wdi-avatar-b { left: 75%; }

/* The matched avatar: the same tinted-ring look Who Done It's own fallback
   avatar draws (whodoneit.css .wdi-avatar-fallback), scaled up. */
.game-art--whodoneit .wdi-avatar.wdi-hit {
  background: color-mix(in srgb, #BE185D 22%, var(--surface));
  border: max(1px, 2.6cqmin) solid #BE185D;
}
/* The other avatar: neutral and dimmed, same idiom as the unmatched tag. */
.game-art--whodoneit .wdi-avatar:not(.wdi-hit) {
  background: var(--surface);
  border: max(1px, 2cqmin) solid var(--border);
  opacity: .55;
}

/* Face assembly, ported from Memory's cardArt.css at the same proportions,
   just re-centered for a round avatar instead of a card. */
.game-art--whodoneit .wdi-oval {
  position: absolute;
  left: 22%;
  top: 30%;
  width: 56%;
  height: 44%;
  border-radius: 50%;
  background: #EFBD91;
}
.game-art--whodoneit .wdi-eye {
  position: absolute;
  top: 42%;
  width: 3.2cqmin;
  height: 3.2cqmin;
  border-radius: 50%;
  background: #111827;
  transform: translate(-50%, -50%);
}
.game-art--whodoneit .wdi-eye-l { left: 33%; }
.game-art--whodoneit .wdi-eye-r { left: 67%; }
.game-art--whodoneit .wdi-mouth {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 8.5cqmin;
  height: 4.2cqmin;
  border-bottom-left-radius: 4.2cqmin;
  border-bottom-right-radius: 4.2cqmin;
  background: #111827;
  transform: translateX(-50%);
}
.game-art--whodoneit .wdi-hair {
  position: absolute;
  top: 16%;
  left: 50%;
  height: 13%;
  width: max(1px, 2cqmin);
  background: #111827;
  border-radius: 999px;
  transform-origin: 50% 100%;
}
.game-art--whodoneit .wdi-hair-c { transform: translateX(-50%); }
.game-art--whodoneit .wdi-hair-l { left: 37%; transform: translateX(-50%) rotate(-22deg); }
.game-art--whodoneit .wdi-hair-r { left: 63%; transform: translateX(-50%) rotate(22deg); }

/* Stage corner (25,25) to stage corner (75,75): a plain 45deg diagonal, the
   one guess that landed, running under both matched shapes. */
.game-art--whodoneit .wdi-link {
  position: absolute;
  left: 25%;
  top: 25%;
  width: 70.7%;
  height: 9%;
  transform-origin: 0 50%;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 999px;
  background: #BE185D;
  z-index: 1;
}

/* Thumbnail tier: chip text and the face's fine detail are the first things
   to turn to mud at small sizes — two solid tags, two ringed dots and the
   diagonal between them still reads as "one guess found its match." */
@container ga-stage (max-width: 100px) {
  .game-art--whodoneit .wdi-chip { font-size: 0; }
  .game-art--whodoneit .wdi-oval, .game-art--whodoneit .wdi-hair { display: none; }
}
