.sticky {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

.results-live-card {
  margin-top: .5rem;
  border-radius: 16px;
  background: #020617;
  border: 1px solid #1f2937;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  padding: .9rem 1.1rem 1.1rem;
  overflow: hidden;
}

.results-grid {
  --card-min-width: 320px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-min-width)), 1fr));
  gap: 12px;
  margin-top: .25rem;
  align-items: start;
}

.overall-grid .result-card {
  border-width: 1.5px;
}

.result-card {
  background: #020617;
  border-radius: 14px;
  border: 1px solid #262c3a;
  padding: 14px 12px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: start;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.rank-badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 700;
  color: #e5e7eb;
  background: #111827;
  border: 2px solid #4b5563;
  margin-top: 2px;
}

.rank-1 {
  background: radial-gradient(circle at 30% 30%, #fef9c3, #facc15);
  border-color: #facc15;
  color: #111827;
}

.rank-2 {
  background: radial-gradient(circle at 30% 30%, #e5e7eb, #9ca3af);
  border-color: #9ca3af;
  color: #111827;
}

.rank-3 {
  background: radial-gradient(circle at 30% 30%, #fed7aa, #ea580c);
  border-color: #ea580c;
  color: #111827;
}

.result-main {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  overflow: hidden;
}

.result-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.club-badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, .18);
  border: 1px solid rgba(99, 102, 241, .28);
  color: #c7d2fe;
  overflow: hidden;
  font-weight: 800;
  font-size: .78rem;
  user-select: none;
}

.club-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-name {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.2;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.result-club-line {
  margin-top: 2px;
  font-size: .92rem;
  line-height: 1.25;
  color: #cbd5e1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .87rem;
  opacity: .92;
  margin-top: 4px;
}

.result-meta .nation {
  text-transform: uppercase;
  font-weight: 700;
  color: #f8fafc;
}

.result-meta .team {
  border-left: 1px solid rgba(255, 255, 255, .25);
  padding-left: 8px;
  color: #dbeafe;
  font-weight: 600;
}

.result-meta .clubtxt {
  border-left: 1px solid rgba(255, 255, 255, .25);
  padding-left: 8px;
  opacity: .95;
}

/* ROUNDS */
.result-rounds-wrap {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(40px, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.round-row {
  display: contents;
}

.round-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #111827;
  color: #e5e7eb;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  min-height: 24px;
}

.round-label-row .round-pill {
  background: transparent;
  border: 1px dashed #374151;
  color: #9ca3af;
  font-size: .8rem;
  font-weight: 700;
}

.round-value-row .round-pill.empty {
  opacity: .35;
}

/* Desktop: 6 rounds per visual group */
.round-label-row .round-pill:nth-child(1),
.round-value-row .round-pill:nth-child(1) { grid-column: 1; }

.round-label-row .round-pill:nth-child(2),
.round-value-row .round-pill:nth-child(2) { grid-column: 2; }

.round-label-row .round-pill:nth-child(3),
.round-value-row .round-pill:nth-child(3) { grid-column: 3; }

.round-label-row .round-pill:nth-child(4),
.round-value-row .round-pill:nth-child(4) { grid-column: 4; }

.round-label-row .round-pill:nth-child(5),
.round-value-row .round-pill:nth-child(5) { grid-column: 5; }

.round-label-row .round-pill:nth-child(6),
.round-value-row .round-pill:nth-child(6) { grid-column: 6; }

.round-label-row .round-pill:nth-child(n+1):nth-child(-n+6) { grid-row: 1; }
.round-value-row .round-pill:nth-child(n+1):nth-child(-n+6) { grid-row: 2; }

.round-label-row .round-pill:nth-child(n+7):nth-child(-n+12) { grid-row: 3; }
.round-value-row .round-pill:nth-child(n+7):nth-child(-n+12) { grid-row: 4; }

.round-label-row .round-pill:nth-child(n+13):nth-child(-n+18) { grid-row: 5; }
.round-value-row .round-pill:nth-child(n+13):nth-child(-n+18) { grid-row: 6; }

.round-label-row .round-pill:nth-child(n+19):nth-child(-n+24) { grid-row: 7; }
.round-value-row .round-pill:nth-child(n+19):nth-child(-n+24) { grid-row: 8; }

.round-label-row .round-pill:nth-child(7),
.round-value-row .round-pill:nth-child(7),
.round-label-row .round-pill:nth-child(13),
.round-value-row .round-pill:nth-child(13),
.round-label-row .round-pill:nth-child(19),
.round-value-row .round-pill:nth-child(19) { grid-column: 1; }

.round-label-row .round-pill:nth-child(8),
.round-value-row .round-pill:nth-child(8),
.round-label-row .round-pill:nth-child(14),
.round-value-row .round-pill:nth-child(14),
.round-label-row .round-pill:nth-child(20),
.round-value-row .round-pill:nth-child(20) { grid-column: 2; }

.round-label-row .round-pill:nth-child(9),
.round-value-row .round-pill:nth-child(9),
.round-label-row .round-pill:nth-child(15),
.round-value-row .round-pill:nth-child(15),
.round-label-row .round-pill:nth-child(21),
.round-value-row .round-pill:nth-child(21) { grid-column: 3; }

.round-label-row .round-pill:nth-child(10),
.round-value-row .round-pill:nth-child(10),
.round-label-row .round-pill:nth-child(16),
.round-value-row .round-pill:nth-child(16),
.round-label-row .round-pill:nth-child(22),
.round-value-row .round-pill:nth-child(22) { grid-column: 4; }

.round-label-row .round-pill:nth-child(11),
.round-value-row .round-pill:nth-child(11),
.round-label-row .round-pill:nth-child(17),
.round-value-row .round-pill:nth-child(17),
.round-label-row .round-pill:nth-child(23),
.round-value-row .round-pill:nth-child(23) { grid-column: 5; }

.round-label-row .round-pill:nth-child(12),
.round-value-row .round-pill:nth-child(12),
.round-label-row .round-pill:nth-child(18),
.round-value-row .round-pill:nth-child(18),
.round-label-row .round-pill:nth-child(24),
.round-value-row .round-pill:nth-child(24) { grid-column: 6; }

.result-score {
  grid-column: 3;
  grid-row: 1 / span 2;
  text-align: right;
  white-space: nowrap;
  align-self: start;
  min-width: 72px;
}

.score-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
  font-weight: 700;
}

.score-value {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.2;
}

.overall-grid .result-card.rank-1-card {
  border-color: #facc15;
}

.overall-grid .result-card.rank-2-card {
  border-color: #9ca3af;
}

.overall-grid .result-card.rank-3-card {
  border-color: #ea580c;
}

#roundButtons .round-btn.active {
  background: #1d88ff;
  border-color: #1d88ff;
  color: #fff;
}

.no-data {
  font-size: 1rem;
  opacity: .8;
}

/* MOBILE */
@media (max-width: 640px) {
  .results-live-card {
    padding: .75rem;
  }

  .results-grid {
    --card-min-width: 100%;
  }

  .result-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding: 12px 10px 10px;
  }

  .result-main {
    grid-column: 2;
    grid-row: 1;
  }

  .result-score {
    grid-column: 1 / span 2;
    grid-row: 3;
    text-align: left;
    border-top: 1px solid #111827;
    margin-top: 8px;
    padding-top: 8px;
    min-width: 0;
  }

  .result-rounds-wrap {
    grid-template-columns: repeat(5, minmax(34px, 1fr));
    gap: 5px 4px;
  }

  .round-pill {
    font-size: .72rem;
    padding: 3px 4px;
    min-height: 22px;
  }

  .round-label-row .round-pill {
    font-size: .7rem;
  }

  /* Mobile: 5 rounds per visual group */
  .round-label-row .round-pill:nth-child(1),
  .round-value-row .round-pill:nth-child(1),
  .round-label-row .round-pill:nth-child(6),
  .round-value-row .round-pill:nth-child(6),
  .round-label-row .round-pill:nth-child(11),
  .round-value-row .round-pill:nth-child(11),
  .round-label-row .round-pill:nth-child(16),
  .round-value-row .round-pill:nth-child(16),
  .round-label-row .round-pill:nth-child(21),
  .round-value-row .round-pill:nth-child(21) {
    grid-column: 1;
  }

  .round-label-row .round-pill:nth-child(2),
  .round-value-row .round-pill:nth-child(2),
  .round-label-row .round-pill:nth-child(7),
  .round-value-row .round-pill:nth-child(7),
  .round-label-row .round-pill:nth-child(12),
  .round-value-row .round-pill:nth-child(12),
  .round-label-row .round-pill:nth-child(17),
  .round-value-row .round-pill:nth-child(17),
  .round-label-row .round-pill:nth-child(22),
  .round-value-row .round-pill:nth-child(22) {
    grid-column: 2;
  }

  .round-label-row .round-pill:nth-child(3),
  .round-value-row .round-pill:nth-child(3),
  .round-label-row .round-pill:nth-child(8),
  .round-value-row .round-pill:nth-child(8),
  .round-label-row .round-pill:nth-child(13),
  .round-value-row .round-pill:nth-child(13),
  .round-label-row .round-pill:nth-child(18),
  .round-value-row .round-pill:nth-child(18),
  .round-label-row .round-pill:nth-child(23),
  .round-value-row .round-pill:nth-child(23) {
    grid-column: 3;
  }

  .round-label-row .round-pill:nth-child(4),
  .round-value-row .round-pill:nth-child(4),
  .round-label-row .round-pill:nth-child(9),
  .round-value-row .round-pill:nth-child(9),
  .round-label-row .round-pill:nth-child(14),
  .round-value-row .round-pill:nth-child(14),
  .round-label-row .round-pill:nth-child(19),
  .round-value-row .round-pill:nth-child(19),
  .round-label-row .round-pill:nth-child(24),
  .round-value-row .round-pill:nth-child(24) {
    grid-column: 4;
  }

  .round-label-row .round-pill:nth-child(5),
  .round-value-row .round-pill:nth-child(5),
  .round-label-row .round-pill:nth-child(10),
  .round-value-row .round-pill:nth-child(10),
  .round-label-row .round-pill:nth-child(15),
  .round-value-row .round-pill:nth-child(15),
  .round-label-row .round-pill:nth-child(20),
  .round-value-row .round-pill:nth-child(20),
  .round-label-row .round-pill:nth-child(25),
  .round-value-row .round-pill:nth-child(25) {
    grid-column: 5;
  }

  .round-label-row .round-pill:nth-child(n+1):nth-child(-n+5) { grid-row: 1; }
  .round-value-row .round-pill:nth-child(n+1):nth-child(-n+5) { grid-row: 2; }

  .round-label-row .round-pill:nth-child(n+6):nth-child(-n+10) { grid-row: 3; }
  .round-value-row .round-pill:nth-child(n+6):nth-child(-n+10) { grid-row: 4; }

  .round-label-row .round-pill:nth-child(n+11):nth-child(-n+15) { grid-row: 5; }
  .round-value-row .round-pill:nth-child(n+11):nth-child(-n+15) { grid-row: 6; }

  .round-label-row .round-pill:nth-child(n+16):nth-child(-n+20) { grid-row: 7; }
  .round-value-row .round-pill:nth-child(n+16):nth-child(-n+20) { grid-row: 8; }

  .round-label-row .round-pill:nth-child(n+21):nth-child(-n+25) { grid-row: 9; }
  .round-value-row .round-pill:nth-child(n+21):nth-child(-n+25) { grid-row: 10; }

  .rank-badge {
    width: 36px;
    height: 36px;
    font-size: .9rem;
  }

  .club-badge {
    width: 28px;
    height: 28px;
    font-size: .72rem;
  }

  .result-name {
    font-size: 1rem;
  }

  .result-club-line {
    font-size: .86rem;
  }

  .result-meta {
    font-size: .8rem;
    gap: 6px;
  }

  .score-value {
    font-size: 1.1rem;
  }
}

