/* Публичная сетка плей-офф (вкладка «Результаты» → «Плей-офф») */

.tp-po {
  margin: 0;
}

.tp-po-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
}

.tp-po-canvas {
  position: relative;
  min-width: min(100%, var(--tp-po-w, 640px));
  min-height: var(--tp-po-canvas-h, 200px);
}

.tp-po-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tp-po-w, 100%);
  height: var(--tp-po-canvas-h, 200px);
  pointer-events: none;
  z-index: 0;
}

.tp-po-lines path {
  fill: none;
  stroke: #c8d4dc;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.tp-po-columns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 44px;
  padding-top: 32px;
}

.tp-po-round {
  flex: 0 0 232px;
  width: 232px;
}

.tp-po-round__head {
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef2f5;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: #4a5560;
  text-align: center;
}

.tp-po-round__body {
  position: relative;
  min-height: var(--tp-po-h, 120px);
}

.tp-po-match-wrap {
  position: absolute;
  left: 0;
  right: 0;
  width: 232px;
}

.tp-po-third-label {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  color: #6b5a45;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 1;
}

.tp-po-match-wrap--third {
  z-index: 1;
}

.tp-po-round--champion .tp-po-round__head {
  background: linear-gradient(180deg, #fff8e8 0%, #f5ecd8 100%);
  color: #6b5a45;
}

.tp-po-match-wrap--champion {
  z-index: 1;
}

.tp-po-champion-card {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf6 0%, #f8f0dc 100%);
  border: 1px solid #e8d4a8;
  box-sizing: border-box;
  overflow: hidden;
}

.tp-po-champion-card--revealed {
  border-color: #d4b86a;
  box-shadow: 0 0 0 1px rgba(212, 184, 106, 0.35);
}

.tp-po-champion-card--tbd {
  opacity: 0.92;
}

.tp-po-champion-card__hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.tp-po-champion-card__row {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 16px;
  color: #252a2f;
}

.tp-po-champion-card--revealed .tp-po-champion-card__name {
  font-weight: 700;
  color: #8a6b1a;
}

.tp-po-champion-card--tbd .tp-po-champion-card__name {
  color: #8a96a0;
  font-style: italic;
  font-weight: 500;
}

.tp-po-champion-card__crest {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e8d4a8;
  overflow: hidden;
  flex-shrink: 0;
}

.tp-po-champion-card__crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-po-champion-card__crest--ph {
  background: url("/static/images/placeholders/team.png") center / cover no-repeat;
}

.tp-po-champion-card__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-po-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  background: #f4f7f9;
  border: 1px solid #e4eaef;
  overflow: hidden;
  min-height: 72px;
  box-sizing: border-box;
}

.tp-po-card--live {
  border-color: #037cbd;
  box-shadow: 0 0 0 1px rgba(3, 124, 189, 0.25);
}

.tp-po-card--synthetic {
  opacity: 0.92;
}

.tp-po-card__hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.tp-po-card__row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 16px;
  color: #252a2f;
}

.tp-po-card__row + .tp-po-card__row {
  border-top: 1px solid #e4eaef;
}

.tp-po-card__row--winner .tp-po-card__name,
.tp-po-card__row--winner .tp-po-card__score {
  font-weight: 700;
  color: #037cbd;
}

.tp-po-card__row--tbd .tp-po-card__name {
  color: #8a96a0;
  font-style: italic;
}

.tp-po-card__crest {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e4eaef;
  overflow: hidden;
  flex-shrink: 0;
}

.tp-po-card__crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-po-card__crest--ph {
  background: url("/static/images/placeholders/team.png") center / cover no-repeat;
}

.tp-po-card__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-po-card__score {
  min-width: 1.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #4a5560;
  white-space: nowrap;
}

.tp-po-card__score-pen {
  font-size: 11px;
  font-weight: 500;
  color: #6c757b;
}

@media (max-width: 640px) {
  .tp-po-columns {
    gap: 28px;
  }

  .tp-po-round,
  .tp-po-match-wrap {
    width: 200px;
    flex-basis: 200px;
  }
}
