/* Профиль спортсмена: портрет 4:5, факты таблицей, табло боёв, история боёв, места */
.pr-top { grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.pr-name { margin: 12px 0 20px; overflow-wrap: break-word; hyphens: auto; }
.pr-top .factlist a { color: inherit; }
.pr-score { margin-top: 24px; }
.pr-acts { margin-top: 20px; }
@media (max-width: 900px) {
  .pr-top { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pr-top .profile-photo { width: 168px; }
  .pr-name { margin: 8px 0 16px; }
}

.score-rank a { display: block; color: inherit; text-decoration: none; }
.score-rank b { color: var(--blue); }
.score-rank a:hover span { color: var(--ink); }
/* Место 1–3 в рейтинге — медалью на ленте, как у тройки лидеров; цифра остаётся для экранных чтецов */
/* Высота медали — как у цифр соседних колонок (38px), чтобы подписи стояли на одной линии */
.score-rank em { display: block; margin-top: 2px; font-style: normal; color: var(--ink); }
.score-rank .medal { margin: 0 auto; width: 30px; height: 38px; padding-top: 8px; }
.score-rank .medal .medal-r { width: 16px; height: 12px; margin: 0 0 0 -8px; }
.score-rank .medal .medal-d { display: flex; width: 30px; height: 30px; margin: 0; font: 700 var(--fs-m)/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--m-ink); }
.score-rank .medal + b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.score-rank a:hover .medal-d { color: var(--m-ink); }
.stack > .score-note { margin-top: 10px; line-height: 1.5; max-width: 65ch; }

.bouts td { vertical-align: top; }
.bouts .b-res { white-space: nowrap; }
.bouts .b-method { color: var(--muted); white-space: nowrap; }
.bouts .b-tour a, .places td a { font-weight: 400; }
.bouts .b-date, .bouts .b-weight { white-space: nowrap; }
.bouts .b-link { text-align: right; white-space: nowrap; font-size: var(--fs-s); font-weight: 600; }
/* Вся строка ведёт на страницу боя; ссылки на соперника и турнир остаются поверх */
.bouts tbody tr { position: relative; }
.bouts tbody tr:has(.b-link a):hover { background: var(--blue-tint); }
.bouts .b-link a::after { content: ""; position: absolute; inset: 0; }
.bouts .b-opp a, .bouts .b-tour a { position: relative; z-index: 1; }

@media (max-width: 600px) {
  .score { flex-wrap: wrap; }
  .score div { padding: 10px 4px; }
  .score b { font-size: 30px; }
  .score span { font-size: var(--fs-xs); }
  .score .score-rank { flex-basis: 100%; border-left: 0; border-top: 1px solid var(--line); display: flex; }
  .score-rank a { display: flex; align-items: baseline; justify-content: center; gap: 10px; width: 100%; }
  .score-rank a:has(.medal) { align-items: center; }
  .score-rank .medal { margin: 0; width: 36px; padding-top: 13px; }
  .score-rank .medal .medal-r { width: 20px; height: 18px; margin-left: -10px; }
  .score-rank .medal .medal-d { width: 36px; height: 36px; font-size: var(--fs-l); }
}

/* На телефоне строка боя складывается в три строки вместо прокрутки */
@media (max-width: 700px) {
  .bouts thead { display: none; }
  .bouts, .bouts tbody { display: block; }
  .bouts tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 4px;
    grid-template-areas: "res method method date" "opp opp opp link" "stage stage stage stage" "tour tour tour tour";
    padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  .bouts td { display: block; border: 0; padding: 0; }
  .bouts .b-res { grid-area: res; }
  .bouts .b-method { grid-area: method; font-size: var(--fs-s); }
  .bouts .b-date { grid-area: date; font-size: var(--fs-s); }
  .bouts .b-opp { grid-area: opp; font-size: var(--fs-l); }
  .bouts .b-link { grid-area: link; }
  .bouts .b-stage { grid-area: stage; font-size: var(--fs-s); }
  /* Турнир и дисциплина — частями через промежуток, без точки: перенесённая точка висела бы в начале строки */
  .bouts .b-tour { grid-area: tour; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; font-size: var(--fs-s); }
  .bouts .b-tour .sub { display: inline; margin: 0; }
}

/* Портфолио: медали под фактами, места карточками по турнирам, рейтинг по сезонам */
.pr-medals { margin-top: 24px; }
/* Тренер: подпись над медалями учеников */
.pr-medals-l { margin: 24px 0 0; }
.pr-medals-l + .pr-medals { margin-top: 8px; }
.pr-medals + .pr-score { margin-top: 16px; }
.pr-sec { margin-top: 56px; }
.pr-sec .head { margin-bottom: 16px; }
.pm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pm-card { border: 1px solid var(--line2); background: var(--paper); min-width: 0; }
.pm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; background: var(--mist);
  border-bottom: 1px solid var(--line2); border-left: 4px solid var(--blue); }
