/* game.css — the play screen (.play-*) */
.play-root { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.play-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.play-abs { position: absolute; pointer-events: none; }

.play-hud {
  position: absolute; left: 8px; top: 8px; max-width: 46%; min-width: 130px; padding: 6px 12px 7px; z-index: 5; pointer-events: none;
  background: linear-gradient(180deg, rgba(234, 220, 255, 0.95), rgba(198, 168, 255, 0.92));
  border: 3px solid #5a2e5e; border-radius: 16px; box-shadow: 0 3px 0 #5a2e5e, inset 0 0 0 2px #ffd27a;
  animation: play-pop 0.3s cubic-bezier(.2, 1.5, .4, 1) both;
}
.play-hud-stage { font-size: 13px; font-weight: 900; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-hud-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.play-hud-score { font-size: 18px; font-weight: 900; }
.play-hud-shots { display: flex; align-items: center; gap: 3px; font-size: 18px; font-weight: 900; }
.play-hud-shots img { width: 20px; height: 20px; image-rendering: pixelated; }
.play-hud-shots.low { color: #ff9aa8; animation: play-pulse 0.6s infinite; }

.play-boss { position: absolute; z-index: 3; pointer-events: none; transform-origin: 50% 100%; transform: translateX(-50%); }
.play-boss-in { transform-origin: 50% 100%; transition: transform 0.9s cubic-bezier(.6, -0.3, .7, .2), opacity 0.9s; }
.play-boss-in.shrink { transform: scale(0.02) rotate(540deg); opacity: 0; }
.play-boss-in.hit { animation: play-shake 0.3s; }
.play-bosspanel {
  position: absolute; z-index: 4; transform: translateX(-50%); width: 62%; max-width: 260px; pointer-events: none; text-align: center;
}
.play-bossname { font-size: 14px; font-weight: 900; line-height: 1.1; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-hpbar { position: relative; height: 14px; border-radius: 999px; background: #fff; border: 3px solid #5a2e5e; overflow: hidden; box-shadow: 0 2px 0 rgba(90, 46, 94, .5); }
.play-hpbar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #ff7eb6, #ff4d5e); border-radius: 999px; transition: width 0.35s cubic-bezier(.3, 1.2, .5, 1); }
.play-hpbar.hit { animation: play-shake 0.3s; }

.play-owner { position: absolute; z-index: 2; pointer-events: none; transform: translateX(-50%); }
.play-owner > div { transform-origin: 50% 100%; }
.play-owner.squash > div { animation: play-squash 0.28s ease-out; }

.play-swap, .play-skill { position: absolute; z-index: 6; cursor: pointer; padding: 0; border: 0; background: none; outline: none; }
.play-swap {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid #5a2e5e; background: radial-gradient(circle at 35% 30%, #fff, #eadcff);
  box-shadow: 0 3px 0 #5a2e5e; transition: transform 0.12s cubic-bezier(.3, 1.6, .5, 1);
  animation: play-pop 0.35s 0.2s cubic-bezier(.2, 1.5, .4, 1) both;
}
.play-swap img { width: 38px; height: 38px; image-rendering: pixelated; display: block; margin: auto; }
.play-swap:active, .play-skill:active { transform: scale(0.88); }
.play-swap:hover { transform: scale(1.08); }
.play-skill { width: 60px; height: 60px; border-radius: 50%; animation: play-pop 0.35s 0.3s cubic-bezier(.2, 1.5, .4, 1) both; }
.play-skill .ring { position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(#ffd27a var(--ch, 0deg), rgba(90, 46, 94, 0.45) 0); }
.play-skill .face {
  position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d8c4ff); border: 3px solid #5a2e5e;
  display: flex; align-items: center; justify-content: center; overflow: hidden; filter: grayscale(0.85) brightness(0.9);
}
.play-skill .face img { width: 44px; height: 44px; image-rendering: pixelated; }
.play-skill.ready .face { filter: none; box-shadow: 0 0 14px 4px #ffe9a0; }
.play-skill.ready { animation: play-bounce 0.9s ease-in-out infinite; }
.play-skill.used .face { filter: grayscale(1) brightness(0.8); opacity: 0.7; }
.play-skill.used .face::after { content: "✓"; position: absolute; font-size: 30px; color: #fff; text-shadow: 0 0 3px #5a2e5e, 2px 2px 0 #5a2e5e; }
.play-skill-label { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); font-size: 12px; font-weight: 900; white-space: nowrap; pointer-events: none; }

.play-banner {
  position: absolute; left: 50%; top: 36%; z-index: 20; transform: translate(-50%, -50%); max-width: 90%; text-align: center; pointer-events: none;
  padding: 12px 22px; border-radius: 18px; border: 3px solid #5a2e5e; box-shadow: 0 4px 0 #5a2e5e;
  background: linear-gradient(180deg, rgba(255, 126, 182, 0.95), rgba(198, 130, 255, 0.95));
  animation: play-banner 0.34s cubic-bezier(.2, 1.6, .4, 1) both;
}
.play-banner.out { animation: play-banner-out 0.25s both; }
.play-banner b { display: block; font-size: 22px; font-weight: 900; }
.play-banner span { display: block; font-size: 15px; font-weight: 900; margin-top: 4px; }

.play-tut {
  position: absolute; left: 50%; z-index: 7; transform: translateX(-50%); width: 76%; max-width: 300px; text-align: center; pointer-events: none;
  padding: 10px 14px; border-radius: 16px; background: rgba(234, 220, 255, 0.96); border: 3px solid #5a2e5e; box-shadow: 0 3px 0 #5a2e5e;
  color: #5a2e5e; font-size: 15px; font-weight: 900; line-height: 1.35; animation: play-pop 0.3s cubic-bezier(.2, 1.5, .4, 1) both;
}
.play-tut small { display: block; font-size: 13px; margin-top: 4px; color: #8a5f8e; }
.play-tut .hand { display: block; font-size: 28px; animation: play-bounce 0.9s ease-in-out infinite; }

.play-comp { position: absolute; z-index: 2; pointer-events: none; }
.play-comp-badge {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 2px; width: 150px; padding: 4px 8px; border-radius: 12px; background: rgba(255, 250, 253, 0.95);
  border: 2px solid #5a2e5e; color: #5a2e5e; font-size: 12px; font-weight: 900; line-height: 1.25; animation: play-pop 0.3s both;
}
.play-comp-badge.out { animation: play-banner-out 0.3s both; }

/* results */
.play-res { text-align: center; color: #5a2e5e; }
.play-stars { display: flex; justify-content: center; gap: 6px; margin: 2px 0 6px; }
.play-star { width: 56px; height: 56px; image-rendering: pixelated; opacity: 0; }
.play-star.on { animation: play-starpop 0.5s cubic-bezier(.2, 1.8, .4, 1) both; filter: drop-shadow(0 0 6px #ffd27a); }
.play-star.off { opacity: 0.55; filter: grayscale(1) brightness(1.2); animation: play-pop 0.3s both; }
.play-res-score { font-size: 28px; font-weight: 900; }
.play-best { display: inline-block; margin: 2px 0 4px; padding: 2px 10px; border-radius: 999px; background: #ff7eb6; font-size: 13px; font-weight: 900; border: 2px solid #5a2e5e; animation: play-bounce 0.8s infinite; }
.play-rewards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 6px 0; }
.play-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 2px solid #c6a8ff; font-size: 15px; font-weight: 900; min-height: 32px; }
.play-chip img { width: 22px; height: 22px; image-rendering: pixelated; }
.play-chip.gold { background: #fff3cf; border-color: #ffd27a; }
.play-cap { display: flex; flex-direction: column; align-items: center; margin-top: 4px; font-size: 14px; }
.play-reason { font-size: 17px; margin: 10px 0 6px; }

@keyframes play-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes play-banner { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes play-banner-out { to { transform: translate(-50%, -70%) scale(.9); opacity: 0; } }
@keyframes play-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes play-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes play-shake { 0%, 100% { translate: 0 0; } 20% { translate: -4px 1px; } 40% { translate: 4px -1px; } 60% { translate: -3px 0; } 80% { translate: 3px 0; } }
@keyframes play-squash { 0% { transform: scale(1, 1); } 30% { transform: scale(1.08, 0.9); } 60% { transform: scale(0.96, 1.05); } 100% { transform: scale(1, 1); } }
@keyframes play-starpop { 0% { transform: scale(0) rotate(-120deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