@media (max-width: 380px) {
  .result-rounds-wrap {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
  }

  .round-label-row .round-pill:nth-child(1),
  .round-value-row .round-pill:nth-child(1),
  .round-label-row .round-pill:nth-child(5),
  .round-value-row .round-pill:nth-child(5),
  .round-label-row .round-pill:nth-child(9),
  .round-value-row .round-pill:nth-child(9),
  .round-label-row .round-pill:nth-child(13),
  .round-value-row .round-pill:nth-child(13),
  .round-label-row .round-pill:nth-child(17),
  .round-value-row .round-pill:nth-child(17),
  .round-label-row .round-pill:nth-child(21),
  .round-value-row .round-pill:nth-child(21) {
    grid-column: 1;
  }

  .round-label-row .round-pill:nth-child(2),
  .round-value-row .round-pill:nth-child(2),
  .round-label-row .round-pill:nth-child(6),
  .round-value-row .round-pill:nth-child(6),
  .round-label-row .round-pill:nth-child(10),
  .round-value-row .round-pill:nth-child(10),
  .round-label-row .round-pill:nth-child(14),
  .round-value-row .round-pill:nth-child(14),
  .round-label-row .round-pill:nth-child(18),
  .round-value-row .round-pill:nth-child(18),
  .round-label-row .round-pill:nth-child(22),
  .round-value-row .round-pill:nth-child(22) {
    grid-column: 2;
  }

  .round-label-row .round-pill:nth-child(3),
  .round-value-row .round-pill:nth-child(3),
  .round-label-row .round-pill:nth-child(7),
  .round-value-row .round-pill:nth-child(7),
  .round-label-row .round-pill:nth-child(11),
  .round-value-row .round-pill:nth-child(11),
  .round-label-row .round-pill:nth-child(15),
  .round-value-row .round-pill:nth-child(15),
  .round-label-row .round-pill:nth-child(19),
  .round-value-row .round-pill:nth-child(19),
  .round-label-row .round-pill:nth-child(23),
  .round-value-row .round-pill:nth-child(23) {
    grid-column: 3;
  }

  .round-label-row .round-pill:nth-child(4),
  .round-value-row .round-pill:nth-child(4),
  .round-label-row .round-pill:nth-child(8),
  .round-value-row .round-pill:nth-child(8),
  .round-label-row .round-pill:nth-child(12),
  .round-value-row .round-pill:nth-child(12),
  .round-label-row .round-pill:nth-child(16),
  .round-value-row .round-pill:nth-child(16),
  .round-label-row .round-pill:nth-child(20),
  .round-value-row .round-pill:nth-child(20),
  .round-label-row .round-pill:nth-child(24),
  .round-value-row .round-pill:nth-child(24) {
    grid-column: 4;
  }

  .round-label-row .round-pill:nth-child(n+1):nth-child(-n+4) { grid-row: 1; }
  .round-value-row .round-pill:nth-child(n+1):nth-child(-n+4) { grid-row: 2; }

  .round-label-row .round-pill:nth-child(n+5):nth-child(-n+8) { grid-row: 3; }
  .round-value-row .round-pill:nth-child(n+5):nth-child(-n+8) { grid-row: 4; }

  .round-label-row .round-pill:nth-child(n+9):nth-child(-n+12) { grid-row: 5; }
  .round-value-row .round-pill:nth-child(n+9):nth-child(-n+12) { grid-row: 6; }

  .round-label-row .round-pill:nth-child(n+13):nth-child(-n+16) { grid-row: 7; }
  .round-value-row .round-pill:nth-child(n+13):nth-child(-n+16) { grid-row: 8; }

  .round-label-row .round-pill:nth-child(n+17):nth-child(-n+20) { grid-row: 9; }
  .round-value-row .round-pill:nth-child(n+17):nth-child(-n+20) { grid-row: 10; }

  .round-label-row .round-pill:nth-child(n+21):nth-child(-n+24) { grid-row: 11; }
  .round-value-row .round-pill:nth-child(n+21):nth-child(-n+24) { grid-row: 12; }
}