/* MINI LEAGUE ADD-ON CSS
   Load AFTER style.css.
   Purpose: mini-site layouts, league hub, admin, tournaments, rules pages,
   member data views, friendlies and compact mobile tweaks.
*/

/* ===============================
   MINI SITE LAYOUTS
   =============================== */

.mini-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px auto;
}

.mini-nav a,
.admin-grid a,
.tournament-actions .button-link {
  text-align: center;
}

.league-hub-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.league-card-table,
.draw-preview,
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.league-card-row,
.draw-match-card,
.entry-row {
  display: grid;
  grid-template-columns: 55px 1fr 80px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 18px;
}

.draw-match-card {
  grid-template-columns: 90px 1fr;
}

.entry-row {
  grid-template-columns: 64px 1fr 90px;
}

.assignment-entry-row {
  grid-template-columns: 64px 1fr 90px auto;
}

.assignment-entry-row .remove-assignment-btn {
  padding: 7px 12px;
  font-size: 16px;
  white-space: nowrap;
}

.entry-row img,
.player-mini-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
}

.admin-pin-box {
  max-width: 460px;
  margin: 0 auto;
}

.admin-only-badge,
.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.tournament-actions,
.draw-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.manual-draw-board {
  margin-top: 18px;
}

.manual-seed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.manual-seed-slot {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
}

.manual-seed-slot span {
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  color: rgba(244,238,229,0.78);
}

.manual-seed-slot select {
  width: 100%;
}

.admin-back-bar {
  margin-bottom: 20px;
}

.admin-back-bar .button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===============================
   LEAGUE HUB COMPACT LAYOUT
   =============================== */

html {
  scroll-padding-top: 90px;
}

#league-hub.league-hub-grid {
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.league-preview-card {
  padding: 16px;
  margin: 0;
  gap: 10px;
}

.league-preview-card h2 {
  font-size: 26px;
  padding: 8px;
  margin-bottom: 12px;
}

.league-preview-card .division-preview {
  padding: 14px;
  margin: 10px 0;
}

.league-preview-card .division-preview h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.leader-label {
  font-size: 13px;
  margin-bottom: 8px;
}

.leader-player-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.leader-player-card img {
  width: 82px;
  height: 82px;
}

.leader-player-card h4 {
  font-size: 28px;
  line-height: 1;
  margin: 0 0 6px;
}

.leader-player-card p {
  font-size: 13px;
  margin: 0 0 6px;
}

.leader-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.leader-mini-stats span {
  font-size: 12px;
  padding: 5px;
}

/* Desktop stats hub stacked layout */
@media (min-width: 801px) {
  main.container #league-hub.league-hub-grid {
    display: flex;
    flex-direction: column;
    width: min(100%, 1120px);
    max-width: 1120px;
    gap: 18px;
    padding: 0 18px;
  }

  main.container #league-hub.league-hub-grid > .league-preview-card {
    width: 100%;
    max-width: none;
    padding: 22px 28px;
    margin: 0;
  }

  main.container #league-hub .league-title-link {
    margin-bottom: 14px;
  }

  main.container #league-hub .league-card-logo {
    width: 76px;
    height: 76px;
  }

  main.container #league-hub .division-preview {
    width: 100%;
    padding: 14px 18px;
    margin: 12px 0;
  }

  main.container #league-hub .league-preview-info {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    grid-template-areas:
      "title leader action"
      "label leader action";
    align-items: center;
    gap: 8px 18px;
    text-align: left;
  }

  main.container #league-hub .division-preview h3 {
    grid-area: title;
    margin: 0;
    font-size: 26px;
  }

  main.container #league-hub .leader-label {
    grid-area: label;
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
  }

  main.container #league-hub .leader-player-card {
    grid-area: leader;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    justify-content: start;
    align-items: center;
    gap: 12px;
  }

  main.container #league-hub .leader-player-card img {
    width: 68px;
    height: 68px;
  }

  main.container #league-hub .leader-player-card > div {
    min-width: 0;
  }

  main.container #league-hub .leader-player-card h4 {
    margin-bottom: 6px;
    text-align: left;
    font-size: 27px;
  }

  main.container #league-hub .leader-player-card p {
    display: none;
  }

  main.container #league-hub .leader-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 5px;
    width: 100%;
    flex-wrap: nowrap;
  }

  main.container #league-hub .leader-mini-stats span {
    min-width: 0;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
  }

  main.container #league-hub .division-direct-link {
    grid-area: action;
    margin-top: 0;
    white-space: nowrap;
  }
}

