@font-face {
  font-family: "DB Adman X";
  src: url("assets/fonts/db-adman-x.ttf") format("truetype");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DB Adman X";
  src: url("assets/fonts/db-adman-x-bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #071a48;
  --ink-2: #09275e;
  --acid: #ffb600;
  --mint: #39a7ff;
  --cream: #f1f5fb;
  --paper: #ffffff;
  --muted: #91a8c8;
  --dark-line: rgba(7, 26, 72, .13);
  --display: "DB Adman X", sans-serif;
  --thai: "DB Adman X", sans-serif;
}

body {
  font-family: var(--thai);
  font-size: 19px;
}

.main-nav { font-size: 17px; }
.brand-copy strong { font-family: var(--display); }
.brand-copy small { font-size: 12px; }
.brand-byline { margin-top: 4px; color: #fff; font-size: 13px; line-height: 1.1; }
.footer-brand .footer-byline { margin-top: 7px; font: 700 15px/1.3 var(--thai); letter-spacing: 0; color: #fff; }
.footer-social a img { display: block; width: 23px; height: 23px; object-fit: contain; }
.footer-social a[title="YouTube"] img { width: 25px; height: 18px; }
.hero p { font-size: 21px; line-height: 1.5; }
.btn { font-size: 18px; }
.section-head p { font-size: 18px; }
.club span, .score small, .events { font-size: 15px; }
.table-team strong { font-family: var(--thai); font-size: 18px; text-transform: none; }
th { font-size: 15px; }
td { font-size: 17px; }

.site-header {
  background: linear-gradient(180deg, rgba(2, 15, 48, .96), rgba(2, 15, 48, .5), transparent);
}

.site-header.scrolled {
  background: rgba(3, 22, 63, .97);
}

.brand-logo {
  width: 57px;
  height: 57px;
  object-fit: cover;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25));
  border-radius: 50%;
  background: #fff;
}

.brand-copy strong {
  font-size: 18px;
  letter-spacing: .4px;
}

.brand-copy strong i,
.footer-brand strong i {
  color: #ef2a3e;
  font-style: normal;
}

.hero {
  background:
    linear-gradient(90deg, rgba(2, 14, 51, .98) 0%, rgba(4, 28, 80, .9) 48%, rgba(9, 61, 150, .48) 100%),
    url('assets/live-cover.png') center / cover no-repeat;
}

.orb-one { background: rgba(255, 182, 0, .12); }
.orb-two { background: rgba(34, 136, 255, .13); }

.crest-glow {
  left: 50%;
  top: 46%;
  width: 430px;
  height: 430px;
  background: #4a9dff;
  opacity: .22;
}

.official-logo {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 47%;
  width: min(510px, 95%);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 32px 28px rgba(0, 0, 0, .42));
}

.blue-swipe {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, rgba(255, 182, 0, .18), rgba(255, 255, 255, .02));
  transform: skewX(-16deg);
}

.swipe-a { width: 130px; height: 520px; right: 2%; top: 7%; }
.swipe-b { width: 80px; height: 360px; left: 7%; bottom: -5%; }

