/* Турниры: список плотными строками (дата · название · призовой) и
   полноэкранная страница турнира — этапы, группы, расписание, сетка,
   команды. Язык оформления общий с сайтом: срезанный угол вместо
   скруглений, Oswald на заголовках и цифрах, янтарный акцент. */

:root {
  /* Слой затемнения панелей: на арте-подложке стеклянные блоки читались как
     полупрозрачные, поэтому под заливку каждого кладём 15% темноты. */
  --tourn-dim: linear-gradient(rgba(8, 12, 10, 0.15), rgba(8, 12, 10, 0.15));
  /* Крупные блоки поверх арта (строки списка) требуют плотнее подложки —
     иначе яркая вспышка на картинке спорит с текстом. */
  --tourn-dim-strong: linear-gradient(rgba(8, 12, 10, 0.55), rgba(8, 12, 10, 0.55));
}

/* Подложка страницы турниров: арт Блиц Поинта вместо общей картинки сайта.
   Затемнение и блюр берутся из базового правила body::after в style.css. */
body::after {
  background:
    linear-gradient(180deg, rgba(10, 14, 12, 0.58) 0%, rgba(10, 14, 12, 0.78) 55%, rgba(10, 14, 12, 0.92) 100%),
    url("/backgrounds/bp-playin.webp") center top / cover no-repeat;
  /* Базовое правило в style.css мылит фон на 6px — арт держим помягче, но резче */
  filter: blur(4px);
}

/* ---------- Список ---------- */

.tourn-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tourn-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 15px 20px 15px 18px;
  background: var(--tourn-dim-strong), linear-gradient(100deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-left: 3px solid rgba(255, 201, 77, 0.5);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.tourn-row:hover,
.tourn-row:focus-visible {
  background: var(--tourn-dim-strong), linear-gradient(100deg, rgba(255, 201, 77, 0.18), rgba(255, 255, 255, 0.03));
  outline: none;
  transform: translateX(2px);
}

.tourn-row.is-live { border-left-color: #ff523c; }
.tourn-row.is-over { border-left-color: rgba(255, 255, 255, 0.14); opacity: 0.82; }

.tourn-row-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tourn-row-day {
  font: 600 19px/1.1 Oswald, Inter, sans-serif;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: none;
}

.tourn-row-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.tourn-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tourn-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tourn-row-title {
  margin: 0;
  font: 600 19px/1.2 Oswald, Inter, sans-serif;
  letter-spacing: 0.015em;
  color: #fff;
  text-wrap: pretty;
}

.tourn-row-meta {
  font-size: 12.4px;
  color: var(--text-dim);
}

.tourn-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tourn-flag--live {
  background: rgba(255, 82, 60, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 82, 60, 0.45);
  color: #ff8b7a;
}

.tourn-flag--soon {
  background: rgba(255, 201, 77, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.3);
  color: var(--accent);
}

.tourn-flag--over {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
}

.tourn-row-side {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tourn-row-award {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.tourn-row-award-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tourn-row-award-value {
  font: 600 17px/1.1 Oswald, Inter, sans-serif;
  color: var(--accent);
  white-space: nowrap;
}

.tourn-row-arrow {
  font-size: 16px;
  color: var(--text-dim);
  transition: transform 0.16s ease, color 0.16s ease;
}

.tourn-row:hover .tourn-row-arrow { color: var(--accent); transform: translateX(3px); }

/* ---------- Статус-бейдж ---------- */

.tourn-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tourn-status--upcoming {
  background: rgba(255, 201, 77, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.3);
  color: var(--accent);
}

.tourn-status--live {
  background: rgba(255, 82, 60, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 82, 60, 0.45);
  color: #ff8b7a;
}

.tourn-status--finished {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
}

.tourn-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.tourn-status--live .tourn-status-dot,
.tourn-flag--live .tourn-status-dot { animation: tournPulse 1.2s ease-in-out infinite; }

@keyframes tournPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 60, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(255, 82, 60, 0); }
}

.sort-chip-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff523c;
  display: inline-block;
  margin-right: 7px;
  animation: chipLiveBlink 1.4s ease-in-out infinite;
}

@keyframes chipLiveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Страница турнира (оверлей на весь экран) ---------- */

/* Оверлей непрозрачный (иначе сквозь него виден список турниров), поэтому
   арт-подложку он несёт сам — той же картинкой, что и страница под ним. */
.tourn-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg-deep);
}