@media (min-width: 1320px) {
  main.container #league-hub.league-hub-grid {
    width: min(100%, 1280px);
    max-width: 1280px;
  }

  main.container #league-hub.league-hub-grid > .league-preview-card {
    padding-left: 30px;
    padding-right: 30px;
  }

  main.container #league-hub .league-preview-info {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "title leader"
      "label leader"
      ". action";
    gap: 6px 12px;
  }

  main.container #league-hub .leader-player-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
  }

  main.container #league-hub .leader-player-card img {
    width: 52px;
    height: 52px;
  }

  main.container #league-hub .leader-mini-stats {
    grid-template-columns: repeat(9, minmax(80px, 1fr));
    gap: 4px;
  }

  main.container #league-hub .leader-mini-stats span {
    padding: 6px;
    font-size: 11px;
    overflow: hidden;
  }

  main.container #league-hub .division-direct-link {
    justify-self: end;
    margin-top: 4px;
  }
}

/* ===============================
   TABLES: RESULTS / FIXTURES / DIVISION
   =============================== */

@media (min-width: 701px) {
  #results-table,
  #member-results-table,
  #player-profile-results {
    table-layout: fixed;
  }

  #results-table th:nth-child(1),
  #results-table td:nth-child(1),
  #results-table th:nth-child(5),
  #results-table td:nth-child(5),
  #member-results-table th:nth-child(1),
  #member-results-table td:nth-child(1),
  #member-results-table th:nth-child(5),
  #member-results-table td:nth-child(5),
  #player-profile-results th:nth-child(1),
  #player-profile-results td:nth-child(1),
  #player-profile-results th:nth-child(5),
  #player-profile-results td:nth-child(5) {
    width: 41%;
  }

  #results-table th:nth-child(2),
  #results-table td:nth-child(2),
  #results-table th:nth-child(4),
  #results-table td:nth-child(4),
  #member-results-table th:nth-child(2),
  #member-results-table td:nth-child(2),
  #member-results-table th:nth-child(4),
  #member-results-table td:nth-child(4),
  #player-profile-results th:nth-child(2),
  #player-profile-results td:nth-child(2),
  #player-profile-results th:nth-child(4),
  #player-profile-results td:nth-child(4) {
    width: 7%;
    text-align: center;
  }

  #results-table th:nth-child(3),
  #results-table td:nth-child(3),
  #member-results-table th:nth-child(3),
  #member-results-table td:nth-child(3),
  #player-profile-results th:nth-child(3),
  #player-profile-results td:nth-child(3) {
    width: 4%;
    text-align: center;
  }
}

#division-table th:nth-child(1),
#division-table td:nth-child(1) {
  text-align: center;
  padding-left: 0;
  width: fit-content;
}

#division-table th:nth-child(2),
#division-table td:nth-child(2) {
  text-align: left;
  padding-left: 10px;
  width: fit-content;
}

/* ===============================
   REMAINING FIXTURES
   =============================== */

.remaining-summary-card {
  text-align: center;
}

.remaining-summary-card h3 {
  font-size: 28px;
  margin: 10px 0;
}

.remaining-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.remaining-mini-stats span,
.remaining-opponent-row {
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.remaining-opponent-row {
  margin: 8px auto;
  max-width: 260px;
}

.division-stats-leaders,
.division-fixtures-overview {
  margin-bottom: 18px;
}

.division-stats-sheet {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.division-fixture-summary-row {
  max-width: 640px;
  margin-bottom: 18px;
}

/* ===============================
   PLAYER SEARCH / FRIENDLIES
   =============================== */

.player-search-card,
.player-search-strip {
  max-width: 720px;
  margin: 18px auto;
}

.player-search-strip {
  text-align: center;
}

.player-search-strip h2 {
  margin-bottom: 10px;
}

.player-search-strip .member-form {
  max-width: 640px;
  margin: 0 auto;
}

#player-search {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: block;
}

#player-search-results {
  max-width: 920px;
  margin: 14px auto 0;
}

#player-search-results .entry-row,
.friendlies-table-wrap > .entry-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
}

#player-search-results .entry-row img,
.friendlies-table-wrap > .entry-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

#player-search-results .entry-row strong,
.friendlies-table-wrap > .entry-row strong {
  display: block;
  font-size: 18px;
  color: #f3e7d5;
}

#player-search-results .entry-row p,
.friendlies-table-wrap > .entry-row p {
  margin: 4px 0 0;
  font-size: 14px;
}

#player-search-results .button-link {
  padding: 8px 18px;
  white-space: nowrap;
}

.friendlies-league-card {
  max-width: 1120px;
  margin: 18px auto 28px;
}

.friendlies-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.friendlies-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.friendlies-table th,
.friendlies-table td {
  text-align: center;
  white-space: nowrap;
}

.friendlies-table th:nth-child(2),
.friendlies-table td:nth-child(2) {
  text-align: left;
}

.friendly-opponent-results {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.friendly-opponent-option {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.055);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}

.friendly-opponent-option:hover {
  border-color: rgba(0,255,120,0.32);
  background: rgba(0,255,120,0.08);
}

.friendly-opponent-option img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 9px;
}

.friendly-opponent-option strong,
.friendly-opponent-option small {
  display: block;
}

.friendly-opponent-option strong {
  font-size: 18px;
}

.friendly-opponent-option small,
.friendly-opponent-results p,
.friendly-opponent-selected {
  color: rgba(244,238,229,0.72);
  font-size: 14px;
}

