/* Matka Stack: terracotta HUD over the sky-and-courtyard canvas */

body.game {
  --bg-top: #a8402a;
  --bg-bottom: #c8643a;
  --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.mk-score { font-weight: 800; }
.chip.mk-score.pop { animation: mkpop .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mkpop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.chip.mk-lives { padding: 2px 10px; gap: 2px; }
.mk-life { display: inline-block; width: 22px; height: 22px; transition: opacity .3s, filter .3s; }
.mk-life svg { width: 22px; height: 22px; }
.mk-life.lost { opacity: .3; filter: grayscale(1); }
.mk-life.mend { animation: mkmend .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mkmend { 0% { transform: scale(.4); filter: drop-shadow(0 0 0 #9ff0b0); } 50% { transform: scale(1.35); filter: drop-shadow(0 0 6px #9ff0b0); } 100% { transform: none; } }
.mk-life.shake { animation: mkshake .45s; }
@keyframes mkshake { 0%, 100% { transform: none; } 20% { transform: translateX(-4px) rotate(-12deg); } 40% { transform: translateX(4px) rotate(10deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.coach-line { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

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

.mk-banner {
  position: absolute; z-index: 6; left: 50%; top: 12%; pointer-events: none; /* over the crane beam, clear of the swing */
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 22px; border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, #ffd25a, #f2a33d); color: #5e1f12; border: 3px solid #fff4e0;
  font: 700 clamp(20px, 5.6vw, 30px)/1.15 var(--display); box-shadow: 0 12px 30px -10px rgba(60, 20, 0, .55);
}
.mk-banner.show { animation: mkbanner 2.3s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes mkbanner {
  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); }
}

.mk-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; }
