:root {
  --match-gold: #e6ba52;
  --match-gold-soft: #f6d985;
  --match-line: rgba(222, 178, 70, .22);
}

.matches-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 70% -10%, rgba(218, 162, 40, .13), transparent 35%),
    radial-gradient(ellipse at 5% 65%, rgba(218, 162, 40, .055), transparent 30%),
    #050505;
}

.matches-page main {
  min-height: calc(100vh - 82px);
}

.schedule-shell {
  position: relative;
  min-height: 790px;
  overflow: hidden;
  padding: 142px clamp(26px, 5vw, 92px) 76px;
  isolation: isolate;
}

.schedule-shell::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 82px 0 auto;
  height: 390px;
  opacity: .18;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(225, 182, 78, .12) 50%, transparent 50.2%),
    linear-gradient(rgba(225, 182, 78, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 182, 78, .06) 1px, transparent 1px);
  background-size: 100% 100%, 90px 90px, 90px 90px;
  mask-image: linear-gradient(to bottom, #000, transparent);
}

.schedule-shell::after {
  content: "MATCH DAY";
  position: absolute;
  z-index: -1;
  right: 2vw;
  top: 106px;
  color: rgba(234, 191, 86, .035);
  font: 900 clamp(6rem, 14vw, 15rem)/1 Arial, sans-serif;
  letter-spacing: -.08em;
  white-space: nowrap;
}

.schedule-heading {
  position: relative;
  z-index: 2;
  max-width: 1640px;
  margin: 0 auto 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.schedule-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  color: var(--match-gold);
  font: 800 .55rem Arial, sans-serif;
  letter-spacing: .2em;
}

.schedule-kicker span {
  width: 30px;
  height: 1px;
  background: var(--match-gold);
  box-shadow: 0 0 10px rgba(230, 186, 82, .55);
}

.schedule-heading h1 {
  margin: 0;
  color: #f9f2df;
  font-family: Kanit, Tahoma, sans-serif;
  font-size: clamp(3.25rem, 5.8vw, 6.7rem);
  font-weight: 650;
  line-height: .89;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.schedule-heading h1 em {
  color: transparent;
  background: linear-gradient(100deg, #fff1bf, #d89e2a 58%, #f6d982);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
  font-weight: 350;
}

.schedule-meta {
  min-width: 270px;
  padding: 18px 0 5px 26px;
  border-left: 1px solid var(--match-line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #8f8778;
}

.schedule-meta .live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #dcb351;
  font: 800 .5rem Arial, sans-serif;
  letter-spacing: .16em;
}

.live-indicator i,
.featured-top span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #efc45d;
  box-shadow: 0 0 12px rgba(239, 196, 93, .8);
}

.schedule-meta time {
  color: #e7dfcf;
  font-size: .88rem;
  font-weight: 500;
}

.schedule-meta small {
  margin-top: 5px;
  font-size: .67rem;
}

.schedule-divider {
  max-width: 1640px;
  margin: 0 auto 13px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #706958;
  font: 700 .44rem Arial, sans-serif;
  letter-spacing: .18em;
}

.schedule-divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--match-line));
}

.schedule-divider span:last-child {
  background: linear-gradient(90deg, var(--match-line), transparent);
}

.schedule-layout {
  position: relative;
  z-index: 2;
  max-width: 1640px;
  min-height: 380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(430px, 1.16fr) minmax(480px, .94fr);
  gap: 12px;
}

.featured-match {
  min-width: 0;
  min-height: 380px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(228, 184, 77, .32);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 40%, rgba(224, 174, 52, .12), transparent 35%),
    linear-gradient(145deg, rgba(30, 25, 15, .96), rgba(9, 8, 6, .98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 240, 194, .035);
}

.featured-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: #8c8374;
  font-size: .68rem;
}

.featured-top > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0b754;
  font-weight: 600;
}

.featured-top small b {
  margin-right: 5px;
  color: #f0c458;
}

.featured-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 24px 4%;
}

.featured-team {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fixture-logo {
  width: 82px;
  height: 82px;
  padding: 7px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 191, 87, .25);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .018));
  box-shadow: 0 17px 35px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .08);
}