.friendly-opponent-selected {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,255,120,0.08);
  border: 1px solid rgba(0,255,120,0.20);
  text-align: center;
}

/* ===============================
   DIVISION DETAIL PANELS
   =============================== */

.division-picker-form {
  max-width: 520px;
  margin: 0 auto 16px;
}

.division-detail-panel {
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 16px;
}

.division-player-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
  text-align: left;
}

.division-player-summary img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.42);
}

.division-player-summary h3 {
  font-size: 30px;
  line-height: 1;
  margin: 0;
}

.division-player-summary p {
  margin: 4px 0 0;
  color: rgba(244,238,229,0.72);
}

.division-detail-grid,
.fixture-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.division-detail-grid span,
.fixture-summary-row span,
.fixture-opponent-list span {
  display: grid;
  gap: 3px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 18px;
}

.division-detail-grid strong,
.fixture-summary-row strong {
  color: rgba(244,238,229,0.68);
  font-size: 12px;
  line-height: 1;
}

.fixture-summary-row {
  max-width: 420px;
  margin: 0 auto 14px;
}

.fixture-opponent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

@media (min-width: 701px) {
  .division-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 980px;
    margin: 0 auto;
  }
}

/* ===============================
   RULES PAGE
   =============================== */

.rules-container {
  max-width: 1120px;
}

.rules-page-header {
  padding-bottom: 38px;
}

.rules-intro-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: -12px;
}

.rules-intro-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.14));
}

.rules-intro-card h2 {
  margin-bottom: 4px;
}

.rules-intro-card p,
.rules-section p,
.rules-final-card p {
  color: rgba(244,238,229,0.78);
  font-size: 20px;
  line-height: 1.45;
}

.rules-jump-nav {
  position: sticky;
  top: 124px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
}

.rules-jump-nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  color: var(--cream);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 18px;
  transition: 0.2s ease;
}

.rules-jump-nav a:hover {
  color: #fff;
  border-color: rgba(0,255,120,0.38);
  box-shadow: 0 0 18px rgba(0,255,120,0.12);
}

.rules-section {
  scroll-margin-top: 235px;
}

.rules-section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  text-align: center;
}

.rules-section-heading h2 {
  margin: 0;
}

.rules-section-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, rgba(139,0,0,0.96), rgba(0,120,58,0.80));
  border: 1px solid rgba(255,255,255,0.14);
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
}

.rules-info-grid,
.rules-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.rules-info-grid span,
.rules-split-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--cream);
  font-size: 19px;
}

.rules-info-grid strong {
  color: rgba(244,238,229,0.64);
  font-size: 13px;
}

.rules-split-grid h3 {
  margin: 0;
  font-size: 26px;
}

.rules-split-grid p {
  margin: 0;
}

.rules-list,
.rules-number-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 22px;
  color: rgba(244,238,229,0.86);
  font-size: 19px;
  line-height: 1.35;
}

.rules-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(139,0,0,0.26);
  border: 1px solid rgba(255,90,90,0.22);
}

.rules-action-link {
  margin: 8px 0 4px;
}

.rules-danger-section {
  border-color: rgba(255,90,90,0.22);
}

.rules-final-card {
  text-align: center;
}

/* ===============================
   HOME ABOUT PAGE
   =============================== */

.home-about-card,
.home-platform-card {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.home-about-card h2,
.home-platform-card h2 {
  margin-bottom: 18px;
}

.home-about-card p,
.home-platform-card p {
  color: rgba(244,238,229,0.82);
  font-size: 21px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.home-about-signoff {
  color: #fff;
  font-family: "Bebas Neue", sans-serif;
  font-size: 34px;
  letter-spacing: 0;
  text-align: center;
}

.home-platform-card {
  text-align: center;
}

/* ===============================
   MEMBER HUB / PROFILE STATS
   =============================== */

.member-season-card {
  grid-column: 1 / -1;
}

.member-stats-panel {
  max-width: 980px;
  margin: 0 auto;
}

.member-stats-filter {
  max-width: 520px;
  margin: 0 auto 16px;
}

.member-stats-context {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(244,238,229,0.82);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.member-detail-grid {
  margin-top: 4px;
}

@media (min-width: 701px) {
  .member-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .member-detail-grid .member-primary-stat {
    grid-column: span 2;
    max-width: 260px;
    width: 100%;
    justify-self: center;
  }
}

.member-opponent-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 16px;
}

.member-opponent-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--cream);
  text-align: center;
  font-size: 19px;
  text-decoration: none;
}

.member-opponent-pill:hover,
.player-profile-link:hover {
  color: #fff;
  border-color: rgba(0,255,120,0.28);
}

.player-profile-link {
  color: inherit;
  text-decoration: none;
}

.mini-standing-row .player-profile-link,
.league-card-row .player-profile-link,
td .player-profile-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-profile-button {
  margin-top: 8px;
}

