:root {
  --bg: #f6f7f9;
  --card: #fff;
  --line: #e3e6ea;
  --text: #1f2933;
  --muted: #7b8794;
  --accent: #1d4ed8;
  --live: #dc2626;
  --ok: #047857;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }

header {
  background: #111827;
  color: #e5e7eb;
  padding: 10px 0;
  margin-bottom: 20px;
}
header .brand { color: #fff; font-weight: 600; text-decoration: none; margin-right: 8px; }
header .field { display: flex; align-items: center; gap: 6px; color: #9ca3af; }
header input, header select {
  background: #1f2937; color: #e5e7eb; border: 1px solid #374151;
  border-radius: 6px; padding: 4px 8px; font: inherit;
}

.sports { display: flex; gap: 2px; flex-wrap: wrap; }
.sports a {
  color: #cbd5e1; text-decoration: none; padding: 4px 10px; border-radius: 6px;
}
.sports a:hover { background: #1f2937; }
.sports a.on { background: #374151; color: #fff; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 16px; overflow: hidden;
}
.card > h2 {
  margin: 0; padding: 10px 14px; font-size: 14px; background: #f9fafb;
  border-bottom: 1px solid var(--line);
}
.card > .body { padding: 12px 14px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 10px; }
td { padding: 6px 10px; border-top: 1px solid #f1f3f5; vertical-align: middle; }
tr:hover td { background: #fafbfc; }

a { color: var(--accent); }
a:hover { text-decoration: underline; }

.logo { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.team { display: inline-flex; align-items: center; }

.score { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px; }
.tag.live { background: #fee2e2; color: var(--live); }
.tag.finished { background: #f1f5f9; color: var(--muted); }
.tag.scheduled { background: #dbeafe; color: var(--accent); }
.tag.postponed { background: #fef3c7; color: #92400e; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.kv td:first-child { color: var(--muted); width: 190px; }

details.block { border-top: 1px solid #f1f3f5; }
details.block summary {
  cursor: pointer; padding: 8px 14px; display: flex; gap: 8px; align-items: center;
}
details.block summary:hover { background: #fafbfc; }
details.block pre {
  margin: 0; padding: 12px 14px; background: #0f172a; color: #e2e8f0;
  overflow: auto; max-height: 420px; font-size: 12px; line-height: 1.5;
}

.pill { background: #f1f5f9; color: var(--muted); padding: 1px 7px; border-radius: 6px; font-size: 12px; }
.pill.lang { background: #fef3c7; color: #92400e; }

.events li { list-style: none; padding: 4px 0; border-top: 1px solid #f1f3f5; }
.events { margin: 0; padding: 0; }
.minute { display: inline-block; min-width: 46px; color: var(--muted); font-variant-numeric: tabular-nums; }

.statrow { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; align-items: center; padding: 3px 0; }
.statrow .bar { height: 6px; background: #eef1f4; border-radius: 3px; overflow: hidden; display: flex; }
.statrow .bar i { display: block; height: 100%; }
.statrow .bar i:first-child { background: var(--accent); }
.statrow .bar i:last-child { background: #94a3b8; }
.statrow .n { font-variant-numeric: tabular-nums; }
.statrow .n.r { text-align: right; }

.warn { background: #fef3c7; color: #92400e; padding: 8px 14px; border-radius: 8px; margin-bottom: 12px; }
footer { padding: 20px 0 40px; }

/* ── табло матча ─────────────────────────────────────────────────── */
.head { position: relative; padding: 16px; }
.head-surface {
  position: absolute; top: 12px; left: 14px;
  background: #eef2f7; color: var(--muted);
  padding: 2px 10px; border-radius: 999px; font-size: 12px;
}
.head-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.head-side { display: flex; align-items: center; gap: 10px; }
.head-side.away { flex-direction: row-reverse; text-align: right; }
.head-photo {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  background: #eef2f7; flex: none;
}
.head-name { font-size: 17px; font-weight: 600; text-decoration: none; }
.head-center { text-align: center; }
.head-status { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.head-status.live { color: var(--live); }
.head-score { font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score sup { font-size: 10px; color: var(--muted); margin-left: 1px; }
@media (max-width: 700px) {
  .head-row { grid-template-columns: 1fr; gap: 10px; }
  .head-side.away { flex-direction: row; text-align: left; }
}

/* ── хроника матча ───────────────────────────────────────────────── */
.chron-period {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 14px; background: #f1f5f9; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.chron { margin: 0; padding: 0; list-style: none; }
.chron > li { border-top: 1px solid #f1f3f5; padding: 6px 12px; }
.chron-row { display: grid; grid-template-columns: 1fr 3.5rem 1fr; align-items: center; gap: 8px; }
.chron-min { text-align: center; background: #f1f5f9; border-radius: 4px; padding: 1px 0; min-width: 0; }
.ev-side { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-width: 0; text-align: right; }
.ev-side.ev-away { flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
.ev-photo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #eef2f7; flex: none; }
.ev-icon { flex: none; font-size: 13px; }
.ev-text { min-width: 0; }
.ev-text i { display: block; font-style: normal; font-size: 12px; }
.chron-comment { margin: 4px 0 0; font-size: 12px; }

/* ── теннис: по геймам ───────────────────────────────────────────── */
.set-strip { display: flex; gap: 3px; flex-wrap: wrap; padding: 0 0 8px; }
.set-strip i { width: 12px; height: 12px; border-radius: 2px; display: block; }
.set-strip i.h { background: var(--accent); }
.set-strip i.a { background: #94a3b8; }
.set-strip i.tb { width: 20px; }
.set-strip i.brk { outline: 2px solid #f59e0b; outline-offset: 1px; }
.set-sum { width: auto; margin: 0 0 6px; }
.set-sum td, .set-sum th { border: 0; padding: 1px 10px; font-size: 12px; }
.set-sum th { color: var(--muted); font-weight: 400; text-align: center; }
.set-sum td { font-weight: 600; width: 48px; }
.set-sum td:first-child { text-align: right; }
.games { margin: 0; padding: 0; list-style: none; }
.games > li { border-top: 1px solid #f1f3f5; padding: 5px 0; }
.game-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.game-left { text-align: right; }
.game-score {
  min-width: 70px; text-align: center; background: #f1f5f9;
  border-radius: 4px; padding: 2px 8px; line-height: 1.25;
}
.game-score b.win { color: var(--accent); }
.serve { color: var(--muted); font-size: 11px; }
.lost { color: var(--live); font-size: 11px; text-transform: uppercase; margin: 0 4px; }
.points {
  display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: center;
  margin-top: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.points .mini { color: #b45309; font-weight: 600; }
.mark {
  font-style: normal; font-size: 9px; font-weight: 700; color: #fff;
  border-radius: 2px; padding: 0 2px; margin-left: 2px;
}
.mark.bp { background: #dc2626; }
.mark.sp { background: var(--accent); }
.mark.mp { background: #047857; }

/* ── очные встречи ───────────────────────────────────────────────── */
.h2h { display: grid; grid-template-columns: 160px 1fr 160px; gap: 16px; align-items: center; }
.h2h-side { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.h2h-mid { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fafbfc; }
.form { display: flex; gap: 3px; }
.form i {
  width: 18px; height: 18px; border-radius: 4px; font-style: normal;
  font-size: 11px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.form i.w { background: var(--ok); }
.form i.d { background: #94a3b8; }
.form i.l { background: var(--live); }
.form i.q { background: #e5e7eb; color: var(--muted); }
@media (max-width: 760px) { .h2h { grid-template-columns: 1fr; } }

/* ── строка матча в списках встреч и формы ───────────────────────── */
.mr {
  display: grid; grid-template-columns: 96px 1fr auto 1fr 24px;
  align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #f1f3f5;
}
.mr:first-child { border-top: 0; }
.mr-when { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mr-status.live { color: var(--live); }
.mr-status.scheduled { color: var(--accent); }
.mr-team {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  color: var(--muted); text-decoration: none;
}
.mr-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-team:not(.mr-right) { justify-content: flex-end; text-align: right; }
.mr-focus { color: var(--text); font-weight: 600; }
.mr-score {
  min-width: 64px; text-align: center; background: #f1f5f9; border-radius: 6px;
  padding: 2px 8px; text-decoration: none; color: inherit; font-weight: 600;
}
.mr-badge { display: flex; justify-content: flex-end; }
.mr-badge i {
  width: 18px; height: 18px; border-radius: 4px; font-style: normal;
  font-size: 11px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.mr-badge i.w { background: var(--ok); }
.mr-badge i.d { background: #94a3b8; }
.mr-badge i.l { background: var(--live); }
.mr-note { grid-column: 1 / -1; margin: 2px 0 0; text-align: center; font-size: 12px; }
@media (max-width: 700px) {
  .mr { grid-template-columns: 1fr auto 1fr; }
  .mr-when, .mr-badge { grid-column: 1 / -1; flex-direction: row; gap: 6px; justify-content: center; }
}
.mr-status.odd { color: #b45309; }

/* ── арена ───────────────────────────────────────────────────────── */
.venue { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.venue-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.venue-pics img { width: 100%; height: 86px; object-fit: cover; border-radius: 6px; background: #eef2f7; }
.venue-pics a { grid-column: 1 / -1; font-size: 12px; }
@media (max-width: 760px) { .venue { grid-template-columns: 1fr; } }

/* ── характер игры команд ────────────────────────────────────────── */
.style-grid { gap: 0; }
.style-side { padding: 0 14px; border-left: 1px solid var(--line); }
.style-side:first-child { border-left: 0; padding-left: 0; }
.style-team { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.style-head {
  margin: 12px 0 4px; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.traits { margin: 0; padding: 0; list-style: none; }
.traits li {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 8px;
  align-items: baseline; padding: 3px 0; border-top: 1px solid #f1f3f5;
}
.traits li:first-child { border-top: 0; }
.tr-kind { color: var(--muted); font-size: 11px; }
.tr-kind.def { color: #0891b2; }
.tr-text { min-width: 0; }
.tr-lv { font-size: 12px; white-space: nowrap; }
.tr-lv.lv5 { color: var(--ok); font-weight: 600; }
.tr-lv.lv4 { color: var(--ok); }
.tr-lv.lv2 { color: var(--live); }
.tr-lv.lv1 { color: var(--live); font-weight: 600; }
.tr-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px; font-size: 12px;
}
@media (max-width: 900px) { .style-side { border-left: 0; padding: 0; } }

/* ── счёт по периодам: числа прижаты вправо, итог отделён ────────── */
td.num, th.num { text-align: right; width: 54px; }
th.num { font-variant-numeric: tabular-nums; }
td.total, th.total { width: 64px; padding-left: 16px; }
td.total { font-weight: 700; }

/* ── вкладки срезов статистики ───────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 12px; cursor: pointer;
}
.tab:hover { background: #f8fafc; }
.tab.on { background: #111827; border-color: #111827; color: #fff; }
.pane.off { display: none; }
.statrow .n.lead { font-weight: 700; color: var(--text); }
.statrow .of { font-style: normal; font-size: 11px; color: var(--muted); }

/* ── кнопки в шапке блока ────────────────────────────────────────── */
.card > h2 { display: flex; align-items: center; gap: 8px; }
.cardbtn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 6px; padding: 0 7px; height: 22px; line-height: 20px;
  font: inherit; font-size: 12px; cursor: pointer; flex: none;
}
.cardbtn:hover { background: #eef2f7; color: var(--text); }
.cardbtn.fold { margin-left: auto; }
.card.folded > .body { display: none; }
.card.folded .cardbtn.fold { transform: rotate(-90deg); }

/* ── окно с исходными данными ────────────────────────────────────── */
#modal {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, .55); padding: 32px 16px;
}
#modal.open { display: block; }
.modal-box {
  max-width: 980px; margin: 0 auto; background: var(--card);
  border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
  max-height: calc(100vh - 64px);
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f9fafb;
}
.modal-head button {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.modal-head button:hover { background: #eef2f7; }
#modal-code {
  margin: 0; padding: 14px; overflow: auto; background: #0f172a; color: #e2e8f0;
  font-size: 12px; line-height: 1.5;
}

/* ── составы ─────────────────────────────────────────────────────── */
.lu-grid { gap: 0; }
.lu-side { padding: 0 14px; border-left: 1px solid var(--line); min-width: 0; }
.lu-side:first-child { border-left: 0; padding-left: 0; }
.lu-team { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.lu-head {
  margin: 12px 0 4px; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.lu { margin: 0; padding: 0; list-style: none; }
.lu li {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; border-top: 1px solid #f1f3f5;
}
.lu li:first-child { border-top: 0; }
.lu-num {
  min-width: 20px; text-align: right; color: var(--muted);
  font-variant-numeric: tabular-nums; font-size: 12px;
}
.flag { width: 16px; height: 11px; object-fit: cover; border-radius: 2px; flex: none; }
.lu-photo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #eef2f7; flex: none; }
.lu-name { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-name:hover { text-decoration: underline; }
.role {
  width: 15px; height: 15px; border-radius: 3px; background: #e2e8f0; color: var(--muted);
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; flex: none;
}
.lu-ev { font-size: 11px; color: var(--muted); white-space: nowrap; margin-left: 4px; }
.lu-miss { font-size: 12px; color: var(--live); white-space: nowrap; }
@media (max-width: 900px) { .lu-side { border-left: 0; padding: 0; } }

/* ── текстовая трансляция ────────────────────────────────────────── */
.cm { margin: 0; padding: 0; list-style: none; }
.cm.off { display: none; }
.cm li {
  display: grid; grid-template-columns: 76px 20px 1fr; gap: 8px;
  align-items: baseline; padding: 6px 0; border-top: 1px solid #f1f3f5;
}
.cm li:first-child { border-top: 0; }
.cm li.key { font-weight: 600; }
.cm-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cm-icon { font-size: 12px; text-align: center; }
.cm-more {
  display: block; width: 100%; margin-top: 8px; padding: 6px;
  border: 1px solid var(--line); background: #f9fafb; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--accent); cursor: pointer;
}
.cm-more:hover { background: #eef2f7; }

/* ── статистика команд за сезон ──────────────────────────────────── */
.season-head, .season tr { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; }
.season-head { padding-bottom: 8px; border-bottom: 1px solid var(--line); align-items: start; }
.season-head b { display: block; }
.season-head i { font-style: normal; font-size: 12px; }
.season-right { text-align: right; }
.season-mid { text-align: center; font-size: 12px; align-self: center; }
.cut { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 4px; }
.season-right .cut { justify-content: flex-end; }
.cutbtn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 1px 8px; font: inherit; font-size: 11px; cursor: pointer;
}
.cutbtn:hover { background: #f8fafc; }
.cutbtn.on { background: #111827; border-color: #111827; color: #fff; }
.season { width: 100%; }
.season td { border-top: 1px solid #f1f3f5; padding: 4px 0; }
.season td.num { font-variant-numeric: tabular-nums; }
.season tr td.num:first-child { text-align: left; }
.season tr td.num:last-child { text-align: right; }
.season td.num.lead { font-weight: 700; color: var(--text); }
.season-name { text-align: center; color: var(--muted); font-size: 13px; }
.season-group {
  display: block; margin-bottom: 6px; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit;
}

/* ── лучшие игроки ───────────────────────────────────────────────── */
.lead-teams, .lead-row { display: grid; grid-template-columns: 1fr 60px 1fr 60px; gap: 8px; align-items: center; }
.lead-teams { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.lead-teams > span:first-child { grid-column: 1 / 3; display: flex; align-items: center; gap: 6px; }
.lead-teams .lead-right { grid-column: 3 / 5; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.lead-head {
  margin: 10px 0 2px; text-align: center; font-size: 11px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.lead-row { padding: 4px 0; border-top: 1px solid #f1f3f5; }
.lead-name { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-name:hover { text-decoration: underline; }
.lead-val { text-align: right; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ── турнирная таблица и шахматка ────────────────────────────────── */
.tablewrap { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings th {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  font-weight: 500; text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.standings th:nth-child(2) { text-align: left; }
.standings td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.standings td.num { text-align: center; white-space: nowrap; }
.standings tr.me { font-weight: 600; }
.standings tr.me td { border-top: 1px solid #94a3b8; border-bottom: 1px solid #94a3b8; }
.standings .formcol { text-align: left; }

/* зоны: шкала от зелёного к красному, подпись — в легенде под таблицей */
.standings tr.z0 td { background: #dcfce7; }
.standings tr.z1 td { background: #ecfccb; }
.standings tr.z2 td { background: #fef9c3; }
.standings tr.z3 td { background: #fef3c7; }
.standings tr.z4 td { background: #fee2e2; }
.standings tr.z5 td { background: #fecaca; }

.zones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.zone { font-size: 11px; color: var(--muted); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); }
.zone.z0 { background: #dcfce7; } .zone.z1 { background: #ecfccb; } .zone.z2 { background: #fef9c3; }
.zone.z3 { background: #fef3c7; } .zone.z4 { background: #fee2e2; } .zone.z5 { background: #fecaca; }

.standings .form { display: inline-flex; gap: 3px; }
.standings .form a {
  width: 18px; height: 18px; border-radius: 4px; font-size: 11px; font-weight: 600;
  color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center;
}
.standings .form a.w { background: var(--ok); }
.standings .form a.d { background: #94a3b8; }
.standings .form a.l { background: var(--live); }
.standings .form a.q { background: #e5e7eb; color: var(--muted); }

.cross th.cxhead { padding: 4px 2px; }
.cross th.cxhead .logo { margin: 0; }
.cross td { min-width: 42px; }
.cx { text-decoration: none; font-size: 12px; }
.cx.h { color: var(--ok); }
.cx.a { color: var(--live); }
.cx.soon { color: var(--muted); }
.cross td:nth-child(2) { white-space: nowrap; }

/* ── страница команды ────────────────────────────────────────────── */
.pc { display: inline-flex; align-items: center; gap: 6px; }
.pc-photo {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
  background: #e5e7eb; flex: 0 0 20px;
}
.squad td:nth-child(2) { white-space: nowrap; }

.trait-head {
  text-align: center; font-size: 12px; color: var(--muted);
  background: #fafbfc; margin: 0; padding: 5px 0; border-bottom: 1px solid var(--line);
}
.trait { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.trait-mark { width: 18px; display: inline-flex; justify-content: center; color: #64748b; }
.trait-level { font-size: 12px; }
.trait-level.l5 { color: #15803d; }
.trait-level.l4 { color: #65a30d; }
.trait-level.l3 { color: var(--muted); }
.trait-level.l2 { color: #ef4444; }
.trait-level.l1 { color: #b91c1c; }
.styles { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; padding: 12px 0; }
.style-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-align: center; max-width: 140px; }

.tr-in { color: var(--ok); white-space: nowrap; }
.tr-out { color: var(--live); white-space: nowrap; }

/* ── сетка плей-офф ──────────────────────────────────────────────── */
.bk { display: flex; gap: 24px; overflow-x: auto; padding: 4px 0 12px; align-items: stretch; }
.bk-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 240px; }
.bk-head {
  margin: 0 0 4px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}
.bk-pair { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.bk-side { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 13px; }
.bk-side + .bk-side { border-top: 1px solid var(--line); }
.bk-on { font-weight: 600; }
.bk-score {
  min-width: 22px; text-align: center; text-decoration: none; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: 6px; margin-left: 2px;
}
.bk-on .bk-score { color: var(--text); }

/* ── страница игрока ─────────────────────────────────────────────── */
.pl-head { display: flex; align-items: center; gap: 10px; }
.pl-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e5e7eb; }
.pl-min { font-size: 11px; margin-right: 6px; }
.career-total td { font-weight: 600; background: #fafbfc; border-bottom: 2px solid var(--line); }

/* ── ожидание данных, которых ещё нет ───────────────────────────── */
.cooking { text-align: center; padding: 48px 16px; }
.cooking p { margin: 4px 0; }
.cooking-dots { display: inline-flex; gap: 6px; margin-bottom: 12px; }
.cooking-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  animation: cooking 1.1s infinite ease-in-out;
}
.cooking-dots i:nth-child(2) { animation-delay: .15s; }
.cooking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cooking {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* ── последние матчи игрока ──────────────────────────────────────── */
.pl-games .pl-vs { text-align: center; }
.pl-games td.pl-vs { display: flex; align-items: center; gap: 8px; justify-content: center; }
.pl-side { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 0; justify-content: flex-end; text-decoration: none; }
.pl-side.pl-right { justify-content: flex-start; }
.pl-games .form { display: inline-flex; }
.pl-games .form i {
  width: 18px; height: 18px; border-radius: 4px; font-style: normal;
  font-size: 11px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.pl-games .form i.w { background: var(--ok); }
.pl-games .form i.d { background: #94a3b8; }
.pl-games .form i.l { background: var(--live); }

/* ── левое меню вида спорта ──────────────────────────────────────── */
.daygrid { display: grid; grid-template-columns: 290px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .daygrid { grid-template-columns: 1fr; } }
.side { position: sticky; top: 8px; }
.mblock { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.mhead {
  margin: 0; padding: 8px 12px; background: var(--ink, #1f2933); color: #fff;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
}
.mi {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-top: 1px solid var(--line); font-size: 13px; text-decoration: none; color: var(--text);
}
.mi:hover { background: #f1f5f9; }
.mi .logo { width: 16px; height: 16px; }
.msearch { width: 100%; border: 0; border-top: 1px solid var(--line); padding: 7px 12px; font: inherit; }
.msearch:focus { outline: 2px solid #cbd5e1; outline-offset: -2px; }
.mregion > summary {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer;
  border-top: 1px solid var(--line); font-size: 13px;
}
.mregion > summary::-webkit-details-marker { display: none; }
.mregion[open] > summary { font-weight: 600; background: #f8fafc; }
.mcount { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.mregion .mi { padding-left: 32px; }
#mregions { max-height: 70vh; overflow-y: auto; }
.tabs .tab[disabled] { opacity: .4; cursor: default; }
.tabs .tab .mcount { margin-left: 4px; }

/* ── ход матча ───────────────────────────────────────────────────── */
.mom { margin-bottom: 12px; }
.mom-svg { width: 100%; height: 170px; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.mom-label { font-size: 9px; fill: var(--muted); }
.mom-legend { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; }
.mom-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.mom-legend .mom-dot:first-child { margin-left: 0; }

/* ── лента матча ─────────────────────────────────────────────────── */
.tl { margin-bottom: 12px; }
.tl-svg { width: 100%; height: 150px; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.tl-tick { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.tl-legend { margin: 6px 0 0; font-size: 12px; }
.box th { font-size: 10px; }
.box td:first-child { white-space: nowrap; }

/* ── зоны атак ───────────────────────────────────────────────────── */
.pz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .pz-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pz-grid { grid-template-columns: 1fr; } }
.pz-title { margin: 0 0 4px; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.pz-svg { width: 100%; background: #f8fafc; border-radius: 6px; }
.pz-value { font-size: 9px; font-weight: 600; fill: #0f172a; text-anchor: middle; }
.pz-label { font-size: 5.5px; fill: #475569; text-anchor: middle; }
