/* Guppies Club only: drift the cutouts, and fade the backdrop rather than the artwork. */
.guppy-refined :is(.g-hero-flank, .g-art, .char-grid .cell, .faq-head, .cta-panel) img[src*="/complete-char-"] {
  --guppy-x: var(--guppy-drift-x, 4px);
  --guppy-y: var(--guppy-drift-y, 7px);
  --guppy-turn: var(--guppy-drift-turn, 1.2deg);

  mask-image: none;
  filter: none;
  animation: guppy-drift var(--guppy-period, 7.2s) ease-in-out var(--guppy-phase, -1.4s) infinite;
}
.guppy-refined .char-grid .cell:nth-child(2n) img { --guppy-phase: -3.6s; --guppy-period: 8.1s; --guppy-drift-x: -4px; }
.guppy-refined .char-grid .cell:nth-child(3n) img { --guppy-phase: -5.1s; --guppy-period: 6.6s; }
.guppy-refined .g-hero-flank:last-child img[src*="/complete-char-"],
.guppy-refined section:nth-child(2n) .g-art img { --guppy-phase: -4.2s; --guppy-drift-x: -5px; --guppy-period: 8s; }
.guppy-refined .faq-peek { --guppy-drift-x: 1.5px; --guppy-drift-y: 3px; --guppy-drift-turn: .8deg; --guppy-period: 6.4s; }
.guppy-refined .faq-card:nth-child(2n) .faq-peek { --guppy-drift-x: -1.5px; --guppy-phase: -3.8s; }

/* Individual transforms keep the FAQ peeks moving even with their legacy transform:none. */
@keyframes guppy-drift {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: var(--guppy-x) calc(-1 * var(--guppy-y)); rotate: var(--guppy-turn); }
}

/* The cast keeps the same palette and layout, without the rectangular painted rim. */
.guppy-refined .char-grid .cell[data-c] {
  --guppy-halo: #fdf3c9;
  border-color: transparent;
  background: radial-gradient(ellipse closest-side, var(--guppy-halo) 46%, transparent 100%);
  box-shadow: none;
}
.guppy-refined .char-grid .cell:is([data-c="dj"], [data-c="soccer"]) { --guppy-halo: #fce4d5; }
.guppy-refined .char-grid .cell:is([data-c="gardener"], [data-c="surfer"]) { --guppy-halo: #e7f3f6; }
.guppy-refined .char-grid .cell[data-c="chef"] { --guppy-halo: #e2eee4; }
.guppy-refined .char-grid .cell[data-c="bike"] { --guppy-halo: #ede4f5; }
.guppy-refined .g-art::before {
  border-color: transparent;
  background: radial-gradient(ellipse closest-side, rgba(254,249,240,.62) 32%, transparent 100%);
}

/* A CSS-backed character needs the same motion and natural alpha as the image cutouts. */
.guppy-refined section[data-screen-label="05 The Window"] .g-inner::before {
  --guppy-x: 4px;
  --guppy-y: 6px;
  --guppy-turn: .9deg;
  mask-image: none;
  animation: guppy-drift 8.4s ease-in-out -3.3s infinite;
}
@media (max-width: 600px) {
  .guppy-refined { --guppy-drift-y: 4px; }
  .guppy-refined .faq-peek { --guppy-drift-y: 2.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .guppy-refined img[src*="/complete-char-"],
  .guppy-refined section[data-screen-label="05 The Window"] .g-inner::before { animation: none !important; }
}