.match-centre,
.standings,
.teams {
  background: linear-gradient(135deg, #061a49, #0b347e);
}

.stat-card.featured {
  background: linear-gradient(145deg, #ffb600, #ffd45d);
}

.player-art {
  background: linear-gradient(160deg, #071b4c, #1357af);
}

.about-art {
  background:
    linear-gradient(rgba(6, 35, 100, .62), rgba(5, 23, 68, .84)),
    url('assets/live-cover.png') center / cover no-repeat;
}

.about-art strong { color: rgba(255, 182, 0, .92); }
.join { background: linear-gradient(135deg, #ffb600, #ffd45d); }

footer { background: #031537; }

.footer-brand > img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.footer-brand strong { font-size: 21px; line-height: .95; }

.club-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 5px;
  border-radius: 14px;
  background: #fff;
}

.score em {
  font-size: 12px;
  font-style: normal;
  letter-spacing: 1px;
  color: var(--acid);
}

.schedule-controls {
  display: grid;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.schedule-controls button {
  min-width: 92px;
  padding: 13px 10px 11px;
  border: 1px solid rgba(7, 26, 72, .18);
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  cursor: pointer;
  transition: .2s ease;
}

.schedule-controls button:hover,
.schedule-controls button.active {
  color: #fff;
  border-color: var(--ink-2);
  background: var(--ink-2);
  transform: translateY(-2px);
}

.schedule-controls strong,
.schedule-controls span { display: block; }
.schedule-controls strong { font-size: 18px; }
.schedule-controls span { margin-top: 2px; font-size: 14px; opacity: .72; }

.schedule-card {
  overflow: hidden;
  border: 1px solid rgba(7, 26, 72, .16);
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 26, 72, .09);
}

.schedule-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
  color: #fff;
  background: linear-gradient(115deg, #061a49, #0d56ba);
}

.schedule-round {
  min-width: 78px;
  padding-right: 24px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .25);
}

.schedule-round span,
.schedule-round strong { display: block; }
.schedule-round span { font-size: 13px; letter-spacing: 1.5px; color: var(--acid); }
.schedule-round strong { font: 900 50px/.85 var(--display); }
.schedule-header h3 { margin: 0; font: 700 clamp(26px, 3vw, 38px)/1.1 var(--display); }
.schedule-header p { margin: 6px 0 0; font-size: 17px; color: #bcd0ee; }
.schedule-header p span { color: var(--acid); margin-right: 10px; }

.schedule-games { display: grid; grid-template-columns: 1fr 1fr; }
.schedule-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
  align-items: center;
  min-height: 112px;
  padding: 16px 22px;
  border-right: 1px solid rgba(7, 26, 72, .1);
  border-bottom: 1px solid rgba(7, 26, 72, .1);
}

.schedule-team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.schedule-team.home { flex-direction: row-reverse; text-align: right; }
.schedule-team strong { font-size: 17px; line-height: 1.2; }
.schedule-team img {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  object-fit: contain;
  padding: 3px;
}

.schedule-game time {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 900 28px/.8 var(--display);
  color: #0d4f9d;
}

.schedule-game time small { margin-top: 7px; font: 400 13px/1 var(--thai); color: #7183a0; }
.schedule-note { margin: 0; padding: 14px 24px; text-align: center; font-size: 14px; color: #607596; background: #f3f6fb; }

.table-wrap table { min-width: 980px; }

.table-logo {
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  object-fit: contain;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
}

.danger-row {
  background: rgba(239, 42, 62, .13);
}

.danger-row:hover {
  background: rgba(239, 42, 62, .2);
}

.data-pending {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--dark-line);
  background: linear-gradient(135deg, rgba(10, 61, 150, .05), rgba(255, 182, 0, .09));
}

.data-pending strong {
  font: 900 42px/1 var(--display);
  color: #17498e;
}

.data-pending span {
  color: #607596;
  font-size: 17px;
}

.team-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.team-grid article {
  min-height: 280px;
}

.team-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  margin-bottom: 22px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .24));
}

.team-grid h3 {
  font-family: var(--thai);
  font-size: 17px;
  line-height: 1.35;
  text-transform: none;
}

.rosters {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(234, 241, 251, .96)),
    url('assets/live-cover.png') center / cover fixed;
}

.roster-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.roster-toolbar > label {
  align-self: center;
  margin-right: 6px;
  color: #607596;
  font-size: 16px;
}

.roster-select-wrap {
  position: relative;
  flex: 1;
  max-width: 580px;
}

.roster-select-wrap select {
  width: 100%;
  min-height: 54px;
  appearance: none;
  padding: 11px 48px 11px 17px;
  border: 1px solid rgba(7, 26, 72, .2);
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font: 700 19px/1.2 var(--thai);
  cursor: pointer;
}

.roster-select-wrap > span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #0b55ad;
  pointer-events: none;
}

