/* teams.css — вид командных турниров, перенесён с bridgeresults.org (папка Alt):
   тёмно-синие рамки #0C479D, светло-зелёные шапки #ddffdd, жёлтая домашняя / сиреневая гостевая команды,
   кнопки и ячейки навигации с зелёной рамкой. Подключается после style.css только на страницах командников. */

/* ===== Общее ===== */
body.team-results {
  background: #fff;
  color: #3C3C3C;
  font-family: Arial, Helvetica, sans-serif;
}
body.team-results .tournament-header {
  background: #fff;
  border-bottom: none;
  padding-bottom: 8px;
}
body.team-results .tournament-header h1 { color: #006699; }
body.team-results h2, body.team-results .head2 { color: #006699; }

/* Таблицы как на сайте-источнике */
body.team-results table.allbrd,
body.team-results table.allbrd td { border: 1px solid #0C479D; border-collapse: collapse; }
body.team-results table.allbrd th {
  border: 1px solid #0C479D;
  border-collapse: collapse;
  background: #ddffdd;
  color: #3C3C3C;
  font-weight: normal;
}
body.team-results table.allbrd th, body.team-results table.allbrd td { white-space: nowrap; }
body.team-results table.allbrd td.home, body.team-results table.allbrd td.bg-home { background-color: #FEF8BC; }
body.team-results table.allbrd td.away, body.team-results table.allbrd td.bg-away { background-color: #E4A0FE; }
body.team-results table.allbrd th.home { background-color: #f2ec9e; }
body.team-results table.allbrd th.away { background-color: #dcbcf3; }
body.team-results table.nobrd, body.team-results table.nobrd th, body.team-results table.nobrd td { border: none; }
body.team-results table.allbrd table.nobrd, body.team-results table.allbrd table.nobrd th,
body.team-results table.allbrd table.nobrd td { border: none; background: transparent; }
body.team-results tr.odd, body.team-results tr.rm-odd { background-color: #F4F4F4; }
body.team-results tr.even, body.team-results tr.rm-even { background-color: #FFFFFF; }
body.team-results tr.own > td.home, body.team-results tr.own > td.bg-home { outline: 2px solid #16a34a; }
body.team-results td.nBRD { background-color: #9BFFB9; text-align: center; }
body.team-results a { color: #0c479d; }
body.team-results td.num { font-variant-numeric: tabular-nums; }
body.team-results table { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }

/* Ячейка команды: жирное имя, ростер во всплывашке на телефоне */
body.team-results table.team-cell { width: auto; max-width: 100%; }
body.team-results table.team-cell td.tc-name { padding: 1px 2px; }
body.team-results table.team-cell a { text-decoration: none; font-size: 14px; }
body.team-results .roster-pop { display: none; }

/* Навигация турнира — кнопки и ячейки как на сайте-источнике */
body.team-results .tour-nav {
  max-width: 1190px;
  gap: 8px 16px;
  margin: 14px auto 18px;
}
body.team-results .nav-btn {
  background: #F4F4F4;
  border: 1px solid #4CAF50;
  border-radius: 8px;
  color: #0c479d;
  font-size: 16px;
  font-weight: normal;
  height: auto;
  padding: 3px 14px;
}
body.team-results .nav-btn:hover { background: #E0E0E0; box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24); border-color: #4CAF50; }
body.team-results .nav-btn.active { background: #008000; border-color: #AF4C50; color: #fff; font-weight: 700; }
body.team-results .view-toggle {
  background: #fff; border: 1px solid #4CAF50; border-radius: 999px; color: #0c479d;
  height: auto; padding: 3px 12px; font-size: 13px;
}
body.team-results .rounds { gap: 0; }
body.team-results .rounds-label { color: #3C3C3C; }
body.team-results .round-btn {
  width: 44px; min-width: 44px; height: auto; padding: 2px 0; margin: 0 2px;
  background: #F4F4F4; border: 1px solid #4CAF50; border-radius: 8px;
  color: #0c479d; font-size: 15px; font-weight: normal;
}
body.team-results .round-btn:hover { background: #E0E0E0; border-color: #4CAF50; }
body.team-results .round-btn.active { background: #F4F4F4; color: #0c479d; font-weight: 700; }

/* ===== Таблица лидеров (главная) ===== */
body.team-results .lb-page .table-title,
body.team-results .lb-title {
  text-align: center; color: #006699; font-size: 20px; font-weight: normal; margin: 14px 0 10px;
}
body.team-results .lb-wrap { max-width: 760px; margin: 0 auto; }
body.team-results .lb-wrap table.allbrd { width: 100%; }
body.team-results .lb-players { font-size: 12px; white-space: normal; color: #556; padding: 0 0 3px 4px; }
body.team-results .lb-players .pl { white-space: normal; }

/* ===== Тур: шапка + сетка «матчи | положение» ===== */
body.team-results .round-head {
  display: flex; justify-content: space-between; align-items: baseline;
  max-width: 1190px; margin: 0 auto; padding: 0 4px;
}
body.team-results .round-head h2 { color: #006699; font-size: 16px; }
body.team-results .round-head .rh-scores { white-space: nowrap; }
body.team-results .round-layout {
  max-width: 1190px; margin: 0 auto; padding: 0 4px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 310px); gap: 16px; align-items: start;
}
body.team-results .round-matches-wrap { min-width: 0; }
body.team-results table.round-matches { width: 100%; table-layout: fixed; }
body.team-results table.round-matches th, body.team-results table.round-matches td { padding: 3px; }
body.team-results .round-ranking { min-width: 0; }
body.team-results .round-ranking table.allbrd { width: 100%; table-layout: fixed; }
body.team-results .round-ranking col.col-rk { width: 15%; }
body.team-results .round-ranking col.col-vp { width: 25%; }
body.team-results table.round-matches td.c-brd { text-align: center; }
body.team-results .round-switch { max-width: 1190px; }
body.team-results .round-title { color: #006699; font-weight: 700; }

/* Мобильные матчи тура: по две строки на матч (показ — только в мобильном виде) */
body.team-results .rm-mob,
body.team-results .match-head,
body.team-results .mp-mob,
body.team-results .mp-sub { display: none; }
body.team-results .table-section { max-width: 1190px; }

/* ===== Протокол матча ===== */
body.team-results .match-head, body.team-results .match-head-desk { max-width: 880px; margin: 0 auto 10px; }
body.team-results .mh-teams { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 10px; }
body.team-results .mh-vs { font-weight: 700; font-size: 18px; color: #64748b; }
body.team-results .mh-rooms { display: flex; gap: 24px; justify-content: center; }
body.team-results .mh-room { text-align: left; min-width: 0; }
body.team-results .mh-label { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
body.team-results .mh-pair { font-size: 12px; line-height: 1.5; }
body.team-results .mh-pair b { color: #0c479d; margin-right: 4px; }
body.team-results .mh-room-label { font-weight: 700; font-size: 15px; }
body.team-results .mh-room-sep { color: #94a3b8; margin: 0 8px; }
body.team-results .match-head-desk td.home, body.team-results .match-head-desk td.bg-home { background-color: #FEF8BC; }
body.team-results .match-head-desk td.away, body.team-results .match-head-desk td.bg-away { background-color: #E4A0FE; }
body.team-results .match-head-desk td { padding: 2px 6px; }

body.team-results table.match-table { max-width: 900px; margin: 0 auto; width: 100%; }
body.team-results table.match-table th, body.team-results table.match-table td { padding: 2px; }
body.team-results table.match-table tr { height: 27px; }
body.team-results table.match-table td { height: auto; line-height: 18px; }
body.team-results table.match-table .match-foot-title { font-size: 18px; }
body.team-results .cell-cont { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
body.team-results .contract-bid { flex: 0 0 auto; text-align: left; padding-left: 6px; }
body.team-results .contract-decl { flex: 0 0 auto; min-width: 14px; text-align: center; }
body.team-results .cell-cont .bbo-btn { flex: none; }
body.team-results .c-butler { text-align: center; }
body.team-results .lead-res { font-size: 9px; font-weight: 700; white-space: nowrap; line-height: 1; }
body.team-results .lead-res.ok, body.team-results .lead-res.lead-best { color: #15803d; }
body.team-results .lead-res.bad, body.team-results .lead-res.lead-bad { color: #dc2626; }
body.team-results .match-hint { margin: 10px auto 0; max-width: 880px; color: #64748b; font-size: 12px; text-align: center; }

/* Чипы комнат OR/CR */
body.team-results .room-tag {
  display: none; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; margin-right: 4px;
  cursor: pointer; border: 1px solid #cbd5e1; background: #f1f5f9; color: #334155; user-select: none;
}
body.team-results .room-head-mob { display: none; }
body.team-results .room-tag.rt-open { background: #FEF8BC; border-color: #d9c84a; }
body.team-results .room-tag.rt-closed { background: #E4A0FE; border-color: #b06fd6; }

/* ===== Страница сдачи тура ===== */
body.team-results .protocol-section { padding: 8px 0; }
/* в столбик (picker → расклад → протоколы), как на сайте-источнике; style.css держит ряд с !important */
body.team-results .protocol-layout { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 14px; }
body.team-results .protocol-layout > * { min-width: 0; max-width: 100%; }
body.team-results .board-picker { width: 100% !important; flex: 0 0 auto !important; }
body.team-results .protocol-deal { width: 100% !important; max-width: 640px !important; flex: 0 0 auto !important; margin: 0 auto !important; }
body.team-results .protocol-results { width: 100% !important; max-width: 100% !important; flex: 1 1 auto !important; }
body.team-results .protocol-deal .deal-box { margin: 0 auto; }
/* расклад с DD сбоку (как dNp на сайте-источнике): руки слева, DD в 4 строки справа */
body.team-results .protocol-deal .deal-hand .dh-line { font-size: 18px; }
body.team-results .protocol-deal .deal-hand .dh-suit { font-size: 20px; }
body.team-results .deal-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
body.team-results .deal-corner { font-size: 12px; color: #64748b; white-space: nowrap; align-self: start; margin-top: 2px; }
body.team-results .deal-corner b { color: #334155; }
body.team-results .deal-dlr { grid-column: 1; grid-row: 1; justify-self: start; }
body.team-results .deal-vul { grid-column: 3; grid-row: 1; justify-self: start; }
/* DD-таблица компактнее, как на источнике (style.css держит 14px через !important — перебиваем) */
body.team-results .protocol-deal .dd-table { font-size: 11px !important; }
body.team-results .protocol-deal .dd-table th,
body.team-results .protocol-deal .dd-table td { padding: 1px 2px !important; font-size: 11px !important; }
body.team-results .protocol-deal .dd-table .dd-val {
  width: 1.3em !important; min-width: 1.3em !important; max-width: 1.5em !important; font-size: 11px !important;
}
body.team-results .protocol-deal .dd-table .dd-seat { width: 1.1em !important; font-size: 11px !important; }
body.team-results .protocol-deal .dd-table .dd-head th { font-size: 10px !important; }
body.team-results .dd-side .deal-minimax { margin-top: 4px; font-size: 13px; }
body.team-results .deal-wide .dd-mobile,
body.team-results .deal-wide .mx-mobile { display: none; }
body.team-results .deal-wide .mx-desktop { display: block; }
/* расклад протокола сдачи: мобильный вид по ширине <=700, ориентация не важна */
@media (max-width: 700px) {
  body.team-results .deal-wrap { flex-direction: column; align-items: center; gap: 8px; }
  body.team-results .deal-wide .dd-side { display: none !important; }
  body.team-results .deal-wide .dd-mobile { display: block !important; }
  body.team-results .deal-wide .mx-desktop { display: none !important; }
  body.team-results .deal-wide .mx-mobile { display: block !important; }
  body.team-results .protocol-deal .deal-hand .dh-line { font-size: 14px; }
  body.team-results .protocol-deal .deal-hand .dh-suit { font-size: 16px; }
}
/* протокол сдачи: колонка ROOM скрыта при ширине <=800 */
@media (max-width: 800px) {
  body.team-results table.team-board th.c-room,
  body.team-results table.team-board td.c-room { display: none !important; }
}
body.team-results .protocol-results { width: 100%; min-width: 0; }
body.team-results .team-board-page .protocol-results { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.team-results table.team-board { min-width: 0; }
body.team-results .nav-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; justify-content: center; }
body.team-results .nav-row .nav-label { color: #3C3C3C; white-space: nowrap; font-weight: 700; }
body.team-results .nav-cells { display: flex; flex-wrap: nowrap; gap: 0; flex: 1 1 auto; justify-content: center; }
body.team-results .nav-cell {
  min-width: 42px; margin: 0 2px; padding: 3px; text-align: center;
  background: #F4F4F4; border: 1px solid #4CAF50; border-radius: 8px;
  text-decoration: none; color: #0c479d; font-size: 16px;
}
body.team-results .nav-cell:hover { background: #E0E0E0; }
body.team-results .nav-cell.current { background: #9BFFB9; font-weight: 700; }
body.team-results table.team-board { width: 100%; }
body.team-results table.team-board th, body.team-results table.team-board td { padding: 2px 4px; }
body.team-results tr.match-end td { border-bottom: 3px double #0C479D; }
body.team-results td.c-room { padding: 0; text-align: center; vertical-align: middle; }
body.team-results td.c-room.rt-open { background: #FEF8BC; }
body.team-results td.c-room.rt-closed { background: #E4A0FE; }
body.team-results td.c-room .room-label-desk { font-size: 12px; }
body.team-results td.c-pair { font-size: 12px; }

/* ===== Кросс-таблица ===== */
body.team-results .cross-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
body.team-results table.cross-table { margin: 0 auto; }
body.team-results .cross-table th.vp-after-team, body.team-results .cross-table td.vp-after-team { width: 72px; }
body.team-results .cross-table .sticky-col { width: 48px; }
body.team-results .cross-table .sticky-col2 { width: 230px; }
body.team-results .cross-table td, body.team-results .cross-table th { text-align: center; }
body.team-results .cross-table td.sticky-col2 { text-align: left; }

/* ===== Батлер ===== */
body.team-results .butler-page .butler-wrap { max-width: 1100px; }
body.team-results .butler-page table.allbrd { width: 100%; }
body.team-results .butler-page .butler-name { min-width: 180px; }
body.team-results .butler-page .c-round-col { min-width: 42px; }

/* ===== Страница команды ===== */
body.team-results .team-page { max-width: 1180px; }
body.team-results .team-title { text-align: center; margin-bottom: 10px; }
body.team-results .team-cols { display: flex; gap: 36px; align-items: flex-start; justify-content: flex-start; }
body.team-results .team-hist-wrap { flex: 0 1 700px; min-width: 0; overflow-x: auto; }
body.team-results table.team-hist { width: 700px; max-width: 100%; }
body.team-results table.team-hist th, body.team-results table.team-hist td { padding: 3px 4px; }
body.team-results table.team-roster { flex: 0 0 auto; margin: 0; }
body.team-results table.team-roster th, body.team-results table.team-roster td { padding: 3px 8px; }
body.team-results table.team-roster td { border: none; }

/* ===== История игрока ===== */
body.team-results .pp-head { text-align: center; margin: 8px 0; }
body.team-results .pp-head h1 { color: #006699; font-size: 22px; }
body.team-results .pp-meta { text-align: center; margin: 8px 0 14px; }
body.team-results .pp-seg { max-width: 900px; margin: 0 auto; }
body.team-results .pp-round { text-align: center; margin: 10px 0 6px; color: #006699; }
body.team-results .pp-seg .match-head-desk { width: 658px; }
body.team-results table.pp-match { width: 658px; table-layout: fixed; }
body.team-results .pp-match td.cell-other { white-space: nowrap; text-align: right; }
body.team-results .pp-match .other-score { display: inline-block; min-width: 56px; }

/* ===== Мобильная версия (одна разметка, как на сайте-источнике) ===== */
@media (max-width: 800px) and (orientation: portrait) {
  body.team-results .only-desktop { display: none !important; }
  body.team-results .only-mobile { display: block; }
  body.team-results .match-head-desk { display: none; }
  body.team-results .mh-room-sep { display: none; }
  body.team-results .rh-meta { display: none; }
  body.team-results .round-head { justify-content: center; }
  body.team-results .round-layout { grid-template-columns: minmax(0, 1fr); }
  body.team-results table.allbrd { font-size: 11px; width: 100%; }
  body.team-results table.allbrd th { font-size: 10px; padding: 3px 2px; }
  body.team-results table.allbrd td { padding: 3px 2px; }
  body.team-results .nav-cells { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; gap: 3px; }
  body.team-results .nav-cell { min-width: 0; margin: 0; padding: 2px 0; font-size: 14px; }
  body.team-results .nav-row { flex-wrap: wrap; }
  body.team-results .nav-row .nav-label { width: 100%; text-align: center; }

  /* второстепенные колонки скрываются (c-team — имя команды — остаётся видимой) */
  body.team-results .c-tbl, body.team-results .c-butler, body.team-results .c-other,
  body.team-results .c-brd, body.team-results .c-adj, body.team-results .c-nbrds, body.team-results .c-imp-tot,
  body.team-results .c-nick, body.team-results .c-team-col, body.team-results .c-pair, body.team-results .c-rk { display: none !important; }

  /* матчи тура — карточками по две строки */
  body.team-results .rm-mob { display: block; }
  body.team-results .rm-m { border: 1px solid #0C479D; border-radius: 6px; margin-bottom: 6px; overflow: hidden; }
  body.team-results .rm-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) 30px 60px; align-items: center; gap: 4px; padding: 3px 6px; }
  body.team-results .rm-tbl { font-weight: 700; font-size: 13px; color: #0c479d; text-align: center; }
  body.team-results .rm-imp a, body.team-results .rm-vp a, body.team-results .rm-tbl a { display: block; color: inherit; text-decoration: none; }
  body.team-results .rm-team { min-width: 0; overflow: hidden; }
  body.team-results .rm-team .team-cell, body.team-results .rm-team .team-cell a { font-size: 13px; }
  body.team-results .rm-imp { font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
  body.team-results .rm-vp { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

  /* кросс: липкие колонки, без номера команды */
  body.team-results .cross-table { border-collapse: separate; border-spacing: 0; margin: 0; }
  body.team-results .cross-table th, body.team-results .cross-table td { border-width: 0 1px 1px 0; }
  body.team-results .cross-table tr:first-child > * { border-top-width: 1px; }
  body.team-results .cross-table tr > :first-child { border-left-width: 1px; }
  body.team-results .cross-table .sticky-col { box-sizing: border-box; width: 32px; min-width: 32px; max-width: 32px; position: sticky; left: 0; background: #fff; z-index: 2; }
  body.team-results .cross-table .sticky-col2 { position: sticky; left: 32px; background: #fff; z-index: 2; box-shadow: 4px 0 6px -4px rgba(0,0,0,0.25); box-sizing: border-box; width: 130px; min-width: 130px; max-width: 150px; overflow: hidden; }
  body.team-results .cross-table td:nth-child(4), body.team-results .cross-table th:nth-child(4) { display: none; }

  /* чипы комнат появляются, десктопные подписи скрываются */
  body.team-results .room-tag { display: inline-block; font-size: 11px; padding: 2px 6px; }
  body.team-results .room-label-desk { display: none; }
  body.team-results .room-head-desk { display: none; }
  body.team-results .room-head-mob { display: inline; }
  body.team-results td.c-room .room-tag { display: block; width: 100%; font-weight: 700; padding: 0; background: transparent; border: 0; border-radius: 0; white-space: nowrap; overflow: hidden; }

  /* история команды: компактно, состав ниже */
  body.team-results .team-cols { flex-direction: column; align-items: stretch; gap: 0; }
  body.team-results .team-title { margin-top: 10px; }
  body.team-results table.team-hist { min-width: 0; font-size: 11px; }
  body.team-results .team-hist .team-cell a { font-size: 12px; }
  body.team-results table.team-roster { margin: 24px auto 0; }

  /* шапка матча на телефоне: комнаты столбиком, пары подсвечены по командам */
  body.team-results .match-head { display: block; padding: 0 4px; }
  body.team-results .mh-rooms { flex-direction: column; gap: 10px; }
  body.team-results .match-head .mh-pair, body.team-results .mp-sub .mh-pair { padding: 1px 6px; border-radius: 3px; margin: 1px 0; }
  body.team-results .match-head .mh-open .mh-pair:nth-of-type(2),
  body.team-results .mp-sub .mh-open .mh-pair:nth-of-type(2),
  body.team-results .match-head .mh-closed .mh-pair:nth-of-type(3),
  body.team-results .mp-sub .mh-closed .mh-pair:nth-of-type(3) { background: #FEF8BC; }
  body.team-results .match-head .mh-open .mh-pair:nth-of-type(3),
  body.team-results .mp-sub .mh-open .mh-pair:nth-of-type(3),
  body.team-results .match-head .mh-closed .mh-pair:nth-of-type(2),
  body.team-results .mp-sub .mh-closed .mh-pair:nth-of-type(2) { background: #E4A0FE; }

  /* мобильный протокол матча: строка-сетка на комнатy, номер сдачи и импы по краям */
  body.team-results .mp-mob { display: block; margin: 0 auto; max-width: 100%; }
  body.team-results .mp-bd { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; column-gap: 4px; align-items: stretch; border-bottom: 1px solid #0C479D; }
  body.team-results .mp-bd.mp-even { background: #F4F4F4; }
  body.team-results .mp-bd > .mp-brd { grid-column: 1; grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; background: #9BFFB9; font-size: 20px; font-weight: 700; }
  body.team-results .mp-bd > .mp-brd a { display: block; width: 100%; text-align: center; min-height: 0; line-height: normal; font-size: 20px; }
  body.team-results .mp-bd > .mp-imp { grid-column: 3; grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; border-radius: 0; font-size: 14px; }
  body.team-results .mp-bd .mp-row { grid-column: 2; display: grid; grid-template-columns: 24px minmax(0, 128px) 44px 24px minmax(64px, 1fr); gap: 3px; padding: 1px 0; min-height: 28px; align-items: center; border-bottom: 0; background: transparent; }
  body.team-results .mp-bd .mp-row .room-tag { display: inline-block; text-align: center; font-size: 10px; padding: 1px 0; margin: 0; width: 24px; cursor: pointer; }
  body.team-results .mp-bd .mp-row.mp-r1 { grid-row: 1; border-bottom: 1px dotted #cbd5e1; }
  body.team-results .mp-bd .mp-row.mp-r2 { grid-row: 2; }
  body.team-results .mp-cont { display: grid; grid-template-columns: minmax(45px, 45fr) minmax(20px, 20fr) 25px; align-items: center; gap: 0; padding-left: 6px; white-space: nowrap; }
  body.team-results .mp-cont .mp-ct { text-align: center; overflow: hidden; }
  body.team-results .mp-cont .mp-decl { text-align: center; font-variant-numeric: tabular-nums; }
  body.team-results .mp-ol { text-align: center; white-space: nowrap; overflow: hidden; }
  body.team-results .mp-tr { text-align: center; }
  body.team-results .mp-sc { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 4px; }
  body.team-results .mp-imp { text-align: center; font-weight: 700; border-radius: 4px; padding: 1px 0; }
  body.team-results .mp-imp-home { background: #FEF8BC; }
  body.team-results .mp-imp-away { background: #E4A0FE; }
  body.team-results .mp-tot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 8px 4px 2px; }
  body.team-results .mp-tot-round { font-size: 15px; margin-right: 6px; }
  body.team-results .mp-tot-cell { border-radius: 4px; padding: 2px 8px; font-size: 13px; }
  body.team-results .mp-sub { display: flex; flex-direction: column; gap: 6px; padding: 8px 4px; border-bottom: 1px solid #0C479D; background: #fff; }
  body.team-results .mp-sub::before { content: "Смена состава"; font-weight: 700; font-size: 12px; color: #0c479d; }

  /* история игрока: 6 колонок + очки другой комнаты второй строкой */
  body.team-results .pp-seg .mp-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 40px 24px 52px 32px; align-items: center; gap: 3px; padding: 4px 4px; border-bottom: 1px solid #e2e8f0; }
  body.team-results .pp-seg .mp-row.mp-even { background: #F4F4F4; }
  body.team-results .pp-seg .mp-cont { display: flex; align-items: center; gap: 3px; }
  body.team-results .pp-seg .mp-oth { display: flex; grid-row: 2; grid-column: 2 / -1; justify-content: flex-end; gap: 4px; font-size: 12px; color: #64748b; }
  body.team-results .pp-seg .mp-oth::before { content: "Другая комната:"; }

  /* батлер: компактные ячейки */
  body.team-results .butler-page table.allbrd th, body.team-results .butler-page table.allbrd td,
  body.team-results .butler-page table.allbrd td a { font-size: 10px; padding: 2px 1px; }
  body.team-results .butler-page .butler-name { min-width: 0; }
}

@media (min-width: 801px) {
  body.team-results .only-mobile { display: none; }
  body.team-results .match-head { display: none; }
  body.team-results .mp-mob { display: none; }
  body.team-results .mp-sub { display: none; }
  body.team-results .room-tag { display: none !important; }
  body.team-results table.match-table:not(.pp-match) { width: 900px; table-layout: fixed; }
  body.team-results table.match-table th, body.team-results table.match-table td { box-sizing: border-box; }
  body.team-results table.match-table td.cell-cont { display: table-cell; white-space: nowrap; overflow: hidden; }
  body.team-results table.match-table td.cell-cont > span, body.team-results table.match-table td.cell-cont > .bbo-btn { display: inline-block; vertical-align: middle; }
  body.team-results table.match-table td.cell-cont .contract-bid { padding-left: 0; text-align: center; }
  body.team-results table.match-table sup { line-height: 0; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(1),
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(7) { width: 90px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(2),
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(8) { width: 44px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(3),
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(9) { width: 37px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(4),
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(10) { width: 100px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(5),
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(11) { width: 58px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(6) { width: 55px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(12) { width: 72px; }
  body.team-results table.match-table:not(.pp-match) tr:first-child th:nth-child(13) { width: 71px; }
  body.team-results table.pp-match tr:first-child th:nth-child(1) { width: 55px; }
  body.team-results table.pp-match tr:first-child th:nth-child(2) { width: 90px; }
  body.team-results table.pp-match tr:first-child th:nth-child(3) { width: 44px; }
  body.team-results table.pp-match tr:first-child th:nth-child(4) { width: 37px; }
  body.team-results table.pp-match tr:first-child th:nth-child(5) { width: 100px; }
  body.team-results table.pp-match tr:first-child th:nth-child(6) { width: 58px; }
  body.team-results table.pp-match tr:first-child th:nth-child(7) { width: 110px; }
  body.team-results table.pp-match tr:first-child th:nth-child(8) { width: 72px; }
  body.team-results table.pp-match tr:first-child th:nth-child(9) { width: 71px; }
  /* ячейки выбора сдачи — как на сайте-источнике */
  body.team-results .board-picker .nav-row { max-width: 1100px; margin: 5px auto 0; justify-content: flex-start; }
  body.team-results .board-picker .nav-row .nav-label { width: 237px; text-align: left; padding-left: 3px; flex: none; }
  body.team-results .board-picker .nav-cells { gap: 0; flex: none; }
}

/* ===== Тултипы: торговля у контракта (hover на десктопе, панель снизу на телефоне) ===== */
.bid-tip {
  position: fixed; z-index: 10001; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; max-width: calc(100vw - 16px);
}
.bid-tip[hidden] { display: none; }
.bid-tip table.bidding { border-collapse: collapse; }
.bid-tip table.bidding th {
  border: 1px solid #0C479D; background: #ddffdd; border-radius: 6px; padding: 1px 8px;
  font-weight: 700; min-width: 44px; text-align: center;
}
.bid-tip table.bidding th.vul { background: #ffd9d9; }
.bid-tip table.bidding td { padding: 1px 8px; text-align: center; min-width: 44px; }
.bid-tip table.bidding td.b-empty { background: #f1f5f9; }
.hover-tip { cursor: help; }
@media (hover: none), (pointer: coarse) {
  .hover-tip { cursor: pointer; text-decoration: underline dotted #0C479D; }
  .bid-tip { top: auto; left: 0; right: 0; bottom: 0; border-radius: 12px 12px 0 0; max-height: 60vh; overflow: auto; }
}

/* ===== Всплывашки комнат и ростера (модальные окна в стиле сайта-источника) ===== */
.room-win { width: min(92vw, 420px); height: auto; }
.room-body { padding: 14px 16px; font-size: 14px; }
.room-team { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.room-line { margin: 5px 0; }
.room-line b { color: #0c479d; margin-right: 6px; }
.room-close-link { margin-top: 10px; }

/* ALT component proportions, isolated from pair/individual portal tables. */
body.team-results .table-section { padding: 0 8px; }
body.team-results table.allbrd { border-collapse: collapse; border-spacing: 0; line-height: 1.3; }
body.team-results table.allbrd th,
body.team-results table.allbrd td { padding: 3px 5px; vertical-align: middle; }
body.team-results table.team-cell { border-collapse: collapse; margin: 0; }
body.team-results table.team-cell td { padding: 1px 2px; border: 0; }
body.team-results .team-cell .tc-name { white-space: normal; overflow-wrap: anywhere; }
body.team-results .team-cell .team-link { line-height: 1.3; }
body.team-results .team-notes { max-width: 1000px; margin: 20px auto 0; padding: 0 12px; text-align: center; color: #64748b; font-size: 12px; }
body.team-results .team-notes sup { font-weight: bold; }
body.team-results a:focus-visible { outline: 2px solid #0c479d; outline-offset: 2px; }
body.team-results table.allbrd tr.own > td { box-shadow: inset 0 2px #16a34a, inset 0 -2px #16a34a; }
body.team-results table.allbrd tr.own > td:first-child { border-left: 3px solid #16a34a; }
body.team-results .rm-m.own { border: 2px solid #16a34a; }

/* The roster needs a useful text column, not the round sidebar's 15/25% split. */
body.team-results .leaderboard-ranking { width: 100%; }
body.team-results .leaderboard-table { width: 100%; table-layout: auto; }
body.team-results .leaderboard-table col.col-rk { width: 44px; }
body.team-results .leaderboard-table col.col-vp { width: 84px; }
body.team-results .leaderboard-table > tbody > tr > td { padding: 5px 7px; }
body.team-results .leaderboard-table .lb-players { line-height: 1.5; padding: 2px 2px 0; }
body.team-results .lb-title { font-size: 20px; margin: 12px 0; }

/* Main links at the sides, round/protocol chips in the centre, like ah-nav. */
body.team-results .team-tour-nav { position: static; background: #fff; max-width: 1190px; padding: 0 8px; box-sizing: border-box; }
body.team-results .team-tour-nav .nav-btn { box-shadow: none; line-height: 1.3; }
body.team-results .team-tour-nav .nav-btn.active { background: #008000; color: #fff; }
body.team-results .team-tour-nav .rounds-label { line-height: 1.3; font-weight: normal; font-size: 14px; }
body.team-results .team-tour-nav .round-btn { box-sizing: border-box; line-height: 1.3; box-shadow: none; }
body.team-results .team-tour-nav .round-btn.active { background: #9BFFB9; border-color: #0c479d; }
body.team-results .team-tour-nav .view-toggle { box-shadow: none; }

/* Round page: keep names legible beside a genuinely narrow ranking table. */
body.team-results .round-head { gap: 8px; margin-bottom: 8px; }
body.team-results .round-head h2 { margin: 0; font-size: 16px; }
body.team-results .round-matches .c-home-team,
body.team-results .round-matches .c-away-team { width: 27%; }
body.team-results .round-ranking table.allbrd .team-cell a { font-size: 13px; }
body.team-results .round-ranking table.allbrd col.col-rk { width: 38px; }
body.team-results .round-ranking table.allbrd col.col-vp { width: 64px; }

/* Team history: centred title over a 700px scorecard, roster 36px to the right. */
body.team-results .team-title { width: 700px; max-width: 100%; margin-bottom: 12px; }
body.team-results .team-title table.team-cell { margin: 0 auto; }
body.team-results .team-title .team-cell a { font-size: 24px; }
body.team-results .team-page .round-switch { margin: 8px 0 14px; }
body.team-results .team-page .round-title { font-size: 14px; font-weight: normal; }
body.team-results .team-roster { width: auto; }

/* Match/player protocols share the same room colours and compact cell rhythm. */
body.team-results .match-head-desk { max-width: 900px; }
body.team-results .match-head-desk .team-cell { margin: 0 auto; }
body.team-results .match-head-desk .team-cell a { font-size: 18px; }
body.team-results .match-head-desk td.home,
body.team-results .match-head-desk td.bg-home,
body.team-results .player-home { background: #FEF8BC; }
body.team-results .match-head-desk td.away,
body.team-results .match-head-desk td.bg-away,
body.team-results .player-away { background: #E4A0FE; }
body.team-results table.match-table th,
body.team-results table.match-table td { padding: 2px; }
body.team-results .pp-seg { margin-bottom: 22px; }
body.team-results table.pp-match { max-width: 658px; }
body.team-results .pp-meta { font-size: 14px; }
body.team-results .mp-imp-draw { background: #ddffdd; }

/* Cross: compact numerical matrix; no invented flags or extra team metadata. */
body.team-results .cross-table > tbody > tr { height: 35px; }
body.team-results .cross-table td.cross-self { background: #3498db; color: #fff; font-size: 18px; }
body.team-results .cross-table td.cross-number { background: #f0f0f0; }
body.team-results .cross-table th.sticky-col2 { min-width: 180px; }
body.team-results .team-cross-page .round-switch,
body.team-results .butler-page .round-switch { margin: 8px auto 14px; }
body.team-results .butler-page { max-width: 1060px; }
body.team-results .butler-page .butler-wrap { max-width: 1040px; margin: 0 auto; overflow-x: auto; }
body.team-results .butler-table .c-round-col { text-align: right; font-variant-numeric: tabular-nums; }
body.team-results .butler-table th.c-round-col { text-align: center; }
body.team-results .butler-table .c-team-col a { font-size: 13px; font-weight: bold; }

/* Board: deal/minimax stay native portal components; room rows follow ALT. */
body.team-results .team-board-page .protocol-results { max-width: 1190px; }
body.team-results .team-board td.cell-cont { display: table-cell; white-space: nowrap; }
body.team-results .team-board td.cell-cont > span,
body.team-results .team-board td.cell-cont > .bbo-btn { display: inline-block; vertical-align: middle; }
body.team-results .team-board .contract-bid { padding-left: 2px; }
body.team-results .team-board .contract-decl { margin: 0 3px; }
body.team-results .team-board .c-pair { white-space: normal; }
body.team-results .team-board .col-lead,
body.team-results .match-table .col-lead { text-align: center; }

@media (min-width: 801px) {
  body.team-results .team-tour-nav { display: grid; grid-template-columns: auto minmax(0, auto) auto; gap: 5px 16px; justify-content: center; align-items: center; margin: 20px auto; }
  body.team-results .team-tour-nav .nav-group { display: contents; }
  body.team-results .team-tour-nav .nav-btn,
  body.team-results .team-tour-nav .view-toggle { width: auto; min-width: 0; padding: 4px 16px; height: auto; text-align: center; }
  body.team-results .team-tour-nav .nav-btn:nth-child(1) { grid-column: 1; grid-row: 1; }
  body.team-results .team-tour-nav .nav-btn:nth-child(2) { grid-column: 1; grid-row: 2; }
  body.team-results .team-tour-nav .nav-btn:nth-child(3) { grid-column: 3; grid-row: 1; }
  body.team-results .team-tour-nav .view-toggle { grid-column: 3; grid-row: 2; }
  body.team-results .team-tour-nav .rounds,
  body.team-results .team-tour-nav #tours { grid-column: 2; flex: none; order: initial; width: auto; justify-content: flex-start; gap: 6px; min-width: 0; }
  body.team-results .team-tour-nav #tours { grid-row: 1; }
  body.team-results .team-tour-nav #protocols { grid-row: 2; }
  body.team-results .team-tour-nav .rounds-label { width: 112px; flex: 0 0 112px; text-align: right; }
  body.team-results .team-tour-nav .rs-list { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
  body.team-results .team-tour-nav .round-btn { width: 54px; min-width: 28px; height: auto; padding: 3px; margin: 0; flex: 0 1 54px; font-size: 16px; }
}
@media (max-width: 1050px) and (min-width: 801px) {
  body.team-results .team-cols { gap: 20px; }
  body.team-results .team-hist-wrap { flex: 1 1 700px; }
  body.team-results .team-roster { max-width: 220px; }
}
@media (max-width: 800px) and (orientation: portrait) {
  body.team-results .table-section { padding: 0 6px; }
  body.team-results .team-tour-nav { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 12px auto 16px; padding: 0 6px; }
  body.team-results .team-tour-nav .nav-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
  body.team-results .team-tour-nav .nav-btn { width: auto; min-width: 0; flex: 1 1 0; padding: 5px 7px; height: auto; font-size: 14px; }
  body.team-results .team-tour-nav .view-toggle { height: auto !important; padding: 5px 8px !important; }
  body.team-results .team-tour-nav .rounds,
  body.team-results .team-tour-nav #tours { display: flex; width: 100%; flex: none; order: initial; justify-content: flex-start; gap: 5px; flex-wrap: nowrap; align-items: flex-start; }
  body.team-results .team-tour-nav .rounds-label { flex: 0 0 88px; width: 88px; font-size: 12px; padding-top: 5px; text-align: right; }
  body.team-results .team-tour-nav .rs-list,
  body.team-results .team-tour-nav #tours .rs-list { display: flex; flex: 1; flex-wrap: wrap; justify-content: flex-start; gap: 3px; }
  body.team-results .team-tour-nav .round-btn,
  body.team-results .team-tour-nav #tours .round-btn { width: 34px; min-width: 28px; height: 28px; padding: 2px; margin: 0; font-size: 13px; }
  body.team-results .lb-wrap { max-width: 540px; }
  body.team-results .leaderboard-table col.col-rk { width: 32px; }
  body.team-results .leaderboard-table col.col-vp { width: 62px; }
  body.team-results .leaderboard-table > tbody > tr > td { padding: 5px 4px; }
  body.team-results .leaderboard-table .team-cell a { font-size: 13px; }
  body.team-results .team-title { width: 100%; }
  body.team-results .team-title .team-cell a { font-size: 22px; }
  body.team-results .team-hist-wrap { flex: none; width: 100%; }
  body.team-results table.team-hist { width: 100%; min-width: 0; }
  body.team-results .team-hist th { white-space: normal; font-size: 10px; }
  body.team-results table.team-roster { width: auto; }
  body.team-results .rm-mob .rm-line { grid-template-columns: 22px minmax(0, 1fr) 30px 60px; }
  body.team-results .cross-table th.sticky-col2 { min-width: 130px; }
  body.team-results .team-board-page table.team-board { min-width: 0; width: 100%; }
  body.team-results table.team-board th,
  body.team-results table.team-board td { padding: 3px 2px; }
  body.team-results .team-board .contract-bid { padding-left: 0; }
  body.team-results .team-board .contract-decl { min-width: 10px; margin: 0 1px; }
  body.team-results .mp-bd .mp-row { grid-template-columns: 24px minmax(0, 1fr) 36px 20px 48px; }
  body.team-results .mp-bd .mp-cont { grid-template-columns: minmax(45px, 45fr) minmax(20px, 20fr) 25px; padding-left: 0; }
  body.team-results .pp-seg .mp-row { grid-template-columns: minmax(26px, 26fr) minmax(90px, 90fr) minmax(34px, 34fr) minmax(20px, 20fr) 46px minmax(26px, 26fr); gap: 2px; }
  body.team-results .pp-seg .mp-cont { min-width: 0; padding-left: 0; gap: 1px; }
  body.team-results .team-notes { font-size: 11px; margin-top: 16px; }
}

/* Portal-specific corrections after local review (team events only). */
body.team-results .tournament-header h1.header-badge,
body.team-results .tournament-header h1.header-badge a { color: #fff !important; }
body.team-results .team-roster-tip {
  position: fixed; z-index: 10005; max-width: min(380px, calc(100vw - 16px));
  max-height: 70vh; overflow: auto; padding: 8px 12px; background: #fff;
  border: 1px solid #0c479d; border-radius: 6px; box-shadow: 0 4px 16px #0003;
  font-size: 14px; line-height: 1.7;
}
body.team-results .team-roster-tip[hidden] { display: none; }
body.team-results .team-roster-tip .pl { display: block; }
body.team-results .allbrd td.cell-cont { display: table-cell !important; }
body.team-results .allbrd .contract-row,
body.team-results .mp-cont,
body.team-results .pp-seg .mp-cont {
  display: grid; grid-template-columns: minmax(45px, 45fr) minmax(20px, 20fr) 25px;
  gap: 0; align-items: center; white-space: nowrap; padding: 0;
}
body.team-results .allbrd .contract-row .contract-bid,
body.team-results .allbrd .contract-row .contract-decl {
  display: block; width: auto; min-width: 0; padding: 0; margin: 0; font-weight: 600;
}
body.team-results .allbrd .contract-row .contract-bid { text-align: center; }
body.team-results .allbrd .contract-row .contract-decl { text-align: center; }
body.team-results .bbo-btn.bbo-play {
  background: #ddffdd !important; border: 1px solid #4CAF50 !important;
  border-radius: 8px !important; color: #000 !important; margin: 0 !important;
  padding: 0 !important; width: 25px !important; height: 22px !important;
  display: inline-flex !important; align-items: center; justify-content: center;
}
body.team-results .bbo-btn.bbo-play:hover { background: #aaffaa !important; }
body.team-results table.team-score {
  width: 100%; table-layout: fixed; border: 0; border-collapse: collapse;
  margin: 0; background: transparent; font-variant-numeric: tabular-nums;
}
body.team-results table.team-score col { width: 50%; }
body.team-results table.team-score tr { height: auto; background: transparent; }
body.team-results table.team-score td {
  width: 50%; height: auto; border: 0; padding: 0 2px; background: transparent;
  font-size: inherit; white-space: nowrap; text-align: right; line-height: inherit;
}
body.team-results table.team-score td[colspan] { width: 100%; text-align: center; }
/* результат сдачи цветом шрифта: +зелёным, −красным, 0 синим (своя комната и счёт другой комнаты) */
body.team-results table.team-score td.sc-pos,
body.team-results .other-score.sc-pos, body.team-results .mp-oth.sc-pos { color: #008000; }
body.team-results table.team-score td.sc-neg,
body.team-results .other-score.sc-neg, body.team-results .mp-oth.sc-neg { color: #cc0000; }
body.team-results table.team-score td.sc-zero,
body.team-results .other-score.sc-zero, body.team-results .mp-oth.sc-zero { color: #0000cc; }
/* страница игрока: подписи Wins:/VP: без фона; заголовок «Другая комната:» серым, значение — цветом */
body.team-results table.pp-match th.c-other { background: transparent; }
body.team-results .pp-seg .mp-oth::before { color: #64748b; }
body.team-results .team-board .c-pair { text-align: center; line-height: 1.5; }
/* имена в протоколе сдачи — «Фамилия И.» (полное — во всплывающей карточке) */
body.team-results table.team-board .n-full { display: none; }
body.team-results table.team-board .n-tiny { display: inline; }
/* лидерборд: при нешироком экране сначала прячем туры, состав — одной строкой (таблица скроллится) */
@media (max-width: 1150px) {
  body.team-results table.results .tour-col { display: none !important; }
}
@media (min-width: 701px) and (max-width: 1150px) {
  body.team-results table.results .players-grid.team-roster { white-space: nowrap; }
  body.team-results table.results .players-grid.team-roster a.player-link { white-space: nowrap; }
}
/* мобильный лидерборд: состав в строку через запятую (без столбика имён и висячих «?»), VPs — основной результат;
   style.css держит имена столбиком через !important — перебиваем */
@media (max-width: 700px) and (orientation: portrait) {
  body.team-results table.results .players-grid.team-roster .pl,
  body.team-results table.results .players-grid.team-roster a.player-link {
    display: inline !important; white-space: normal !important; overflow: visible !important;
    text-overflow: clip !important; max-width: none !important;
  }
  body.team-results table.results.results-team .col-mp { display: table-cell !important; width: 52px !important; text-align: right !important; }
}
body.team-results .team-board-page #BRD {
  position: sticky; top: 40px; z-index: 25; width: 100%; background: #fff;
  scroll-margin-top: 48px; padding: 8px 4px; border-bottom: 1px solid #0c479d;
}
body.team-results .board-picker .nav-cell { min-height: 32px; font-weight: 600; }
body.team-results .board-picker .nav-cell.current { background: #9bffb9; border: 2px solid #0c479d; }
body.team-results .match-table td.nBRD a { font-size: 18px; font-weight: bold; display: block; }
@media (max-width: 800px) and (orientation: portrait) {
  body.team-results .mp-cont,
  body.team-results .pp-seg .mp-cont { grid-template-columns: minmax(45px, 45fr) minmax(20px, 20fr) 25px; gap: 0; }
  body.team-results .team-board-page #BRD { top: 36px; scroll-margin-top: 44px; }
  body.team-results .mp-sc table.team-score td { padding: 0; font-size: 11px; }
  body.team-results .team-roster-tip { display: none; }
}

/* team board on mobile: hide player-name cells (headers already hidden) */
@media (max-width: 800px) and (orientation: portrait) {
  body.team-results table.team-board th.only-desktop,
  body.team-results table.team-board td.c-pair { display: none !important; }
}

/* ===== Лёгкий рестайлинг таблиц: как таблицы результатов портала =====
   Без рамок и вертикальных линий; строки — едва заметной нижней линией;
   шапка мягко-зелёная с синей подчёркивающей; углы и тень — как у карточек. */
body.team-results table.allbrd {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: none;
  border-radius: var(--radius, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
body.team-results table.allbrd th {
  border: none;
  border-bottom: 2px solid var(--blue, #0c479d);
  background: var(--green-bg, #e8f5e9);
  color: #1a3a5c;
  font-weight: 600;
}
body.team-results table.allbrd td {
  border: none;
  border-bottom: 1px solid var(--gray-200, #e2e8f0);
}
body.team-results table.allbrd tr:last-child td { border-bottom: none; }
body.team-results table.allbrd tr.odd,
body.team-results table.allbrd tr.even { background: transparent; }
body.team-results table.allbrd tr.odd { background: var(--gray-50, #f8fafc); }
body.team-results table.allbrd tr:hover td { background: var(--blue-light, #e0f2fe); }
body.team-results table.allbrd tr:hover td.home,
body.team-results table.allbrd tr:hover td.away,
body.team-results table.allbrd tr:hover td.bg-home,
body.team-results table.allbrd tr:hover td.bg-away { background: inherit; }
/* функциональные подложки (своё/призёры/сдача) сохраняются поверх зебры */
body.team-results table.allbrd tr.rank-1 td { background: #fdf6d8; }
body.team-results table.allbrd tr.rank-2 td { background: #eef2f7; }
body.team-results table.allbrd tr.rank-3 td { background: #fdeee3; }

/* страница игрока: OTHER выравнивается как SCORE — плюс в левой половине (вправо),
   минус в правой, ноль и текст по центру; подписи Wins:/VP: — зелёный фон как у шапки */
body.team-results table.pp-match td.c-other { text-align: center; }
body.team-results .c-other .other-score { display: block; }
body.team-results .c-other .other-score.sc-pos { width: 50%; text-align: right; padding-right: 4px; }
body.team-results .c-other .other-score.sc-neg { margin-left: 50%; width: 50%; text-align: right; padding-right: 4px; }
body.team-results .c-other .other-score.sc-zero,
body.team-results .c-other .other-score:not(.sc-pos):not(.sc-neg) { width: 100%; text-align: center; }
body.team-results table.pp-match th.c-other { background: var(--green-bg, #e8f5e9) !important; }
/* мобильный итог: подписи Wins:/VP: без фона, отступ перед VP */
body.team-results .mp-tot-label { color: #64748b; font-weight: 600; margin-right: 4px; }
body.team-results .mp-tot-label.mp-vp { margin-left: 14px; }

/* шапка матча: углы фонов команд и составов скруглены */
body.team-results .match-head-desk td.home,
body.team-results .match-head-desk td.away,
body.team-results .match-head-desk td.bg-home,
body.team-results .match-head-desk td.bg-away,
body.team-results .match-head-desk td.player-home,
body.team-results .match-head-desk td.player-away { border-radius: 8px; }
body.team-results .match-head .mh-team,
body.team-results .match-head .mh-pair { border-radius: 8px; }

/* тур: при ширине <=800 положение после тура — под матчами (в обеих ориентациях), имена команд переносятся */
@media (max-width: 800px) {
  body.team-results .round-layout { grid-template-columns: minmax(0, 1fr); }
  body.team-results .round-ranking table.team-cell td.tc-name { white-space: normal; }
  body.team-results .round-ranking { max-width: 640px; margin: 0 auto; }
}