/* Арт с затемнением живёт отдельным слоем: filter на самом оверлее размыл бы
   и содержимое. Вылет за края (-20px) прячет прозрачную кромку от блюра. */
.tourn-overlay::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 0;
  background:
    linear-gradient(rgba(8, 12, 10, 0.1), rgba(8, 12, 10, 0.1)),
    linear-gradient(180deg, rgba(10, 14, 12, 0.6) 0%, rgba(10, 14, 12, 0.9) 42%, rgba(10, 14, 12, 0.96) 100%),
    url("/backgrounds/bp-playin.webp") center top / cover no-repeat;
  filter: blur(4px);
}

.tourn-page {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.tourn-panel-close {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 130;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 14, 12, 0.72);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tourn-panel-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Шапка */

.tp-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 201, 77, 0.2);
  background:
    linear-gradient(105deg, #131a10 0%, rgba(10, 14, 12, 0.92) 60%),
    radial-gradient(70% 130% at 8% 0%, rgba(255, 201, 77, 0.18), transparent 62%);
}

.tp-hero-bg {
  position: absolute;
  inset: 0 0 0 auto;
  height: 100%;
  width: min(60%, 720px);
  object-fit: cover;
  object-position: center;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
  mask-image: linear-gradient(90deg, transparent, #000 55%);
  pointer-events: none;
}

.tp-hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px 26px;
}

.tp-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.tp-crumb-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}

.tp-crumb-link:hover { text-decoration: underline; }
.tp-crumb-sep { color: var(--text-faint); }
.tp-crumb-current {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-hero-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tp-hero-left { min-width: 0; }

.tp-hero-flag { display: inline-flex; }

.tp-hero-title {
  margin: 12px 0 0;
  max-width: 820px;
  font: 700 clamp(26px, 3.4vw, 42px) / 1.05 Oswald, Inter, sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: pretty;
}

.tp-hero-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding-left: 22px;
  border-left: 2px solid rgba(255, 201, 77, 0.35);
}

.tp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-stat-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-stat-value {
  font: 600 21px/1.15 Oswald, Inter, sans-serif;
  color: #fff;
}

.tp-stat-value.is-accent { color: var(--accent); }

.tp-stat-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.tp-hero-format {
  margin: 14px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Рельса этапов */

.tp-stages {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.015);
}

.tp-stages-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 18px;
}

.tp-stages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tp-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-eyebrow--accent { color: var(--accent); }

.tp-stages-now {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
}

.tp-stage-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tp-stage-rail::-webkit-scrollbar { display: none; }