.fixture-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fixture-logo-fallback {
  color: #1a1307;
  background: linear-gradient(145deg, #f5d77d, #bd7e1b);
  font: 900 2rem Arial, sans-serif;
}

.featured-team h2 {
  max-width: 100%;
  margin: 13px 0 2px;
  overflow-wrap: anywhere;
  color: #f5eddd;
  font-size: clamp(.98rem, 1.25vw, 1.3rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.featured-team > small {
  color: #655e52;
  font: 700 .42rem Arial, sans-serif;
  letter-spacing: .17em;
}

.kickoff {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kickoff span {
  color: #f3e8ce;
  font: 800 1.45rem Arial, sans-serif;
}

.kickoff time {
  margin-top: 5px;
  color: var(--match-gold);
  font: 700 .7rem Arial, sans-serif;
}

.kickoff i {
  width: 62px;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, transparent, #d9ac43, transparent);
}

.featured-detail {
  min-height: 48px;
  padding: 0 8px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--match-line);
  color: #d4c9b6;
  background: rgba(255, 255, 255, .018);
  font-size: .75rem;
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.featured-detail b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #100c04;
  background: linear-gradient(145deg, #f5d981, #c88a24);
}

.fixture-list {
  min-width: 0;
  display: grid;
  align-content: stretch;
  gap: 8px;
}

.fixture-row {
  position: relative;
  min-width: 0;
  min-height: 68px;
  padding: 8px 13px 8px 9px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 56px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(220, 177, 74, .2);
  background: linear-gradient(110deg, rgba(25, 21, 14, .86), rgba(8, 8, 7, .96));
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.fixture-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  opacity: 0;
  background: var(--match-gold);
  transition: opacity .25s ease;
}

.fixture-index {
  color: #625b4e;
  font: 700 .46rem Arial, sans-serif;
}

.fixture-row .fixture-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 4px;
  border-radius: 10px;
}

.fixture-row .fixture-logo-fallback {
  font-size: 1rem;
}

.fixture-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.fixture-team.home {
  flex-direction: row;
}

.fixture-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.fixture-team strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #e9e1d2;
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.25;
}

.fixture-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fixture-time time {
  color: #efca6c;
  font: 800 .79rem Arial, sans-serif;
}

.fixture-time small {
  margin-top: 2px;
  color: #6e6658;
  font-size: .48rem;
}

.fixture-row > a {
  color: #9e8d69;
  font: 700 .8rem Arial, sans-serif;
}

.fixture-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid var(--match-line);
  color: #968d7e;
}

.schedule-foot {
  position: relative;
  z-index: 2;
  max-width: 1640px;
  margin: 16px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #716a5e;
  font-size: .66rem;
}

.schedule-foot p {
  margin: 0;
}

.schedule-foot p span {
  margin-right: 7px;
  color: #cfa647;
}

.schedule-foot a {
  color: #c5b58f;
}

.schedule-foot a b {
  margin-left: 7px;
  color: var(--match-gold);
}

.schedule-note {
  max-width: 1640px;
  margin: 0 auto 80px;
  padding: 0 clamp(26px, 5vw, 92px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.schedule-note > div {
  min-height: 112px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  border-block: 1px solid rgba(222, 178, 70, .14);
  border-right: 1px solid rgba(222, 178, 70, .14);
}

.schedule-note > div:first-child {
  border-left: 1px solid rgba(222, 178, 70, .14);
}

.schedule-note span {
  color: #d7aa43;
  font: 800 .55rem Arial, sans-serif;
}

.schedule-note p {
  margin: 0;
  color: #81796c;
  font-size: .7rem;
  line-height: 1.65;
}

.schedule-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  opacity: .55;
  background: #f3ca67;
  box-shadow: 0 0 9px 2px rgba(237, 188, 66, .38);
}

.schedule-stars i:nth-child(1) { left: 7%; top: 27%; }
.schedule-stars i:nth-child(2) { left: 21%; top: 63%; width: 2px; height: 2px; }
.schedule-stars i:nth-child(3) { left: 49%; top: 18%; }
.schedule-stars i:nth-child(4) { right: 8%; top: 31%; width: 2px; height: 2px; }
.schedule-stars i:nth-child(5) { right: 23%; top: 69%; }
.schedule-stars i:nth-child(6) { left: 37%; top: 79%; width: 2px; height: 2px; }

.schedule-stars > span {
  position: absolute;
  z-index: -1;
  top: 23%;
  left: -12%;
  width: 150px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(248, 216, 134, .78));
  filter: drop-shadow(0 0 4px rgba(239, 190, 72, .35));
  transform: rotate(-13deg) translate3d(0, 0, 0);
  animation: schedule-shooting-star 18s 3s linear infinite;
}

.schedule-stars > span:last-child {
  top: 56%;
  animation-delay: 11s;
  animation-duration: 23s;
}

.match-skeleton {
  justify-content: space-between;
}

.skeleton-line {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, .035);
}