.roster-nav { display: flex; gap: 7px; }
.roster-nav button {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(7, 26, 72, .2);
  color: var(--ink);
  background: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: .2s ease;
}
.roster-nav button:hover { color: #fff; border-color: var(--ink-2); background: var(--ink-2); }

.roster-card {
  overflow: hidden;
  border: 1px solid rgba(7, 26, 72, .14);
  background: #fff;
  box-shadow: 0 24px 65px rgba(7, 26, 72, .09);
}

.roster-card-header {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 150px;
  padding: 24px 30px;
  color: #fff;
  background: linear-gradient(115deg, #061a49, #0d56ba);
}

.roster-card-header img {
  flex: 0 0 auto;
  width: 94px;
  height: 94px;
  padding: 6px;
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
}

.roster-card-header span { color: var(--acid); font: 700 13px/1 var(--display); letter-spacing: 2px; }
.roster-card-header h3 { margin: 5px 0 4px; font: 800 clamp(28px, 3.5vw, 46px)/1 var(--display); }
.roster-card-header p { margin: 0; color: #bcd0ee; font-size: 16px; }

.roster-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr);
}

.player-roster { padding: 28px 30px 34px; }
.player-roster h4,
.coach-roster h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 17px;
  font: 800 23px/1 var(--display);
}
.player-roster h4 span { color: #607596; font-size: 15px; font-weight: 400; }
.player-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(7, 26, 72, .11); }
.player-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(7, 26, 72, .11);
}
.player-row:nth-child(odd) { padding-right: 18px; border-right: 1px solid rgba(7, 26, 72, .11); }
.player-row:nth-child(even) { padding-left: 18px; }
.player-row b { color: #0d56ba; font: 900 22px/1 var(--display); }
.player-row span { font-size: 17px; line-height: 1.2; }

.coach-roster {
  padding: 28px;
  color: #fff;
  background: #071d4c;
}
.coach-row { padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .15); }
.coach-row span { display: block; margin-bottom: 5px; color: var(--acid); font-size: 14px; }
.coach-row strong { font-size: 20px; line-height: 1.25; }
.coach-row.staff-card-row {
  min-height: 154px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.coach-row.staff-card-row > span {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}
.coach-roster > p { color: #bcd0ee; }
.roster-source { margin: 16px 0 0; color: #607596; font-size: 14px; text-align: center; }

.partners {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 25, 70, .97), rgba(8, 58, 139, .96)),
    url('assets/live-cover.png') center / cover no-repeat;
}

.partners::after {
  content: "PARTNERS";
  position: absolute;
  right: -18px;
  top: 45px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .06);
  font: 900 clamp(90px, 15vw, 220px)/.7 var(--display);
  letter-spacing: -.04em;
  pointer-events: none;
}

.partners .section-head,
.partners .partner-grid { position: relative; z-index: 1; }
.partners .section-head { max-width: 840px; }

.partner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.partner-grid article {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  background: #fff;
  transition: transform .22s ease, box-shadow .22s ease;
}

.partner-grid article:hover {
  z-index: 2;
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .28);
}

.partner-grid img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Team cards open a complete, accessible team profile. */
.team-grid article[data-team] { position: relative; cursor: pointer; outline: none; }
.team-grid article[data-team]::after {
  content: "ดูข้อมูลทีม  →";
  margin-top: 17px;
  color: var(--acid);
  font: 700 10px/1 var(--thai);
  letter-spacing: .04em;
  opacity: .72;
  transition: opacity .2s, transform .2s;
}
.team-grid article[data-team]:hover::after,
.team-grid article[data-team]:focus-visible::after { opacity: 1; transform: translateX(3px); }
.team-grid article[data-team]:focus-visible { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(200, 255, 56, .2); }
.table-team[data-team], .schedule-team[data-team] { cursor: pointer; outline: none; }
.table-team[data-team]:focus-visible, .schedule-team[data-team]:focus-visible { box-shadow: 0 0 0 3px rgba(200, 255, 56, .35); }

