/* 17.10 | Responsive counter positioning, only for small screens.
   Page 'Матчи': title only in header, original live total immediately below.
   Page 'Матчевая статистика': original total left; admin action right.
   Uses no gradient/background overrides. */
@media (max-width: 650px) {
  /* MATCHES LIST ONLY — title stays a compact single row */
  html body .wapper .content .automix #am-content > .am-native-title.am-matches-heading {
    display:flex!important;
    flex-direction:row!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:9px!important;
    height:55px!important;
    min-height:55px!important;
    padding:10px 14px!important;
    box-sizing:border-box!important;
  }
  html body .wapper .content .automix #am-content > .am-native-title.am-matches-heading > .am-heading-icon {
    display:inline-block!important;
    position:static!important;
    flex:0 0 auto!important;
    width:auto!important;
    margin:0!important;
    font-size:18px!important;
    line-height:1!important;
  }
  html body .wapper .content .automix #am-content > .am-native-title.am-matches-heading > .am-heading-label {
    display:inline-block!important;
    flex:0 1 auto!important;
    min-width:0!important;
    margin:0!important;
    font-size:19px!important;
    line-height:1.25!important;
    white-space:nowrap!important;
  }
  html body .wapper .content .automix #am-content > .am-body > .am-matches-mobile-counter-v3 {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0 0 14px!important;
    padding:0!important;
    box-sizing:border-box!important;
  }
  html body .wapper .content .automix #am-content .am-matches-mobile-counter-v3 > .am-heading-total {
    display:block!important;
    position:static!important;
    left:auto!important;
    margin:0!important;
    padding:0!important;
    max-width:100%!important;
    min-width:0!important;
    justify-self:auto!important;
    align-self:auto!important;
    color:#d8e2ec!important;
    text-align:left!important;
    font-size:16px!important; /* existing mobile size, not reduced */
    font-weight:600!important;
    line-height:1.4!important;
    white-space:normal!important;
  }
  html body .wapper .content .automix #am-content .am-matches-mobile-counter-v3 > .am-heading-total strong {
    font-size:inherit!important;
  }
  html body .wapper .content .automix #am-content .am-matches-mobile-counter-v3 > .am-heading-total b {
    font-size:17px!important;
  }

  /* MATCH STATISTICS ONLY — reverse the current meta-row alignment,
     retaining the ORIGINAL live total and owner-only action listeners. */
  html body .wapper .content .automix-stat-content #am-content .am-month-mobile-meta-v2 {
    justify-content:space-between!important;
    align-items:center!important;
  }
  html body .wapper .content .automix-stat-content #am-content .am-month-mobile-meta-v2 > .am-heading-total {
    order:0!important;
    flex:0 1 auto!important;
    margin:0!important;
    left:auto!important;
    text-align:left!important;
    font-size:16px!important; /* restore original mobile count size */
    font-weight:600!important;
    line-height:1.4!important;
    white-space:normal!important;
  }
  html body .wapper .content .automix-stat-content #am-content .am-month-mobile-meta-v2 > .am-heading-total strong {
    font-size:inherit!important;
  }
  html body .wapper .content .automix-stat-content #am-content .am-month-mobile-meta-v2 > .am-heading-total b {
    font-size:17px!important;
  }
  html body .wapper .content .automix-stat-content #am-content .am-month-mobile-meta-v2 > .am-heading-action {
    order:1!important;
    margin:0 0 0 auto!important;
    max-width:100%!important;
  }
}

/* 17.10 | On mobile, hide the OWNER-ONLY "Настроить итоги"
   in Match Statistics. Desktop controls and live counter unchanged.
   Also cover the header before the mobile relocation script runs. */
@media (max-width: 650px) {
  html body .wapper .content .automix-stat-content #am-content
    .am-month-mobile-meta-v2 > .am-heading-action,
  html body .wapper .content .automix-stat-content #am-content
    .am-native-title.am-match-stats-heading-v2 > .am-heading-action {
    display: none !important;
  }
}
