/* Noodle Snake: street-food plaza backdrop, leaderboard, boost button, banners */

body.game {
  --bg-top: #7a3a1c;
  --bg-bottom: #3d1d0c;
  --hud-ink: #fff;
  --hud-chip: rgba(255, 255, 255, .14);
}
body.game .stage { overflow: hidden; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body.game .stage .coach-line { top: 132px; }

.subhud .chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 28px; }
.subhud .chip b { font-size: 17px; font-variant-numeric: tabular-nums; }
.chip.ns-len { background: var(--chili); }
.chip.ns-kill.bump { animation: ns-bump .3s ease-out; }
@keyframes ns-bump { 50% { transform: scale(1.18); } }

.ns-board {
  position: absolute; z-index: 4; top: 8px; right: max(8px, env(safe-area-inset-right, 0px)); margin: 0; padding: 6px 8px;
  list-style: none; pointer-events: none; min-width: 132px; max-width: 46%;
  border-radius: 12px; background: rgba(30, 14, 4, .5); color: #fff; font-size: 12.5px; line-height: 1.45; font-weight: 600;
}
.ns-board[hidden] { display: none; }
.ns-board li { display: flex; align-items: center; gap: 6px; opacity: .88; }
.ns-board li.me { opacity: 1; font-weight: 800; color: #ffe08a; }
.ns-board i { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); }
.ns-board span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-board b { font-variant-numeric: tabular-nums; margin-left: 4px; }

.ns-boost {
  position: absolute; z-index: 4; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-content: center; justify-items: center; gap: 0;
  background: radial-gradient(circle at 35% 30%, #ff8a3d, var(--chili) 65%); color: #fff; font: inherit; font-weight: 800; font-size: 12px;
  box-shadow: 0 5px 0 var(--chili-2), 0 8px 18px rgba(0, 0, 0, .35); touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .08s, box-shadow .08s, opacity .2s;
}
.ns-boost svg { width: 28px; height: 28px; }
.ns-boost.on { transform: translateY(3px) scale(.96); box-shadow: 0 2px 0 var(--chili-2), 0 0 0 6px rgba(255, 180, 60, .35); }
.ns-boost.off { opacity: .45; }
.ns-boost[hidden] { display: none; }

.ns-hand {
  position: absolute; left: 0; top: 0; z-index: 6; width: 52px; height: 52px; margin: -7px 0 0 -21px;
  pointer-events: none; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4));
}
.ns-hand:not(.show) { opacity: 0 !important; }
.ns-hand svg { width: 100%; height: 100%; }

.ns-banner {
  position: absolute; z-index: 6; left: 50%; top: 38%; pointer-events: none; text-align: center;
  transform: translate(-50%, -50%) scale(.6) rotate(-3deg); opacity: 0;
  padding: 10px 24px 12px; border-radius: 18px; background: var(--chili); color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 0 0 3px rgba(255, 255, 255, .28);
  max-width: calc(100% - 32px); text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.ns-banner.show { animation: ns-banner 1.3s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes ns-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-6deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-3deg); }
  30% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  80% { opacity: 1; transform: translate(-50%, -54%) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(.96) rotate(-3deg); }
}
.ns-banner b { display: block; font: 700 32px/1.1 var(--display); white-space: nowrap; }
.ns-banner small { display: block; font-weight: 700; font-size: 15px; opacity: .95; margin-top: 2px; }
.ns-banner small:empty { display: none; }

.ns-pause {
  position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; gap: 4px; border: 0;
  background: rgba(30, 14, 4, .62); color: #fff; font: inherit; text-align: center; cursor: pointer;
}
.ns-pause[hidden] { display: none; }
.ns-pause b { font: 700 34px/1.1 var(--display); }
.ns-pause span { font-weight: 700; font-size: 17px; padding: 10px 22px; margin-top: 10px; border-radius: 999px; background: var(--chili); box-shadow: 0 5px 0 var(--chili-2); }

/* v2: noodles left (dumplings), separate from the cafe-life ❤ chip */
.chip.ns-lives { letter-spacing: 1px; }
.chip.ns-lives i { font-style: normal; display: inline-block; transition: filter .3s, opacity .3s, transform .3s; }
.chip.ns-lives i.off { filter: grayscale(1); opacity: .3; transform: scale(.8); }
.chip.ns-lives.hit { animation: ns-hit .45s cubic-bezier(.3, 1.6, .5, 1); }
.chip.ns-lives.bump { animation: ns-hit .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ns-hit { 30% { transform: scale(1.2) rotate(-4deg); } 100% { transform: none; } }
.subhud .chip.ns-lives { gap: 1px; }
@media (max-width: 380px) { .subhud .chip { padding-left: 9px; padding-right: 9px; } }