.player-view-profile-card {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.player-view-profile-info {
  text-align: center;
}

.member-fixture-actions {
  justify-content: center;
  margin-top: 4px;
}

/* Member data access prompt/modal */

.page-header.is-access-blocked {
  min-height: 220px;
}

.member-data-access-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.member-data-access-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 14px rgba(255,255,255,0.16));
}

.member-data-access-card p {
  max-width: 560px;
  margin: 0 auto 18px;
  color: rgba(244,238,229,0.82);
  font-size: 21px;
  line-height: 1.45;
}

.member-data-access-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  justify-content: center;
  width: min(100%, 520px);
  margin: 0 auto;
}

.member-data-access-actions .button-link {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 11px 18px 9px;
  border-radius: 999px;
  line-height: 1.05;
  white-space: nowrap;
  text-align: center;
}

.member-data-access-close {
  display: none;
}

.member-data-access-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.member-data-access-modal.is-open {
  display: flex;
}

.member-data-access-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}

.member-data-access-modal .member-data-access-card {
  width: min(100%, 760px);
  z-index: 1;
}

.member-data-access-modal .member-data-access-close {
  display: inline-flex;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--cream);
  background: rgba(0,0,0,0.45);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ===============================
   TOURNAMENT PAGES
   =============================== */

.dropdown-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.desktop-primary-links .dropdown-trigger,
.navbar .dropdown-trigger {
  color: var(--cream);
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  font-weight: inherit;
  line-height: normal;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 8px 14px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
}

.desktop-primary-links .dropdown-trigger:hover,
.navbar .dropdown-trigger:hover {
  color: #fff;
}

.tournament-page-header {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.tournament-hero-logo {
  width: min(240px, 56vw);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.55));
}

.tournaments-hub-page {
  max-width: 1160px;
}

.tournament-hub-intro {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.tournament-hub-intro p,
.tournament-hub-card p,
.tournament-route-card p {
  color: rgba(244,238,229,0.78);
  font-size: 20px;
  line-height: 1.4;
}

.tournament-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tournament-hub-card {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 220px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tournament-hub-card:hover {
  transform: translateY(-5px);
  border-color: rgba(230,196,82,0.42);
  box-shadow: 0 20px 42px rgba(0,0,0,0.34), inset 0 0 34px rgba(230,196,82,0.06);
}

.tournament-feature-card img,
.tournament-feature-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,0.48));
}

.tournament-feature-card img {
  object-fit: contain;
}

.tournament-feature-icon {
  fill: none;
  stroke: #f4eee1;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  padding: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(230,196,82,0.18), rgba(0,0,0,0.28));
  border: 1px solid rgba(230,196,82,0.30);
  box-shadow: inset 0 0 28px rgba(230,196,82,0.07);
}

.tournament-feature-card h2 {
  margin-bottom: 8px;
}

.tournament-feature-card p {
  max-width: 260px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.35;
}

.tournament-live-panel {
  margin-top: 24px;
}

.tournament-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tournament-section-heading h2 {
  margin: 0;
}

.tournament-section-heading .button-link {
  width: fit-content;
  min-width: 140px;
  padding: 9px 14px;
}

.tournament-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tournament-list-grid .tournament-card {
  margin: 0;
  height: 100%;
}

.tournament-report-header img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.45));
}

.tournament-selector-form,
.tournament-result-form {
  max-width: 560px;
  margin: 0 auto;
}

.tournament-route-card {
  text-align: center;
}

.tournament-guidance-note {
  max-width: 680px;
  margin: 16px auto;
  padding: 10px 14px;
  border-left: 3px solid rgba(0,255,120,0.45);
  border-radius: 6px;
  background: rgba(255,255,255,0.035);
  color: rgba(244,238,229,0.74);
  font-size: 18px;
  line-height: 1.35;
  text-align: left;
}

.tournament-bracket-board {
  width: 100%;
}

.tournament-bracket-shell {
  display: grid;
  gap: 12px;
}

.tournament-round-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tournament-round-tabs::-webkit-scrollbar {
  display: none;
}

.tournament-round-tab {
  flex: 1 0 auto;
  min-width: 112px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(244,238,229,0.14);
  border-radius: 6px;
  background: rgba(0,0,0,0.34);
  color: rgba(244,238,229,0.72);
  font: inherit;
  cursor: pointer;
}

.tournament-round-tab.is-active {
  border-color: rgba(0,255,120,0.34);
  background: rgba(8,55,28,0.72);
  color: #fff8ec;
}

.tournament-bracket-scroll {
  display: block;
}

.tournament-round {
  padding: 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.09);
}

.tournament-round[hidden] {
  display: none;
}

.tournament-round.round-size-1 {
  border-color: rgba(230,196,82,0.38);
  box-shadow: inset 0 0 22px rgba(230,196,82,0.08);
}

.tournament-round-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tournament-round-heading h2 {
  margin: 0;
  text-align: left;
}

.tournament-round-heading span {
  color: rgba(244,238,229,0.58);
  font-size: 14px;
}

.tournament-match-card {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}