.pm-head a { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pm-head a:hover { color: var(--blue); text-decoration: underline; }
.pm-date { font-size: var(--fs-s); font-weight: 600; color: var(--ink2); }
.pm-sport { font-size: var(--fs-xs); font-weight: 600; color: var(--ink2); text-transform: uppercase; letter-spacing: .06em; }
.pm-places { list-style: none; margin: 0; padding: 0; }
.pm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 10px 14px; }
.pm-row + .pm-row { border-top: 1px solid var(--line); }
.pm-row > .place:not(.place-1):not(.place-2):not(.place-3) { font-size: var(--fs-xl); text-align: center; }
.pm-what { min-width: 0; line-height: 1.3; }
.pm-what b { display: block; font-weight: 600; }
.pm-what .sub { display: block; font-size: var(--fs-s); overflow-wrap: anywhere; }
.pm-empty { display: flex; gap: 16px; align-items: center; padding: 20px; border: 1px dashed var(--line2); background: var(--mist); }
.pm-empty img { flex: none; opacity: .55; }
.pm-empty b { font-size: var(--fs-l); }
.pm-empty p { margin: 4px 0 0; font-size: var(--fs-s); }
.pm-seasons { max-width: 640px; }
.pm-seasons td { vertical-align: middle; }
.pm-seasons .mark { margin-left: 8px; font-size: var(--fs-s); }
@media (max-width: 600px) {
  .pr-sec { margin-top: 40px; }
  .pm-cards { grid-template-columns: minmax(0, 1fr); }
  .pm-empty { padding: 16px; }
}

/* Страница спортсмена, «Афиша»: места лентой турниров, рейтинг плитками сезонов, бои с цветным итогом.
   Место одним знаком .pk: 1–3 — медальный кружок (.place-N), остальные — кружок того же размера с числом */
.fc-body .pk { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid; font: 800 21px/1 var(--display); letter-spacing: 0; font-variant-numeric: lining-nums tabular-nums; vertical-align: middle; }
.fc-body .pk:not(.place) { border-color: var(--line2); background: var(--paper); color: var(--ink); }

