/* owcpedia — справочник по osu! World Cup в манере вики, тёмная чёрная тема: разделы — заголовок с линией,
   таблицы с сеткой, синие ссылки. Шрифт как у Liquipedia (системный, на Windows Segoe UI). Без скруглений,
   свечений, капслока с разрядкой и подсказок. Цифры табличные. */

:root {
  color-scheme: dark;

  --bg: #000000;
  --bg-2: #0c0c0c;
  --panel: #000000;
  --panel-2: #121212;
  --panel-3: #1c1c1c;
  --line: #262626;
  --line-2: #3a3a3a;

  --text: #e6e6e6;
  --text-2: #c4c4c4;
  --muted: #9a9a9a;
  --dim: #858585;

  --accent: #6b9eff;
  --accent-2: #8fb4ff;
  --accent-bg: #0f1e3a;
  --link: #6b9eff;
  --link-hover: #8fb4ff;

  --win: #4cc38a;
  --win-bg: #0d2a1d;
  --mid: #d9a441;
  --mid-bg: #2e2209;
  --loss: #f0606c;
  --loss-bg: #331116;
  --live: #f0606c;

  --gold: #d4a017;
  --silver: #9aa0a6;
  --bronze: #b5651d;
  --gold-bg: #33290a;
  --silver-bg: #23262a;
  --bronze-bg: #331f10;

  --radius: 2px;
  --radius-sm: 2px;
  --wrap: 1440px;
  --gutter: 24px;
  --top: 48px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

p a,
.note a,
.lead a,
.footer a,
.fanline a {
  color: var(--accent-2);
}

p a:hover,
.note a:hover,
.footer a:hover,
.fanline a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #1a0a12;
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

/* Текст для поисковиков в <main>, пока грузится скрипт (boot.js) */
.hide-static [data-static] {
  display: none;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--win);
}

.down {
  color: var(--loss);
}

[hidden] {
  display: none !important;
}

/* ---------- Шапка ---------- */

.sitebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--top);
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
  color: var(--text);
  font: 600 19px/1 var(--font);
  white-space: nowrap;
}

.brand__name b {
  color: var(--accent);
  font-weight: 600;
}

.nav {
  display: flex;
  align-self: stretch;
  min-width: 0;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-2);
}

.nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.finder {
  position: relative;
  margin-left: auto;
  width: 260px;
}

.finder input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a92a1' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px 50%;
  color: var(--text);
  font: 500 14px var(--font);
}

.finder input::placeholder {
  color: var(--dim);
}

.finder input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Лупа, открывающая поиск, и «Cancel» — только на телефоне (mobile.css): там поле спрятано */
.finder-open,
.finder__close {
  display: none;
}

.finder__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.finder__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.finder__item[aria-selected='true'],
.finder__item:hover {
  background: var(--panel-3);
}

.finder__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.finder__hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.finder__empty {
  padding: 8px;
  color: var(--muted);
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.contact:hover {
  background: var(--panel);
  color: var(--text);
}

.contact__icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url('/img/discord.svg') center / contain no-repeat;
  mask: url('/img/discord.svg') center / contain no-repeat;
}

.account {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account__me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.avatar {
  border-radius: 50%;
}

.account__out {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.fanline {
  max-width: var(--wrap);
  width: calc(100% - 2 * var(--gutter));
  margin: 10px auto 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.45;
}

/* ---------- Каркас ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 16px var(--gutter) 48px;
}

main:focus {
  outline: none;
}

.page-title {
  margin: 8px 0 6px;
  font-size: 26px;
}

.lead {
  max-width: 72ch;
  color: var(--text-2);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 20px max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  color: var(--dim);
  font-size: 12px;
}

.footer p {
  margin: 4px 0;
}

.footer__contact {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-2);
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.15s, transform 0.15s;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.loading {
  color: var(--muted);
  padding: 12px 0;
}

.notice {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--loss-bg);
  color: var(--text-2);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font: 600 13px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--dim);
  background: var(--panel-3);
  color: var(--text);
}

.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
}

.btn--quiet {
  background: transparent;
}

.link-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-2);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.more {
  margin-top: 8px;
}

/* ---------- Мелочи: флаги, сборные, метки ---------- */

.flag {
  width: 21px;
  height: 14px;
  flex: none;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  vertical-align: middle;
}

/* Сборная: флаг + название */
.tl,
.country-link,
.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.tl .flag + .flag,
.country-link .flag + .flag {
  margin-left: -4px;
}

.tl__name,
.country-link > span:last-child,
.who > a,
.who > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seed,
.seed-tag {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
}

.tag--live {
  background: var(--live);
  color: #fff;
}

/* «Live»: мигающая точка и подпись */
.live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--live);
  font-size: 11px;
  font-weight: 600;
}

.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: live-dot 1.4s ease-in-out infinite;
}

@keyframes live-dot {
  50% { opacity: 0.35; }
}

/* Слот карты: NM1, HD2… цветом мода */
.mod {
  display: inline-block;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text-2);
  font: 600 11px/1.4 var(--font);
  vertical-align: 1px;
}

