/* ── Crazy 8s ─────────────────────────────────────────────────────────────
   The discard-matching race in one glance: three cards, each printed like a
   real card — a rank tucked in its own top-left corner, a suit pip filling
   the middle — rather than one glyph floating centered. The discard pile's
   middle card (mid-depth in the stack, between the peek card behind it and
   the hand card landing on top) carries the wild rank itself, an 8, since
   that's the one rank that breaks the match. Colors are the shared card
   system's own suit red (public/shared/cards/cards.css .psuit-red:
   #DC2626). */
.game-art--crazy8s .gc8-card {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 14%;
  /* Fixed white, not var(--surface): matches shared/cards/cards.css .pcard,
     which stays a physical white card in every theme. The dark/red suit ink
     below assumes that white face — var(--surface) goes near-black in dark
     theme and swallows the dark-slate ink. */
  background: #fff;
  border: max(1px, 2cqmin) solid color-mix(in srgb, var(--muted) 45%, var(--border));
  box-sizing: border-box;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16cqmin;
  line-height: 1;
  color: #DC2626;
}
/* The corner rank: printed once per card, separate from the suit pip
   filling the card's middle. Peek and discard sit behind a card in front
   that covers most of their face — only their bottom-right corner actually
   pokes out (see the peek/discard transforms below), so that's where their
   rank has to sit to be visible at all; the frontmost hand card is fully
   clear, so its rank sits top-left the way a real card prints it. */
.game-art--crazy8s .gc8-card::before {
  position: absolute;
  font-weight: 800;
  font-size: 10cqmin;
  line-height: 1;
}
.game-art--crazy8s .gc8-peek::before { content: '5'; right: 10%; bottom: 6%; }
.game-art--crazy8s .gc8-discard::before { content: 'Q'; right: 10%; bottom: 6%; }
.game-art--crazy8s .gc8-hand::before { content: '8'; left: 12%; top: 8%; }
/* The peek card is the discard pile's back-most card. */
.game-art--crazy8s .gc8-peek {
  width: 46%;
  height: 62%;
  transform: translate(-28%, -30%) rotate(-12deg);
  opacity: .55;
  z-index: 1;
}
.game-art--crazy8s .gc8-discard {
  width: 46%;
  height: 62%;
  transform: translate(-40%, -42%) rotate(-3deg);
  z-index: 2;
}
/* The hand card overlaps the discard's bottom-right corner rather than
   sitting apart from it — the overlap itself is the "landing on the pile"
   gesture. A heart, not a diamond, so its pip is visibly a different suit
   from the discard beneath it. */
.game-art--crazy8s .gc8-hand {
  width: 42%;
  height: 58%;
  transform: translate(-64%, -60%) rotate(10deg);
  z-index: 3;
}
/* Thumbnail tier: the corner rank and center pip are the first thing to
   blur — the three overlapping card silhouettes still read as "discard
   pile, incoming match" alone at 40px. */
@container ga-stage (max-width: 100px) {
  .game-art--crazy8s .gc8-card { font-size: 0; }
  .game-art--crazy8s .gc8-card::before { content: none; }
}
