@@ -165,14 +178,20 @@ export function ShopPhase({ view, you, send }: Props) {
{deck.length === 0 ? (
+
{deck.map((c) => (
-
toggle(c.id)}
- />
+
+ toggle(c.id)}
+ />
+
+ ))}
+ {deckAnim.ghosts.map((g) => (
+
+
+
))}
)}
diff --git a/web/src/styles.css b/web/src/styles.css
index 751958a..60d7c6b 100644
--- a/web/src/styles.css
+++ b/web/src/styles.css
@@ -1051,6 +1051,33 @@ h3 {
gap: 16px;
flex-wrap: wrap;
justify-content: center;
+ /* Positioning context for the exit "ghost" cards, which are pinned to where
+ the departing card sat while they shrink away (see .card-ghost). */
+ position: relative;
+}
+
+/* A thin wrapper around each animated card. The FLIP animator moves and flips
+ this element (not the .card inside), so the card's own hover/selected lift
+ transforms stay independent. backface-visibility hides the card mid-flip so
+ a dealt-in card reads as turning face-up rather than showing mirrored text. */
+.card-cell {
+ display: flex;
+ flex: 0 0 auto;
+ backface-visibility: hidden;
+}
+
+/* An exiting card: pinned (inline styles) where it last sat, shrinking away as
+ its former neighbors glide into the gap. */
+.card-ghost {
+ z-index: 3;
+ animation: card-ghost-out 280ms cubic-bezier(0.4, 0, 0.7, 0.4) forwards;
+}
+
+@keyframes card-ghost-out {
+ to {
+ opacity: 0;
+ transform: scale(0.62) translateY(-6px);
+ }
}
.deck-empty {
diff --git a/web/tsconfig.tsbuildinfo b/web/tsconfig.tsbuildinfo
index 59ee396..ca90d72 100644
--- a/web/tsconfig.tsbuildinfo
+++ b/web/tsconfig.tsbuildinfo
@@ -1 +1 @@
-{"root":["./src/App.tsx","./src/api.ts","./src/main.tsx","./src/petArt.ts","./src/types.ts","./src/useGame.ts","./src/components/ArrangePhase.tsx","./src/components/BattlePhase.tsx","./src/components/CardView.tsx","./src/components/DebugPanel.tsx","./src/components/DiceRoll.tsx","./src/components/EventLog.tsx","./src/components/GameOver.tsx","./src/components/Home.tsx","./src/components/Lobby.tsx","./src/components/ShopPhase.tsx","./src/components/Table.tsx"],"version":"5.9.3"}
\ No newline at end of file
+{"root":["./src/App.tsx","./src/anim.ts","./src/api.ts","./src/main.tsx","./src/petArt.ts","./src/types.ts","./src/useGame.ts","./src/components/ArrangePhase.tsx","./src/components/BattlePhase.tsx","./src/components/CardView.tsx","./src/components/DebugPanel.tsx","./src/components/DiceRoll.tsx","./src/components/EventLog.tsx","./src/components/GameOver.tsx","./src/components/Home.tsx","./src/components/Lobby.tsx","./src/components/ShopPhase.tsx","./src/components/Table.tsx"],"version":"5.9.3"}
\ No newline at end of file