/* Закреплённая верхняя навигация */
@media (min-width: 992px) {
  .wapper > .content > .header {
    position: sticky;
    top: 0;
    z-index: 1100;
  }
}

/* Обычная статистика: исходный блок из готового пакета 07. */
.stats-main-card {
  overflow: hidden;
}

.stats-main-card > .block_head {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  min-height: 60px !important;
  margin: -30px -30px 24px !important;
  padding: 0 30px !important;
  border-bottom: 1px solid rgba(85, 151, 204, .14);
  background:
    radial-gradient(ellipse 38% 115% at 30% 45%, rgba(175, 222, 252, .30), rgba(72, 139, 194, .15) 50%, transparent 100%),
    linear-gradient(90deg, rgba(25, 43, 63, .44), rgba(12, 20, 31, .12)) !important;
  color: #edf6ff !important;
}

.stats-main-card > .block_head > span {
  margin: 0 !important;
  color: inherit !important;
  font: inherit !important;
}

.stats-section-icon {
  color: #59d7e6;
  font-size: 17px;
  text-shadow: 0 0 12px rgba(89, 215, 230, .48);
}

/* Смысловые иконки заголовков главной: исходный блок из пакета 07. */
.home-section-title,
body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block > .block_head:has(> .home-section-icon) {
  gap: 9px !important;
}

.home-section-title > span,
body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block > .block_head:has(> .home-section-icon) > span {
  margin: 0 !important;
  color: inherit !important;
  font: inherit !important;
}

.home-section-icon {
  flex: 0 0 auto;
  font-size: 15px;
}