.skeleton-line.short {
  width: 34%;
  height: 12px;
}

.skeleton-versus {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.skeleton-versus i {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .045);
}

.skeleton-versus b {
  width: 28px;
  height: 12px;
  background: rgba(230, 186, 82, .14);
}

.match-skeleton-list {
  display: grid;
  gap: 8px;
}

.match-skeleton-list i {
  min-height: 68px;
  border: 1px solid rgba(222, 178, 70, .1);
  background: rgba(255, 255, 255, .025);
}

.match-skeleton .skeleton-line,
.match-skeleton .skeleton-versus i,
.match-skeleton .skeleton-versus b,
.match-skeleton-list i {
  animation: match-skeleton-pulse 1.8s ease-in-out infinite;
}

.schedule-error {
  grid-column: 1 / -1;
  min-height: 380px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--match-line);
  background: rgba(18, 15, 10, .78);
  text-align: center;
}

.schedule-error > span {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border: 1px solid var(--match-gold);
  border-radius: 50%;
  color: var(--match-gold);
  font: 800 1.4rem Arial, sans-serif;
}

.schedule-error h2 {
  margin: 18px 0 4px;
  color: #eee5d5;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.schedule-error p {
  color: #81796c;
}

.schedule-error button {
  min-height: 44px;
  margin-top: 12px;
  padding: 0 22px;
  border: 1px solid #d8aa42;
  color: #110d05;
  background: #e0b34a;
  cursor: pointer;
}

@keyframes schedule-shooting-star {
  0%, 72% { opacity: 0; transform: rotate(-13deg) translate3d(0, 0, 0); }
  74% { opacity: .5; }
  84% { opacity: 0; transform: rotate(-13deg) translate3d(125vw, 0, 0); }
  100% { opacity: 0; transform: rotate(-13deg) translate3d(125vw, 0, 0); }
}

@keyframes match-skeleton-pulse {
  0%, 100% { opacity: .38; }
  50% { opacity: .82; }
}

@media (hover: hover) and (pointer: fine) {
  .featured-detail:hover {
    border-color: rgba(230, 186, 82, .62);
    background: rgba(225, 178, 63, .06);
    transform: translate3d(0, -2px, 0);
  }

  .fixture-row:hover {
    z-index: 2;
    border-color: rgba(230, 186, 82, .52);
    background: linear-gradient(110deg, rgba(37, 29, 15, .94), rgba(10, 9, 7, .98));
    transform: translate3d(4px, 0, 0);
  }

  .fixture-row:hover::before {
    opacity: 1;
  }
}

@media (max-width: 1050px) {
  .schedule-layout {
    grid-template-columns: 1fr;
  }

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

  .fixture-row {
    grid-template-columns: 22px minmax(0, 1fr) 52px minmax(0, 1fr) 20px;
  }
}