.team-dialog {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 0;
  color: var(--ink);
  background: #f5f7fb;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .48);
}
.team-dialog::backdrop { background: rgba(1, 8, 18, .8); backdrop-filter: blur(6px); }
.team-dialog-close {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .22);
  font: 300 29px/1 sans-serif;
  cursor: pointer;
}
.team-dialog-close:hover { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.team-profile-hero {
  min-height: 190px;
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 30px 86px 30px 34px;
  color: #fff;
  background: linear-gradient(120deg, #061a49, #0b55ad 63%, #06183c);
}
.team-profile-hero > img { width: 118px; height: 118px; padding: 8px; object-fit: contain; border-radius: 20px; background: #fff; }
.team-profile-hero > div > span { color: var(--acid); font: 700 11px/1 var(--display); letter-spacing: 2px; }
.team-profile-hero h2 { margin: 8px 0 5px; font: 800 clamp(31px, 4vw, 54px)/1.05 var(--thai); }
.team-profile-hero p { margin: 0; color: #bcd0ee; font-size: 15px; }
.team-rank { min-width: 105px; text-align: center; }
.team-rank small, .team-rank span { display: block; color: #bcd0ee; font-size: 12px; }
.team-rank strong { display: block; color: var(--acid); font: 900 74px/.85 var(--display); }
.team-detail-body { padding: 25px; }
.team-performance { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.team-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.team-stat-grid article { min-height: 94px; display: flex; flex-direction: column; justify-content: space-between; padding: 15px; border: 1px solid rgba(7, 26, 72, .11); background: #fff; }
.team-stat-grid article span { color: #61718b; font-size: 12px; }
.team-stat-grid article strong { font: 900 34px/1 var(--display); }
.team-stat-grid .points { color: #071a48; background: var(--acid); border-color: var(--acid); }
.team-stat-grid .points span { color: #345019; }
.next-match-card { min-height: 196px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 14px 18px; padding: 20px; color: #fff; background: #071d4c; }
.next-match-label { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.next-match-label span { color: var(--acid); font: 700 11px var(--display); letter-spacing: 2px; }
.next-match-label strong { font-size: 13px; }
.next-opponent { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.next-opponent img { width: 68px; height: 68px; padding: 4px; object-fit: contain; border-radius: 12px; background: #fff; }
.next-opponent small { display: block; margin-bottom: 4px; color: #8fa5c8; font-size: 11px; }
.next-opponent strong { display: block; font-size: 15px; line-height: 1.25; }
.next-match-meta { text-align: right; }
.next-match-meta b { display: block; color: var(--acid); font: 900 25px var(--display); }
.next-match-meta span, .next-match-meta small { display: block; color: #bcd0ee; font-size: 11px; line-height: 1.35; }
.team-squad { display: grid; grid-template-columns: minmax(0, 2fr) minmax(255px, .75fr); margin-top: 16px; border: 1px solid rgba(7, 26, 72, .12); background: #fff; }
.team-player-panel { padding: 25px; }
.team-player-panel h3, .team-coach-panel h3 { margin: 0 0 16px; font: 800 22px/1 var(--thai); }
.team-player-panel h3 span { color: #607596; font-size: 13px; font-weight: 400; }
.team-player-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(7, 26, 72, .11); }
.team-player-list > div { min-height: 48px; display: grid; grid-template-columns: 42px 1fr; align-items: center; border-bottom: 1px solid rgba(7, 26, 72, .11); }
.team-player-list > div:nth-child(odd) { padding-right: 14px; border-right: 1px solid rgba(7, 26, 72, .11); }
.team-player-list > div:nth-child(even) { padding-left: 14px; }
.team-player-list b { color: #0d56ba; font: 900 20px var(--display); }
.team-player-list span { font-size: 14px; }
.team-coach-panel { padding: 25px; color: #fff; background: #071d4c; }
.team-coach-panel > div { padding: 17px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.team-coach-panel > div span { display: block; margin-bottom: 4px; color: var(--acid); font-size: 12px; }
.team-coach-panel > div strong { font-size: 16px; line-height: 1.3; }
.team-coach-panel > p { color: #bcd0ee; }

/* Partners remain visible, but no longer dominate the page. */
.partners.section { padding-top: 62px; padding-bottom: 68px; }
.partners .section-kicker { margin-bottom: 10px; font-size: 10px; }
.partners .section-head { margin-bottom: 25px; }
.partners .section-head h2 { font-size: clamp(36px, 4vw, 56px); }
.partner-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.partner-grid article { min-height: 105px; }

@media (max-width: 760px) {
  .brand-logo { width: 50px; height: 50px; }
  .official-logo { width: 390px; left: 56%; }
  .hero-visual { opacity: .42; }
  .club-logo { width: 52px; height: 52px; }
  .hero p { font-size: 18px; }
  .section-head p { font-size: 16px; }
  .schedule-controls { grid-template-columns: repeat(9, 92px); margin-right: -20px; }
  .schedule-header { align-items: flex-start; gap: 15px; padding: 20px 16px; }
  .schedule-round { min-width: 64px; padding-right: 15px; }
  .schedule-round strong { font-size: 42px; }
  .schedule-header h3 { font-size: 24px; }
  .schedule-header p { font-size: 15px; line-height: 1.3; }
  .schedule-games { grid-template-columns: 1fr; }
  .schedule-game { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); min-height: 102px; padding: 12px 9px; border-right: 0; }
  .schedule-team { gap: 7px; }
  .schedule-team strong { font-size: 14px; }
  .schedule-team img { width: 39px; height: 39px; }
  .schedule-game time { font-size: 24px; }
  .schedule-note { font-size: 13px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid article { min-height: 235px; }
  .team-logo { width: 82px; height: 82px; }
  .team-grid h3 { font-size: 14px; }
  .data-pending { text-align: center; padding: 28px; }
  .roster-toolbar { align-items: stretch; flex-wrap: wrap; }
  .roster-toolbar > label { width: 100%; }
  .roster-select-wrap { max-width: none; flex: 1 1 calc(100% - 122px); }
  .roster-select-wrap select { font-size: 16px; }
  .roster-card-header { align-items: flex-start; gap: 14px; padding: 20px 16px; }
  .roster-card-header img { width: 72px; height: 72px; border-radius: 13px; }
  .roster-card-header h3 { font-size: 26px; line-height: 1.1; }
  .roster-card-header p { font-size: 14px; }
  .roster-content { grid-template-columns: 1fr; }
  .player-roster { padding: 24px 16px; }
  .player-list { grid-template-columns: 1fr; }
  .player-row:nth-child(odd),
  .player-row:nth-child(even) { padding: 0; border-right: 0; }
  .player-row span { font-size: 16px; }
  .coach-roster { padding: 24px 20px; }
  .team-profile-hero { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; min-height: 145px; padding: 20px 60px 20px 18px; }
  .team-profile-hero > img { width: 76px; height: 76px; border-radius: 13px; }
  .team-profile-hero h2 { font-size: 23px; }
  .team-profile-hero p { font-size: 12px; }
  .team-rank { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 7px; min-width: 0; text-align: left; }
  .team-rank small, .team-rank span { display: inline; }
  .team-rank strong { display: inline; font-size: 35px; }
  .team-detail-body { padding: 12px; }
  .team-performance { grid-template-columns: 1fr; }
  .team-stat-grid { grid-template-columns: repeat(4, 1fr); }
  .team-stat-grid article { min-height: 76px; padding: 10px; }
  .team-stat-grid article strong { font-size: 27px; }
  .next-match-card { grid-template-columns: 1fr; }
  .next-opponent { grid-column: 1 / -1; }
  .next-match-meta { text-align: left; }
  .team-squad { grid-template-columns: 1fr; }
  .team-player-panel { padding: 18px 14px; }
  .team-player-list { grid-template-columns: 1fr; }
  .team-player-list > div:nth-child(odd), .team-player-list > div:nth-child(even) { padding: 0; border-right: 0; }
  .team-coach-panel { padding: 20px; }
  .partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .partner-grid article { min-height: 105px; }
  .partner-grid article:last-child { grid-column: 1 / -1; width: calc(50% - 4px); justify-self: center; }
}

/* Homepage refresh: the supplied league portrait is the primary visual. */
.hero-cover-section {
  min-height: 610px;
  height: min(78vh, 760px);
  isolation: isolate;
  align-items: flex-end;
  background: #061431;
}
.hero-cover-section::after { content: none; }
.hero-cover {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}
.hero-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 11, 31, .93) 0%, rgba(2, 12, 34, .62) 31%, rgba(2, 12, 34, .08) 60%, rgba(2, 12, 34, .12) 100%),
    linear-gradient(0deg, rgba(2, 11, 31, .78) 0%, transparent 42%);
}
.hero-cover-section .hero-content {
  width: min(585px, 44vw);
  margin: 0 0 74px clamp(24px, 7vw, 116px);
  padding: 0;
}
.hero-cover-section .eyebrow { margin-bottom: 18px; color: #fff; font-size: 11px; letter-spacing: 2.4px; }
.hero-cover-section .eyebrow span { background: var(--acid); }
.hero-cover-section h1 {
  max-width: 580px;
  font-size: clamp(46px, 5.5vw, 84px);
  line-height: .9;
  letter-spacing: -.035em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .36);
}
.hero-cover-section h1 em { display: inline-block; margin-top: 5px; }
.hero-cover-section p {
  max-width: 520px;
  margin: 23px 0 25px;
  color: rgba(255, 255, 255, .82);
  font-size: 17px;
  line-height: 1.65;
}
.hero-cover-section .btn { min-height: 48px; border-radius: 3px; }
.hero-cover-section .scroll-cue { color: rgba(255, 255, 255, .66); }

.quick-nav {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 48px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: -38px auto 0;
  color: #071a48;
  background: #fff;
  border: 1px solid rgba(7, 26, 72, .1);
  box-shadow: 0 18px 50px rgba(4, 20, 55, .14);
}
.quick-nav a {
  position: relative;
  min-height: 116px;
  display: grid;
  align-content: center;
  padding: 22px 25px 22px 66px;
  border-right: 1px solid rgba(7, 26, 72, .1);
  transition: transform .2s ease, background .2s ease;
}
.quick-nav a:last-child { border-right: 0; }
.quick-nav a:hover { z-index: 1; transform: translateY(-4px); background: #f5f9ff; }
.quick-nav span {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #0d56ba;
  font: 900 28px/1 var(--display);
}
.quick-nav strong { font-size: 18px; line-height: 1.2; }
.quick-nav small { margin-top: 5px; color: #6d7e97; font-size: 12px; }

/* A tighter, calmer rhythm keeps the homepage focused on match information. */
.match-centre { padding-top: 92px; }
.fixtures.section, .standings.section, .teams.section { padding-top: 84px; padding-bottom: 84px; }
.section-head { margin-bottom: 32px; }
.teams .section-head p { max-width: 640px; }
.team-grid article { cursor: pointer; }
.team-grid article:focus-visible,
.table-team:focus-visible,
.schedule-team:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }

@media (max-width: 1100px) {
  .hero-cover-section .hero-content { width: min(570px, 58vw); margin-left: 5vw; }
  .quick-nav { grid-template-columns: repeat(2, 1fr); }
  .quick-nav a:nth-child(2) { border-right: 0; }
  .quick-nav a:nth-child(-n + 2) { border-bottom: 1px solid rgba(7, 26, 72, .1); }
}

@media (max-width: 760px) {
  .site-header { background: linear-gradient(180deg, rgba(2, 11, 31, .92), rgba(2, 11, 31, .44), transparent); }
  .hero-cover-section {
    min-height: 670px;
    height: 82vh;
    padding: 0;
    align-items: flex-end;
  }
  .hero-cover { object-position: 50% center; }
  .hero-shade {
    background:
      linear-gradient(0deg, rgba(2, 11, 31, .98) 0%, rgba(2, 11, 31, .83) 35%, rgba(2, 11, 31, .14) 74%, rgba(2, 11, 31, .18) 100%);
  }
  .hero-cover-section .hero-content {
    width: auto;
    margin: 0;
    padding: 0 20px 70px;
  }
  .hero-cover-section .eyebrow { margin-bottom: 14px; font-size: 9px; }
  .hero-cover-section h1 { max-width: 360px; font-size: clamp(42px, 12vw, 58px); }
  .hero-cover-section p { max-width: 355px; margin: 18px 0 22px; font-size: 15px; line-height: 1.55; }
  .hero-cover-section .hero-actions { width: 100%; flex-direction: row; }
  .hero-cover-section .btn { flex: 1; gap: 12px; padding: 12px 14px; font-size: 15px; }
  .quick-nav {
    width: calc(100% - 28px);
    grid-template-columns: repeat(2, 1fr);
    margin-top: -28px;
  }
  .quick-nav a { min-height: 94px; padding: 17px 12px 17px 48px; }
  .quick-nav span { left: 14px; font-size: 22px; }
  .quick-nav strong { font-size: 15px; }
  .quick-nav small { font-size: 10px; }
  .match-centre { padding-top: 78px; }
  .fixtures.section, .standings.section, .teams.section { padding-top: 68px; padding-bottom: 68px; }
}

@media (max-width: 430px) {
  .hero-cover-section { min-height: 630px; }
  .hero-cover-section .hero-actions { gap: 8px; }
  .hero-cover-section .btn { font-size: 13px; }
}

.hero-content .league-full-name { margin: 22px 0 0; max-width: 650px; font-size: clamp(16px, 1.5vw, 23px); font-weight: 700; line-height: 1.4; color: #fff; }
.hero-content .league-full-name strong { color: #ffcf56; }
.top-scorers { background: #f1f5fb; scroll-margin-top: 80px; }
.scorer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.scorer-card { overflow: hidden; border-radius: 12px; background: #071d4c; color: #fff; box-shadow: 0 10px 28px rgba(7, 29, 76, .12); }
.scorer-portrait { aspect-ratio: 278 / 690; background-image: url('assets/top-scorers-source.jpg'); background-size: 559.35% auto; background-repeat: no-repeat; background-position-y: 44.2%; }
.scorer-photo-1 { background-position-x: 5.09%; }
.scorer-photo-2 { background-position-x: 27.96%; }
.scorer-photo-3 { background-position-x: 50.82%; }
.scorer-photo-4 { background-position-x: 73.61%; }
.scorer-photo-5 { background-position-x: 96.48%; }
.scorer-copy { padding: 20px 16px; }
.scorer-rank { display: inline-block; color: #ffcf56; font-size: 15px; font-weight: 700; }
.scorer-copy h3 { margin: 8px 0; font: 800 23px/1.15 var(--thai); }
.scorer-copy p { min-height: 42px; margin: 0; color: #bcd0ee; font-size: 16px; line-height: 1.3; }
.scorer-goals { display: flex; align-items: baseline; gap: 9px; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.15); }
.scorer-goals strong { font: 900 64px/.85 var(--display); color: #ffcf56; }
.scorer-goals span { color: #fff; font-size: 17px; }
@media(max-width:1100px) { .scorer-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media(max-width:760px) { .scorer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; } .scorer-copy { padding: 16px 12px; } .scorer-copy h3 { font-size: 21px; } .hero-cover-section { padding-top: 105px; } }
@media(max-width:430px) { .scorer-copy p { font-size: 14px; min-height: 55px; } .scorer-copy h3 { font-size: 19px; } }

/* Player and coach cards inside each team profile. Missing cards stay blank. */
.team-player-list > .team-player-entry {
  min-height: 126px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 0;
}
.team-player-list > .team-player-entry:nth-child(odd) { padding-right: 14px; }
.team-player-list > .team-player-entry:nth-child(even) { padding-left: 14px; }
.team-card-thumb {
  width: 78px;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(145deg, #eef2f8, #e2e8f1);
  box-shadow: inset 0 0 0 1px rgba(7, 26, 72, .08);
}
.team-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-player-copy { min-width: 0; }
.team-player-copy b {
  display: block;
  margin-bottom: 6px;
  color: #0d56ba;
  font: 900 24px/1 var(--display);
}
.team-player-copy span {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.team-coach-panel > .team-coach-entry {
  min-height: 145px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 18px 0;
}
.coach-thumb {
  width: 84px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.team-coach-entry > div:last-child { min-width: 0; }
.team-coach-entry > div:last-child span { display: block; margin: 0; color: var(--acid); font-size: 16px; line-height: 1.35; }
.team-coach-entry > div:last-child strong { display: block; font-size: 16px; line-height: 1.35; }

@media (max-width: 760px) {
  .team-player-list > .team-player-entry:nth-child(odd),
  .team-player-list > .team-player-entry:nth-child(even) {
    min-height: 120px;
    padding: 9px 0;
    border-right: 0;
  }
  .team-coach-panel > .team-coach-entry { grid-template-columns: 78px minmax(0, 1fr); min-height: 136px; }
  .coach-row.staff-card-row { grid-template-columns: 78px minmax(0, 1fr); min-height: 142px; }
  .coach-thumb { width: 78px; }
}