.home-section-title:has(.home-section-icon--gold) { --home-heading-gradient: linear-gradient(100deg, #ffe79a, #ffbf47, #fff0b3, #ffd35f); }
.home-section-title:has(.home-section-icon--cyan) { --home-heading-gradient: linear-gradient(100deg, #8df4ff, #45bfd7, #baf8ff, #5bd8e8); }
.home-section-title:has(.home-section-icon--blue) { --home-heading-gradient: linear-gradient(100deg, #9ed6ff, #609ff5, #c1e7ff, #72b9ff); }
.home-section-title:has(.home-section-icon--mint) { --home-heading-gradient: linear-gradient(100deg, #a4f5d8, #51c9aa, #c4ffe8, #67d9b8); }
.home-section-title:has(.home-section-icon--violet) { --home-heading-gradient: linear-gradient(100deg, #d2c2ff, #9d7bea, #e0d6ff, #b194f5); }

.home-section-title > .home-section-icon,
.home-section-title > span {
  display: inline-block;
  background: var(--home-heading-gradient, linear-gradient(100deg, #9ed6ff, #59d7e6, #edf6ff, #70b9ff));
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  animation: home-heading-flow 6s ease-in-out infinite alternate;
}

@keyframes home-heading-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@media (max-width: 991.98px) {
  .stats-main-card > .block_head {
    min-height: 54px !important;
    margin: -18px -12px 18px !important;
    padding: 0 16px !important;
  }

  .home-section-icon {
    font-size: 14px;
  }
}

/* Мобильное меню: вместо старой сплошной лиловой заливки — мягкий синий блик. */
@media (max-width: 991.98px) {
  body .wapper .header #hidden-menu .collapsible-menu > li > a.open,
  body .wapper .header #hidden-menu .collapsible-menu > li > a:hover,
  body .wapper .header .collapsible-menu.user-menu > li > a.open {
    background: linear-gradient(90deg,
      rgba(36, 66, 91, .28) 0%,
      rgba(70, 129, 158, .19) 50%,
      rgba(36, 66, 91, .28) 100%) !important;
    border-bottom-color: rgba(117, 166, 196, .38) !important;
    box-shadow: inset 0 -1px rgba(114, 182, 205, .18) !important;
  }

  body .wapper .header #hidden-menu .collapsible-menu > li ul > li:hover,
  body .wapper .header .collapsible-menu.user-menu > li > ul > li:hover {
    background: rgba(53, 91, 116, .27) !important;
  }

  body .wapper .header #hidden-menu .collapsible-menu > li ul > li > a:hover,
  body .wapper .header .collapsible-menu.user-menu > li > ul > li > a:hover {
    background: transparent !important;
  }

  /* PHP помечает первый сервер активным; в мобильном банлисте ждём выбора. */
  body .wapper .content .banlist-server-picker .extra-nav ul li,
  body .wapper .content .banlist-server-picker .extra-nav ul li.active,
  body .wapper .content .banlist-server-picker .extra-nav ul li:hover {
    background: transparent !important;
    border-left-color: transparent !important;
  }

  body .wapper .content .banlist-server-picker .extra-nav ul li.is-selected {
    background: linear-gradient(90deg,
      rgba(48, 95, 123, .31),
      rgba(46, 76, 103, .12)) !important;
    border-left-color: rgba(119, 192, 213, .77) !important;
  }
}


/*
 * Ширина между старой (1170) и экспериментальной (1380).
 * Навигацию и логотип оставляем привычного масштаба.
 */
@media (min-width: 1200px) {
  .wapper .container {
    max-width: 1280px;
  }

  .wapper .header .container {
    max-width: 1170px;
  }

  .wapper .logo {
    max-width: 293px;
    margin-left: auto;
    margin-right: auto;
  }

  /*
   * Не трогаем общий размер .block: внутри него живут графики с точным
   * позиционированием. Увеличиваем только текст мониторинга.
   */
  .wapper .monitoring-table > table > tbody > tr > td,
  .wapper .monitoring-table > table > thead > tr > td {
    font-size: 15px;
    line-height: 1.42;
  }

  /*
   * Новости сохраняют исходные квадратные изображения без обрезки.
   * Вместо двух гигантских карточек показываем три в ряд.
   */
  #new_news div:not(.loader),
  .news div:not(.loader) {
    width: 33.333333%;
  }

  #new_news div:not(.loader):nth-child(3),
  .news div:not(.loader):nth-child(3) {
    border-top: 0;
    padding-top: 0;
  }

  #new_news div:not(.loader):nth-child(n+4),
  .news div:not(.loader):nth-child(n+4) {
    padding-top: 30px;
  }

  /* Этот разделитель нужен исходной двухколоночной сетке, не трём карточкам. */
  .vertical-center-line::after {
    display: none;
  }

  /* Сетка из шести новостей: три колонки и два ряда. */
  #new_news,
  .news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    background-image: none;
  }

  #new_news div:not(.loader),
  .news div:not(.loader) {
    width: auto;
    border-top: 0;
    padding: 0 22px 28px;
  }

  #new_news div:not(.loader):nth-child(3n + 1),
  #new_news div:not(.loader):nth-child(3n + 2),
  .news div:not(.loader):nth-child(3n + 1),
  .news div:not(.loader):nth-child(3n + 2) {
    border-right: 1px solid rgba(121, 151, 185, .26);
  }

  #new_news div:not(.loader):nth-child(n + 4),
  .news div:not(.loader):nth-child(n + 4) {
    border-top: 1px solid rgba(121, 151, 185, .26);
    padding-top: 28px;
  }
}

/* На телефоне шесть новостей удобнее смотреть сеткой 2×3, а не одной колонкой. */
@media (max-width: 991.98px) {
  /* Логотип стоит рядом с кнопкой меню и не попадает под правое меню профиля. */
  .wapper .header > .container {
    position: relative;
  }

  .wapper .logo.mobile-header-logo {
    position: absolute;
    z-index: 3;
    top: 9px;
    left: calc(15px + 40px + 12px);
    width: auto;
    margin: 0;
    transform: none;
    pointer-events: auto;
  }

  .wapper .logo.mobile-header-logo a {
    display: block;
    line-height: 1;
  }

  .wapper .logo.mobile-header-logo a img {
    display: block;
    width: auto;
    max-width: min(128px, calc(50vw - 84px));
    max-height: 52px;
    margin: 0 auto;
  }

  .mobile-logo-source {
    display: none !important;
  }

  /* Обёртки меняют только порядок блоков; их исходную вёрстку не переопределяем. */
  .home-mobile-sidebar-pair {
    display: block;
  }

  /* «Сейчас онлайн» и «Сегодня были» — исходные полноразмерные карточки. */
  .home-mobile-online-pair,
  .home-mobile-events-pair {
    display: block;
  }

  /* Чат остаётся полноценным, но показывает меньше сообщений одновременно. */
  #chat #chat_messages {
    height: 260px;
  }

  #chat #chat_messages .chat_message {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #chat #chat_messages .chat_message > a img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  /* Четыре плашки статистики — ровная сетка 2×2. */
  #site_stats .stats-col {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
  }

  #site_stats .stat-row {
    gap: 8px !important;
    min-width: 0;
    padding: 10px !important;
  }

  #site_stats .stat-row .icon {
    width: 22px !important;
    height: 22px !important;
  }

  #site_stats .stat-row .value {
    font-size: 17px !important;
  }

  #site_stats .stat-row .label {
    font-size: 9px !important;
    letter-spacing: 0 !important;
  }

  #new_news,
  .news {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  #new_news div:not(.loader),
  .news div:not(.loader) {
    width: auto;
    border-top: 0;
    padding: 0 12px 20px;
  }

  #new_news div:not(.loader):nth-child(odd),
  .news div:not(.loader):nth-child(odd) {
    border-right: 1px solid rgba(121, 151, 185, .24);
  }

  /* В исходной теме второй элемент получает отступ как будто это новая строка. */
  #new_news div:not(.loader):nth-child(1),
  #new_news div:not(.loader):nth-child(2),
  .news div:not(.loader):nth-child(1),
  .news div:not(.loader):nth-child(2) {
    padding-top: 0;
  }

  #new_news div:not(.loader):nth-child(n + 3),
  .news div:not(.loader):nth-child(n + 3) {
    border-top: 1px solid rgba(121, 151, 185, .24);
    padding-top: 20px;
  }

  #new_news div:not(.loader) a h3,
  .news div:not(.loader) a h3 {
    margin-top: 12px;
    font-size: 14px;
  }

  #new_news div:not(.loader) p,
  .news div:not(.loader) p {
    font-size: 12px;
    line-height: 1.4;
  }
}
/* Поиск и сортировка — два самостоятельных, очевидных контролла. */
.stats-combined-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 10px;
  height: auto !important;
  min-height: 52px;
  margin: 0 18px 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.stats-search-control,
.stats-sort-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(79, 128, 184, .44);
  border-radius: 9px;
  background: rgba(7, 13, 23, .72);
  box-shadow: inset 0 1px 0 rgba(173, 222, 255, .04);
}

.stats-search-control { flex: 1 1 auto; }
.stats-sort-control { flex: 0 0 268px; }

.stats-search-control .fa-search,
.stats-sort-control > .fa-sort-amount-down,
.stats-sort-control > .fa-chevron-down {
  position: absolute;
  z-index: 1;
  color: #f2f7ff !important;
  font-size: 14px;
  pointer-events: none;
}

.stats-search-control .fa-search { left: 17px; pointer-events: auto; cursor: pointer; }
.stats-sort-control > .fa-sort-amount-down { left: 14px; }
.stats-sort-control > .fa-chevron-down { right: 14px; font-size: 11px; }

.stats-search-control input {
  width: 100% !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 15px 0 45px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #eef6ff !important;
  font-size: 14px !important;
}

.stats-sort-control select {
  width: 100% !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 34px 0 39px !important;
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #f3f7ff !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 700;
}

.stats-sort-control select:focus,
.stats-search-control input:focus {
  outline: 1px solid rgba(85, 213, 230, .66) !important;
  outline-offset: -1px;
}

/* Банлист использует такое же отдельное поле поиска. */
.stats-combined-bar > .fa-search {
  align-self: center;
  flex: 0 0 auto;
  margin: 0 0 0 17px !important;
  color: #f2f7ff !important;
  font-size: 15px !important;
}

.stats-combined-bar > input {
  flex: 1 1 auto;
  height: 50px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 15px !important;
  color: #eef6ff !important;
}

.mobile-ban-server-note { display: none; }

/* Холодный блик ограничен верхней полосой карточки и не затрагивает её тело.
   На широких карточках главной он по центру; на узких и в обычном профиле
   световой центр сдвинут к левому заголовку. */
.wapper .content .block:not(.automix-hitdash):not(.gma-personal-profile):not(.gma-profile):has(> .block_head) {
  --card-glow-x: 30%;
  background-image:
    radial-gradient(ellipse 34% 90% at var(--card-glow-x) 48%, rgba(167, 216, 248, .28), rgba(79, 150, 204, .15) 49%, transparent 100%),
    radial-gradient(ellipse 75% 120% at var(--card-glow-x) 40%, rgba(45, 94, 141, .09), transparent 85%) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 60px, 100% 60px !important;
}

/* Прописные — только в широкой колонке главной, не в боковом меню. */
body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block:not(:has(> .vertical-navigation)) > .block_head {
  text-transform: uppercase !important;
}

body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block:not(:has(> .vertical-navigation)):has(> .block_head) {
  --card-glow-x: 50%;
}

/* Текст широкой шапки центрируется и по горизонтали, и по высоте блика. */
body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block:not(:has(> .vertical-navigation)) > .block_head {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 60px !important;
  margin: -30px -30px 24px !important;
  padding: 0 30px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

body:has(#main-slider) .wapper .content .col-lg-9.order-is-first > .block.block-table:not(:has(> .vertical-navigation)) > .block_head {
  margin: 0 !important;
}

/* Навигация и карточки с левым заголовком остаются визуально собранными. */
.wapper .content .block:has(> .vertical-navigation),
.wapper .content .profile-page .col-lg-4 > .block:has(> .block_head),
.wapper .content .home-mobile-online-pair > .block,
.wapper .content .home-mobile-events-pair > .block,
.wapper .content .home-mobile-sidebar-pair > .block {
  --card-glow-x: 30% !important;
}

.wapper .content .profile-page .block.profile:has(> .block_head) {
  --card-glow-x: 18% !important;
}

/* Обёртка имени нужна для мобильной сетки, но не меняет вид ника на ПК. */
html body .profile-page .col-lg-8 > .block.profile > .block_head > .profile-display-name {
  margin: 0 !important;
  color: inherit !important;
  font: inherit !important;
}

.automix-hitdash,
.gma-personal-profile,
.gma-profile {
  overflow: hidden;
  background: #111722 !important;
}

/* Три заголовка личной статистики: одинаковые размеры и центральный синий
   блик до разделителя. Ник и Steam ID ниже остаются нетронутыми. */
html body .automix-hitdash > .automix-profile-section-head,
html body .gma-personal-profile > .automix-profile-section-head,
html body .gma-profile > .gma-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 17px 22px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(129, 177, 216, .32) !important;
  background: linear-gradient(90deg, #151f2d 0%, #1c354a 24%, #286079 50%, #1c354a 76%, #151f2d 100%) !important;
  color: #f5f7fb !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

html body .automix-profile-section-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  margin-right: 11px !important;
  font-size: 23px !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 7px rgba(83, 197, 230, .38));
}

/* Старый текст был псевдоэлементом: скрываем его после появления настоящего
   заголовка, чтобы заголовок статистики по фрагам не дублировался. */
html body .gma-personal-profile::before {
  content: none !important;
  display: none !important;
}

html body .automix-hitdash { padding: 0 !important; }
html body .automix-hitdash::before { content: none !important; }

html body .automix-hitdash > .automix-hitdash-head {
  padding: 15px 20px !important;
  border-bottom: 1px solid rgba(92, 116, 143, .22) !important;
  background: transparent !important;
}

/* Убираем повтор только там, где ниже действительно есть карточка с ником.
   Если статистика по фрагам отсутствует, имя в хитмапе остаётся. */
html body:has(.gma-personal-profile) .automix-hitdash > .automix-hitdash-head {
  justify-content: center !important;
}

html body:has(.gma-personal-profile) .automix-hitdash > .automix-hitdash-head > .automix-hitdash-mark,
html body:has(.gma-personal-profile) .automix-hitdash > .automix-hitdash-head > div:has(> .automix-hitdash-name) {
  display: none !important;
}

html body:has(.gma-personal-profile) .automix-hitdash > .automix-hitdash-head > .automix-hitdash-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

html body:has(.gma-personal-profile) .automix-hitdash > .automix-hitdash-head {
  padding: 0 !important;
}

html body:has(.gma-personal-profile) .automix-hitdash .automix-hitdash-stats > .automix-hitdash-stat {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 70px !important;
  padding: 10px 7px !important;
  box-sizing: border-box !important;
}

html body:has(.gma-personal-profile) .automix-hitdash .automix-hitdash-stats > .automix-hitdash-stat + .automix-hitdash-stat {
  border-left: 1px solid rgba(129, 177, 216, .28) !important;
}

html body:has(.gma-personal-profile) .automix-hitdash .automix-hitdash-stat > span {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

html body .gma-personal-profile > .gma-personal-head {
  background: transparent !important;
}

html body .gma-personal-profile > .gma-personal-head h2 {
  color: #f5f7fb !important;
}

.gma-profile > .gma-title { margin: 0 !important; }

/* Одна палитра кнопок для хитмапы, переключателя периода и матчевой статы. */
html body .automix-hitdash .automix-hitdash-tabs > button,
html body .gma-personal-profile .gma-personal-period,
html body .gma-profile > .gma-tabs .gma-tab {
  border: 1px solid #4b6d83 !important;
  background: linear-gradient(115deg, #243d51, #192d40 55%, #142231) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08) !important;
  color: #e7f1fb !important;
}

html body .automix-hitdash .automix-hitdash-tabs > button:hover,
html body .automix-hitdash .automix-hitdash-tabs > button.active,
html body .gma-personal-profile .gma-personal-period:hover,
html body .gma-personal-profile .gma-personal-period.active,
html body .gma-profile > .gma-tabs .gma-tab:hover,
html body .gma-profile > .gma-tabs .gma-tab.active {
  border-color: #83c6d7 !important;
  background: linear-gradient(115deg, #397487, #285b72 55%, #1c3e55) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .15), 0 0 14px rgba(60, 153, 188, .14) !important;
  color: #fff !important;
}

html body .automix-hitdash .automix-hitdash-tabs > button,
html body .gma-profile > .gma-tabs .gma-tab {
  padding: 10px 15px !important;
  border-radius: 7px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

/* Подписи и карточки матчей читаются без увеличения масштаба браузера. */
html body .gma-personal-profile .gma-personal-period > span {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

html body .gma-personal-profile .gma-personal-period > small {
  color: #c2d2df !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html body .gma-profile > .gma-match-history-note {
  color: #bfd0df !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

html body .gma-profile > .gma-summary > div > span:last-child {
  color: #c0cfde !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

html body .gma-profile .gma-match-title {
  font-size: 17px !important;
  line-height: 1.35 !important;
}

html body .gma-profile .gma-match-meta {
  color: #b6c9dc !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

/* Победа — светлое золото; замена — нейтральный серо-голубой статус. */
html body .gma-profile .gma-match-result.win {
  color: #ffe5a3 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-shadow: 0 0 12px rgba(240, 192, 96, .29) !important;
}

html body .gma-profile .gma-match-result.replaced {
  color: #aebdca !important;
  text-shadow: none !important;
}

@media (min-width: 651px) {
  html body .gma-profile .gma-match-result.win {
    padding: 7px 10px !important;
    border: 1px solid rgba(238, 193, 105, .35) !important;
    border-radius: 5px !important;
    background: rgba(184, 134, 48, .16) !important;
  }
}

/* Развёрнутая строка таблицы: ник приходит как ссылка из модуля статистики.
   Никакого курсива у неё не должно быть. */
.modal[id^="modal"] .modal-body td,
.modal[id^="modal"] .modal-body td a,
.modal[id^="modal"] .modal-body td i {
  font-style: normal !important;
}

@media (max-width: 650px) {
  html body:has(.gma-personal-profile) .automix-hitdash .automix-hitdash-stat > span {
    font-size: 11px !important;
  }

  html body .automix-hitdash > .automix-profile-section-head,
  html body .gma-personal-profile > .automix-profile-section-head,
  html body .gma-profile > .gma-title {
    padding: 15px 16px !important;
    font-size: 16px !important;
  }

  /* У результата своя правая секция под счётом, без лишней строки снизу. */
  html body .gma-profile details.gma-match > summary.gma-match-head {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(98px, 27vw, 124px) !important;
    grid-template-rows: auto auto !important;
    gap: 0 !important;
    align-items: stretch !important;
    padding: 0 !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > :first-child {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    padding: 12px 8px 29px 12px !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head::after {
    position: absolute !important;
    left: 17px !important;
    bottom: 10px !important;
    float: none !important;
    margin: 0 !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-score {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    align-self: stretch !important;
    padding: 12px 7px 2px !important;
    border-left: 1px solid rgba(120, 153, 185, .24) !important;
    background: rgba(109, 138, 168, .07) !important;
    text-align: center !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    align-self: stretch !important;
    padding: 3px 6px 12px !important;
    border-left: 1px solid rgba(120, 153, 185, .24) !important;
    background: rgba(109, 138, 168, .07) !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result.loss {
    background: rgba(159, 81, 88, .13) !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result.win {
    background: rgba(184, 134, 48, .20) !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result.cancelled {
    background: rgba(129, 103, 151, .14) !important;
  }

  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result.replaced,
  html body .gma-profile details.gma-match > summary.gma-match-head > .gma-match-result.incomplete {
    background: rgba(107, 133, 157, .14) !important;
  }
}

@media (max-width: 991.98px) {
  /* На мобильном заголовки боковых карточек и блик стоят в центре.
     Навигационные ссылки остаются в исходном регистре и порядке. */
  .wapper .content .col-lg-3.order-is-last > .block:has(> .block_head),
  .wapper .content .profile-page .col-lg-4 > .block:has(> .block_head),
  .wapper .content .home-mobile-online-pair > .block:has(> .block_head),
  .wapper .content .home-mobile-events-pair > .block:has(> .block_head),
  .wapper .content .home-mobile-sidebar-pair > .block:has(> .block_head),
  .wapper .content .block:has(> .vertical-navigation):has(> .block_head) {
    --card-glow-x: 50% !important;
  }

  .wapper .content .col-lg-3.order-is-last > .block > .block_head,
  .wapper .content .profile-page .col-lg-4 > .block > .block_head,
  .wapper .content .home-mobile-online-pair > .block > .block_head,
  .wapper .content .home-mobile-events-pair > .block > .block_head,
  .wapper .content .home-mobile-sidebar-pair > .block > .block_head,
  .wapper .content .block:has(> .vertical-navigation) > .block_head {
    text-align: center !important;
  }

  .wapper .content .profile-page .col-lg-8 > .block.profile > .block_head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    text-align: left !important;
  }

  .wapper .content .profile-page .col-lg-8 > .block.profile > .block_head > .profile-display-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    font: inherit !important;
    overflow-wrap: anywhere;
  }

  .wapper .content .profile-page .col-lg-8 > .block.profile > .block_head > small {
    position: static !important;
    display: block !important;
    flex: 0 1 48% !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #bfcddc !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    text-align: right !important;
    overflow-wrap: anywhere;
  }

  /* Две отдельные строки: сначала однозначный поиск, ниже — сортировка. */
  .stats-controls-bar {
    flex-direction: column !important;
    gap: 9px;
    margin: 0 12px 16px !important;
  }

  .stats-controls-bar .stats-search-control,
  .stats-controls-bar .stats-sort-control {
    width: 100%;
    flex: 0 0 52px;
  }

  .stats-combined-bar:not(.stats-controls-bar) {
    min-height: 52px;
    margin: 0 12px 16px !important;
    border: 1px solid rgba(79, 128, 184, .44) !important;
    border-radius: 9px !important;
    background: rgba(7, 13, 23, .72) !important;
  }

  .mobile-ban-server-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 14px !important;
    color: #a8c4de;
    font-size: 13px;
    line-height: 1.35;
    background: rgba(11, 20, 32, .62);
    border-bottom: 1px solid rgba(100, 143, 183, .20);
  }

  .mobile-ban-server-note i {
    color: #6be0ef;
    margin-right: 4px;
  }

  .extra .vertical-navigation.extra-nav {
    clear: both;
    margin: 0 !important;
    padding: 0 !important;
  }

  .extra .vertical-navigation.extra-nav ul {
    margin: 0 !important;
    padding: 0 14px 10px !important;
  }

  /* Убираем автозаливку Safari у поля поиска банов. */
  .stats-combined-bar > input,
  .stats-combined-bar > input:-webkit-autofill {
    -webkit-text-fill-color: #eef6ff !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(7, 13, 23, .72) inset !important;
    background-color: transparent !important;
  }

}