.tournament-match-label {
  color: rgba(244,238,229,0.62);
  text-align: center;
  font-size: 13px;
}

.tournament-player-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(0,0,0,0.30);
}

.tournament-player-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-player-line.is-winner {
  color: #fff;
  border: 1px solid rgba(0,255,120,0.28);
  box-shadow: inset 0 0 16px rgba(0,255,120,0.08);
}

.tournament-match-card p {
  margin: 0;
  color: rgba(244,238,229,0.70);
  text-align: center;
}

/* ===============================
   ADMIN RESULT REVIEW
   =============================== */

.pending-results-list {
  display: grid;
  gap: 18px;
}

.result-review-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.10);
}

.result-review-header,
.review-stat-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.review-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.review-edit-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: rgba(244,238,229,0.72);
  font-size: 13px;
  line-height: 1;
}

.review-edit-grid input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.42);
  color: var(--cream);
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.reject-reason-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
}

.ai-reading-summary {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(244,238,225,0.12);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(0,0,0,0.24));
}

.ai-reading-summary p,
.ai-reading-summary small {
  margin: 0;
  color: rgba(244,238,225,0.78);
}

.submission-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.screenshot-preview-button {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.32);
  color: var(--cream);
  font-family: "Bebas Neue", sans-serif;
  cursor: pointer;
}

.screenshot-preview-button img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
}

.screenshot-preview-button span,
.screenshot-missing {
  font-size: 14px;
  color: rgba(244,238,229,0.72);
}

.screenshot-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 70000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.86);
}

.screenshot-viewer-modal figure {
  display: grid;
  gap: 10px;
  width: min(100%, 1120px);
  max-height: calc(100dvh - 70px);
  margin: 0;
}

.screenshot-viewer-modal img {
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,0.45);
}

.screenshot-viewer-modal figcaption {
  text-align: center;
  color: var(--cream);
  font-size: 18px;
}

.screenshot-viewer-close {
  position: fixed;
  top: 14px;
  right: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.70);
  color: var(--cream);
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .review-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-preview-button {
    padding: 6px;
  }

  .screenshot-preview-button img {
    max-height: 320px;
  }
}

/* ===============================
   DONATE BUTTONS
   =============================== */

.desktop-donate-link {
  display: flex;
  align-items: center;
  margin-left: 12px;
  position: relative;
  z-index: 9999;
}

.desktop-donate-logo {
  height: 36px;
  width: auto;
  transition: transform 0.25s ease;
}

.desktop-donate-link:hover .desktop-donate-logo {
  transform: scale(2.6);
  filter:
    drop-shadow(0 0 8px rgba(255,0,0,.8))
    drop-shadow(0 0 16px rgba(255,0,0,.5));
}

.mobile-donate-link {
  display: none;
}

/* ===============================
   ADMIN CONTROL CENTRE
   =============================== */

.admin-dashboard {
  max-width: 1180px;
}

.admin-overview-card {
  text-align: center;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.admin-summary-grid > span,
.admin-record-card {
  border-radius: 16px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
}

.admin-summary-grid > span {
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: center;
}

.admin-summary-grid strong,
.admin-record-card p,
.admin-helper-text {
  color: rgba(244,238,229,0.70);
}

.admin-summary-grid strong {
  font-size: 13px;
}

.admin-summary-grid span span {
  color: var(--cream);
  font-size: 24px;
}

.admin-hub-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-tool-group {
  display: flex;
  flex-direction: column;
}

.admin-tool-group p {
  color: rgba(244,238,229,0.78);
  font-size: 19px;
  line-height: 1.35;
}

.admin-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.admin-record-list {
  display: grid;
  gap: 12px;
}

.admin-record-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.admin-record-card > img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.10);
}

.admin-record-card h3 {
  margin: 0;
  font-size: 28px;
}

.admin-record-card p {
  margin: 4px 0 0;
  font-size: 16px;
}

.admin-card-actions,
.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-inline-form input,
.admin-inline-form select {
  width: auto;
  min-width: 160px;
}

.admin-record-card .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.reader-status-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,255,120,0.18);
  background: rgba(0,0,0,0.25);
}

.reader-status-panel p {
  margin: 0;
  color: rgba(244,238,229,0.78);
  font-size: 17px;
}

.screenshot-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 250px;
  letter-spacing: 0.9px;
}

.screenshot-action-button::after {
  content: ">";
  color: #00ff66;
  font-size: 20px;
  line-height: 1;
}

.screenshot-action-button.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(244,238,229,0.35);
  border-top-color: #f4eee5;
  border-radius: 999px;
  animation: screenshot-action-spin 0.8s linear infinite;
}

@keyframes screenshot-action-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .screenshot-action-button {
    width: 100%;
    min-width: 0;
  }
}

/* ===============================
   RESPONSIVE: TABLET / MOBILE
   =============================== */

