/* Fling Flight's own styles, listed in its entry.js (styles): the web wrapper loads them after brand.css and
   enjo-ui.css (the games' PLAN.md, steps 17 and 39b). */
/* At the slingshot: back to the upgrades, a surface button at the bottom's middle. */
.game-back {
  position: absolute;
  left: 50%;
  bottom: calc(var(--enjo-safe-bottom) + 18px);
  transform: translate(-50%, 140%);
  min-width: 170px;
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms cubic-bezier(.3, 1.3, .5, 1), opacity 200ms;
}
.game-back.is-shown { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.game-back.is-shown:active { transform: translate(-50%, 3px); }
/* The power-ups (src/systems.js) in the bottom bar's middle: in flight only (the upgrades' panel and the slingshot's
   button take the bottom otherwise). */
.enjo-ui-actions:not(.is-flying) { visibility: hidden; }
.game-powers { display: flex; gap: 24px; }
/* A paint's picture (src/skins.js) in a chest's item card. */
.enjo-ui-chest__look img.skin-preview { width: 76px; }
/* The meter's unit past km (src/hud.js makeMeter): once, under the goal's number, in the goal's colour, smaller; the
   two lines no taller than the flag (26 px), so the card keeps its height. */
.game-meter-goal { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.game-meter-unit { font: 600 11px/1 var(--enjo-font); white-space: nowrap; direction: auto; }
/* Its number alone then: room for four digits (9,999) rather than the shared 3.6em kept for a number and its unit. */
.enjo-ui-meter:has(.game-meter-unit) .enjo-ui-meter__value { min-width: 2.8em; }
/* The meter's numbers with their unit (m, km) in the words' direction: "170 م" reads its unit after the number in
   Arabic (the shared meter isolates them left to right; Conveyor Truck's fix, for the shared UI to take). */
.enjo-ui-meter__value, .enjo-ui-meter__goalText { unicode-bidi: plaintext; }
/* The upgrade cards' pips and price at each card's bottom (the row's cards are as tall as the tallest): the income
   card's note (x1.4) put its pips and price pill 18 px under its neighbours' (the review). */
.enjo-ui-upgrade__pips { margin-top: auto; }
/* Phones under 390 px: the cards' row a little tighter and their price pills a little smaller, so a price in short
   words ("22,3 Mio.", "99,9 млрд", "22.3 مليون": src/hud.js bigPrice) stays inside its card (at 320 px they ran up
   to 20 px out of it; the review). */
@media (max-width: 389px) {
  .enjo-ui-upgrades__row { gap: 6px; }
  .enjo-ui-upgrade__price { gap: 3px; padding-inline: 3px 7px; font-size: 14px; }
  .enjo-ui .enjo-ui-upgrade__coin { width: 16px; }
}
/* Small phones (under 360 px): a boss's chest (its coins, a power-up and the paint, the plane's picture 76 px wide)
   wrapped its paint onto a second row at 320 x 568 in every language, the dialog's badge at 6 px in the 20 px status
   inset: its items a little narrower, the paint's picture 64 px. The paint shop's grid cap (@enjo/ui's, the screen's
   height less 340 px) less the status inset twice too (its badge sat at 12 px in the 20 px inset in every language).
   Orchard Jar's, Hide N Seek's and Conveyor Truck's rules (the review). */
@media (max-width: 359px) {
  .enjo-ui-chest { gap: 6px; }
  .enjo-ui-chest__item { min-width: 64px; padding-inline: 6px; }
  .enjo-ui-chest__look img.skin-preview { width: 64px; }
}
.enjo-ui-skins__grid { max-height: min(48vh, 440px, calc(100vh - 340px - 2 * var(--enjo-safe-top))); }