@media (max-width: 700px) {
  .schedule-shell {
    min-height: 0;
    padding: 118px 5vw 58px;
  }

  .schedule-shell::after {
    top: 105px;
    font-size: 5.8rem;
  }

  .schedule-heading {
    margin-bottom: 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .schedule-heading h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
    line-height: .94;
  }

  .schedule-meta {
    width: 100%;
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--match-line);
    border-left: 0;
  }

  .schedule-divider {
    margin-bottom: 10px;
  }

  .schedule-layout {
    min-height: 0;
  }

  .featured-match {
    min-height: 345px;
    padding: 17px;
  }

  .featured-stage {
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    gap: 7px;
    padding: 25px 0;
  }

  .fixture-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .featured-team h2 {
    font-size: .8rem;
  }

  .kickoff span {
    font-size: 1.1rem;
  }

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

  .fixture-row {
    min-height: 72px;
    padding-right: 9px;
    grid-template-columns: 20px minmax(0, 1fr) 48px minmax(0, 1fr) 18px;
    gap: 6px;
  }

  .fixture-row .fixture-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .fixture-team {
    gap: 6px;
  }

  .fixture-team strong {
    font-size: .63rem;
  }

  .schedule-foot {
    flex-direction: column;
    gap: 8px;
    line-height: 1.55;
  }

  .schedule-note {
    margin-bottom: 55px;
    padding-inline: 5vw;
    grid-template-columns: 1fr;
  }

  .schedule-note > div,
  .schedule-note > div:first-child {
    min-height: 0;
    border: 0;
    border-top: 1px solid rgba(222, 178, 70, .14);
  }

  .schedule-note > div:last-child {
    border-bottom: 1px solid rgba(222, 178, 70, .14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-stars > span,
  .match-skeleton .skeleton-line,
  .match-skeleton .skeleton-versus i,
  .match-skeleton .skeleton-versus b,
  .match-skeleton-list i {
    animation: none;
  }
}


/* ===== แถบเครื่องมือตารางบอล (แท็บ/ลีก/ค้นหา/วันที่) — โทนทองดำเดียวกับทั้งเว็บ ===== */
.schedule-tools{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:14px;justify-content:space-between;align-items:center;margin-bottom:6px}
.schedule-tabs{display:flex;flex-wrap:wrap;gap:8px}
.schedule-tab{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:6px;cursor:pointer;
  color:#c9ad68;background:linear-gradient(145deg,#11100d,#050505);border:1px solid #6b5624;
  font-family:inherit;font-size:.84rem;font-weight:500;transition:.25s ease}
.schedule-tab:hover{border-color:#d9b65d;color:#f0dca4}
.schedule-tab b{font-family:Manrope,sans-serif;font-size:.72rem;padding:2px 7px;border-radius:99px;background:#ffffff12;color:#e6c66f}
.schedule-tab.is-on{color:#0a0805;border-color:#f3d77e;background:linear-gradient(115deg,#a87520,#e7c45f 32%,#ffe695 52%,#c79331)}
.schedule-tab.is-on b{background:#00000026;color:#3a2a06}
.schedule-filters{display:flex;flex-wrap:wrap;gap:8px}
.schedule-filters input,.schedule-filters select{
  padding:10px 12px;border-radius:6px;color:#e8dcbb;background:#0a0907;border:1px solid #4a3c1c;
  font-family:inherit;font-size:.84rem;outline:none;min-width:150px}
.schedule-filters input:focus,.schedule-filters select:focus{border-color:#d9b65d}
.schedule-filters input[type=date]{color-scheme:dark}

.fixture-row.is-live .fixture-time time{color:#ffdf8a}
.fixture-row.is-live{border-color:#8c6d24}
.fixture-league{grid-column:1/-1;justify-self:start;font-size:.68rem;letter-spacing:.4px;color:#8b8371;padding-left:2px}

@media(max-width:760px){
  .schedule-tools{flex-direction:column;align-items:stretch}
  .schedule-filters input,.schedule-filters select{flex:1;min-width:0}
}

/* คู่เด่นอยู่คอลัมน์ซ้ายของกริด — เดิมยืดสูงเท่ารายการคู่ทั้งหมด เนื้อหาเลยกระจายห่างกันเป็นพันพิกเซล */
.featured-match{align-self:start}
.fixture-list{max-height:none}


/* เนื้อหา SEO ท้ายหน้าตารางบอล — โทนเดียวกับส่วนอื่นของหน้า */
.schedule-seo{max-width:1180px;margin:0 auto;padding:48px 5vw 8px;color:#b9b2a0}
.schedule-seo h2{font-size:clamp(1.15rem,2.2vw,1.6rem);line-height:1.5;letter-spacing:0;margin:26px 0 10px;color:#f0dca4}
.schedule-seo h2:first-of-type{margin-top:0}
.schedule-seo p{font-size:.94rem;line-height:1.95;margin:0}