@media (max-width: 900px) {
  .admin-summary-grid,
  .admin-hub-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-record-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .admin-card-actions,
  .admin-inline-form {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .admin-card-actions .button-link,
  .admin-inline-form .button-link,
  .admin-inline-form input,
  .admin-inline-form select {
    width: 100%;
  }
}

@media (max-width: 800px) {
  .mini-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    width: 100%;
  }

  .mini-nav a,
  .mini-nav .button-link {
    width: 100%;
    min-width: 0;
    padding: 7px 4px;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
  }

  .rules-grid,
  .rule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    text-size-adjust: 80%;
  }

  .league-hub-grid,
  #league-hub.league-hub-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-size-adjust: 100%;
  }

  .division-preview {
    padding: 8px 5px;
    margin: 0;
    text-align: center;
  }

  .division-preview h3 {
    font-size: 15px;
    margin: 0 0 4px;
  }

  .division-preview p {
    font-size: 10px;
    margin: 0;
    line-height: 1.25;
  }

  main.container #league-hub .leader-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  main.container #league-hub .leader-mini-stats span {
    min-width: 0;
    padding: 5px 6px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
  }

  .rules-intro-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .rules-jump-nav {
    top: 78px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 14px;
  }

  .rules-info-grid,
  .rules-split-grid,
  .tournament-hub-grid {
    grid-template-columns: 1fr;
  }

  .tournament-hero-logo {
    width: min(132px, 38vw);
  }

  .rules-section {
    scroll-margin-top: 165px;
  }

  .tournament-hub-card {
    grid-template-columns: 52px minmax(0, 1fr) 20px;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 2px 12px;
    min-height: 0;
    padding: 13px 14px;
    text-align: left;
  }

  .tournament-hub-card::after {
    grid-column: 3;
    grid-row: 1 / 3;
    color: rgba(230,196,82,0.72);
    content: ">";
    font-size: 24px;
  }

  .tournament-feature-card img,
  .tournament-feature-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 52px;
    height: 52px;
    margin: 0;
  }

  .tournament-feature-icon {
    padding: 10px;
  }

  .tournament-feature-card h2 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .tournament-feature-card p {
    grid-column: 2;
    grid-row: 2;
    max-width: 100%;
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
  }

  .tournament-section-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .tournament-section-heading .button-link {
    width: 100%;
    min-width: 0;
  }

  .tournament-list-grid {
    grid-template-columns: 1fr;
  }

  .tournament-report-header img {
    width: 70px;
    height: 70px;
  }

  .tournament-bracket-scroll,
  .tournament-bracket-scroll.is-knockout {
    display: block;
    overflow: visible;
  }

  .tournament-round {
    min-width: 0;
    width: 100%;
  }

  .tournament-round-tab {
    min-width: 104px;
    min-height: 40px;
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 12px;
    overflow-x: hidden;
  }

  body::before {
    background-size: 620px;
    opacity: 0.06;
    background-position: center center;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .container {
    width: 80%;
    padding: 8px;
    margin: 12px auto;
    gap: 10px;
  }

  .page-header {
    padding: 10px 8px;
    margin-bottom: 10px;
  }

  .page-header h1 {
    font-size: 34px;
    line-height: 0.9;
    margin-bottom: 4px;
  }

  .page-header p {
    font-size: 11px;
    line-height: 1.2;
    margin-top: 4px;
  }

  .card {
    padding: 10px;
    margin-bottom: 14px;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .button-link {
    font-size: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    min-height: unset;
  }

  .mini-nav,
  .main-nav {
    flex-direction: column;
    align-items: center;
  }

  .league-hub-grid,
  .admin-grid,
  .division-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .division-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .league-division-card,
  .division-card {
    width: 100%;
    max-width: none;
  }

  .division-preview,
  .entry-row,
  .league-card-row,
  .draw-match-card,
  .remaining-opponent-row {
    padding: 8px;
    border-radius: 10px;
    min-height: unset;
    text-align: center;
  }

  .division-preview {
    margin: 6px 0;
  }

  .division-preview h3,
  .entry-row h3 {
    font-size: 18px;
    margin: 0 0 4px;
  }

  .division-preview p,
  .entry-row p,
  .card p,
  li {
    font-size: 11px;
    line-height: 1.3;
  }

  .league-card-row,
  .draw-match-card,
  .entry-row {
    grid-template-columns: 1fr;
  }

  .entry-row img,
  .player-mini-img {
    margin: 0 auto;
  }

  .leader-player-card {
    grid-template-columns: 58px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .leader-player-card img {
    width: 54px;
    height: 54px;
  }

  .leader-player-card h4 {
    font-size: 20px;
    margin: 0;
  }

  .leader-player-card p {
    font-size: 13px;
    margin: 0;
  }

  .leader-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
  }

  .leader-mini-stats span {
    font-size: 9px;
    padding: 5px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  main.container #league-hub .leader-mini-stats span {
    font-size: 9px;
    padding: 5px 4px;
  }

  .coming-soon-card {
    padding: 24px 14px;
  }

  .coming-logo {
    width: 90px;
  }

  .coming-soon-card h1 {
    font-size: 48px;
  }

  .coming-tagline {
    font-size: 14px;
  }

  .coming-badge {
    font-size: 22px;
    padding: 8px 14px;
  }

  .coming-description {
    font-size: 14px;
    line-height: 1.5;
  }

  .coming-actions {
    gap: 8px;
  }

  .coming-actions .button-link {
    width: 100%;
    max-width: 260px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 10px;
  }

  th,
  td {
    padding: 4px 2px;
    font-size: 13px;
    white-space: nowrap;
  }

  #division-title {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .mini-league-logo {
    width: 85px;
    height: 85px;
  }

  #division-table,
  .division-table {
    min-width: 600px;
  }

  #division-table td:nth-child(2) {
    max-width: 82px;
    min-width: 82px;
  }

  #results-table,
  .results-table,
  #fixtures-table,
  .fixtures-table,
  #member-results-table,
  #player-profile-results {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  #results-table th,
  #results-table td,
  .results-table th,
  .results-table td,
  #fixtures-table th,
  #fixtures-table td,
  .fixtures-table th,
  .fixtures-table td,
  #member-results-table th,
  #member-results-table td,
  #player-profile-results th,
  #player-profile-results td {
    padding: 4px 2px;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #results-table th:nth-child(1),
  #results-table td:nth-child(1),
  .results-table th:nth-child(1),
  .results-table td:nth-child(1),
  #results-table th:nth-child(5),
  #results-table td:nth-child(5),
  .results-table th:nth-child(5),
  .results-table td:nth-child(5),
  #member-results-table th:nth-child(1),
  #member-results-table td:nth-child(1),
  #member-results-table th:nth-child(5),
  #member-results-table td:nth-child(5),
  #player-profile-results th:nth-child(1),
  #player-profile-results td:nth-child(1),
  #player-profile-results th:nth-child(5),
  #player-profile-results td:nth-child(5) {
    width: 36%;
    max-width: 36%;
    font-size: 10.5px;
  }

  #results-table th:nth-child(2),
  #results-table td:nth-child(2),
  .results-table th:nth-child(2),
  .results-table td:nth-child(2),
  #results-table th:nth-child(4),
  #results-table td:nth-child(4),
  .results-table th:nth-child(4),
  .results-table td:nth-child(4),
  #member-results-table th:nth-child(2),
  #member-results-table td:nth-child(2),
  #member-results-table th:nth-child(4),
  #member-results-table td:nth-child(4),
  #player-profile-results th:nth-child(2),
  #player-profile-results td:nth-child(2),
  #player-profile-results th:nth-child(4),
  #player-profile-results td:nth-child(4) {
    width: 10%;
    max-width: 10%;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
  }

  #results-table th:nth-child(3),
  #results-table td:nth-child(3),
  .results-table th:nth-child(3),
  .results-table td:nth-child(3),
  #member-results-table th:nth-child(3),
  #member-results-table td:nth-child(3),
  #player-profile-results th:nth-child(3),
  #player-profile-results td:nth-child(3) {
    width: 4%;
    max-width: 4%;
    text-align: center;
    font-size: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  #fixtures-table th:nth-child(1),
  #fixtures-table td:nth-child(1),
  .fixtures-table th:nth-child(1),
  .fixtures-table td:nth-child(1),
  #fixtures-table th:nth-child(3),
  #fixtures-table td:nth-child(3),
  .fixtures-table th:nth-child(3),
  .fixtures-table td:nth-child(3) {
    width: 39%;
    max-width: 39%;
    font-size: 10.5px;
  }

  #fixtures-table th:nth-child(2),
  #fixtures-table td:nth-child(2),
  .fixtures-table th:nth-child(2),
  .fixtures-table td:nth-child(2) {
    width: 6%;
    max-width: 6%;
    text-align: center;
    font-size: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  #fixtures-table th:nth-child(4),
  #fixtures-table td:nth-child(4),
  .fixtures-table th:nth-child(4),
  .fixtures-table td:nth-child(4) {
    width: 16%;
    max-width: 16%;
    font-size: 9.5px;
    text-align: center;
  }

  .form-row {
    margin-bottom: 10px;
  }

  .form-row label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  input {
    height: 38px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  select,
  option {
    min-height: 42px;
    height: 42px;
    padding: 9px 10px 7px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  select {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .register-phone-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .register-phone-group select,
  .register-phone-group input#country-code {
    width: 92px;
    flex: 0 0 92px;
  }

  .register-phone-group input {
    flex: 1;
    min-width: 0;
  }

  .remaining-mini-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .remaining-mini-stats span {
    padding: 6px;
    font-size: 10px;
  }

  .remaining-summary-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .settings-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .settings-toggle-list,
  .notification-feed {
    gap: 9px;
  }

  .settings-toggle-row {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 9px;
  }

  .settings-toggle-row strong,
  .notification-card h3 {
    font-size: 18px;
  }

  .settings-toggle-row em {
    font-size: 12px;
  }

  .notification-card {
    padding: 12px;
    border-radius: 9px;
  }

  .notification-card p {
    font-size: 14px;
  }

  .notification-card .button-link {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }

  .notifications-heading-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .notifications-heading-row .button-link {
    width: 100%;
    min-width: 0;
  }

  .report-header-row {
    flex-direction: column;
    gap: 10px;
  }

  .report-header-row .button-link {
    width: 100%;
    min-width: 0;
  }

  .report-highlight-grid,
  .report-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .report-highlight-grid span,
  .report-mini-grid span {
    padding: 10px;
    border-radius: 9px;
  }

  .report-highlight-grid strong,
  .report-mini-grid strong,
  .report-highlight-grid em {
    font-size: 11px;
  }

  .report-highlight-grid b {
    font-size: 26px;
  }

  .report-mini-grid span {
    font-size: 22px;
  }

  .report-section h3 {
    font-size: 22px;
  }

  .report-table th,
  .report-table td {
    padding: 7px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .report-copy-text {
    min-height: 180px;
    font-size: 11px;
  }

  main.container #league-hub.league-hub-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0;
    align-items: center;
  }

  main.container #league-hub.league-hub-grid > .league-preview-card,
  main.container .season-selector-card {
    width: 100%;
    max-width: 359px;
    margin-left: auto;
    margin-right: auto;
  }

  main.container #league-hub .division-preview {
    width: 100%;
    max-width: none;
    margin-bottom: 14px;
  }

  main.container #league-hub .division-preview:last-child {
    margin-bottom: 0;
  }

  .player-search-card,
  .player-search-strip,
  #player-search-results,
  .friendlies-league-card {
    margin: 10px;
  }

  #player-search {
    max-width: 100%;
    font-size: 14px;
    height: 42px;
  }

  #player-search-results .entry-row,
  .friendlies-table-wrap > .entry-row {
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 10px;
  }

  #player-search-results .entry-row img,
  .friendlies-table-wrap > .entry-row img {
    width: 40px;
    height: 40px;
  }

  #player-search-results .entry-row strong {
    font-size: 15px;
  }

  #player-search-results .entry-row p {
    font-size: 12px;
  }

  #player-search-results .button-link {
    grid-column: 1 / -1;
    width: 100%;
    padding: 7px;
    font-size: 13px;
  }

  .friendly-opponent-option {
    grid-template-columns: 38px 1fr;
    padding: 9px 10px;
  }

  .friendly-opponent-option strong {
    font-size: 15px;
  }

  .division-picker-form {
    max-width: none;
    margin-bottom: 12px;
  }

  .division-detail-panel {
    padding: 12px;
  }

  .division-player-summary {
    gap: 10px;
    justify-content: flex-start;
  }

  .division-player-summary img {
    width: 58px;
    height: 58px;
  }

  .division-player-summary h3 {
    font-size: 24px;
  }

  .division-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .division-detail-grid span,
  .fixture-summary-row span,
  .fixture-opponent-list span {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 15px;
  }

  .fixture-opponent-list {
    grid-template-columns: 1fr;
  }

  .home-about-card p,
  .home-platform-card p {
    font-size: 18px;
    line-height: 1.45;
  }

  .home-about-signoff {
    font-size: 28px;
  }

  .page-header.is-access-blocked {
    min-height: 170px;
  }

  .member-data-access-logo {
    width: 88px;
    height: 88px;
  }

  .member-data-access-card p {
    font-size: 18px;
  }

  .member-data-access-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .member-data-access-actions .button-link {
    min-height: 32px;
    padding: 8px 16px 6px;
    font-size: 13px;
    line-height: 1.05;
  }

  .member-stats-panel {
    max-width: none;
    padding: 10px;
  }

  .member-stats-filter {
    max-width: none;
    margin-bottom: 10px;
  }

  .member-detail-grid {
    gap: 7px;
  }

  .member-detail-grid span {
    border-radius: 12px;
    min-height: 48px;
    font-size: 16px;
    padding: 8px 6px;
  }

  .member-detail-grid strong {
    font-size: 11px;
  }

  .member-opponent-pills {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .member-opponent-pill {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 15px;
  }

  .mobile-donate-link {
    display: block;
    margin-top: auto;
    padding: 25px 0;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .mobile-donate-logo {
    width: 190px;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .admin-summary-grid,
  .admin-hub-sections {
    grid-template-columns: 1fr;
  }

  .admin-record-card h3 {
    font-size: 23px;
  }

  .admin-tool-links {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .rules-intro-logo {
    width: 92px;
    height: 92px;
  }

  .rules-jump-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
  }

  .rules-section {
    scroll-margin-top: 190px;
  }

  .rules-jump-nav a {
    min-height: 38px;
    font-size: 16px;
  }

  .rules-section-heading {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  .rules-section-icon {
    width: 38px;
    height: 38px;
    font-size: 19px;
    flex: 0 0 auto;
  }

  .rules-intro-card p,
  .rules-section p,
  .rules-final-card p,
  .rules-list,
  .rules-number-list {
    font-size: 17px;
  }
}