.mod--nm { color: #d6dae3; }
.mod--hd { color: #f4cf6c; }
.mod--hr { color: #ff8b8b; }
.mod--dt,
.mod--nc { color: #c4a6ff; }
.mod--fm { color: #92d660; }
.mod--ez,
.mod--ht { color: #7cc6ff; }
.mod--tb { color: #ff9dcc; }

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-chip__img {
  width: 36px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
}

.cost {
  font-weight: 600;
}

.cost--high {
  color: var(--win);
}

.cost--low {
  color: var(--muted);
  font-weight: 600;
}

.result {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.result--p1 { background: rgb(232 189 79 / 0.16); color: var(--gold); }
.result--p2 { background: rgb(185 194 207 / 0.14); color: var(--silver); }
.result--p3 { background: rgb(207 141 93 / 0.15); color: var(--bronze); }

/* ---------- Карточки ---------- */

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.card--pad {
  padding: 14px 16px;
}

.card__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.card__title {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.card__hint {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

.card__more {
  margin-left: auto;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.card__more:hover {
  text-decoration: underline;
}

.card__sub {
  padding: 8px 14px 6px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.card__empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}

.card__foot {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.stack {
  display: grid;
  gap: 16px;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  margin: 4px 0 -4px;
  font-size: 13px;
  color: var(--text-2);
}

.scroll-x {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

/* ---------- Главная: шапка турнира ---------- */

.hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.ev {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--panel);
}

.ev__logo {
  width: 60px;
  height: auto;
  align-self: center;
}

.ev__crumbs {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ev__crumbs a {
  color: var(--accent-2);
}

.ev__title {
  font-size: 26px;
}

.ev__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  margin: 10px 0 0;
}

.ev__fact dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.ev__fact dd {
  margin: 1px 0 0;
  color: var(--text);
  font-weight: 600;
}

.ev__clock {
  color: var(--accent-2);
}

.ev__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-self: start;
}

/* Лента этапов */
.tline-slot:empty {
  display: none;
}

.tline {
  display: grid;
  grid-auto-columns: minmax(118px, 1fr);
  grid-auto-flow: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--bg-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.tline__step {
  position: relative;
  display: grid;
  min-width: 112px;
  padding: 8px 12px 8px;
  border-right: 1px solid var(--line);
}

.tline__step:last-child {
  border-right: 0;
}

.tline__step::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line-2);
}

.tline__what {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tline__when {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tline__step.is-past .tline__what {
  color: var(--muted);
}

.tline__step.is-past::after {
  background: var(--dim);
}

.tline__step.is-now {
  background: var(--accent-bg);
}

.tline__step.is-now .tline__what {
  color: var(--text);
}

.tline__step.is-now .tline__when {
  color: var(--accent-2);
}

.tline__step.is-now::after {
  background: var(--accent);
}

/* Вкладки страницы */
.tabs {
  position: sticky;
  top: var(--top);
  z-index: 20;
  display: flex;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--panel);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__tab {
  padding: 12px 18px 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.tabs__tab:hover {
  color: var(--text);
  background: var(--panel-2);
}

.tabs__tab[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Обзор: три колонки ---------- */

.ov {
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(0, 1fr) minmax(270px, 300px);
  gap: 16px;
  align-items: start;
}

.ov__col {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* ---------- Матч (как в списках vlr.gg) ---------- */

.mfeed {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.mfeed > .mi:last-child {
  border-bottom: 0;
}

.mi:hover {
  background: var(--panel-2);
}

.mi.is-live {
}

.mi__teams {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mi__team {
  display: grid;
  grid-template-columns: minmax(0, auto) auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 24px;
}

.mi__team .seed {
  justify-self: start;
}

.mi__team .tl {
  font-size: 14px;
}

.mi__team.is-loss .tl {
  color: var(--muted);
  font-weight: 600;
}

.mi__team.is-loss .flag {
  opacity: 0.6;
}

.mi__score {
  grid-column: 4;
  min-width: 18px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
}

.mi__team.is-win .mi__score {
  color: var(--text);
}

.mi__team.is-loss .mi__score {
  color: var(--dim);
}

.mi__score.is-live,
.bm__score.is-live {
  color: var(--live);
}

.live-score--lead {
  color: var(--win);
}

.live-score--behind {
  color: var(--loss);
}

.mi__meta {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 0;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  min-width: 92px;
  line-height: 1.35;
  text-align: right;
}

.mi__status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.mi__status.is-soon {
  color: var(--accent-2);
  text-transform: none;
  font-size: 13px;
}

.mi__time,
.mi__where {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.mi__links {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}

.mi__links a {
  color: var(--muted);
}

.mi__links a:hover {
  color: var(--accent-2);
}

/* Все матчи: дни сеткой карточек */
.day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.day__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 13px;
}

.day__title small {
  color: var(--dim);
  font-weight: 600;
  font-size: 12px;
}

.mfeed--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.mfeed--grid > .mi {
  border-right: 1px solid var(--line);
}

/* ---------- Таблицы групп ---------- */

.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
}

.st {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 13px;
}

.st caption {
  padding: 8px 12px 6px;
  text-align: left;
  background: var(--panel);
}

.st__name {
  font-weight: 600;
}

.st__tier {
  margin-left: 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.st th {
  padding: 4px 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.st th.num {
  text-align: right;
}

.st td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.st tbody tr:last-child td {
  border-bottom: 0;
}

.st td.num {
  font-weight: 600;
}

.st__pos {
  width: 30px;
  text-align: center !important;
  color: var(--muted);
  font-weight: 600;
}

.st tr.is-up .st__pos {
  color: var(--win);
}

.st tr.is-mid .st__pos {
  color: var(--mid);
}

.st tr.is-out .st__pos {
  color: var(--loss);
}

.st tr.is-out .tl {
  color: var(--muted);
}

.st__team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 190px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.groups + .legend,
.legend:first-child {
  border: 0;
  padding: 0 0 12px;
}

.legend__key::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
  background: var(--win);
}

.legend__key.is-mid::before {
  background: var(--mid);
}

.legend__key.is-out::before {
  background: var(--loss);
}

.groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.group {
  overflow: hidden;
}

.group .st caption {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.group__played {
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Сетка ---------- */

.bracket {
  --gap: 28px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: var(--gap);
  padding: 14px;
  min-width: min-content;
}

.bracket--compact {
  --gap: 22px;
  grid-auto-columns: minmax(150px, 1fr);
}

.bracket__round {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.bracket__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
}

.bracket__title small {
  color: var(--dim);
  font-size: 11px;
}

/* Каждый матч стоит в своей ячейке, ячейки раунда делят высоту поровну: центр пары ячеек совпадает
   с центром ячейки следующего раунда, и линии сходятся точно в матч */
.bracket__matches {
  display: flex;
  flex-direction: column;
}

.bracket__pair,
.bracket__slot {
  position: relative;
  flex: 1;
}

.bracket__pair {
  display: flex;
  flex-direction: column;
}

.bracket__slot {
  display: flex;
  align-items: center;
  padding: 16px 0;
}

.bm {
  position: relative;
  width: 100%;
}

/* Линии сетки — рамки, а не заливка: на дробном масштабе страницы (90%, 110%) полоска фона в 1px
   округляется до нуля и пропадает, рамка остаётся не тоньше пикселя экрана */
/* Отвод вправо от матча, который передаёт победителя дальше */
.bracket__round:not(:last-child) .bracket__slot::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(var(--gap) / -2);
  width: calc(var(--gap) / 2);
  border-top: 1px solid var(--line-2);
}

/* Вертикаль пары: от центра верхнего матча до центра нижнего */
.bracket__pair::after {
  content: '';
  position: absolute;
  top: 25%;
  bottom: 25%;
  right: calc(var(--gap) / -2);
  border-left: 1px solid var(--line-2);
}

/* Подвод слева к матчу, куда пришли победители пары */
.bracket__round:not(:first-child) .bracket__slot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--gap) / -2);
  width: calc(var(--gap) / 2);
  border-top: 1px solid var(--line-2);
}

.bm__box {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.bm.is-live .bm__box {
  border-color: var(--live);
}

.bm__row {
  display: grid;
  grid-template-columns: minmax(0, auto) auto 1fr 26px;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 0 0 8px;
  font-size: 13px;
}

.bm__row + .bm__row {
  border-top: 1px solid var(--line);
}

.bm__row .seed {
  justify-self: start;
}

.bm__row.is-win {
  background: var(--win-bg);
}

.bm__row.is-loss .tl {
  color: var(--muted);
  font-weight: 600;
}

.bm__row.is-loss .flag {
  opacity: 0.6;
}

.bm__tbd {
  overflow: hidden;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm__score {
  grid-column: 4;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  font-weight: 600;
}

.bm__row.is-win .bm__score {
  color: var(--win);
}

.bm__row.is-loss .bm__score {
  color: var(--dim);
}

.bm__meta {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-left: 2px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.bm__meta a {
  color: var(--muted);
  font-weight: 600;
}

.bm__meta a:hover {
  color: var(--accent-2);
}

/* ---------- Лидеры ---------- */

.leaders {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.leaders li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
}

.leaders li:hover {
  background: var(--panel-2);
}

.lead__n {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.leaders li.is-first .lead__n {
  color: var(--gold);
}

.lead__who {
  display: grid;
  min-width: 0;
}

.lead__who small {
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead__v {
  font-size: 14px;
  font-weight: 600;
}

.leaders li.is-first .lead__v {
  color: var(--accent-2);
}

/* ---------- Таблицы статистики (views/sheets.js, qualifier.js) ---------- */

.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.table th.num,
.table td.num {
  text-align: right;
}

.table tbody tr:hover {
  background: var(--panel-2);
}

.table tbody th {
  font-weight: 600;
}

.sheet-sub {
  display: block;
  font-size: 11px;
}

.sheet-best {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.q-rank--1 { color: var(--gold); font-weight: 600; }
.q-rank--2 { color: var(--silver); font-weight: 600; }
.q-rank--3 { color: var(--bronze); font-weight: 600; }

.q-map {
  margin: 10px 0;
  color: var(--text-2);
  font-weight: 600;
}

.played-title,
.block__title {
  margin: 16px 0 8px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.block {
  margin: 0 0 16px;
}

/* Переключатели: этап — подчёркнутые вкладки, раздел — чипы, вид — тихие чипы */
.sheet-tabs {
  display: grid;
  gap: 12px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.seg__btn {
  margin-bottom: -1px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.seg__btn:hover {
  color: var(--text);
}

.seg__btn[aria-pressed='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.wk-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wk-part {
  padding: 4px 12px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.wk-part:hover {
  border-color: var(--dim);
  color: var(--text);
}

.wk-part[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--text);
}

.wk-parts--sub .wk-part {
  padding: 4px 10px;
  font-size: 12px;
}

.hide-sm,
.hide-md {
  /* видимы на широком экране */
}

/* ---------- Узкие экраны ---------- */

@media (max-width: 1280px) {
  .ov {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  }

  .ov > .ov__col:last-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 1100px) {
  .finder {
    width: 200px;
  }

  .contact__name {
    display: none;
  }
}

@media (max-width: 960px) {
  /* На телефоне боком поля не меньше выреза экрана: страница рисуется до краёв (viewport-fit=cover в index.html) */
  :root {
    --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .sitebar {
    flex-wrap: wrap;
    height: auto;
    padding-top: 8px;
    padding-bottom: 0;
    row-gap: 4px;
  }

  .nav {
    order: 3;
    width: 100%;
    height: 40px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs {
    top: 0;
    position: relative;
  }

  .ov {
    grid-template-columns: minmax(0, 1fr);
  }

  .ev {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ev__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hide-md {
    display: none;
  }
}

@media (max-width: 600px) {
  .brand {
    margin-right: 4px;
  }

  .finder {
    width: auto;
    flex: 1;
    min-width: 0;
    margin-left: 4px;
  }

  .contact {
    display: none;
  }

  .account .btn {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  /* Матч: сборные во всю ширину, время и ссылки строкой под ними */
  .mi {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .mi__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 2px 10px;
    padding: 0;
    border: 0;
    min-width: 0;
  }

  .mi__links {
    margin-left: auto;
  }

  .ev {
    padding: 14px;
    gap: 12px;
  }

  .ev__logo {
    width: 44px;
  }

  .ev__title {
    font-size: 20px;
  }

  .ev__facts {
    gap: 6px 20px;
  }

  .groups,
.mfeed--grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hide-sm {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live i {
    animation: none;
  }
}

/* Итоги матчей сборной в таблице этапа: флаг соперника и счёт */
.sheet-results {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.sheet-result {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 600;
}

.sheet-hint,
.sheet-notes {
  color: var(--muted);
  font-size: 13px;
}

/* Переключатели статистики не раздвигают страницу: на узком экране чипы переносятся */
.sheet-tabs,
.hub-stats,
.hub-stats__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

/* =====================================================================
   Страницы сайта: общий каркас — шапка страницы, панели-разделы, поля
   ===================================================================== */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.page > .page-title {
  margin: 4px 0 -8px;
}

.page > .lead {
  margin: 0;
}

.lead--tight {
  margin: 2px 0 0;
}

/* Раздел страницы — панель с заголовком-полосой, как карточки главной */
.block {
  min-width: 0;
  margin: 0;
  padding: 0 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.block > .block__title,
.block > header > .block__title {
  margin: 0 -16px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
}

.block__count {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 2px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
}

.block--flush {
  padding-bottom: 0;
}

/* Панели внутри карточек главной не рисуют вторую рамку */
.card .block {
  padding: 0;
  border: 0;
  background: none;
}

.card .block > .block__title {
  margin: 16px 0 8px;
  padding: 0;
  border: 0;
}

.played-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.played-title small {
  text-transform: none;
}

.played-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text-2);
  font-weight: 600;
}

/* Ключевые факты строкой: подпись над значением */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.facts__item dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.facts__item dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  font-weight: 600;
}

.facts__item dd a {
  color: var(--accent-2);
}

/* Поле с подписью: select и поиск */
.field {
  display: inline-grid;
  gap: 4px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.field select,
.field input,
select,
input[type='search'],
input[type='text'] {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background-color: var(--bg-2);
  color: var(--text);
  font: 600 13px var(--font);
  text-transform: none;
}

select {
  padding-right: 28px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a92a1' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

select:focus,
input:focus {
  border-color: var(--accent);
  outline: none;
}

option {
  background: var(--panel-2);
  color: var(--text);
}

.inline-list {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inline-list li {
  display: inline;
}

.inline-list li + li::before {
  content: ' · ';
  color: var(--dim);
}

.only-sm {
  display: none;
}

/* Медали: число на кружке цвета металла */
.medals {
  display: inline-flex;
  gap: 4px;
}

.medal {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--panel-3);
  color: #15171c;
  font-size: 12px;
  font-weight: 600;
}

.medal--p1 { background: var(--gold); }
.medal--p2 { background: var(--silver); }
.medal--p3 { background: var(--bronze); }

/* Капитан: маленькая буква C */
.captain {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--mid);
  color: #1a1408;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.captain::before {
  content: 'C';
}

/* Тир o!TR: цветная метка */
.tier-tag {
  --t: var(--muted);
  display: inline-block;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--t) 16%, transparent);
  color: var(--t);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.tier-tag[data-tier='bronze'] { --t: #d08a4f; }
.tier-tag[data-tier='silver'] { --t: #b8bec9; }
.tier-tag[data-tier='gold'] { --t: #e3b94f; }
.tier-tag[data-tier='platinum'] { --t: #4fb0d6; }
.tier-tag[data-tier='emerald'] { --t: #3fd17f; }
.tier-tag[data-tier='diamond'] { --t: #c27cf0; }
.tier-tag[data-tier='master'] { --t: #a98bff; }
.tier-tag[data-tier='grandmaster'] { --t: #ff6b66; }
.tier-tag[data-tier='elitegrandmaster'] { --t: #6aa5ff; }

.otr-credit {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
}

/* Ранг / o!TR / pp в карточке игрока */
.statmini {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  gap: 0 12px;
  margin: 0;
  font-size: 12px;
  text-align: right;
}

.statmini dt {
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
}

.statmini dd {
  margin: 0;
  font-weight: 600;
}

.avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}

.avatar--empty {
  display: inline-block;
}

.who__text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}

.who__old {
  font-weight: 500;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tag--support {
  background: var(--accent-bg);
  color: var(--accent-2);
}

.block .table thead th {
  position: static;
}

.table tfoot th,
.table tfoot td {
  padding: 8px 10px;
  border-top: 1px solid var(--line-2);
  border-bottom: 0;
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
}

.table tr.is-idle {
  color: var(--dim);
}

.table--roster td.num b {
  color: var(--text);
}

/* ---------- Сборные: список стран ---------- */

.page > .seg {
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.page > .table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

/* ---------- Сборная ---------- */

.team-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.team-head__flag {
  width: 72px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

.team-head .page-title {
  margin: 0;
}

.team-head:has(+ .facts) {
  border-radius: var(--radius) var(--radius) 0 0;
}

.team-head + .facts {
  margin-top: -17px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-2);
}

.compare__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.compare__summary {
  margin: 0 0 12px;
  color: var(--text-2);
}

.compare__summary:empty {
  display: none;
}

.compare__tables {
  display: grid;
  gap: 12px;
}

.roster-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.roster-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.roster-card__head h3 {
  font-size: 15px;
}

/* Составы двух турниров: слева прошлый, справа новый, между ними — связь замены */
.lineup {
  display: grid;
  gap: 6px;
}

.lineup__rows {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineup__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.lineup__row--head {
  padding-bottom: 4px;
}

.lineup__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lineup__head h3 {
  font-size: 15px;
}

.lineup__arrow::before {
  content: '→';
  display: block;
  color: var(--dim);
  font-size: 18px;
  text-align: center;
}

.lineup__card,
.lineup__empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.lineup__card.is-out {
  background: var(--loss-bg);
}

.lineup__card.is-in {
  background: var(--win-bg);
}

.lineup__card.is-banned {
  opacity: 0.7;
}

.lineup__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
  font-weight: 600;
}

.lineup__who > a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup__empty {
  grid-template-columns: 1fr;
  border-style: dashed;
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.lineup__shame {
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--loss-bg);
  color: var(--loss);
  font-size: 11px;
  font-weight: 600;
}

/* Связь «был → стал»: линия и подпись разницы */
.lineup__link {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 20px;
}

.lineup__link::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--line-2);
}

.lineup__link--up::before { background: var(--win); }
.lineup__link--down::before { background: var(--loss); }

.lineup__label {
  position: relative;
  padding: 1px 8px;
  border-radius: 2px;
  background: var(--panel);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.lineup__link--up .lineup__label { color: var(--win); }
.lineup__link--down .lineup__label { color: var(--loss); }

.lineup__frame,
.lineup__short {
  display: none;
}

.lineup__row--foot {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.lineup__avg {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 13px;
}

.lineup__avg b {
  color: var(--text);
}

.lineup__note {
  margin: 8px 0 0;
}

/* Матрица «игрок × турнир» */
.matrix-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.matrix th,
.matrix td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
}

.matrix thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  vertical-align: bottom;
}

.matrix__player {
  text-align: left;
  white-space: nowrap;
}

.matrix__player a {
  font-weight: 600;
}

.matrix__rank {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.matrix__ed button {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-2);
  font: 600 11px var(--font);
  cursor: pointer;
}

.matrix__ed button:hover {
  background: var(--panel-2);
  color: var(--text);
}

.matrix__res {
  color: var(--dim);
  font-size: 10px;
}

.matrix__res--p1 { color: var(--gold); }
.matrix__res--p2 { color: var(--silver); }
.matrix__res--p3 { color: var(--bronze); }

.matrix__cell {
  text-align: center;
}

.matrix tbody tr:hover {
  background: var(--panel-2);
}

.matrix .is-a {
  background: var(--accent-bg);
}

.matrix .is-b {
  background: rgb(255 255 255 / 0.04);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-2);
}

.dot--captain {
  background: var(--mid);
  box-shadow: 0 0 0 2px rgb(224 180 82 / 0.25);
}

/* Сыгранные матчи сборной или турнира (views/matches.js) */
.mlist {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.mlist__row {
  display: grid;
  grid-template-columns: 110px 24px minmax(0, 1fr) 70px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.mlist li:last-child .mlist__row {
  border-bottom: 0;
}

a.mlist__row:hover {
  background: var(--panel-2);
  color: var(--text);
}

.mlist__date {
  display: grid;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mlist__date small {
  color: var(--dim);
  font-size: 11px;
}

.mlist__outcome {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.mlist__outcome--win { background: var(--win-bg); color: var(--win); }
.mlist__outcome--loss { background: var(--loss-bg); color: var(--loss); }

.mlist__side {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
}

.mlist__side--b {
  justify-content: flex-start;
}

.mlist__side.is-winner {
  color: var(--text);
}

.mlist__score {
  color: var(--dim);
  font-size: 15px;
  text-align: center;
}

.mlist__score b {
  color: var(--muted);
}

.mlist__score b.is-winner {
  color: var(--text);
}

.mlist__more {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

a.mlist__row:hover .mlist__more {
  color: var(--accent-2);
}

.rating-change {
  font-size: 11px;
}

.mlist__team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.mlist__team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Игрок: профиль osu!, история OWC, рейтинг o!TR ---------- */

.profile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.profile__cover {
  height: 150px;
  background: var(--panel-3) center / cover no-repeat;
}

.profile__cover::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.1), #000);
}

.profile__head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 16px;
  margin-top: -64px;
  padding: 0 20px 16px;
}

.profile__avatar {
  display: block;
  width: 112px;
  height: 112px;
  border: 3px solid var(--panel);
  border-radius: 2px;
  background: var(--panel-3);
  object-fit: cover;
}

.profile__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile__name {
  font-size: 28px;
}

.profile__owc {
  max-width: 80ch;
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.profile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 6px 0 0;
}

.profile__id .muted.small {
  margin: 4px 0 0;
}

.profile__osu {
  align-self: end;
}

.profile__problem {
  padding: 0 20px 16px;
}

.profile__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  border-top: 1px solid var(--line);
}

.profile__main {
  display: grid;
  gap: 14px;
  padding: 16px 20px;
  min-width: 0;
}

.profile__ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 0;
}

.profile__ranks dt,
.profile__facts dt,
.profile__detail dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.profile__ranks dd {
  display: grid;
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 600;
}

.profile__ranks .is-global dd {
  color: var(--accent-2);
  font-size: 30px;
  line-height: 1.15;
}

.profile__ranks dd small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.profile__row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px 30px;
}

.profile__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin: 0;
}

.profile__facts dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.grades {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grade {
  display: grid;
  justify-items: center;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 600;
}

.grade b {
  font-size: 13px;
  font-weight: 600;
}

.grade--xh b,
.grade--sh b { color: #d9dee8; }
.grade--x b,
.grade--s b { color: var(--gold); }
.grade--a b { color: var(--win); }

.profile__detail {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
  padding: 10px 20px;
  border-left: 1px solid var(--line);
  background: var(--bg-2);
}

.profile__detail > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.profile__detail > div:last-child {
  border-bottom: 0;
}

.profile__detail dt {
  align-self: center;
}

.profile__detail dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.profile__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.profile__pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
}

.profile__pill small {
  color: var(--dim);
  font-size: 11px;
}

.profile__since {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}

.profile__since b {
  color: var(--text-2);
}

.profile__level {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.profile__bar {
  width: 160px;
  height: 6px;
  border-radius: 3px;
  background: var(--panel-3);
  overflow: hidden;
}

.profile__bar-fill {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--accent);
}

.profile__hex {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  color: var(--accent-2);
  font-weight: 600;
}

/* График ранга и истории: линия цвета акцента, подсказка при наведении */
.rankchart {
  margin: 0;
}

.rankchart__svg {
  display: block;
  width: 100%;
  height: 72px;
}

.rankchart polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.rankchart figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.rankchart figcaption b {
  color: var(--text);
}

.chart {
  position: relative;
}

.chart__guide,
.chart__dot,
.chart__tip {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chart.is-hover .chart__guide,
.chart.is-hover .chart__dot,
.chart.is-hover .chart__tip {
  opacity: 1;
}

.chart__guide {
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}

.chart__dot {
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}

.chart__tip {
  display: grid;
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
}

.chart__tip span {
  color: var(--muted);
}

.history {
  display: grid;
  gap: 6px;
}

.history + .history {
  margin-top: 16px;
}

.history__title {
  color: var(--muted);
  font-size: 12px;
}

.history__svg {
  display: block;
  width: 100%;
  height: auto;
}

.history__grid {
  stroke: var(--line);
  stroke-width: 1;
}

.history__label {
  fill: var(--dim);
  font: 600 11px var(--font);
}

.history__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

/* OWC и o!TR рядом */
.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.player-grid > .block > .muted:first-of-type {
  margin-top: 0;
}

.timeline {
  display: grid;
  margin: 0 -16px;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: 90px minmax(0, auto) auto 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
}

.timeline__item:hover {
  background: var(--panel-2);
}

.timeline__ed {
  color: var(--accent-2);
  font-weight: 600;
}

.timeline__res {
  grid-column: 5;
}

.timeline__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  grid-column: 2 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.timeline__stats a {
  color: var(--accent-2);
}

.otr-card {
  display: grid;
  gap: 12px;
}

.otr-card__main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.otr-card__value {
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.otr-card__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 4px 24px;
  margin: 0;
}

.otr-card__facts dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.otr-card__facts dd {
  margin: 0;
  font-weight: 600;
}

/* Остальные разделы профиля — сеткой в две колонки */
.player-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.player-extra:empty {
  display: none;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges img {
  display: block;
  border-radius: 3px;
}

.plays,
ol.scores,
.events {
  display: grid;
  margin: 0 -16px;
  padding: 0;
  list-style: none;
}

.play,
.score,
.event {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
}

.plays > :first-child,
ol.scores > :first-child,
.events > :first-child {
  border-top: 0;
}

.play {
  grid-template-columns: 44px minmax(0, 1fr) auto auto 70px;
}

.play--most {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.play__cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  object-fit: cover;
}

.play__map {
  display: grid;
  min-width: 0;
}

.play__map > a,
.score__map > a {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play__map > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play__mods {
  display: inline-flex;
  gap: 4px;
}

.play__acc {
  color: var(--muted);
  font-size: 13px;
}

.play__pp {
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 600;
}

.play__count {
  color: var(--text-2);
  font-weight: 600;
}

.score {
  grid-template-columns: 40px minmax(0, 1fr) auto auto 64px;
}

.score.is-failed {
  opacity: 0.55;
}

.score__map {
  display: grid;
  min-width: 0;
}

.score__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.score__stars {
  color: var(--gold);
  font-weight: 600;
}

.score__acc {
  color: var(--text-2);
  font-size: 13px;
}

.score__combo {
  display: grid;
  justify-items: end;
  font-size: 13px;
}

.score__hits {
  color: var(--dim);
  font-size: 11px;
}

.hit--300 { color: #8fc6ff; }
.hit--100 { color: var(--win); }
.hit--50 { color: var(--mid); }
.hit--miss { color: var(--loss); }

.score__pp {
  color: var(--accent-2);
  font-weight: 600;
}

.grade-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.grade-mark--xh,
.grade-mark--sh { color: #e3e7ee; }
.grade-mark--x,
.grade-mark--s { color: var(--gold); }
.grade-mark--a { color: var(--win); }
.grade-mark--b { color: #6aa5ff; }
.grade-mark--c { color: #c27cf0; }
.grade-mark--d,
.grade-mark--f { color: var(--loss); }

.event {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.event__mark {
  justify-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.event__text {
  margin: 0;
  font-size: 13px;
}

.event__text a {
  color: var(--accent-2);
}

.event__time {
  font-size: 12px;
  white-space: nowrap;
}

.scores.is-collapsed > li:nth-child(n + 6) {
  display: none;
}

@media (max-width: 1100px) {
  .player-grid,
.player-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile__detail {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ---------- Турниры: список ---------- */

.ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.ed-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}

.ed-card__title {
  font-size: 16px;
}

.ed-card__title a:hover {
  color: var(--accent-2);
}

.ed-card__meta {
  margin: 0;
  padding: 0 14px 10px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

.ed-card > .ed-card__head {
  grid-column: 1;
}

.podium {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.podium__place {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-areas: 'num team' 'num players';
  gap: 2px 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.podium__place:last-child {
  border-bottom: 0;
}

.podium__plinth {
  grid-area: num;
  align-self: start;
}

.podium__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 2px;
  background: var(--panel-3);
  color: #15171c;
  font-size: 12px;
  font-weight: 600;
}

.podium__place--1 .podium__num { background: var(--gold); }
.podium__place--2 .podium__num { background: var(--silver); }
.podium__place--3 .podium__num { background: var(--bronze); }

.podium__team {
  grid-area: team;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.podium__team--empty {
  color: var(--dim);
}

.podium__unknown {
  display: none;
}

.podium__players {
  grid-area: players;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.podium__players li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.podium__players a {
  color: var(--muted);
}

.podium__players a:hover {
  color: var(--accent-2);
}

.podium__players .captain {
  width: 13px;
  height: 13px;
  font-size: 8.5px;
}

.podium__place--1 .podium__players {
  color: var(--text-2);
}

.podium__place--1 .podium__players a {
  color: var(--text-2);
}

/* ---------- Страница турнира ---------- */

/* Вкладки-кнопки (страница турнира) выглядят как вкладки главной */
.tabs__tab {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  background: none;
  cursor: pointer;
}

.tabs__tab[aria-pressed='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tabs__tab[hidden] {
  display: none;
}

.hub.page {
  gap: 0;
}

.hub.page > .ev {
  border-radius: var(--radius) var(--radius) 0 0;
}

.ev__fact .country-link {
  font-weight: 600;
}

.page-panel {
  min-width: 0;
}

.page-panel > .table-wrap,
.page-panel > .weeks,
.page-panel > .block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.page-panel > .weeks {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.page-panel > .weeks > .muted:first-child {
  margin: 0;
}

.page-panel > .muted.small {
  margin: 10px 2px 0;
}

.table--edition td .inline-list {
  color: var(--text-2);
  font-size: 13px;
}

.table--edition .inline-list a {
  color: var(--text-2);
}

.table--edition .inline-list a:hover {
  color: var(--accent-2);
}

.table--edition .captain {
  width: 13px;
  height: 13px;
  margin-left: 4px;
  font-size: 8.5px;
}

.week-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.wk-part__n {
  margin-left: 6px;
  color: var(--dim);
  font-size: 11px;
}

/* Маппул: моды группами, карта строкой с обложкой */
.mpool {
  display: grid;
  gap: 16px;
}

.mpool__group {
  display: grid;
  gap: 6px;
}

.mpool__mod {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
}

.mpool__maps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mpool-map {
  display: grid;
  grid-template-columns: 44px 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.mpool-map.is-idle {
  opacity: 0.65;
}

.mpool-map__slot {
  justify-self: center;
}

.mpool-map__cover {
  width: 56px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--panel-3);
}

.mpool-map__cover.is-missing {
  visibility: hidden;
}

.mpool-map__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mpool-map__title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.mpool-map__title:hover {
  color: var(--accent-2);
}

.mpool-map__text > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpool-map__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: var(--muted);
  font-size: 12px;
}

.mpool-map__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  color: var(--muted);
  font-size: 12px;
}

.mpool-stat b {
  color: var(--text-2);
}

.mpool-stat--best b {
  color: var(--accent-2);
}

.mpool-map__heat {
  display: inline-block;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}

.mpool-map__note {
  color: var(--dim);
  font-size: 11px;
}

/* Квалификация: место по картам, участники забега, сборные */
.q-col {
  min-width: 34px;
}

.q-runners {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.q-runner {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
}

.q-grade {
  font-weight: 600;
}

.q-grade--ss,
.q-grade--ssh { color: var(--silver); }
.q-grade--s,
.q-grade--sh { color: var(--gold); }
.q-grade--a { color: var(--win); }

.q-teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 12px;
}

.q-team {
  min-width: 0;
  padding: 0 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.q-team > .played-title {
  margin: 10px 0 6px;
  text-transform: none;
  font-size: 13px;
}

.lb-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.sheet-extra {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 0 16px;
}

.sheet-map {
  display: grid;
  gap: 4px;
}

.sheet-team {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.sheet-vs {
  color: var(--dim);
}

.slot {
  white-space: nowrap;
}

/* Таблицы статистики внутри панелей недели: шапка не прилипает */
.week-body .table thead th,
.hub-stats .table thead th {
  position: static;
}

.table--sheet-matrix td.num {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .mpool__maps,
.q-teams,
.sheet-extra {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Матч: табло, сводка, игроки, карты по порядку ---------- */

.page > .pager {
  margin: 0;
}

.pager a {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 13px;
}

.match-head__meta {
  margin: 0 0 -17px;
  padding: 12px 20px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.match-head__meta a {
  color: var(--accent-2);
}

.match-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 18px 24px 22px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--panel);
  font-size: 22px;
}

.match-head__team {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
}

.match-head__team--b {
  flex-direction: row-reverse;
}

.match-head__team.is-winner {
  color: var(--text);
}

.match-head__team > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-head__flags {
  display: inline-flex;
  gap: 4px;
}

.match-head__flags .flag {
  width: 42px;
  height: 28px;
}

.match-head__score {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 40px;
  font-weight: 600;
  color: var(--dim);
}

.match-head__score .is-winner {
  color: var(--text);
}

.match-head__colon {
  color: var(--dim);
  font-size: 28px;
}

.match-head__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 0;
}

.match-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* Карты по порядку: слот и кто взял карту */
.map-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.map-flow__cell {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 46px;
  padding: 4px 4px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.map-flow__cell:hover {
  background: var(--panel-3);
}

.map-flow__img {
  display: none;
}

.map-flow__won {
  display: inline-flex;
}

.map-flow__won .flag {
  width: 18px;
  height: 12px;
}

/* Сравнение сторон: значение — подпись — значение */
.mp-compare {
  display: grid;
  gap: 2px;
  max-width: 640px;
  margin: 0 auto;
}

.mp-compare__row {
  display: grid;
  grid-template-columns: 1fr 160px 1fr;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.mp-compare__row:last-child {
  border-bottom: 0;
}

.mp-compare__row > :first-child {
  justify-content: flex-end;
  text-align: right;
}

.mp-compare__row--head {
  font-weight: 600;
}

.mp-compare__row--head .mp-compare__v {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.mp-compare__label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.mp-compare__v {
  color: var(--muted);
  font-weight: 600;
}

.mp-compare__v.is-best {
  color: var(--text);
}

.match-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.match-sides__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 8px;
  caption-side: top;
  font-weight: 600;
  text-align: left;
}

.match-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.match-player__ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Карта: заголовок, полоса перевеса, счёт двух сторон */
.map-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
  scroll-margin-top: calc(var(--top) + 12px);
}

.map-card__head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.map-card__no {
  color: var(--dim);
  font-weight: 600;
}

.map-card__mods {
  display: inline-flex;
  gap: 4px;
}

.map-card__title {
  display: grid;
  min-width: 0;
}

.map-card__title > a,
.map-card__title > span {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-card__running {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
}

.map-margin {
  display: grid;
  gap: 4px;
  padding: 8px 12px 0;
}

.map-margin__bar {
  display: flex;
  height: 6px;
  gap: 2px;
  border-radius: 3px;
  overflow: hidden;
}

.map-margin__bar i {
  flex-basis: 0;
  background: var(--panel-3);
}

.map-margin__bar i.is-winner {
  background: var(--win);
}

.map-margin small {
  color: var(--muted);
  font-size: 12px;
}

.map-card__sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 12px 12px;
}

.map-side {
  min-width: 0;
}

.map-side__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

.map-side.is-winner .map-side__total {
  color: var(--text);
}

.map-side.is-winner .map-side__total b {
  color: var(--win);
}

.map-side__team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

table.scores {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.scores th,
table.scores td {
  padding: 4px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

table.scores thead th {
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
}

table.scores .num {
  text-align: right;
}

table.scores tbody tr:last-child > * {
  border-bottom: 0;
}

.hit.is-zero {
  color: var(--dim);
}

.scores__mods {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.scores__mvp {
  margin-left: 6px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: rgb(232 189 79 / 0.16);
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .match-sides,
.map-card__sides {
    grid-template-columns: minmax(0, 1fr);
  }

  .match-head {
    gap: 10px;
    padding: 14px;
    font-size: 15px;
  }

  .match-head__score {
    font-size: 28px;
  }

  .match-head__flags .flag {
    width: 27px;
    height: 18px;
  }

  .scores__extra {
    display: none;
  }
}

/* Обложка карты — приглушённый фон заголовка карточки */
.map-card__head {
  position: relative;
  overflow: hidden;
  min-height: 56px;
}

.map-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  pointer-events: none;
}

.map-card__head > :not(.map-card__cover) {
  position: relative;
}

/* ---------- Пик'ем: вкладки стадий, вход, сохранение ---------- */

.pk-tabs {
  display: flex;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  scrollbar-width: none;
}

.pk-tab {
  display: grid;
  gap: 1px;
  padding: 8px 18px 8px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.pk-tab small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.pk-tab:hover {
  background: var(--panel-2);
  color: var(--text);
}

.pk-tab[aria-current='page'] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.pk-account:empty,
.pk-status:empty {
  display: none;
}

.pk-login {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.pk-login p {
  margin: 0;
}

.pk-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.pk-rules {
  margin: 0;
}

.pk-total {
  margin: 0;
  color: var(--text-2);
  font-weight: 600;
}

.pk-empty {
  padding: 0 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.pk-empty .block__title {
  margin: 0 -16px 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.pk-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.pk-savebar:has(.pk-status:empty):has(.btn[hidden]) {
  display: none;
}

.pk-status {
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 13px;
}

.pk-savebar .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

/* Чипы сборных (квалификация) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text);
  font: 600 13px var(--font);
}

button.chip {
  cursor: pointer;
}

button.chip:hover:not(:disabled) {
  border-color: var(--accent);
}

button.chip:disabled {
  opacity: 0.45;
  cursor: default;
}

.chip small {
  color: var(--win);
  font-weight: 600;
}

.chip.is-hit {
  border-color: var(--win);
  background: var(--win-bg);
}

.chip.is-near {
  border-color: var(--loss);
  background: var(--loss-bg);
}

.chip.is-miss {
  opacity: 0.5;
}

/* Квалификация: пул и корзины */
.qf {
  display: grid;
  gap: 12px;
}

.qf-pool,
.qf-dest {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.qf-pool__head,
.qf-dest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.qf-dest__head {
  cursor: pointer;
}

.qf-dest__head small,
.qf-pool__head small {
  color: var(--dim);
  font-size: 12px;
}

.qf-dest.is-active {
  border-color: var(--accent);
}

.qf-dest.is-active .qf-dest__head {
  background: var(--accent-bg);
}

.qf-pool__teams,
.qf-dest__teams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
}

.qf-dests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 12px;
}

.qf-crowd__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.qf-crowd__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qf-crowd__swatch,
.qf-crowd__bar i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.qf-crowd__bar {
  display: flex;
  height: 10px;
  min-width: 200px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--panel-3);
}

.qf-crowd__bar i {
  width: auto;
  height: 100%;
  border-radius: 0;
}

.qf-crowd__swatch--legends { background: var(--accent); }
.qf-crowd__swatch--challengers { background: #6aa5ff; }
.qf-crowd__swatch--contenders { background: var(--mid); }
.qf-crowd__swatch--out { background: var(--dim); }

.qf-crowd__team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Группы: порядок мест со стрелками */
.pk-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.pk-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.pk-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.pk-group__head h3 {
  font-size: 14px;
}

.pk-group__head small,
.pk-group__head span {
  color: var(--dim);
  font-size: 12px;
}

.pk-order {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pk-order__row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 10px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.pk-order__row:last-child {
  border-bottom: 0;
}

.pk-order__row.is-hit {
  background: var(--win-bg);
}

.pk-order__row.is-miss {
}

.pk-order__pos {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.pk-order__team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.pk-order__team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-order__moves {
  display: flex;
  gap: 4px;
}

.pk-move {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text-2);
  cursor: pointer;
}

.pk-move:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}

.pk-move:disabled {
  opacity: 0.3;
  cursor: default;
}

.pk-group__note {
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

/* ---------- Сетка прогноза (bracketView): колонки раундов, линии рисует скрипт ---------- */

.bk-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.bk-full {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text-2);
  font: 600 12px var(--font);
  cursor: pointer;
}

.bk-full:hover {
  color: var(--text);
}

.bk-full__icon,
.bk-edge,
.bk__ascent,
.bk__hall,
.bk__dungeon,
.bk__duel,
.bk-match__wear {
  display: none;
}

.bk-frame.is-full {
  position: fixed;
  inset: 0;
  z-index: 200;
  border-radius: 0;
  overflow: auto;
}

.has-bk-full {
  overflow: hidden;
}

.bk-scroll {
  overflow-x: auto;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.bk-scroll.is-panning {
  cursor: grabbing;
  user-select: none;
}

.bk {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 196px);
  column-gap: 30px;
  row-gap: 8px;
  width: max-content;
  padding: 16px 18px 20px;
}

.bk__lines {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.bk__lines path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.5;
}

.bk__lines path.is-on {
  stroke: var(--accent);
  stroke-opacity: 0.7;
}

.bk__side {
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
}

.bk__title {
  display: grid;
  gap: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.bk__title small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
}

.bk__col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
  padding-top: 6px;
}

.bk__final {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.bk__final .bk__title {
  margin-bottom: 4px;
}

.bk-match {
  position: relative;
  display: grid;
  margin-top: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.bk-match.is-hit {
  border-color: var(--win);
}

.bk-match.is-miss {
  border-color: rgb(239 90 111 / 0.6);
}

.bk-match__no {
  position: absolute;
  top: -17px;
  left: 1px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.bk-match__pts {
  position: absolute;
  top: -17px;
  right: 1px;
  color: var(--win);
  font-size: 11px;
  font-weight: 600;
}

.bk-match.is-miss .bk-match__pts {
  color: var(--loss);
}

.bk-match__vs {
  position: absolute;
  top: -17px;
  right: 36px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.bk-match__vs:hover {
  color: var(--accent-2);
}

.bk-team {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--text);
  font: 600 13px var(--font);
  text-align: left;
}

.bk-team + .bk-team {
  border-top: 1px solid var(--line);
}

button.bk-team {
  cursor: pointer;
}

button.bk-team:hover {
  background: var(--panel-3);
}

.bk-team--tbd {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.bk-team.is-picked {
  background: var(--win-bg);
}

.bk-team.is-out {
  color: var(--muted);
  font-weight: 600;
}

.bk-team.is-out .flag {
  opacity: 0.55;
}

.bk-team__name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.bk-team__name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-team__seed {
  color: var(--dim);
  font-size: 11px;
}

.bk-team__chance {
  color: var(--muted);
  font-size: 11px;
}

.bk-team__chance.is-fav {
  color: var(--win);
}

.bk-team__score {
  min-width: 18px;
  margin-left: auto;
  font-weight: 600;
  text-align: right;
}

.bk-team__score.is-loser {
  color: var(--dim);
}

.bk-team__bold {
  color: var(--mid);
  font-size: 11px;
}

.bk-team__real {
  color: var(--win);
}

.bk-match--skip .bk-team {
  height: auto;
  min-height: 30px;
  padding: 6px 8px;
  white-space: normal;
}

.bk__champion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgb(232 189 79 / 0.12);
  color: var(--gold);
  font-weight: 600;
}

.bk__champion .flag {
  margin-left: 2px;
}

.bk__champion.is-miss {
  background: var(--loss-bg);
  color: var(--loss);
}

.bk__champion-note {
  margin: 4px 0 0;
}

/* ---------- Окно матча в прогнозе ---------- */

.pk-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.pk-dialog::backdrop {
  background: rgb(5 6 9 / 0.7);
}

.pk-dialog__body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.pk-dialog__title {
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.pk-dialog__teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pk-dialog__team {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font: 600 13px var(--font);
  cursor: pointer;
}

.pk-dialog__team[aria-pressed='true'] {
  border-color: var(--win);
  background: var(--win-bg);
}

.pk-dialog__team.is-tbd {
  color: var(--dim);
  cursor: default;
}

.pk-dialog__share {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.pk-dialog__label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pk-dialog__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pk-dialog__score {
  min-width: 46px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font: 600 13px var(--font);
  cursor: pointer;
}

.pk-dialog__score[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.pk-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- Таблица лидеров ---------- */

.lb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.lb-toolbar .search input {
  width: 260px;
}

.lb-summary {
  margin: 0;
}

.lb-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.table--lb .who {
  font-weight: 600;
}

.table--lb tr.is-me {
  background: var(--accent-bg);
}

.lb-top--1 .medal,
.lb-top--2 .medal,
.lb-top--3 .medal {
  min-width: 24px;
}

.lb-nopick {
  margin-left: 8px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.lb-stat {
  color: var(--muted);
}

.lb-owc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.lb-owc__label {
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
}

.lb-owc__year,
.lb-owc__more {
  padding: 0 4px;
  border-radius: 3px;
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
}

.lb-owc__year--p1 { background: rgb(232 189 79 / 0.2); color: var(--gold); }
.lb-owc__year--p2 { background: rgb(185 194 207 / 0.18); color: var(--silver); }
.lb-owc__year--p3 { background: rgb(207 141 93 / 0.2); color: var(--bronze); }

.lb-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.lb-pages__btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-2);
  font: 600 13px var(--font);
  cursor: pointer;
}

.lb-pages__btn.is-current {
  display: inline-grid;
  place-items: center;
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--text);
}

.lb-pages__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.lb-pages__gap {
  align-self: center;
  color: var(--dim);
}

/* ---------- Профиль участника пик'ема ---------- */

.pk-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.pk-user:empty {
  display: none;
}

.pk-user__avatar {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 2px;
  background: var(--panel-3);
  object-fit: cover;
}

.pk-user__name {
  font-size: 24px;
}

.pk-user__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 6px 0 0;
  color: var(--muted);
}

.pk-user__link {
  color: var(--accent-2);
  font-weight: 600;
}

.pk-user__stat {
  display: grid;
  justify-items: end;
  margin: 0;
}

.pk-user__stat b {
  color: var(--accent-2);
  font-size: 34px;
  line-height: 1;
}

.pk-user__stat span {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .qf-dests {
    grid-template-columns: minmax(0, 1fr);
  }

  .pk-user {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pk-user__stat {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

/* Сетка прогноза шире страницы: она листается внутри рамки, а не раздвигает страницу */
.pk-body,
.page-panel,
.stack {
  grid-template-columns: minmax(0, 1fr);
}

.bk-frame {
  min-width: 0;
  overflow: hidden;
}

/* ---------- VS: две стороны и всё сравнение строками ---------- */

.cmp-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.cmp-results > .block:has(.cmp-chart),
.cmp-results > .block:has(.cmp-rosters),
.cmp-results > .block:has(.cmp-table),
.cmp-results > .block:has(.cmp-group-matches),
.cmp-results > .block:has(.cmp-ideas) {
  grid-column: 1 / -1;
}

/* Выбор сторон: две карточки и счёт между ними */
.cmp-ring {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cmp-slot {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 18px 20px;
}

.cmp-slot--b {
  justify-items: end;
  text-align: right;
}

.cmp-mark {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 120px;
  padding: 12px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.cmp-mark__word {
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
}

.cmp-mark__tally {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 30px;
  font-weight: 600;
}

.cmp-mark__tally:empty {
  display: none;
}

.cmp-mark__tally .is-ahead {
  color: var(--accent-2);
}

.cmp-mark__colon {
  color: var(--dim);
  font-size: 20px;
}

.cmp-mark__swap {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--muted);
  font: 600 12px var(--font);
  cursor: pointer;
}

.cmp-mark__swap::before {
  content: '⇄ swap';
}

.cmp-mark__swap:hover {
  color: var(--text);
}

.cmp-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.cmp-slot--b .cmp-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  direction: rtl;
}

.cmp-slot--b .cmp-card > * {
  direction: ltr;
}

.cmp-card__flag .flag {
  width: 60px;
  height: 40px;
  border-radius: 4px;
}

.cmp-card__avatar {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 2px;
  background: var(--panel-3);
  object-fit: cover;
}

.cmp-card__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cmp-card__name {
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-card__meta,
.cmp-card__best {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cmp-slot--b .cmp-card__meta,
.cmp-slot--b .cmp-card__best {
  justify-content: flex-end;
}

.cmp-card__best-label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.cmp-card__years a {
  color: var(--accent-2);
}

.cmp-card__clear {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
}

.cmp-card__clear::before {
  content: '×';
  font-size: 16px;
  line-height: 1;
}

.cmp-card__clear:hover {
  color: var(--text);
}

/* Поле выбора стороны */
.cmp-pick {
  position: relative;
  width: min(360px, 100%);
}

.cmp-pick input {
  width: 100%;
  height: 42px;
  font-size: 14px;
}

.cmp-pick__list {
  text-align: left;
}

/* Подсказки пар */
.cmp-ideas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-ideas__title {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.cmp-idea {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.cmp-idea:hover {
  border-color: var(--accent);
}

.cmp-idea small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.cmp-idea__pair {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.cmp-idea__pair i {
  color: var(--dim);
  font-size: 11px;
  font-style: normal;
}

.cmp-idea__pair > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Сравнение строками: значение A — подпись — значение B */
.cmp-panel {
  min-width: 0;
}

.cmp-duel {
  display: grid;
  margin: -14px -16px -16px;
}

.cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.cmp-row:last-child {
  border-bottom: 0;
}

.cmp-row__label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.cmp-row__val {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: var(--muted);
  font-weight: 600;
}

.cmp-row__val--a {
  justify-content: flex-end;
  text-align: right;
}

.cmp-row__val.is-better {
  color: var(--text);
}

.cmp-row.is-a .cmp-row__val--a,
.cmp-row.is-b .cmp-row__val--b {
  position: relative;
}

.cmp-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.cmp-form__marks {
  display: inline-flex;
  gap: 4px;
}

.cmp-form__mark {
  width: 8px;
  height: 14px;
  border-radius: 2px;
}

.cmp-form__mark--w { background: var(--win); }
.cmp-form__mark--l { background: var(--loss); }

/* Личные встречи */
.cmp-h2h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.cmp-h2h b {
  font-size: 26px;
}

.cmp-h2h .is-ahead {
  color: var(--text);
}

.cmp-h2h .is-ahead b {
  color: var(--accent-2);
}

.cmp-h2h__sep {
  color: var(--dim);
}

.cmp-h2h small {
  flex-basis: 100%;
  text-align: center;
}

.cmp-meet {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.cmp-meet__ed {
  color: var(--text-2);
  font-size: 13px;
}

.cmp-meet__ed a {
  color: var(--accent-2);
}

.cmp-group-matches,
.cmp-columns,
.cmp-rosters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cmp-group-best {
  color: var(--win);
  font-weight: 600;
}

.cmp-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 -16px 14px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}

.cmp-block-head .block__title {
  margin: 0;
  padding: 0;
  border: 0;
}

.cmp-block-head .field {
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
}

.cmp-note {
  margin: 12px 0 0;
}

/* Составы двух сборных */
.cmp-roster {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.cmp-roster__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.cmp-roster > .muted {
  padding: 0 12px;
}

.cmp-roster__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-player {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.cmp-player__avatar {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-3);
  object-fit: cover;
}

.cmp-player__id {
  display: grid;
  min-width: 0;
}

.cmp-player__name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
}

.cmp-player__name > a,
.cmp-player__name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-player__sub {
  color: var(--dim);
  font-size: 12px;
}

.cmp-player__otr {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.cmp-player__ed {
  display: grid;
  justify-items: end;
  min-width: 80px;
  font-size: 13px;
}

.cmp-player__ed small {
  color: var(--dim);
  font-size: 11px;
}

.cmp-roster__avg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-2);
}

.cmp-roster__avg-item dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.cmp-roster__avg-item dd {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.cmp-roster__avg-item.is-better dd {
  color: var(--win);
}

.cmp-table td.cmp-better {
  background: var(--win-bg);
}

.cmp-table td .country-link {
  margin-right: 8px;
}

.cmp-columns__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.cmp-vets {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.cmp-vets li::marker {
  color: var(--dim);
}

.cmp-vets a {
  margin-right: 8px;
  font-weight: 600;
}

/* График «путь по турнирам»: две линии, точки и деления — скрипт ставит их в процентах */
.cmp-chart {
  margin: 0;
}

.cmp-chart__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-bottom: 10px;
  font-weight: 600;
}

.cmp-chart__key::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: middle;
}

.cmp-chart__key--a::before { background: var(--accent); }
.cmp-chart__key--b::before { background: #6aa5ff; }

.cmp-chart__plot {
  position: relative;
  padding-left: 52px;
}

.cmp-chart__plot > :first-child {
  position: relative;
  height: 240px;
}

.cmp-chart__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cmp-chart__grid {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cmp-chart__line {
  fill: none;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.cmp-chart__line--a { stroke: var(--accent); }
.cmp-chart__line--b { stroke: #6aa5ff; }

.cmp-chart__dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border: 2px solid var(--panel);
  border-radius: 50%;
}

.cmp-chart__dot--a { background: var(--accent); }
.cmp-chart__dot--b { background: #6aa5ff; }

.cmp-chart__tick {
  position: absolute;
  left: -52px;
  width: 46px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  transform: translateY(-50%);
}

.cmp-chart__axis {
  position: relative;
  height: 22px;
  margin-top: 6px;
}

.cmp-chart__axis span {
  position: absolute;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  transform: translateX(-50%);
}

/* «На бумаге»: вероятность победы полосой */
.cmp-paper {
  display: grid;
  gap: 12px;
}

.cmp-paper__sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cmp-paper__side {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}

.cmp-paper__side:last-child {
  justify-items: end;
  text-align: right;
}

.cmp-paper__pct {
  color: var(--text-2);
  font-size: 30px;
  line-height: 1;
}

.cmp-paper__side.is-ahead .cmp-paper__pct {
  color: var(--accent-2);
}

.cmp-paper__bar {
  display: flex;
  height: 8px;
  gap: 2px;
  border-radius: 4px;
  overflow: hidden;
}

.cmp-paper__fill--a {
  width: var(--share, 50%);
  background: var(--accent);
}

.cmp-paper__fill--b {
  flex: 1;
  background: #6aa5ff;
}

.cmp-paper__steps {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.cmp-paper__steps li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  font-size: 13px;
}

.cmp-paper__steps li.is-pending {
  color: var(--dim);
}

.cmp-paper__how {
  color: var(--muted);
  font-size: 13px;
}

.cmp-paper__how summary {
  color: var(--accent-2);
  font-weight: 600;
  cursor: pointer;
}

.cmp-paper__how-title {
  margin: 12px 0 4px;
  color: var(--text-2);
  font-size: 12px;
}

.cmp-paper__formula,
.cmp-paper__formula-inline {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--text-2);
}

.cmp-paper__how-list {
  padding-left: 18px;
}

/* Карты двух игроков */
.cmp-maps summary {
  color: var(--accent-2);
  font-weight: 600;
  cursor: pointer;
}

.cmp-maps__list {
  display: grid;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.cmp-maps__row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.cmp-maps__score {
  display: grid;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.cmp-maps__score--b {
  text-align: left;
}

.cmp-maps__score.is-better {
  color: var(--win);
}

.cmp-maps__score small {
  color: var(--dim);
  font-size: 11px;
}

.cmp-maps__map {
  display: grid;
  min-width: 0;
  text-align: center;
}

.cmp-maps__title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-mods__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 10px 0;
}

@media (max-width: 1000px) {
  .cmp-results,
.cmp-group-matches,
.cmp-columns,
.cmp-rosters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .cmp-ring {
    grid-template-columns: minmax(0, 1fr);
  }

  .cmp-mark {
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .cmp-slot--b {
    justify-items: start;
    text-align: left;
  }

  .cmp-slot--b .cmp-card {
    direction: ltr;
  }

  .cmp-row {
    grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
    padding: 8px 10px;
  }
}

/* ---------- О сайте и «не найдено» ---------- */

.page--about {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.page--about > .page-title,
.page--about > .lead {
  grid-column: 1 / -1;
}

.page--about .block p {
  margin: 0 0 10px;
  color: var(--text-2);
  line-height: 1.6;
}

.page--about .block p:last-child {
  margin-bottom: 0;
}

.emblem {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 12px var(--bg), 0 0 0 3px var(--accent);
}

@media (max-width: 900px) {
  .page--about {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Составы на телефоне: карточки без мини-статистики, между ними — короткая подпись разницы */
@media (max-width: 700px) {
  .lineup__row {
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    gap: 6px;
  }

  .lineup__card,
.lineup__empty {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    min-height: 44px;
    padding: 6px 8px;
  }

  .lineup__card .statmini,
.lineup__card .tier-tag {
    display: none;
  }

  .lineup__card .avatar {
    width: 22px;
    height: 22px;
  }

  .lineup__full {
    display: none;
  }

  .lineup__short {
    display: inline;
  }

  .lineup__label {
    padding: 1px 4px;
    font-size: 10px;
  }

  .lineup__head h3 {
    font-size: 13px;
  }

  .lineup__avg {
    font-size: 11px;
  }

  .team-head {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
  }

  .team-head__flag {
    width: 54px;
    height: 36px;
  }

  .team-head__vs {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .mlist__row {
    grid-template-columns: 22px minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 6px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .mlist__date,
.mlist__more {
    display: none;
  }

  .mlist__row:not(:has(.mlist__outcome)) {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  }

  .profile__head {
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: -48px;
    padding: 0 14px 14px;
  }

  .profile__avatar {
    width: 80px;
    height: 80px;
  }

  .profile__name {
    font-size: 22px;
  }

  .profile__osu {
    grid-row: 2;
    justify-self: start;
  }

  .profile__main,
.profile__detail,
.profile__foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .timeline__item {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .timeline__item .captain {
    display: none;
  }

  .timeline__res {
    grid-column: 3;
  }

  .player-extra .play {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .player-extra .play__mods,
.player-extra .play__acc {
    display: none;
  }

  .score {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .score__acc,
.score__combo {
    display: none;
  }

  .ev__actions .btn {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
}

/* Скрытые подписи в ячейках (visually-hidden) позиционированы абсолютно: без своей опоры внутри
   прокручиваемой таблицы они вылезали за край и растягивали страницу на телефоне */
.table-wrap,
.matrix-wrap,
.scroll-x,
.bk-scroll {
  position: relative;
}

/* Вкладка сетки: переключатель в заголовке карточки, сетка прогноза во всю ширину */
.card__head--tabs {
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.card__head--tabs .seg {
  margin-left: auto;
  border-bottom: 0;
}

.card__head--tabs .seg__btn {
  padding: 12px 14px 10px;
}

.bracket-body > .bk-frame {
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.bracket-body > .loading {
  padding: 14px;
}

.sim {
  display: grid;
  gap: 8px;
}

.sim > p,
.sim > h3,
.sim-tools:not(:empty) {
  margin: 0;
  padding: 0 16px;
}

.sim > p:first-child {
  padding-top: 14px;
}

.sim-bracket .bk-frame {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

/* ---------- Матчи недели (views/home-stats.js groupMatchesList): дни, строки матчей ---------- */

.week-matches {
  display: grid;
  gap: 12px;
}

.hub-fixtures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 12px;
  align-items: start;
}

.hub-fx-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.hub-fx-day__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.hub-fx-day__title small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
}

.hub-fx {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-fx__row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.hub-fx__row:last-child {
  border-bottom: 0;
}

.hub-fx__row:hover {
  background: var(--panel-3);
}

.hub-fx__row.is-live {
}

.hub-fx__time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hub-fx__team {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-weight: 600;
}

.hub-fx__team--red {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.hub-fx__row .hub-fx__team:not(.hub-fx__team--red) {
  flex-direction: row;
  justify-content: flex-start;
}

.hub-fx__team--red {
  flex-direction: row;
  justify-content: flex-end;
}

.hub-fx__team.is-win {
  color: var(--text);
}

.hub-fx__row:not(.is-done) .hub-fx__team {
  color: var(--text);
}

.hub-fx__label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.hub-fx__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-fx__score,
.hub-fx__vs {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.hub-fx__vs {
  color: var(--dim);
  font-size: 12px;
}

.hub-fx__vs:hover {
  color: var(--accent-2);
}

.hub-fx__score.is-live {
  color: var(--live);
}

.hub-fx__links {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 44px;
  font-size: 12px;
  font-weight: 600;
}

.hub-fx__mp,
.hub-fx__watch {
  color: var(--muted);
}

.hub-fx__mp:hover,
.hub-fx__watch:hover {
  color: var(--accent-2);
}

.hub-fx__watch.is-live {
  color: var(--live);
}

.week-matches > .played-title {
  margin: 4px 0 0;
}

@media (max-width: 600px) {
  .hub-fixtures {
    grid-template-columns: minmax(0, 1fr);
  }

  .hub-fx__row {
    grid-template-columns: 40px minmax(0, 1fr) 40px minmax(0, 1fr);
    gap: 6px;
    padding: 8px 8px;
    font-size: 13px;
  }

  .hub-fx__links {
    display: none;
  }

  .hub-fx__label .seed-tag {
    display: none;
  }
}

/* Чипы разделов: прямоугольные, выбранный — заливка, а не цветная обводка */
.wk-part {
  border-radius: var(--radius);
  border-color: var(--line-2);
  background: var(--panel-2);
}

.wk-part:hover {
  background: var(--panel-3);
}

.wk-part[aria-pressed='true'] {
  border-color: var(--text-2);
  background: var(--text);
  color: #15171c;
}

.wk-part[aria-pressed='true'] .wk-part__n {
  color: #4b5160;
}

.wk-parts--sub .wk-part {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.wk-parts--sub .wk-part[aria-pressed='true'] {
  border-color: var(--line-2);
  background: var(--panel-3);
  color: var(--text);
}

.bracket-body,
.sim,
.sim-bracket {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.bracket-body {
  overflow: hidden;
}

/* Матчи недели: дни растягиваются на всю ширину, без лишней рамки вокруг всего списка */
.hub-fixtures {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
}

.pk-group.week-matches {
  border: 0;
  background: none;
  overflow: visible;
}

/* Ширина сетки не зависит от её содержимого (Firefox растягивал карточку под всю сетку симуляции):
   сетка листается и тянется мышью внутри карточки */
.bracket-body,
.sim-bracket,
.bk-frame {
  contain: inline-size;
  max-width: 100%;
}

.card:has(> .bracket-body) {
  overflow: hidden;
}

/* Поясняющие абзацы (как считается, откуда данные, подсказки) на сайте не показываются:
   только данные. Источники и o!TR указаны в подвале каждой страницы */
.expl,
.sheet-hint,
.card__hint,
.cmp-paper__how {
  display: none !important;
}

/* ---------- Участники: карточки сборных (вкладка Participants) ---------- */

.tcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 12px;
  align-items: start;
}

.tcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.tcard__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.tcard__team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.tcard__team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcard__flag {
  width: 36px;
  height: 24px;
}

.tcard__status {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tcard__status.is-out {
  color: var(--dim);
}

.tcard__seed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.tcard__place {
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text);
  font-size: 12px;
}

.tcard__place.is-legends { background: #8a6a1d; color: #fff3cf; }
.tcard__place.is-challengers { background: #2d6a6a; color: #dff7f5; }
.tcard__place.is-contenders { background: #3b4a6b; color: #e1e8f8; }

.tcard__roster {
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}

.tcard__roster li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 14px;
}

.tcard__roster li:nth-child(odd) {
  background: var(--bg-2);
}

.tcard__roster li > a,
.tcard__roster li > span:not(.tcard__marks) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcard__roster .flag {
  width: 18px;
  height: 12px;
}

.tcard__marks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.tcard__titles {
  display: inline-flex;
  gap: 2px;
}

/* Кубок — иконка-маска, цвет даёт текст */
.trophy {
  width: 14px;
  height: 14px;
  background: var(--dim);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12v2h3v3a4 4 0 0 1-4 4h-.3A6 6 0 0 1 13 15.9V19h3v2H8v-2h3v-3.1A6 6 0 0 1 7.3 12H7a4 4 0 0 1-4-4V5h3V3zm0 4H5v1a2 2 0 0 0 1.2 1.8A6 6 0 0 1 6 8V7zm12 0v1a6 6 0 0 1-.2 1.8A2 2 0 0 0 19 8V7h-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12v2h3v3a4 4 0 0 1-4 4h-.3A6 6 0 0 1 13 15.9V19h3v2H8v-2h3v-3.1A6 6 0 0 1 7.3 12H7a4 4 0 0 1-4-4V5h3V3zm0 4H5v1a2 2 0 0 0 1.2 1.8A6 6 0 0 1 6 8V7zm12 0v1a6 6 0 0 1-.2 1.8A2 2 0 0 0 19 8V7h-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tcard__captain {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

/* =====================================================================
   Вики-слой: страница как статья Wikipedia / Liquipedia
   ===================================================================== */

:root {
  --bg: #000000;
  --panel: #000000;
}

body {
  background: #000;
  font: 400 14px/1.6 var(--font);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

p a,
.note a,
.lead a,
.footer a,
.fanline a {
  color: var(--link);
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
}

/* ---------- Шапка ---------- */

.sitebar {
  background: var(--panel);
  border-bottom: 1px solid var(--line-2);
}

.brand {
  gap: 0;
  margin-right: 20px;
  color: var(--text);
  font: 600 22px/1 var(--font);
}

.brand__name b {
  color: var(--text);
  font-weight: 400;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.nav a {
  margin-bottom: 0;
  padding: 0 10px;
  border-bottom: 0;
  color: var(--link);
  font-weight: 400;
  font-size: 14px;
}

.nav a:hover {
  background: none;
  color: var(--link-hover);
  text-decoration: underline;
}

.nav a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

.finder input {
  height: 32px;
  border-color: var(--line-2);
  background-color: var(--panel);
  font: 400 14px var(--font);
}

.finder input:focus {
  border-color: var(--link);
  box-shadow: inset 0 0 0 1px var(--link);
}

.finder__list {
  border-color: var(--line-2);
  background: var(--panel);
}

.finder__item[aria-selected='true'],
.finder__item:hover {
  background: var(--accent-bg);
}

.finder__label {
  font-weight: 400;
}

.contact {
  color: var(--link);
  font-weight: 400;
}

.contact:hover {
  background: none;
  color: var(--link-hover);
}

.fanline {
  color: var(--dim);
  font-size: 12px;
}

main {
  padding-top: 12px;
}

/* ---------- Заголовки: страница и разделы ---------- */

.page-title,
.ev__title,
.profile__name,
.pk-user__name {
  font-family: var(--font);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0;
}

.page > .page-title {
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-2);
}

/* Раздел — заголовок с линией снизу, без рамки и подложки */
.card,
.block,
.day,
.pk-empty,
.facts,
.page > .seg,
.page > .table-wrap,
.page-panel > .table-wrap,
.page-panel > .weeks,
.page-panel > .block {
  border: 0;
  border-radius: 0;
  background: none;
}

.block {
  padding: 0;
}

.card__head {
  padding: 0 0 4px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 8px;
}

.card__title,
.block > .block__title,
.block > header > .block__title,
.pk-empty .block__title,
.section-title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  font: 600 20px/1.3 var(--font);
  text-transform: none;
}

.block > .block__title,
.block > header > .block__title,
.pk-empty .block__title {
  margin: 0 0 10px;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--line-2);
}

.card__more {
  color: var(--link);
  font-weight: 400;
  font-size: 13px;
}

.card__sub,
.played-title,
.block__title:not(.block > .block__title),
.bracket__title,
.bk__title,
.bk__side,
.cmp-ideas__title,
.group__played,
.day__title {
  color: var(--text);
  font: 600 14px/1.4 var(--font);
  background: none;
  border-bottom: 0;
}

.card__sub {
  padding: 10px 0 4px;
}

.card__foot {
  padding: 6px 0;
  border-top: 0;
}

.card__empty {
  padding: 8px 0;
}

.link-btn {
  color: var(--link);
  font-weight: 400;
  font-size: 13px;
}

.note,
.muted {
  color: var(--muted);
}

/* ---------- Таблицы в стиле wikitable ---------- */

.table,
.st,
table.scores,
.matrix {
  border: 1px solid var(--line-2);
  border-collapse: collapse;
  background: var(--panel);
  font-size: 14px;
}

.table th,
.table td,
.st th,
.st td,
table.scores th,
table.scores td,
.matrix th,
.matrix td {
  border: 1px solid var(--line-2);
  padding: 4px 8px;
}

.table thead th,
.st thead th,
table.scores thead th,
.matrix thead th {
  position: static;
  background: var(--panel-3);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.table tbody tr:hover,
.st tbody tr:hover,
.matrix tbody tr:hover {
  background: var(--panel-2);
}

.table tbody th {
  font-weight: 400;
}

.st caption {
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  background: var(--panel-3);
  font-weight: 600;
  text-align: center;
}

.st__name {
  font-weight: 600;
}

.st__tier {
  color: var(--muted);
  font-weight: 400;
}

/* Места в группе: фон строки, как на Liquipedia */
.st tr.is-up td { background: var(--win-bg); }
.st tr.is-mid td { background: var(--mid-bg); }
.st tr.is-out td { background: var(--loss-bg); }

.st tr.is-up .st__pos,
.st tr.is-mid .st__pos,
.st tr.is-out .st__pos {
  color: var(--text);
}

.st tr.is-out .tl {
  color: var(--link);
}

.st-grid {
  gap: 16px;
  background: none;
}

.legend {
  padding: 8px 0 0;
  border-top: 0;
}

.legend__key::before {
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--win-bg);
}

.legend__key.is-mid::before { background: var(--mid-bg); }
.legend__key.is-out::before { background: var(--loss-bg); }

.up { color: var(--win); }
.down { color: var(--loss); }

/* ---------- Ссылки на сборные и игроков ---------- */

.tl,
.country-link,
.who,
.mlist__team,
.lineup__who,
.match-player,
.podium__team,
.cmp-player__name {
  font-weight: 400;
}

.tl,
.country-link,
.who > a,
.lineup__who > a,
.matrix__player a,
.mlist__team {
  color: var(--link);
}

.flag {
  border-radius: 0;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
}

.seed,
.seed-tag {
  color: var(--dim);
  font-weight: 400;
}

/* ---------- Кнопки, вкладки, переключатели ---------- */

.btn {
  height: 32px;
  padding: 0 12px;
  border-color: var(--line-2);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text);
  font: 600 14px var(--font);
}

.btn:hover {
  border-color: var(--dim);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.btn--primary {
  border-color: var(--link);
  background: var(--link);
  color: #fff;
}

.btn--primary:hover {
  border-color: var(--link-hover);
  background: var(--link-hover);
  color: #fff;
}

.tabs,
.pk-tabs {
  position: static;
  margin: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: none;
}

.tabs__tab,
.pk-tab {
  margin-bottom: -1px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--link);
  font-weight: 400;
  font-size: 14px;
}

.tabs__tab:hover,
.pk-tab:hover {
  background: none;
  color: var(--link-hover);
  text-decoration: underline;
}

.tabs__tab[aria-selected='true'],
.tabs__tab[aria-pressed='true'],
.pk-tab[aria-current='page'] {
  border-color: var(--line-2);
  border-bottom: 1px solid var(--panel);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
}

.pk-tab small {
  color: var(--dim);
  font-weight: 400;
}

.seg {
  border-bottom: 1px solid var(--line-2);
}

.seg__btn {
  padding: 6px 12px;
  color: var(--link);
  font-weight: 400;
  font-size: 14px;
}

.seg__btn:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.seg__btn[aria-pressed='true'] {
  border-bottom-color: var(--text);
  color: var(--text);
  font-weight: 600;
}

.wk-part,
.wk-parts--sub .wk-part,
.chip,
.lb-pages__btn,
.pk-move,
.pk-dialog__team,
.pk-dialog__score,
.cmp-mark__swap,
.cmp-card__clear,
.bk-full {
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 400;
}

.wk-part:hover,
.chip:hover {
  border-color: var(--dim);
  background: var(--panel);
}

.wk-part[aria-pressed='true'],
.wk-parts--sub .wk-part[aria-pressed='true'],
.pk-dialog__team[aria-pressed='true'],
.pk-dialog__score[aria-pressed='true'],
.lb-pages__btn.is-current {
  border-color: var(--link);
  background: var(--accent-bg);
  color: var(--text);
  font-weight: 600;
}

.wk-part__n {
  color: var(--dim);
}

/* ---------- Метки и медали ---------- */

.tag {
  border-radius: 2px;
  background: var(--panel-3);
  color: var(--text);
  font-weight: 600;
}

.tag--live {
  background: var(--live);
  color: #fff;
}

.live {
  color: var(--live);
  font-weight: 600;
}

.live i {
  animation: none;
}

.result {
  border-radius: 2px;
  background: var(--panel-3);
  color: var(--text);
  font-weight: 400;
}

.result--p1 { background: var(--gold-bg); color: #f0d27a; }
.result--p2 { background: var(--silver-bg); color: #d0d4d8; }
.result--p3 { background: var(--bronze-bg); color: #e8b088; }

.medal {
  border-radius: 2px;
  color: #fff;
  font-weight: 600;
}

.medal--p1 { background: var(--gold); }
.medal--p2 { background: var(--silver); }
.medal--p3 { background: var(--bronze); }

.captain {
  border-radius: 0;
  background: var(--panel-3);
  color: var(--text);
  border: 1px solid var(--line-2);
}

.mod {
  border-radius: 2px;
  background: var(--panel-3);
  font-weight: 600;
}

.mod--nm { color: #e6e6e6; }
.mod--hd { color: #f1c75b; }
.mod--hr { color: #ff8b8b; }
.mod--dt,
.mod--nc { color: #c4a6ff; }
.mod--fm { color: #7fd6a8; }
.mod--ez,
.mod--ht { color: #8fb4ff; }
.mod--tb { color: #ff9dcc; }

.tier-tag {
  border-radius: 2px;
  font-weight: 600;
}

.tier-tag[data-tier='gold'] { --t: #e3b94f; }
.tier-tag[data-tier='silver'] { --t: #b8bec9; }
.tier-tag[data-tier='emerald'] { --t: #3fd17f; }
.tier-tag[data-tier='platinum'] { --t: #4fb0d6; }

.cost--high { color: var(--win); }

/* ---------- Матчи ---------- */

.mfeed {
  border: 1px solid var(--line-2);
}

.mi {
  padding: 6px 10px;
}

.mi:hover {
  background: var(--panel-2);
}

.mi__team.is-win .tl,
.mi__team.is-win .mi__score {
  font-weight: 600;
}

.mi__team.is-loss .tl {
  color: var(--link);
  font-weight: 400;
}

.mi__team.is-loss .flag {
  opacity: 1;
}

.mi__score {
  font-weight: 400;
}

.mi__meta {
  border-left-color: var(--line);
}

.mi__status {
  color: var(--muted);
  font-weight: 400;
}

.mi__status.is-soon {
  color: var(--text);
}

.mi__links a {
  color: var(--link);
  font-weight: 400;
}

.day {
  border: 1px solid var(--line-2);
}

.day__title {
  padding: 4px 10px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-3);
}

/* ---------- Сетка ---------- */

.bm__box,
.bk-match {
  border-color: var(--line-2);
  border-radius: 0;
  background: var(--panel);
}

.bm__row.is-win,
.bk-team.is-picked {
  background: var(--win-bg);
}

.bm__row.is-win .tl,
.bk-team.is-picked {
  font-weight: 600;
}

.bm__row.is-loss .tl,
.bk-team.is-out {
  color: var(--link);
  font-weight: 400;
}

.bm__row.is-loss .flag,
.bk-team.is-out .flag {
  opacity: 1;
}

.bm__score {
  border-left-color: var(--line-2);
  font-weight: 400;
}

.bm__row.is-win .bm__score {
  color: var(--text);
  font-weight: 600;
}

.bracket__slot::after,
.bracket__slot::before,
.bracket__pair::after {
  border-color: var(--line-2) !important;
}

.bracket__title,
.bk__title {
  border-bottom: 1px solid var(--line-2);
}

.bracket__title small,
.bk__title small {
  color: var(--muted);
  font-weight: 400;
}

.bk__lines path {
  stroke: var(--line-2);
}

.bk__lines path.is-on {
  stroke: var(--text);
  stroke-opacity: 0.6;
}

.bk-frame {
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--panel);
}

.bk-frame.is-full {
  background: var(--panel);
}

.bk__champion {
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--gold-bg);
  color: var(--text);
}

/* ---------- Лидеры ---------- */

.leaders {
  border: 1px solid var(--line-2);
  padding: 0;
}

.leaders li {
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}

.leaders li:last-child {
  border-bottom: 0;
}

.lead__n {
  color: var(--muted);
  font-weight: 400;
}

.leaders li.is-first .lead__n,
.leaders li.is-first .lead__v {
  color: var(--text);
}

.lead__v {
  font-weight: 600;
}

/* ---------- Прочие страницы ---------- */

.team-head,
.pk-user,
.cmp-ring,
.profile,
.match-head,
.match-head__meta,
.lineup__card,
.lineup__empty,
.roster-card,
.qf-pool,
.qf-dest,
.pk-group,
.cmp-roster,
.q-team,
.mpool-map,
.ed-card,
.map-card,
.hub-fx-day,
.cmp-idea,
.pk-login {
  border-color: var(--line-2);
  border-radius: 0;
}

.team-head,
.pk-user {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: none;
}

.team-head + .facts {
  margin-top: 0;
  padding: 0;
  background: none;
}

.facts {
  padding: 0;
}

.facts__item dt,
.ev__fact dt,
.profile__ranks dt,
.profile__facts dt,
.profile__detail dt,
.otr-card__facts dt,
.statmini dt,
.cmp-row__label,
.mp-compare__label,
.cmp-card__best-label,
.cmp-roster__avg-item dt,
.field,
.pk-user__stat span,
.profile__pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.facts__item dd a,
.timeline__ed,
.pk-user__link,
.ev__crumbs a,
.cmp-card__years a {
  color: var(--link);
}

.lineup__card.is-out { background: var(--loss-bg); }
.lineup__card.is-in { background: var(--win-bg); }

.lineup__label {
  background: var(--panel);
}

.profile {
  background: var(--panel);
}

.profile__cover::after {
  background: linear-gradient(180deg, rgb(0 0 0 / 0.1), #000);
}

.profile__avatar {
  border-color: var(--panel);
  border-radius: 0;
}

.profile__ranks .is-global dd {
  color: var(--text);
}

.profile__detail,
.profile__foot {
  background: var(--panel-2);
}

.profile__hex {
  border-radius: 2px;
  background: var(--panel-3);
  color: var(--text);
}

.profile__bar-fill,
.cmp-paper__fill--a {
  background: var(--link);
}

.cmp-paper__fill--b {
  background: #5a5a5a;
}

.rankchart polyline,
.history__line,
.cmp-chart__line--a {
  stroke: var(--link);
}

.cmp-chart__line--b {
  stroke: #f0606c;
}

.cmp-chart__key--a::before,
.cmp-chart__dot--a { background: var(--link); }
.cmp-chart__key--b::before,
.cmp-chart__dot--b { background: #f0606c; }

.chart__dot {
  background: var(--link);
}

.chart__tip {
  background: var(--panel);
}

.cmp-mark__tally .is-ahead,
.cmp-h2h .is-ahead b,
.cmp-paper__side.is-ahead .cmp-paper__pct,
.pk-user__stat b,
.play__pp,
.score__pp {
  color: var(--text);
}

.cmp-mark {
  border-color: var(--line-2);
}

.match-head__score .is-winner,
.match-head__team.is-winner {
  color: var(--text);
}

.mpool-map,
.map-card,
.hub-fx-day,
.cmp-roster,
.q-team,
.lineup__card,
.lineup__empty,
.qf-pool,
.qf-dest,
.pk-group,
.ed-card,
.cmp-idea {
  background: var(--panel);
}

.ed-card {
  border: 1px solid var(--line-2);
}

.hub-fx-day__title,
.roster-card__head,
.cmp-roster__head,
.pk-group__head,
.qf-pool__head,
.qf-dest__head,
.map-card__head {
  background: var(--panel-3);
  border-bottom-color: var(--line-2);
}

.qf-dest.is-active .qf-dest__head {
  background: var(--accent-bg);
}

.hub-fx__row:hover,
.cmp-roster__avg,
.pk-order__row.is-hit {
  background: var(--panel-2);
}

.pk-order__row.is-hit {
  background: var(--win-bg);
}

.pk-savebar .btn {
  border-color: var(--link);
  background: var(--link);
  color: #fff;
  box-shadow: none;
}

.pk-status {
  background: var(--panel-3);
}

.pk-dialog {
  border-radius: 0;
  background: var(--panel);
}

.pk-dialog::backdrop {
  background: rgb(0 0 0 / 0.7);
}

.table--lb tr.is-me {
  background: var(--accent-bg);
}

.lb-owc__year,
.lb-owc__more {
  border-radius: 0;
}

.lb-owc__year--p1 { background: var(--gold-bg); color: #f0d27a; }
.lb-owc__year--p2 { background: var(--silver-bg); color: #d0d4d8; }
.lb-owc__year--p3 { background: var(--bronze-bg); color: #e8b088; }

.podium__num {
  border-radius: 0;
  color: #fff;
}

.podium__players a,
.podium__place--1 .podium__players a {
  color: var(--link);
}

.mlist {
  border-color: var(--line-2);
}

.mlist__side,
.mlist__score b {
  color: var(--text);
}

.mlist__side.is-winner .mlist__team,
.mlist__score b.is-winner {
  font-weight: 600;
}

.mlist__more {
  color: var(--link);
  font-weight: 400;
}

.mlist__outcome {
  border-radius: 0;
}

.grade,
.grade-mark,
.dot {
  border-radius: 0;
}

.grade {
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.grade--x b,
.grade--s b { color: #e3b94f; }
.grade--a b { color: var(--win); }
.grade--xh b,
.grade--sh b { color: #d0d4d8; }

.dot {
  background: var(--text);
}

.dot--captain {
  background: var(--gold);
  box-shadow: none;
}

.matrix .is-a {
  background: var(--accent-bg);
}

.matrix .is-b {
  background: var(--panel-2);
}

.matrix__ed button {
  color: var(--link);
}

.toast {
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
}

.notice {
  border: 1px solid #6b5520;
  border-radius: 0;
  background: #2a2109;
  color: var(--text);
}

select,
input[type='search'],
input[type='text'],
.field select,
.field input {
  border-color: var(--line-2);
  border-radius: 2px;
  background-color: var(--panel);
  font-weight: 400;
}

option {
  background: var(--panel);
}

.footer {
  border-top: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
}

/* ---------- Шапка турнира и лента этапов — без коробки, как заголовок статьи ---------- */

.ev {
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: none;
}

.hub.page > .ev {
  border-radius: 0;
}

.ev__title {
  font-size: 28px;
}

.ev__crumbs a {
  color: var(--link);
}

.ev__fact dd {
  font-weight: 400;
}

.ev__clock {
  color: var(--text);
}

.tline {
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: none;
}

.tline__step {
  border-right-color: var(--line);
}

.tline__step::after {
  display: none;
}

.tline__step.is-now {
  background: var(--panel-3);
}

.tline__step.is-now .tline__what {
  font-weight: 600;
}

.tline__step.is-now .tline__when {
  color: var(--text);
}

.tabs {
  margin-top: 12px;
}

/* Участники: карточки как таблицы вики */
.tcard {
  border-color: var(--line-2);
  border-radius: 0;
  background: var(--panel);
}

.tcard__head {
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-3);
}

.tcard__team {
  color: var(--link);
}

.tcard__status,
.tcard__captain,
.tcard__place {
  border-radius: 0;
}

.tcard__seed {
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.tcard__roster li:nth-child(odd) {
  background: var(--panel-2);
}

.tcard__roster a {
  color: var(--link);
}

.card--matches,
.card--bracket {
  min-width: 0;
}

/* «Live» и «Playing» — красный текст, без плашки */
.tag--live {
  padding: 0;
  background: none;
  color: var(--live);
}

/* Строка матча: правая колонка одной ширины во всех строках — разделитель стоит ровно столбиком */
.mi {
  grid-template-columns: minmax(0, 1fr) 136px;
}

.mi__meta {
  width: 136px;
  min-width: 0;
  align-self: stretch;
  align-content: center;
}

@media (max-width: 600px) {
  .mi {
    grid-template-columns: minmax(0, 1fr);
  }

  .mi__meta {
    width: auto;
  }
}

/* Главная кнопка на тёмной теме — светлая из нейтральной шкалы: синий остаётся за ссылками */
.btn--primary,
.pk-savebar .btn {
  border-color: var(--text);
  background: var(--text);
  color: #000;
}

.btn--primary:hover,
.pk-savebar .btn:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
}

/* Карта в таблице маппула: маленькая обложка, слот и название в одной строке */
.sheet-map__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sheet-map__img {
  flex: none;
  width: 48px;
  height: 28px;
  object-fit: cover;
}

.sheet-map__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th.sheet-map {
  text-align: left !important;
}

/* Поиск в шапке: место под лупу не перебивается общим правилом для полей */
.finder input[type='search'] {
  padding-left: 32px;
}

.sheet-map__row > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.sheet-map__row .mod {
  flex: none;
}

.sheet-map__row {
  max-width: 480px;
}

th.sheet-map {
  display: table-cell;
  vertical-align: middle;
}

/* ---------- Статистика этапа → Head to head: две сборные на всём маппуле (views/stage-boards.js) ---------- */

.h2h__pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 16px;
}

.h2h__pick select {
  min-width: 180px;
}

.h2h__sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.h2h__team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-2);
}

.h2h__team--b {
  justify-content: flex-end;
}

.h2h__team.is-won {
  color: var(--text);
}

.h2h__score {
  font-size: 28px;
  font-weight: 600;
  white-space: nowrap;
}

.h2h__map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.h2h__title {
  overflow: hidden;
  max-width: 420px;
  color: var(--text-2);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table--h2h td.h2h__v {
  white-space: nowrap;
}

.table--h2h td.is-won {
  background: var(--win-bg);
  color: var(--win);
  font-weight: 600;
}

@media (max-width: 600px) {
  .h2h__title {
    display: none;
  }

  .h2h__sum {
    gap: 8px;
    font-size: 14px;
  }

  .h2h__score {
    font-size: 22px;
  }
}

.h2h__mid {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.table--h2h thead th:first-child {
  text-align: left;
}
