body { --fa-player-count-height: 40px; }
.faunara-player-count {
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + 20px);
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px), var(--fa-player-bottom, 0px));
  z-index: 53;
  display: flex; align-items: center; gap: 6px;
  color: #fff2cf; font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; pointer-events: none;
}
.faunara-player-count img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 2px #17202b99); }
.faunara-player-count strong { font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 2px #17202b, 1px 0 2px #17202b, -1px 0 2px #17202b; }
/* Give the flow HUD a footer above the fixed counter, including on touch. */
body.faunara-game #faunaraHud.fa-hud-flow {
  bottom: calc(max(20px, env(safe-area-inset-bottom, 0px), var(--fa-touch-reserve, 0px), var(--fa-player-bottom, 0px)) + var(--fa-player-count-height) + 12px);
}
body.story-speaking .faunara-player-count,
body:has([aria-modal="true"]:not(.hidden):not([hidden])) .faunara-player-count,
body:has(#faunaraSettings:not(.hidden):not([hidden]), #faunaraMap:not(.hidden):not([hidden]), #faunaraPedia:not(.hidden):not([hidden])) .faunara-player-count,
body:has(#faunaraIntro:not(.hidden):not([hidden])) .faunara-player-count,
body:has(#faunaraBattleIntro:not([hidden])) .faunara-player-count,
body:has(#faunaraCustomizeModal:not(.hidden):not([hidden])) .faunara-player-count { visibility: hidden; }
@media (max-width: 900px), (max-height: 500px) {
  body { --fa-player-count-height: 30px; }
  .faunara-player-count { left: calc(env(safe-area-inset-left, 0px) + 12px); gap: 4px; }
  .faunara-player-count img { width: 30px; height: 30px; }
  .faunara-player-count strong { font-size: 22px; }
}
