/* Anda Jump: chai-brown HUD over the kitchen-wall-to-space canvas */

body.game {
  --bg-top: #b4532a;
  --bg-bottom: #d9782f;
  --hud-ink: #fff;
  --hud-chip: rgba(255, 255, 255, .17);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}
.stage { overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.subhud .chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.aj-score { font-weight: 800; }
.chip.aj-score.pop { animation: ajpop .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ajpop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.chip.aj-lives { padding: 2px 10px; gap: 1px; }
.aj-life { display: inline-block; width: 20px; height: 22px; transition: opacity .3s, filter .3s; }
.aj-life[hidden] { display: none; }
.aj-life svg { width: 20px; height: 22px; }
.aj-life.lost { opacity: .3; filter: grayscale(1); }
.aj-life.shake { animation: ajshake .45s; }
.aj-life.gain { animation: ajgain .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ajshake { 0%, 100% { transform: none; } 20% { transform: translateX(-4px) rotate(-12deg); } 40% { transform: translateX(4px) rotate(10deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes ajgain { 0% { transform: scale(0); } 60% { transform: scale(1.4); } 100% { transform: scale(1); } }

.hand.aj-hand {
  left: 50%; bottom: calc(18% + env(safe-area-inset-bottom, 0px)); top: auto; margin: 0 0 0 30px; width: 48px; height: 48px;
  animation: none; transition: transform .08s ease-out, opacity .2s;
}

.aj-banner {
  position: absolute; z-index: 6; left: 50%; top: 13%; pointer-events: none; /* above the play: the next basket sits mid-stage */
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  max-width: calc(100% - 32px); padding: 10px 20px; border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, #ffe07a, #f7b51e); color: #5e1f12; border: 3px solid #fff8e6;
  font: 700 clamp(18px, 5vw, 27px)/1.15 var(--display); box-shadow: 0 12px 30px -10px rgba(60, 20, 0, .55);
}
.aj-banner.show { animation: ajbanner 2.3s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes ajbanner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-4deg); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(1deg); }
  22%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(.96); }
}

.aj-pause {
  position: absolute; inset: 0; z-index: 8; border: 0; width: 100%;
  display: grid; place-items: center; background: rgba(30, 14, 6, .55); color: #fff;
  font: 800 22px/1.2 var(--font); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.boosters:empty { display: none; }
/* "New!" callouts for a new basket behaviour: smaller than milestone banners so the baskets stay visible */
.aj-banner.feat { font: 700 clamp(15px, 4.2vw, 19px)/1.2 var(--font); padding: 8px 14px; max-width: min(320px, calc(100% - 32px)); top: 10%; }
.aj-banner.feat b { display: block; font: 800 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #b4532a; margin-bottom: 3px; }
.modal.aj-start .end-score b::before { content: "🥚 "; font-size: .7em; }
