/* Shared HUD for the hub minigames. Tokens follow the Cassie Games design system. */
#ghud { position: fixed; inset: 0; pointer-events: none; z-index: 4; }

/* Leave a match: right side, under the kart minimap (top-left is the kart place, top-centre the fall chips) */
.g-leave {
  position: fixed; top: calc(140px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 35;
  width: 96px; height: 44px; padding: 0 0 2px; cursor: pointer; /* the pad's button size (controls.js) */
  font: 700 15px/1 var(--font, "Pixelify Sans", system-ui, sans-serif); color: #fff; text-shadow: 2px 2px 0 #000;
  background: var(--red, #fe5f55); border: 2px solid var(--ink, #120c24); border-radius: 10px;
  box-shadow: 0 3px 0 var(--red-d, #a8352e);
}
.g-leave:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-d, #a8352e); }
.g-leave[hidden] { display: none; }

/* kart HUD (games/kart/kart.js) */#ghud .kart { position: absolute; inset: 0; font-family: 'Pixelify Sans', monospace; color: #f4f1ea; text-shadow: 2px 2px 0 #000; pointer-events: none; }
#ghud .kart .k-place { position: absolute; left: 14px; top: calc(env(safe-area-inset-top, 0px) + 10px); font-size: 52px; line-height: 1; }
#ghud .kart .k-place small { font-size: 22px; margin-left: 2px; }
#ghud .kart .k-place span { font-size: 22px; margin-left: 6px; opacity: .75; }
#ghud .kart .k-lap { position: absolute; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 66px); font-size: 22px; }
#ghud .kart .k-map { position: absolute; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 58px); width: 96px; height: 72px; }
#ghud .kart .k-big { position: absolute; left: 0; right: 0; top: 24%; text-align: center; font-size: 110px; line-height: 1; color: #fda200; opacity: 0; }
#ghud .kart .k-big.pop { animation: kpop .9s steps(6) forwards; }
#ghud .kart .k-big.go { color: #3ed598; }
#ghud .kart .k-banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 56px; color: #fda200; display: none; }
#ghud .kart .k-banner small { display: block; font-size: 24px; color: #f4f1ea; margin-top: 8px; }
@keyframes kpop { 0% { transform: scale(1.7); opacity: 0; } 15% { opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }

/* fall HUD (games/fall/fall.js) */#ghud .fall { position: absolute; inset: 0; font-family: var(--font, "Pixelify Sans", system-ui, sans-serif); color: var(--paper, #f4f1ea); text-shadow: 2px 2px 0 #000; }
#ghud .fall .top { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
#ghud .fall .chip { background: var(--ink, #120c24); border: 2px solid var(--paper, #f4f1ea); border-radius: 8px; padding: 3px 10px; font-size: 16px; font-weight: 700; box-shadow: 2px 2px 0 #000; white-space: nowrap; }
#ghud .fall .chip.q { border-color: var(--orange, #fda200); }
#ghud .fall .chip.low { border-color: var(--red, #fe5f55); color: var(--red, #fe5f55); }
#ghud .fall .big { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 84px; font-weight: 700; line-height: 1; -webkit-text-stroke: 3px var(--ink, #120c24); paint-order: stroke fill; text-shadow: 4px 4px 0 #000; }
#ghud .fall .big.go { color: var(--orange, #fda200); }
#ghud .fall .big.small { font-size: 30px; -webkit-text-stroke: 2px var(--ink, #120c24); }
#ghud .fall .big.pop { animation: fallpop 0.35s ease-out; }
#ghud .fall .banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, 0); min-width: 240px; text-align: center; background: var(--ink, #120c24); border: 3px solid var(--orange, #fda200); border-radius: 12px; padding: 12px 22px 14px; box-shadow: 4px 4px 0 #000; animation: fallpop 0.35s ease-out; }
#ghud .fall .banner.bad { border-color: var(--red, #fe5f55); }
#ghud .fall .banner b { display: block; font-size: 38px; line-height: 1.1; }
#ghud .fall .banner span { display: block; font-size: 18px; margin-top: 4px; opacity: 0.9; }
#ghud .fall .toast { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-size: 22px; font-weight: 700; animation: fallpop 0.3s ease-out; }
@keyframes fallpop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
#ghud .fall .banner { animation-name: fallbanner; }
@keyframes fallbanner { 0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; } 70% { transform: translate(-50%, 0) scale(1.06); } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }
