/* Phone layout polish (loaded after responsive.css). Presentation only. */

/* Header: brand and community links share one row, the account buttons a
   second compact row, and the MTA Hub promo becomes a single-line pill.
   The header used ~315px of a 844px phone screen; now ~200px. */
@media (max-width: 620px) {
  .nav-utility {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand activity" "actions actions";
    align-items: center; gap: 6px 10px; padding-bottom: 8px;
  }
  .nav-utility > .brand { grid-area: brand; }
  .nav-utility > .nav-activity { grid-area: activity; justify-self: end; justify-content: flex-end; min-width: 0; width: auto; margin: 0; padding: 0; border: 0; }
  .nav-utility > .nav-actions { grid-area: actions; justify-self: stretch; justify-content: flex-end; margin: 0; }
  .brand-copy small { display: none; }
  .active-community-links { gap: 6px; }
  .active-community-links a, .active-community-links img { width: 30px; height: 30px; }
  .nav-actions .account-menu { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-actions .account-menu::-webkit-scrollbar { display: none; }
  .nav-actions .account-menu button, .nav-actions .account-menu #openAccountProfile { min-height: 36px; padding-block: 6px; white-space: nowrap; }

  .arena-stage { row-gap: 8px; padding-block: 10px; }
  .hub-promo { min-height: 0; padding: 7px 12px; gap: 10px; }
  .hub-promo-copy { display: none; }
  .hub-promo-label::after { content: " · card game"; font-weight: 600; letter-spacing: .04em; opacity: .75; }
  .hub-promo-arrow { margin-left: auto; }
}

/* Wide grids that must scroll inside their card instead of widening the
   whole page (a wider page makes phones zoom out and everything looks tiny). */
.clan-war-player-table, .clan-war-top-brief .clan-war-player-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.clan-war-player-table > [role="row"] { min-width: max-content; }

/* Last line of defence on phones: anything still too wide is clipped instead
   of widening the page (which made phones zoom out). `clip` keeps the pinned
   section navigation working, unlike `hidden`. */
@media (max-width: 760px) {
  html, body { overflow-x: clip; }
}

/* Statistics table: names were cut to "to…" by the country label and the
   status pill. On phones the flag stands alone and the pill wraps below. */
@media (max-width: 620px) {
  .stats-row { grid-template-columns: 42px minmax(0, 1fr) minmax(96px, auto); }
  .stats-table-wrap { overflow-x: hidden; }
  .stats-table { min-width: 0 !important; }
  .total-stat .community-kill-breakdown { display: none; }
  .total-stat { padding-inline: 8px; }
  .stats-player { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding-inline: 8px; }
  .stats-country-mark small { display: none; }
  .stats-player-name-line { flex-wrap: wrap; gap: 3px 8px; }
  .stats-player-name-line .stats-activity-status { margin-left: 0; }
}
