/* Rozkład meczów: jedna powierzchnia od kart lat do istniejących wykresów. */
.team-page .legacy-season {
  border-color:rgba(255,88,104,.28);
  background-color:#070d17;
  background-image:
    linear-gradient(180deg,rgba(3,7,14,.07) 0%,rgba(4,9,18,.17) 24%,rgba(5,10,19,.76) 52%,#070d17 76%),
    url('assets/tlo-rozklad-meczow-full-hd.webp');
  background-repeat:no-repeat;
  background-position:center top;
  background-size:100% 100%,100% auto;
  box-shadow:inset 0 0 54px rgba(0,0,0,.18),0 18px 42px #0007;
}
.team-page .legacy-season::before {background:none;}
.team-page .legacy-season::after {
  left:clamp(18px,2.35vw,34px);right:auto;top:0;width:145px;height:2px;
  background:linear-gradient(90deg,#ff4055,#ff4055 38%,transparent);
  box-shadow:0 0 14px #ff405577;
}
.team-page .legacy-season > .legacy-heading {
  min-height:90px;margin:0 0 19px;padding:0 0 0 3px;align-items:flex-start;
}
.team-page .legacy-season .legacy-title {
  color:#f5f7fa!important;font-size:clamp(30px,3.3vw,49px);
  line-height:1.06;letter-spacing:-1.25px;font-weight:950;font-style:italic;
  text-shadow:0 4px 18px #000a;
}
.team-page .legacy-season .legacy-title em {color:#ff4055;}

/* Karty lat zachowują zmienną koloru i wybór generowany przez aplikację. */
.team-page .legacy-season .season-years-window {
  overflow:visible;scroll-snap-type:none;scroll-behavior:auto;padding:2px 0 0;
}
.team-page .legacy-season .season-years-track {
  display:grid;grid-auto-flow:row;grid-auto-columns:auto;
  grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;width:100%;
}
.team-page .legacy-season .season-year-card {
  min-height:112px;padding:13px 15px 12px;gap:10px;border-radius:13px;
  border-color:rgba(117,151,183,.25);
  background:linear-gradient(165deg,rgba(21,34,47,.93),rgba(7,17,28,.9) 76%),
    radial-gradient(ellipse at 85% 100%,color-mix(in srgb,var(--season-year-color) 18%,transparent),transparent 70%);
  box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--season-year-color) 24%,transparent),0 8px 16px #0005;
}
.team-page .legacy-season .season-year-card::after {
  content:"";position:absolute;left:13px;right:13px;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,var(--season-year-color),transparent);
  opacity:.48;pointer-events:none;
}
.team-page .legacy-season .season-year-card.is-selected {
  border-color:var(--season-year-color);
  background:radial-gradient(ellipse at 82% 98%,color-mix(in srgb,var(--season-year-color) 25%,transparent),transparent 70%),
    linear-gradient(145deg,rgba(35,25,37,.96),rgba(12,15,25,.94));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--season-year-color) 22%,transparent),
    0 0 22px color-mix(in srgb,var(--season-year-color) 33%,transparent),0 10px 19px #0007;
}
.team-page .legacy-season .season-year-card.is-selected::before {
  left:12px;right:12px;background:linear-gradient(90deg,var(--season-year-color),transparent);
}
.team-page .legacy-season .season-year-card.is-selected::after {opacity:1;box-shadow:0 0 11px var(--season-year-color);}
.team-page .legacy-season .season-year-selected-indicator {color:var(--season-year-color);}
.team-page .legacy-season .season-year-dot {width:9px;height:9px;box-shadow:0 0 11px var(--season-year-color);}
.team-page .legacy-season .season-year-top strong {font-size:24px;letter-spacing:-.55px;}
.team-page .legacy-season .season-year-totals {gap:12px;}
.team-page .legacy-season .season-year-totals>span {gap:4px;}
.team-page .legacy-season .season-year-totals>span+span {padding-left:12px;}
.team-page .legacy-season .season-year-totals small {font-size:9px;color:#aeb9ca;}
.team-page .legacy-season .season-year-totals b {font-size:19px;line-height:1.05;}
.team-page .legacy-season .season-mini-chart {height:43px;flex-basis:100px;width:100px;gap:3px;}
.team-page .legacy-season .season-spark-bar {box-shadow:0 -2px 7px color-mix(in srgb,var(--season-year-color) 25%,transparent);}

/* Jeden lekki kontener tabeli, z gęstszymi wierszami i czytelnym sterowaniem. */
.team-page .legacy-season .season-detail {
  margin-top:17px;padding:14px 15px 12px;border-radius:12px;
  border-color:rgba(255,74,91,.28);
  background:linear-gradient(160deg,rgba(8,15,25,.88),rgba(8,13,23,.91));
  box-shadow:inset 0 1px 0 #ff54651c,0 12px 30px #0005;
}
.team-page .legacy-season .season-detail-head {margin-bottom:6px;padding-bottom:11px;border-bottom-color:#8293ac25;}
.team-page .legacy-season .season-calendar {color:#ff4055;filter:drop-shadow(0 0 7px #ff405555);}
.team-page .legacy-season .season-detail-head h4 {font-size:clamp(23px,2.15vw,31px);}
.team-page .legacy-season .season-detail-head h4 em {color:#ff4055;}
.team-page .legacy-season .season-detail-index {color:#a5b0c1;}
.team-page .legacy-season .season-nav {
  width:31px;height:31px;border-color:#91a1ba33;
  background:linear-gradient(160deg,#1b2635,#0d1420);box-shadow:inset 0 1px 0 #ffffff10;
}
.team-page .legacy-season #seasonYearSelect {
  min-width:87px;height:31px;border-color:#ff405588;
  background:linear-gradient(160deg,#251b28,#11131d);
  box-shadow:inset 0 0 0 1px #ff40551c,0 0 11px #ff40551c;
}
.team-page .legacy-season .season-table-frame {
  width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;
  border:0;border-radius:0;background:transparent;box-shadow:none;
}
.team-page .legacy-season #yearBreakdownTable {min-width:900px;table-layout:fixed;}
.team-page .legacy-season #yearBreakdownTable th,
.team-page .legacy-season #yearBreakdownTable td {
  padding:5px 7px;line-height:1.24;font-size:14px;
  border:0;border-bottom:1px solid rgba(149,169,194,.095);
}
.team-page .legacy-season #yearBreakdownTable thead th {
  padding:8px 7px;font-size:11px;color:#aab5c6;
  background:linear-gradient(90deg,rgba(22,31,44,.58),rgba(16,24,36,.32));
}
.team-page .legacy-season #yearBreakdownTable tbody th:first-child {
  padding-left:11px!important;font-size:14px!important;background:transparent;font-weight:850;
}
.team-page .legacy-season #yearBreakdownTable tbody td {font-size:14px!important;}
.team-page .legacy-season #yearBreakdownTable .season-wins {color:#49e19a;}
.team-page .legacy-season #yearBreakdownTable .season-losses {color:#ff6a7c;}
.team-page .legacy-season #yearBreakdownTable .season-winrate {color:#f6f8fc;}
.team-page .legacy-season .season-form {gap:3px;min-height:15px;justify-content:center;}
.team-page .legacy-season .season-form-pill {width:17px;height:17px;border-radius:4px;font-size:11px;}
.team-page .legacy-season .season-activity-track {height:7px;background:#273342;}
.team-page .legacy-season #yearBreakdownTable .season-record-value {padding:2px 3px;}

/* Suma i cztery progi aktywności kończą tabelę w jednym wierszu. */
.team-page .legacy-season #yearBreakdownTable tfoot,
.team-page .legacy-season #yearBreakdownTable tfoot tr {
  background:linear-gradient(90deg,rgba(123,31,48,.66),rgba(74,35,52,.44) 49%,rgba(35,48,67,.72));
}
.team-page .legacy-season #yearBreakdownTable tfoot th,
.team-page .legacy-season #yearBreakdownTable tfoot td {
  padding-top:10px!important;padding-bottom:10px!important;
  border-top:1px solid rgba(255,81,100,.59)!important;
  border-bottom:0!important;font-size:15px!important;
}
.team-page .legacy-season #yearBreakdownTable tfoot th:first-child {
  padding-left:11px!important;background:rgba(139,24,44,.25);
  box-shadow:inset 4px 0 0 #ff4055;font-size:14px!important;white-space:nowrap;
}
.team-page .legacy-season #yearBreakdownTable tfoot td:nth-child(2) {font-size:18px!important;}
.team-page .legacy-season #yearBreakdownTable tfoot td:nth-child(6) {font-size:16px!important;}
.team-page .legacy-season #yearBreakdownTable tfoot td.season-footer-legend-cell {
  display:table-cell!important;padding:5px 7px!important;color:#dfe6f2;text-align:center;
}
.team-page .legacy-season .season-footer-legend {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;
  min-width:0;width:100%;
}
.team-page .legacy-season .season-footer-legend-item {
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  min-width:0;width:100%;white-space:nowrap;font-size:9px;font-weight:750;
}
.team-page .legacy-season .season-footer-legend-item+.season-footer-legend-item {border-left:1px solid #ffffff19;}
.team-page .legacy-season .season-footer-legend-item span {
  display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1.1;
}
.team-page .legacy-season .season-footer-legend-item b {color:#f6f8fd;font-size:10px;font-weight:900;}
.team-page .legacy-season .season-footer-legend-item small {color:#a9b3c4;font-size:8px;}
.team-page .legacy-season .season-footer-legend-item .season-level-dot {width:7px;height:7px;box-shadow:0 0 6px currentColor;}

/* Wykresy zachowują swoją kompozycję i interakcje. */
.team-page .legacy-season .season-charts-grid {margin-top:18px;}

@media (max-width:1100px) {
  .team-page .legacy-season .season-years-track {grid-template-columns:repeat(2,minmax(0,1fr));}
  .team-page .legacy-season .season-year-card {min-height:108px;}
}
@media (max-width:760px) {
  .team-page .legacy-season > .legacy-heading {min-height:70px;margin-bottom:15px;padding:0;}
  .team-page .legacy-season .legacy-title {font-size:clamp(28px,8vw,38px);letter-spacing:-1.25px;}
}
@media (max-width:680px) {
  .team-page .legacy-season {
    background-image:linear-gradient(180deg,rgba(4,8,15,.18),rgba(5,10,19,.72) 390px,#070d17 690px),
      url('assets/tlo-rozklad-meczow-full-hd.webp');
    background-size:100% 100%,auto 690px;
    background-position:center top,right top;
  }
  .team-page .legacy-season .season-years-window {overflow:visible;padding:0;}
  .team-page .legacy-season .season-years-track {
    grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  }
  .team-page .legacy-season .season-year-card {
    min-height:100px;padding:10px 10px 9px;gap:8px;border-radius:11px;
  }
  .team-page .legacy-season .season-year-top {gap:6px;}
  .team-page .legacy-season .season-year-top strong {font-size:19px;}
  .team-page .legacy-season .season-year-dot {width:7px;height:7px;}
  .team-page .legacy-season .season-year-selected-indicator {display:none!important;font-size:7px;letter-spacing:.4px;}
  .team-page .legacy-season .season-year-card.is-selected .season-year-selected-indicator {display:block!important;}
  .team-page .legacy-season .season-year-content {flex:1;flex-direction:row;align-items:flex-end;gap:4px;}
  .team-page .legacy-season .season-year-totals {gap:5px;}
  .team-page .legacy-season .season-year-totals>span+span {display:flex;padding-left:5px;}
  .team-page .legacy-season .season-year-totals small {display:block;font-size:7.5px;}
  .team-page .legacy-season .season-year-totals>span:first-child:after {content:none;}
  .team-page .legacy-season .season-year-totals b {font-size:15px;}
  .team-page .legacy-season .season-mini-chart {flex:1 1 38px;width:auto;min-width:25px;height:33px;gap:1px;}
  .team-page .legacy-season .season-detail {
    margin-top:14px;padding:11px 8px 8px;border:1px solid rgba(255,74,91,.3);
    border-radius:11px;background:rgba(7,14,24,.84);
  }
  .team-page .legacy-season .season-detail-head {padding:0 2px 9px;margin-bottom:5px;border-bottom:1px solid #ffffff1c;}
  .team-page .legacy-season .season-detail-head h4 em {color:#ff4055;}
  .team-page .legacy-season .season-detail-index {display:block;margin-right:2px;font-size:8px;}
  .team-page .legacy-season .season-select-label {display:block;}
  .team-page .legacy-season #seasonYearSelect {min-width:72px;height:29px;padding-left:7px;padding-right:22px;font-size:11px;}
  .team-page .legacy-season .season-nav {width:27px;height:29px;}
  .team-page .legacy-season .season-table-frame {overflow-x:auto;overflow-y:hidden;border:0;border-radius:0;background:transparent;}
  .team-page .legacy-season #yearBreakdownTable {display:table;min-width:900px;width:100%;table-layout:fixed;}
  .team-page .legacy-season #yearBreakdownTable thead {display:table-header-group;}
  .team-page .legacy-season #yearBreakdownTable tbody {display:table-row-group;}
  .team-page .legacy-season #yearBreakdownTable tfoot {display:table-footer-group;margin:0;}
  .team-page .legacy-season #yearBreakdownTable tbody tr,
  .team-page .legacy-season #yearBreakdownTable tfoot tr {display:table-row;border:0;border-radius:0;padding:0;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(n),
  .team-page .legacy-season #yearBreakdownTable td:nth-child(n) {display:table-cell!important;}
  .team-page .legacy-season #yearBreakdownTable th:first-child {width:14%!important;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(2) {width:8%!important;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(3),
  .team-page .legacy-season #yearBreakdownTable th:nth-child(4),
  .team-page .legacy-season #yearBreakdownTable th:nth-child(5) {width:9%!important;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(6) {width:11%!important;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(7) {width:18%!important;}
  .team-page .legacy-season #yearBreakdownTable th:nth-child(8) {width:23%!important;}
  .team-page .legacy-season #yearBreakdownTable tbody th,
  .team-page .legacy-season #yearBreakdownTable tfoot th {padding:5px 7px 5px 11px!important;font-size:14px!important;}
  .team-page .legacy-season #yearBreakdownTable tbody td,
  .team-page .legacy-season #yearBreakdownTable tfoot td {padding:5px 7px!important;font-size:14px!important;}
  .team-page .legacy-season #yearBreakdownTable tfoot th,
  .team-page .legacy-season #yearBreakdownTable tfoot td {padding-top:10px!important;padding-bottom:10px!important;}
  .team-page .legacy-season #yearBreakdownTable tfoot td.season-footer-legend-cell {padding:5px 7px!important;}
  .team-page .legacy-season .season-label-desktop {display:inline;}
  .team-page .legacy-season .season-label-mobile {display:none;}
  .team-page .legacy-season .season-form {justify-content:center;}
  .team-page .legacy-season .season-form-pill {width:17px;height:17px;}
}
@media (max-width:420px) {
  .team-page .legacy-season .season-year-card {padding:9px 7px 8px;}
  .team-page .legacy-season .season-year-totals b {font-size:14px;}
  .team-page .legacy-season .season-year-totals small {font-size:6.5px;letter-spacing:0;}
  .team-page .legacy-season .season-mini-chart {height:27px;}
  .team-page .legacy-season .season-detail-head h4 {font-size:20px;}
  .team-page .legacy-season .season-detail-index {display:none;}
}

/* Liczby meczów i wyników mają jednakową typografię w każdym wierszu. */
.team-page .legacy-season #yearBreakdownTable tbody td:nth-child(n+2):nth-child(-n+5) {
  font-size:14px!important;
  font-weight:900;
}
.team-page .legacy-season #yearBreakdownTable tfoot td:nth-child(n+2):nth-child(-n+5) {
  font-size:18px!important;
  font-weight:900;
}
@media (max-width:760px) {
  .team-page .legacy-season #yearBreakdownTable tfoot td:nth-child(n+2):nth-child(-n+5) {
    font-size:14px!important;
  }
}

/* Telefon: roczniki w jednym przewijanym rzędzie, z zwartym układem danych. */
@media (max-width:680px) {
  .team-page .legacy-season .season-years-window {
    overflow-x:auto;overflow-y:hidden;
    scroll-snap-type:x mandatory;scroll-behavior:smooth;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    padding:2px 0 8px;
  }
  .team-page .legacy-season .season-years-track {
    display:grid;grid-auto-flow:column;
    grid-template-columns:none;grid-auto-columns:clamp(190px,59vw,230px);
    gap:9px;width:max-content;min-width:100%;
  }
  .team-page .legacy-season .season-year-card {
    min-height:84px;padding:9px 10px 8px;gap:6px;
    justify-content:flex-start;scroll-snap-align:start;
  }
  .team-page .legacy-season .season-year-content {
    flex:0 0 auto;align-items:flex-end;justify-content:space-between;gap:6px;
  }
  .team-page .legacy-season .season-year-totals {gap:7px;}
  .team-page .legacy-season .season-year-totals>span+span {padding-left:7px;}
  .team-page .legacy-season .season-mini-chart {
    flex:1 1 45px;min-width:38px;height:29px;
  }
}