.tp-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 15px 13px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tp-stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.tp-stage.is-done::before { background: rgba(255, 201, 77, 0.45); }
.tp-stage.is-current::before { background: #ff523c; }

.tp-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tp-stage-num {
  font: 600 10.5px/1 Oswald, Inter, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-stage-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tp-stage-flag.is-done { color: var(--accent); }
.tp-stage-flag.is-current { color: #ff8b7a; }
.tp-stage-flag.is-next { color: var(--text-dim); }

.tp-stage-title {
  font: 600 17px/1.2 Oswald, Inter, sans-serif;
  letter-spacing: 0.02em;
  color: #fff;
}

.tp-stage-dates { font-size: 12px; color: var(--text-dim); }
.tp-stage-note { font-size: 11.5px; color: var(--text-faint); }

/* Липкие вкладки разделов */

.tp-tabs {
  position: sticky;
  top: 0;
  z-index: 9;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 14, 12, 0.94);
  backdrop-filter: blur(10px);
}

.tp-tabs-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tp-tabs-inner::-webkit-scrollbar { display: none; }

.tp-tab {
  padding: 13px 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
}

.tp-tab.active {
  color: var(--accent);
  font-weight: 800;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Тело страницы */

.tp-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 24px 90px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.tp-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 70px;
}

.tp-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tp-sec-bar {
  width: 4px;
  height: 20px;
  background: var(--accent-grad);
}

.tp-sec-title {
  margin: 0;
  font: 600 21px/1.1 Oswald, Inter, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.tp-sec-note { font-size: 12px; color: var(--text-dim); }

/* Таблицы групп */

.tp-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.tp-group {
  display: flex;
  flex-direction: column;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.022);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.tp-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(255, 201, 77, 0.07);
  border-bottom: 1px solid rgba(255, 201, 77, 0.18);
}

.tp-group-name {
  font: 600 15px/1 Oswald, Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.tp-group-progress {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-group-cols,
.tp-group-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 42px 42px 54px;
  align-items: center;
  padding: 9px 16px;
}

/* Итоговые места: колонки складываются из того, что реально отдала Lesta */
.tp-stand-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.tp-stand-row.tp-stand-head {
  border-top: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-stand-row .num { text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 44px; }
.tp-stand-row .right { text-align: right; }

.tp-stand-row .points {
  font: 600 16px/1 Oswald, Inter, sans-serif;
  color: var(--accent);
}

.tp-stand-row[data-team] { cursor: pointer; transition: background 0.14s ease; }
.tp-stand-row[data-team]:hover,
.tp-stand-row[data-team]:focus-visible { background: rgba(255, 201, 77, 0.07); outline: none; }

.tp-group-cols {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-group-row {
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.tp-group-row[data-team]:hover,
.tp-group-row[data-team]:focus-visible {
  background: rgba(255, 201, 77, 0.07);
  outline: none;
}

.tp-group-cols .num,
.tp-group-row .num { text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tp-group-cols .right,
.tp-group-row .right { text-align: right; }
.tp-group-row .strong { color: var(--text); font-weight: 600; }

.tp-group-row .points {
  font: 600 16px/1 Oswald, Inter, sans-serif;
  color: var(--accent);
}

.tp-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font: 600 12px/1 Oswald, Inter, sans-serif;
}

.tp-place.is-top {
  background: var(--accent-grad);
  color: var(--accent-ink);
  font-weight: 700;
}

.tp-team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Аватар команды: эмблем в API нет, поэтому монограмма и цвет из названия */
.tp-ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: linear-gradient(150deg, hsl(var(--h, 40) 55% 26%), hsl(var(--h, 40) 45% 16%));
  box-shadow: inset 0 0 0 1px hsl(var(--h, 40) 60% 45% / 0.5);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 700 10.5px/1 Oswald, Inter, sans-serif;
  letter-spacing: 0.04em;
  color: #fff;
}

.tp-ava.is-big {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

/* Настоящий логотип: без подложки и обрезки — герб виден целиком */
.tp-ava.is-img {
  width: 40px;
  height: 40px;
  background: none;
  box-shadow: none;
  clip-path: none;
  object-fit: contain;
}

.tp-ava.is-img.is-big { width: 54px; height: 54px; }
.tp-ava.is-inline { width: 26px; height: 26px; }
.tp-ava.is-img.is-inline { width: 30px; height: 30px; }

.tm-tag.is-img {
  width: 92px;
  height: 92px;
  flex: none;
  padding: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
  object-fit: contain;
}

/* Арт этапа шире баннера Lesta — заливаем им всю шапку, приглушая к тексту */
.tp-hero-bg.is-art {
  width: min(72%, 900px);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 62%);
  mask-image: linear-gradient(90deg, transparent, #000 62%);
}

.tp-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

/* Расписание */

.tp-matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-match {
  display: grid;
  grid-template-columns: 118px 210px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--tourn-dim-strong), linear-gradient(100deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-left: 3px solid rgba(255, 201, 77, 0.45);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tp-match-when { display: flex; flex-direction: column; }

.tp-match-time {
  font: 600 16px/1.2 Oswald, Inter, sans-serif;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.tp-match-date { font-size: 11px; color: var(--text-dim); }

.tp-match-stage {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Сетка, а не flex: иначе VS гуляет по горизонтали вслед за длиной названий */
.tp-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tp-match-teams > .tp-match-team:first-child { justify-self: end; }
.tp-match-teams > .tp-match-team:last-child { justify-self: start; }

.tp-match-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 10px 3px 4px;
  box-shadow: inset 0 0 0 1px transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tp-match-team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Итог сыгранного матча читается прямо по рамкам команд */
.tp-match-team.is-won {
  background: rgba(143, 209, 63, 0.1);
  box-shadow: inset 0 0 0 1px rgba(143, 209, 63, 0.5);
  color: #cdeb9c;
}

.tp-match-team.is-lost {
  background: rgba(255, 82, 60, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 82, 60, 0.4);
  color: #ffb3a8;
}

.tp-match-vs {
  font: 500 12px/1 Oswald, Inter, sans-serif;
  color: var(--text-faint);
  flex: none;
}

.tp-match-starts {
  justify-self: end;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: right;
}

.tp-played { display: flex; flex-direction: column; }

.tp-played-row {
  display: grid;
  grid-template-columns: 118px 210px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.tp-played-when {
  font: 600 13.5px/1.2 Oswald, Inter, sans-serif;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.tp-played-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tp-played-teams > .tp-match-team:first-child { justify-self: end; }
.tp-played-teams > .tp-match-team:last-child { justify-self: start; }

/* Сетка плей-офф */

.tp-bracket { display: flex; flex-direction: column; gap: 10px; }

.tp-bracket-name {
  font: 600 15px/1 Oswald, Inter, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.bracket-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 6px;
}

.bracket-scroll {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.bracket-round {
  flex: 1 0 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bracket-round-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bracket-round-matches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-around;
  height: 100%;
}

.bracket-match {
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
}

.bracket-match.is-done { border-color: rgba(255, 201, 77, 0.28); }

.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--text-dim);
}

.bracket-team + .bracket-team { border-top: 1px solid var(--line-soft); }
.bracket-team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-team-name i { font-style: normal; color: var(--text-faint); }

.bracket-team.is-winner {
  background: rgba(255, 201, 77, 0.09);
  color: #fff;
  font-weight: 700;
}

.bracket-team.is-loser { color: var(--text-faint); }
.bracket-team-score { flex-shrink: 0; font-weight: 700; font-size: 12.6px; }

.tp-bracket-empty {
  position: relative;
  padding: 26px 24px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.018);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.tp-bracket-ghost {
  display: flex;
  gap: 26px;
  opacity: 0.28;
}

.tp-bracket-ghost span {
  flex: 1 0 200px;
  height: 74px;
  background: rgba(255, 255, 255, 0.06);
}

.tp-bracket-ghost span.is-final { background: rgba(255, 201, 77, 0.12); }

.tp-bracket-empty-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
}

.tp-bracket-empty-title {
  font: 600 20px/1.2 Oswald, Inter, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.tp-bracket-empty-sub {
  max-width: 560px;
  font-size: 13px;
  color: var(--text-dim);
}

/* Команды */

.tp-teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tp-team-card {
  padding: 14px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  cursor: pointer;
  transition: background 0.14s ease;
}

.tp-team-card:hover,
.tp-team-card:focus-visible { background: rgba(255, 201, 77, 0.08); outline: none; }

.tp-team-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-team-card-id { min-width: 0; flex: 1; }

.tp-team-card-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-team-card-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-team-card-roster {
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Страница команды */

.tm-hero {
  background:
    linear-gradient(115deg, #141b11 0%, rgba(10, 14, 12, 0.94) 62%),
    radial-gradient(60% 130% at 4% 0%, rgba(255, 201, 77, 0.16), transparent 60%);
}

.tm-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.tm-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0 6px;
  flex: none;
  background: linear-gradient(150deg, hsl(var(--h, 40) 55% 30%), hsl(var(--h, 40) 45% 17%));
  box-shadow: inset 0 0 0 1px hsl(var(--h, 40) 60% 48% / 0.55);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 700 22px/1 Oswald, Inter, sans-serif;
  letter-spacing: 0.06em;
  color: #fff;
}

.tm-id { min-width: 0; }

.tm-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.tm-name {
  margin: 4px 0 0;
  font: 700 clamp(26px, 3.2vw, 40px) / 1.05 Oswald, Inter, sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: pretty;
}

.tm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.07);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tm-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  background: rgba(10, 14, 12, 0.86);
}

.tm-stat-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tm-stat-value {
  font: 600 24px/1 Oswald, Inter, sans-serif;
  color: #fff;
}

.tm-stat-value.is-accent { color: var(--accent); }

.tm-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.tm-form-chips { display: flex; gap: 5px; }

.tm-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font: 700 12px/1 Oswald, Inter, sans-serif;
}

.tm-chip.is-won { background: var(--accent-grad); color: var(--accent-ink); }
.tm-chip.is-lost { background: rgba(255, 82, 60, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 82, 60, 0.4); color: #ff8b7a; }

/* Ближайший матч */

.tm-next {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(120deg, rgba(255, 201, 77, 0.13), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.3);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tm-next-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.tm-next-opp { font-size: 15px; color: var(--text-dim); }
.tm-next-opp b { color: #fff; }

.tm-next-stage {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tm-next-when {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font: 600 18px/1.2 Oswald, Inter, sans-serif;
  color: var(--accent);
  white-space: nowrap;
}

.tm-next-rel {
  font: 600 11px/1.4 Inter, sans-serif;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* Путь по турниру */

.tm-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.tm-path-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  border-left: 3px solid rgba(255, 201, 77, 0.4);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tm-path-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tm-path-place {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.tm-path-title {
  font: 600 17px/1.2 Oswald, Inter, sans-serif;
  letter-spacing: 0.02em;
  color: #fff;
}

.tm-path-nums {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
}

.tm-path-nums b { color: var(--text); font-weight: 700; }
.tm-path-nums .is-accent,
.tm-path-nums .is-accent b { color: var(--accent); }
.tm-path-note { font-size: 11.5px; color: var(--text-faint); }

/* Состав */

.tm-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.tm-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background 0.14s ease;
}

a.tm-player:hover { background: rgba(255, 201, 77, 0.09); color: inherit; }

.tm-player-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Подчёркивание рисует сам <a> и потомки его не отменяют — поэтому ссылка
   без подчёркивания, а линию несёт только ник. */
a.tm-player { text-decoration: none; }

.tm-player-name {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 3px;
}

a.tm-player:hover .tm-player-name { color: var(--accent); text-decoration-color: var(--accent); }

.tm-player-cap {
  flex: none;
  padding: 2px 7px;
  background: rgba(255, 201, 77, 0.14);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Процент побед — крупно и цветом по шкале сайта (.wr-* из style.css).
   Свой color тут не задаём: он бы перебил .wr-*, потому что tournaments.css
   подключается после style.css при равной специфичности. */
.tm-player-wr {
  flex: none;
  font: 700 16px/1.2 Oswald, Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}

.tm-player-wr.is-empty { color: var(--text-faint); }

/* История игр */

.tm-history { display: flex; flex-direction: column; gap: 8px; }

.tm-match {
  display: grid;
  grid-template-columns: 104px 92px minmax(120px, 200px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.022);
  border-left: 3px solid transparent;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tm-match.is-won { border-left-color: var(--green); }
.tm-match.is-lost { border-left-color: rgba(255, 82, 60, 0.6); }

.tm-res-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tm-res-badge.is-won {
  background: rgba(143, 209, 63, 0.12);
  box-shadow: inset 0 0 0 1px rgba(143, 209, 63, 0.45);
  color: var(--green);
}

.tm-res-badge.is-lost {
  background: rgba(255, 82, 60, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 82, 60, 0.45);
  color: #ff8b7a;
}

.tm-match[data-match] { cursor: pointer; transition: background 0.14s ease; }
.tm-match[data-match]:hover,
.tm-match[data-match]:focus-visible { background: rgba(255, 255, 255, 0.045); outline: none; }

.tm-match-when {
  display: flex;
  flex-direction: column;
  font: 600 13.5px/1.25 Oswald, Inter, sans-serif;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tm-match-time { font-size: 11px; color: var(--text-dim); }

.tm-match-opp {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.tm-match-vs-label { flex: none; }

.tm-match-opp b {
  color: var(--text);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-match-score {
  justify-self: end;
  font: 600 18px/1 Oswald, Inter, sans-serif;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Общие блоки: призыв к действию, ключевые даты, описание */

.tourn-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(120deg, rgba(255, 201, 77, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.26);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.tourn-cta-text { flex: 1; min-width: 220px; font-size: 13.4px; color: var(--text-dim); }
.tourn-cta-text b { color: var(--text); }

.tourn-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-grad);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}

.tourn-cta-btn:hover { filter: brightness(1.07); }

.tourn-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 22px;
}

.tourn-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line-soft);
}

.tourn-timeline-item { position: relative; }

.tourn-timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-deep);
}

.tourn-timeline-item.is-done::before { background: var(--accent); border-color: var(--accent); }

.tourn-timeline-item.is-next::before {
  border-color: var(--accent);
  animation: tournPulseGold 1.6s ease-in-out infinite;
}

@keyframes tournPulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 77, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 201, 77, 0); }
}

.tourn-timeline-title { font-size: 13.4px; font-weight: 700; color: var(--text); }
.tourn-timeline-date { font-size: 12.6px; color: var(--text-dim); margin-top: 2px; }

.tourn-desc {
  font-size: 13.6px;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-line;
  margin: 0;
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .tp-hero-stats { padding-left: 0; border-left: none; gap: 18px; }
  .tp-groups { grid-template-columns: 1fr; }
  .tp-match,
  .tp-played-row { grid-template-columns: 96px minmax(0, 1fr); grid-auto-rows: auto; row-gap: 6px; }
  .tp-match .tp-match-stage,
  .tp-played-row .tp-match-stage { grid-column: 2; }
  .tp-match-teams,
  .tp-played-teams { grid-column: 1 / -1; }
  .tp-match-starts,
  .tp-played-score { grid-column: 2; justify-self: end; }
}

@media (max-width: 640px) {
  .tourn-row {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
  }
  .tourn-row-side {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid var(--line-soft);
  }
  .tourn-row-award { flex-direction: row; align-items: baseline; gap: 8px; }
  .tourn-row-title { font-size: 17px; }
  .tp-hero-inner,
  .tp-stages-inner,
  .tp-tabs-inner,
  .tp-body { padding-left: 14px; padding-right: 14px; }
  .tp-body { gap: 34px; padding-top: 22px; }
  .tp-group-cols,
  .tp-group-row { grid-template-columns: 26px minmax(0, 1fr) 34px 46px; padding: 9px 12px; }
  .tp-group-cols span:nth-child(4),
  .tp-group-row span:nth-child(4) { display: none; }
  .tp-ava { width: 26px; height: 26px; font-size: 9px; }
  /* На телефоне таблицы несыгранного этапа — экран нулей, показываем текущий */
  .tp-groups .tp-group:not(.is-primary) { display: none; }
  .tm-match {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 6px;
  }
  .tm-match-when { grid-row: 1; }
  .tm-res-badge { grid-row: 1; justify-self: end; }
  .tm-match .tp-match-stage,
  .tm-match-opp { grid-column: 1 / -1; }
  .tm-match-score { grid-column: 2; }
  .tm-next-when { margin-left: 0; align-items: flex-start; }
  .tourn-panel-close { top: 8px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .tourn-row,
  .tourn-row-arrow { transition: none; }
  .tourn-status-dot,
  .sort-chip-live-dot,
  .tourn-timeline-item.is-next::before { animation: none; }
  .tourn-page { scroll-behavior: auto; }
}

/* Итог матча: победитель зелёной плашкой — читается быстрее счёта */
.tp-win-badge {
  justify-self: end;
  flex-wrap: wrap;
  justify-content: center;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(143, 209, 63, 0.12);
  box-shadow: inset 0 0 0 1px rgba(143, 209, 63, 0.45);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  max-width: 100%;
}

.tp-win-badge b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #cdeb9c;
}

.tp-played-row[data-match],
.tp-match[data-match] { cursor: pointer; transition: background 0.14s ease; }

.tp-played-row[data-match]:hover,
.tp-played-row[data-match]:focus-visible { background: rgba(255, 255, 255, 0.035); outline: none; }

.tp-match[data-match]:hover,
.tp-match[data-match]:focus-visible {
  background: linear-gradient(100deg, rgba(255, 201, 77, 0.12), rgba(255, 255, 255, 0.02));
  outline: none;
}

/* Карточка матча */

.tp-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 7, 0.76);
  backdrop-filter: blur(6px);
}

.tp-mm-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 22px 24px 20px;
  background: linear-gradient(180deg, #141b11 0%, var(--bg-deep) 60%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 201, 77, 0.18);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: tpModalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tpModalIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.tp-mm-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 14, 12, 0.6);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.tp-mm-close:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.tp-mm-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-right: 40px;
}

.tp-mm-stage {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.tp-mm-when { font-size: 12.5px; color: var(--text-dim); }

.tp-mm-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.tp-mm-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 12px;
  text-align: center;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.025);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  cursor: pointer;
  transition: background 0.14s ease;
}

.tp-mm-team:hover { background: rgba(255, 201, 77, 0.08); }
.tp-mm-team.is-winner { box-shadow: inset 0 0 0 1px rgba(143, 209, 63, 0.45); background: rgba(143, 209, 63, 0.07); }
.tp-mm-team.is-loser { opacity: 0.72; }

.tp-mm-name {
  max-width: 100%;
  font: 600 17px/1.2 Oswald, Inter, sans-serif;
  letter-spacing: 0.02em;
  color: #fff;
  overflow-wrap: anywhere;
}

.tp-mm-facts {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tp-mm-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tp-mm-score {
  font: 600 26px/1 Oswald, Inter, sans-serif;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.tp-mm-rel { font-size: 11px; color: var(--text-dim); }

.tp-mm-block { display: flex; flex-direction: column; gap: 10px; }

.tp-mm-h2h {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.tp-mm-h2h-score {
  font: 600 22px/1 Oswald, Inter, sans-serif;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tp-mm-h2h-note { font-size: 12.5px; color: var(--text-dim); }

.tp-mm-list { display: flex; flex-direction: column; }

.tp-mm-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-dim);
}

.tp-mm-row-res { color: var(--green); font-weight: 700; white-space: nowrap; }

.tp-mm-note { font-size: 11.5px; color: var(--text-faint); }

/* Регламент от Lesta — это простыня на несколько экранов, поэтому она
   уезжает в самый низ и раскрывается по требованию. */
.tp-rules > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--tourn-dim), rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
}

.tp-rules > summary::-webkit-details-marker { display: none; }
.tp-rules > summary::before { content: "▸"; color: var(--accent); }
.tp-rules[open] > summary::before { content: "▾"; }
.tp-rules > summary:hover { color: var(--text); }
.tp-rules .tourn-desc { margin-top: 14px; max-width: 900px; }

/* Адаптив карточки матча живёт в конце файла: сами правила .tp-mm-* описаны
   ниже основного блока медиазапросов и иначе перебивали бы их. */
@media (max-width: 900px) {
  .tp-modal { padding: 14px; }
  .tp-mm-card { padding: 18px 16px 16px; gap: 14px; }
  /* Три колонки команд не влезают — ставим их друг под друга */
  .tp-mm-teams { grid-template-columns: minmax(0, 1fr); }
  .tm-form-chips { flex-wrap: wrap; justify-content: center; }
  .tp-mm-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tp-mm-row .tp-match-stage { display: none; }
}
