/* WIND GAME phone adaptation (mob1-20261016). Layout/input only: no game logic, odds or stakes.
   Loaded last in <head> on site pages and Arena game pages. Safe on desktop: every rule is
   inside a phone/touch media query except touch-action, which only removes the double-tap delay. */

/* TZ3 §8: a double tap must not zoom the page or fire a button twice with the 300ms delay. */
button, [role="button"], .wg-shell-bar a, .rd-bottom-bar a { touch-action: manipulation; }

/* ---------- Phones (portrait and small tablets) ---------- */
@media (max-width: 600px) {
  /* Chat/support button: smaller so it covers less of the game cards. */
  html body .wg-help-fab .wg-help-trigger { width: 46px; height: 46px; border-radius: 16px; }
  html body .wg-help-fab .wg-help-trigger svg { width: 23px; height: 23px; }

  /* HiLo: the 56px gutter reserved for the chat button squeezed the three choices
     until «Недоступно / Unavailable» was cut. Give them the full row back. */
  .hilo-w-page .hilo-choices { padding-right: 0 !important; gap: 6px; }
  .hilo-w-page .hilo-choices button { padding: 8px 6px; overflow-wrap: anywhere; }

  /* Secondary actions under 40px. */
  #verify, button#verify { min-height: 40px; }
  #pz-sw-practice, #pz-sw-w { min-height: 40px; }
  .th-pill { min-height: 40px; }
  #refresh, #cancel { min-height: 40px; }
  .wg-game-scroll-controls button { min-width: 40px; min-height: 40px; }
  #game-search { min-height: 40px; }

  /* Home favourites star: 28px visual, 40px touch area. */
  .mp-favorite::after { content: ""; position: absolute; inset: -6px; }

  /* Game header links (Duel W / Coin Flip / rooms): wrap instead of cutting «Профиль». */
  body.wg-shell-ready .wg-shell-header > nav { flex-wrap: wrap; row-gap: 2px; min-width: 0; max-width: 100%; }
}

@media (max-width: 360px) {
  .hilo-w-page .hilo-choices strong { font-size: 12px; }
  .hilo-w-page .hilo-choices span, .hilo-w-page .hilo-choices small { font-size: 10.5px; }
}

/* ---------- Short landscape phones (e.g. 740x360) ---------- */
/* The 66px quick bar + header left only ~half of the screen for the game. */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --rd-dock-h: calc(46px + env(safe-area-inset-bottom)) !important;
    --wg-bar-h: calc(46px + env(safe-area-inset-bottom)) !important;
  }
  html body .rd-bottom-bar, html body .wg-shell-bar { padding-top: 3px; padding-bottom: env(safe-area-inset-bottom); }
  html body .rd-bottom-bar a, html body .wg-shell-bar a { flex-direction: row; gap: 7px; min-height: 40px; font-size: 12px; }
  html body .rd-bottom-bar a .rd-bb-icon, html body .wg-shell-bar a .wg-shell-bar-icon { width: 24px; height: 24px; flex: none; }
  html body .wg-help-fab .wg-help-trigger { width: 44px; height: 44px; border-radius: 15px; }
  html body .wg-help-fab .wg-help-trigger svg { width: 22px; height: 22px; }
}