.pt-list { list-style: none; margin: 0; padding: 0; }
.pt { display: grid; grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 32px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--line); }
.pt:first-child { padding-top: 8px; }
.pt-date { padding-left: 12px; border-left: 4px solid var(--red); }
.pt-date b { display: block; font: 800 38px/.9 var(--display); color: var(--ink); }
.pt-date span { display: block; margin-top: 4px; font: 700 var(--fs-m)/1 var(--display); letter-spacing: .12em; color: var(--ink2); }
.pt-tour { min-width: 0; }
.pt-sport { display: block; margin-bottom: 6px; font: 700 var(--fs-m)/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.pt-t { font: 600 var(--fs-l)/1.3 var(--font); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pt-t:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pt-places { list-style: none; margin: 0; padding: 0; }
.pt-places li { display: flex; align-items: center; gap: 14px; }
.pt-places li + li { margin-top: 12px; }
.pt-what { min-width: 0; line-height: 1.3; }
.pt-what b { display: block; font-weight: 600; }
.pt-what .sub { display: block; font-size: var(--fs-s); overflow-wrap: anywhere; }

.ss-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ss { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 18px 20px;
  border: 1px solid var(--line2); border-top: 4px solid var(--ink); background: var(--paper); }
.ss.is-current { border-top-color: var(--red); }
.fc-body .ss .pk { width: 48px; height: 48px; font-size: 25px; }
.ss-b { min-width: 0; }
.ss-t { display: block; font: 800 24px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ss-t:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ss-s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: var(--fs-s); color: var(--ink2); }
.ss-now { padding: 3px 8px 2px; background: var(--red); color: #fff; font: 700 var(--fs-xs)/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.ss-pts { text-align: right; }
.ss-pts b { display: block; font: 800 34px/.85 var(--display); color: var(--ink); }
.ss-pts span { display: block; margin-top: 4px; font: 700 var(--fs-xs)/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }

/* Итог боя — плашкой со скосом: победа зелёная, поражение красная, ничья серая */
.res { display: inline-block; padding: 6px 16px 5px 10px; clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  font: 800 var(--fs-m)/1 var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.res-win { background: var(--ok); color: var(--on-ink); }
.res-loss { background: var(--red); color: #fff; }
.res-draw { background: var(--slot); color: var(--ink); box-shadow: inset 0 0 0 1px var(--slot-line); }
.bx th:nth-child(1) { width: 104px; }
.bx th:nth-child(2) { width: 136px; }
.bx .b-date { font-weight: 600; color: var(--ink2); }
.bx .b-opp { font-weight: 600; }
.bx .b-method { white-space: normal; min-width: 9em; }
.bx .b-tour a { color: var(--ink); }
.bx .b-tour .sub { display: block; font-size: var(--fs-s); margin-top: 2px; }
.bx td { vertical-align: middle; }
.bx .b-link a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 6px 12px; border: 1px solid var(--line2); color: var(--ink);
  font: 700 var(--fs-m)/1 var(--display); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.bx .b-link svg { flex: none; }
.bx tbody tr:has(.b-link a):hover .b-link a { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 900px) {
  .pt { grid-template-columns: 88px minmax(0, 1fr); row-gap: 14px; }
  .pt-places { grid-column: 2; }
}
@media (max-width: 700px) {
  .pt { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 18px 0; }
  .pt-places { grid-column: auto; margin-top: 4px; }
  .pt-date { display: flex; align-items: baseline; gap: 8px; padding-left: 10px; border-left-width: 3px; }
  .pt-date b { font-size: 26px; }
  .pt-date span { margin: 0; }
  .pt-t { font-size: var(--fs-base); }
  .ss-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ss { padding: 14px 16px; column-gap: 14px; }
  .ss-t { font-size: 21px; }
  .ss-pts b { font-size: 30px; }
  /* Бой — карточкой: итог и дата, соперник крупно, способ, турнир и ссылка на бой */
  .bx tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "res date" "opp opp" "method method" "stage stage" "tour link";
    row-gap: 8px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--line2); background: var(--paper); align-items: center; }
  .bx tbody tr:last-child { margin-bottom: 0; }
  .bx .b-date { justify-self: end; }
  .bx .b-method:empty { display: none; }
  .bx .b-method { min-width: 0; color: var(--ink2); }
  .bx .b-tour { display: block; align-self: end; }
  .bx .b-tour .sub { display: block; margin-top: 2px; }
  .bx .b-link { align-self: end; }
  .bx tbody tr:has(.b-link a):hover { background: var(--paper); }
}

/* Ближайший старт: дата плашкой, турнир, вес и взвешивание; после пар — площадка, № пары и время */
.ns .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ns-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 32px; padding: 22px 24px;
  border: 1px solid var(--line2); border-top: 4px solid var(--blue); background: var(--paper); }
.ns-card + .ns-card { margin-top: 16px; }
.ns-main { min-width: 0; }
.ns-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.ns-facts span { display: block; font: 700 var(--fs-xs)/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.ns-facts b { display: block; margin-top: 4px; font-weight: 600; }
.ns-w.is-accepted { color: var(--ok); } .ns-w.is-rejected { color: var(--red-ink); } .ns-w.is-pending { color: var(--warn); }
.ns-bouts { list-style: none; margin: 18px 0 0; padding: 0; }
.ns-bout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ns-corner { font: 700 var(--fs-xs)/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; color: #fff; background: var(--red); }
.ns-corner.is-blue { background: var(--brand); }
.ns-where { font: 800 24px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.ns-where:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.ns-rival { color: var(--ink2); min-width: 0; overflow-wrap: anywhere; }
.ns-note { margin: 16px 0 0; }
@media (max-width: 700px) {
  .ns-card { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding: 18px 16px; }
  .ns-where { font-size: 21px; }
}

/* История боёв: стадия и угол (красный / синий) */
.bouts .b-stage { white-space: nowrap; }
.b-corner { display: inline-block; margin-left: 8px; padding: 2px 6px; font: 700 11px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--red); vertical-align: 1px; }
.b-corner.is-blue { background: var(--brand); }
.b-stage:empty { display: none; }
