/* =========================================================================
   static/css/homepage.css
   สไตล์หน้าแรก RealScore Football Thailand (Modern Football-Only UI)
   ========================================================================= */
:root {
  --bg-page: #f0f4f9;
  --bg-surface: #ffffff;
  --primary-navy: #0a192f;
  --primary-blue: #0f52ba;
  --accent-blue: #1d74f5;
  --accent-cyan: #00d4ff;
  --live-red: #e11d48;
  --live-red-soft: #ffe4e6;
  --emerald-win: #059669;
  --emerald-soft: #ecfdf5;
  --amber-cream: #fdf6e7;
  --amber-border: #f7e2b8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-subtle: #e2e8f0;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 25px -4px rgba(15, 82, 186, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 100vh;
  padding-top: var(--rs-top-header-offset, 114px) !important;
  -webkit-font-smoothing: antialiased;
}

/* 1. MODERN FOOTBALL-ONLY 2-TIER HEADER (LOCKED ON TOP ALWAYS) */
.modern-header {
  background: linear-gradient(135deg, #07162c 0%, #0d3878 52%, #1254b5 100%);
  color: #ffffff;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  box-shadow: 0 4px 20px rgba(7, 22, 44, 0.28);
}

.header-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px;
}

.header-tier-1 {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #ffffff;
}

.brand-badge-icon {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-main-name {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.05;
  display: flex;
  align-items: center;
  gap: 7px;
}

.football-only-pill {
  background: linear-gradient(135deg, #00d4ff 0%, #38bdf8 100%);
  color: #07162c;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.brand-sub-caption {
  font-size: 11px;
  color: #93c5fd;
  font-weight: 400;
  margin-top: 1px;
}

.brand-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.22);
}

.thesports-partner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.thesports-chip {
  font-size: 9px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 1px 5px;
  border-radius: 4px;
  transform: translateY(-5px);
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modern-search {
  position: relative;
  width: 280px;
}

.modern-search input {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 20px;
  padding: 0 38px 0 16px;
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.modern-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.modern-search input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.modern-search-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.ai-mode-header-btn {
  height: 38px;
  padding: 0 15px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(59, 130, 246, 0.25));
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-mode-header-btn:hover,
body.show-ai-bars .ai-mode-header-btn {
  background: linear-gradient(135deg, #00d4ff 0%, #1d74f5 100%);
  color: #07162c;
  border-color: #00d4ff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.35);
}

.live-clock-pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-green-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: livePulse 1.4s infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}

/* Tier 2: FOOTBALL-ONLY Quick League Navigation Bar */
.header-football-nav {
  height: 46px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 6px;
}

.football-league-tabs {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  flex: 1;
  min-width: 0;
  margin-right: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.football-league-tabs::-webkit-scrollbar {
  display: none;
}

.fb-nav-tab {
  height: 40px;
  padding: 0 11px;
  border-radius: 8px 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.fb-nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.fb-nav-tab.active {
  background: var(--bg-page);
  color: #0b2e63;
  font-weight: 700;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.fb-tab-badge {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 1px 6px;
  border-radius: 10px;
}

.fb-nav-tab.active .fb-tab-badge {
  background: #1d74f5;
  color: #ffffff;
}

.fav-Quick-tab {
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fde047;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: background 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.fav-Quick-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 2. MAIN 3-COLUMN PRO FOOTBALL LAYOUT (LEFT: LEAGUES | CENTER: MATCH LIST | RIGHT: STANDINGS) */
.page-container {
  max-width: 1380px;
  margin: 14px auto 48px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.left-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: var(--rs-top-header-offset, 118px);
}

.sidebar-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.sidebar-card-head {
  background: linear-gradient(90deg, #0a192f 0%, #12376b 100%);
  color: #ffffff;
  padding: 11px 15px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-league-list {
  list-style: none;
  padding: 6px;
  max-height: 480px;
  overflow-y: auto;
}

.sidebar-lg-item {
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.14s;
  margin-bottom: 2px;
}

.sidebar-lg-item:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}

.sidebar-lg-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.s-lg-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin-right: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-lg-left span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.s-lg-flag {
  width: 18px;
  height: 13px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

.s-lg-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}

.s-lg-count.live-pill {
  background: var(--live-red-soft);
  color: var(--live-red);
}

/* Left Sidebar Mini Live Pitch Preview Card */
.mini-stadium-card {
  background: linear-gradient(165deg, #071a33 0%, #0d325e 100%);
  border-radius: var(--radius-lg);
  padding: 14px;
  color: #ffffff;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.18s;
}

.mini-stadium-card:hover {
  transform: translateY(-2px);
}

.ms-top-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #7dd3fc;
  margin-bottom: 8px;
  font-weight: 600;
}

.ms-pitch-visual {
  background: linear-gradient(180deg, #1b5e20 0%, #2e7d32 100%);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px;
  text-align: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.ms-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.ms-score-badge {
  background: rgba(0, 0, 0, 0.45);
  color: #fbbf24;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 15px;
  padding: 2px 10px;
  border-radius: 6px;
}

.ms-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, #00d4ff 0%, #1d74f5 100%);
  color: #07162c;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* RIGHT MAIN COLUMN */
.right-main-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.spotlight-banner {
  background: linear-gradient(125deg, #091e3a 0%, #103c7d 55%, #1656b0 100%);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.spotlight-left-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 215px;
}

.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sp-headline {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.sp-sub {
  font-size: 12px;
  color: #cbd5e1;
}

.spotlight-cards-row {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sp-match-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.16s;
  backdrop-filter: blur(8px);
}

.sp-match-card:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.sp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #93c5fd;
  margin-bottom: 5px;
}

.sp-live-tag {
  background: var(--live-red);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.sp-card-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.sp-card-score {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: #fbbf24;
  padding: 0 6px;
}

/* 3. MODERN MATCH TABLE CARD */
.matches-board-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.board-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-group-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modern-filter-pill {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-family: 'Kanit', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.16s;
}

.modern-filter-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.modern-filter-pill.active {
  background: #0f52ba;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(15, 82, 186, 0.25);
}

.modern-filter-pill.live-pill-btn {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  border: 1.5px solid #fb7185;
  font-weight: 700;
  padding-left: 10px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.14);
}

.modern-filter-pill.live-pill-btn:hover {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  color: #9f1239;
  border-color: #f43f5e;
  transform: translateY(-1px);
}

.modern-filter-pill.live-pill-btn.active {
  background: linear-gradient(135deg, #ff1744 0%, #e11d48 55%, #ff6d00 100%);
  color: #ffffff;
  border-color: #ff1744;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.42);
}

.rs-live-radar-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
  color: #022c22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  animation: radarBadgeGlow 1.6s infinite ease-in-out;
  flex-shrink: 0;
}

.rs-live-radar-svg {
  display: block;
}

@keyframes radarBadgeGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.65);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.95), 0 0 6px #fde047;
  }
}

.modern-filter-pill.ai-pill-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.3);
}

.filter-group-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modern-outline-ctrl {
  height: 36px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.modern-outline-ctrl:hover {
  border-color: #1d74f5;
  color: #0f52ba;
  background: #f8fafc;
}

.ctrl-check-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.15s;
}

/* League Section & Modern Cream-Gold Header Bar */
.league-block {
  margin-bottom: 10px;
  border: 1px solid #eef2f6;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modern-league-bar {
  background: linear-gradient(90deg, #fdf6e7 0%, #fef9ef 100%);
  border-bottom: 1px solid #f5e4c3;
  height: 40px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 34px 1fr auto 186px;
  align-items: center;
}

.star-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, color 0.15s;
}

.star-btn-icon:hover {
  transform: scale(1.2);
  color: #f59e0b;
}

.star-btn-icon.pinned {
  color: #f59e0b;
}

.lg-header-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #64748b;
}

.lg-flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lg-name-strong {
  color: #0f172a;
  font-weight: 700;
  font-size: 13.5px;
}

.lg-round-pill {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
}

.lg-popularity-badge {
  padding-right: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pop-fire {
  color: #ea580c;
}

.pop-user {
  color: #64748b;
}

.odds-col-titles {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}

/* Modern Match Row */
.modern-match-row {
  min-height: 54px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 34px 76px 64px 1fr 185px 186px;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}

.modern-match-row:last-child {
  border-bottom: none;
}

.modern-match-row:hover {
  background: #f4f9ff;
}

.modern-match-row.row-updated-flash {
  animation: goalScoreFlash 1.8s ease-out;
}

@keyframes goalScoreFlash {
  0% { background-color: #fef08a; }
  100% { background-color: #ffffff; }
}

.m-time-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.m-status-pill {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--live-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.m-status-pill.is-live-min::before {
  display: none;
}

.rs-row-live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ff1744 0%, #f50057 100%);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(255, 23, 68, 0.35);
  width: fit-content;
}

.rs-row-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
  animation: livePulse 1.1s infinite;
  flex-shrink: 0;
}

.m-status-pill.status-ht .rs-row-live-beacon {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

.m-status-pill.status-ht {
  background: #fef3c7;
  color: #d97706;
  padding: 1px 7px;
  border-radius: 5px;
  width: fit-content;
}

.m-status-pill.status-ft,
.m-status-pill.status-pre {
  color: #94a3b8;
  font-weight: 500;
}

.m-teams-grid {
  display: grid;
  grid-template-columns: 1fr 68px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.m-team-home {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  text-align: right;
  min-width: 0;
}

.m-team-away {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  text-align: left;
  min-width: 0;
}

.m-team-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-team-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.m-card-badge {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 1.1;
}

.m-card-badge.red {
  background: #dc2626;
  color: #ffffff;
}

.m-card-badge.yellow {
  background: #facc15;
  color: #0f172a;
}

.m-score-badge {
  background: var(--live-red-soft);
  color: var(--live-red);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 7px;
  text-align: center;
  letter-spacing: 0.5px;
}

.m-score-badge.score-ft {
  background: #f1f5f9;
  color: #1e293b;
}

.m-score-badge.score-pre {
  background: #f8fafc;
  color: #94a3b8;
  font-weight: 600;
}

.m-meta-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #64748b;
}

.ht-tag {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.corner-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.pitch-25d-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.pitch-25d-btn.is-live-broadcast {
  width: auto;
  height: 26px;
  padding: 0 8px;
  gap: 4px;
  border-radius: 7px;
  background: linear-gradient(135deg, #00c853 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #6ee7b7;
  box-shadow: 0 0 12px rgba(0, 200, 83, 0.45);
  animation: radarBadgeGlow 1.8s infinite ease-in-out;
}

.live-cast-txt {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #fde047;
}

.modern-match-row:hover .pitch-25d-btn {
  transform: scale(1.1);
}

.m-odds-grid {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  align-items: center;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.odd-num.green {
  color: #059669;
}

.odd-num.red {
  color: #e11d48;
}

.m-ai-subrow {
  grid-column: 2 / -1;
  margin-top: 6px;
  padding: 5px 12px;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border-left: 3px solid #1d74f5;
  border-radius: 6px;
  font-size: 12px;
  color: #1e3a8a;
  display: none;
  align-items: center;
  justify-content: space-between;
}

body.show-ai-bars .m-ai-subrow {
  display: flex;
}

.ai-tag-pill {
  background: #1d74f5;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  margin-right: 6px;
}

/* =========================================================================
   4. PRIME HIGH-CTR AD BANNER SLOTS (จุดวางแบนเนอร์โฆษณาตำแหน่งทองคำ)
   ========================================================================= */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  padding-bottom: 84px; /* เผื่อพื้นที่ให้ Sticky Bottom Ad Banner */
}

.ad-kit-header-btn {
  height: 38px;
  padding: 0 13px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  color: #fde68a;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ad-kit-header-btn:hover,
body.highlight-ad-slots .ad-kit-header-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #07162c;
  border-color: #fde047;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.rs-ad-top-wrap {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 0 18px;
}

.rs-ad-slot {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px dashed rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, #0b192e 0%, #102a4c 52%, #173d6e 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rs-ad-slot:hover {
  border-color: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.18);
}

body.highlight-ad-slots .rs-ad-slot {
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.28), 0 10px 28px rgba(245, 158, 11, 0.25) !important;
}

.rs-ad-slot.theme-emerald {
  background: linear-gradient(135deg, #062e22 0%, #064e3b 55%, #047857 100%);
  border-color: rgba(52, 211, 153, 0.55);
}

.rs-ad-slot.theme-royal {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
  border-color: rgba(129, 140, 248, 0.55);
}

.rs-ad-slot.theme-crimson {
  background: linear-gradient(135deg, #3b0718 0%, #701a32 55%, #9f1239 100%);
  border-color: rgba(251, 113, 133, 0.55);
}

.rs-ad-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde047;
  font-family: 'Inter', 'Kanit', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
  width: fit-content;
}

.rs-ad-main-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.rs-ad-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rs-ad-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
}

.rs-ad-right-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.rs-ad-size-pill {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #38bdf8;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.rs-ad-cta-pill {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #07162c;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Dual Split Banner Grid (2 Columns on Desktop, 1 Column on Mobile) */
.rs-ad-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Left Sidebar Vertical / Square VIP Ad Slot */
.rs-ad-slot.sidebar-vip-slot {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  min-height: 220px;
  justify-content: center;
  gap: 10px;
}

.rs-ad-slot.sidebar-vip-slot .rs-ad-main-info {
  flex: 0 0 auto;
  align-items: center;
}

.rs-ad-slot.sidebar-vip-slot .rs-ad-badge-top {
  margin: 0 auto 6px;
}

.rs-ad-slot.sidebar-vip-slot .rs-ad-title {
  justify-content: center;
  font-size: 14.5px;
}

.rs-ad-slot.sidebar-vip-slot .rs-ad-right-meta {
  align-items: center;
  margin-top: 8px;
}

/* In-Feed Native Banner between League Blocks */
.rs-ad-infeed-wrap {
  margin: 12px 0;
}

/* Sticky Bottom Anchor Banner */
.rs-ad-sticky-bottom {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 990;
  width: calc(100% - 24px);
  max-width: 820px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(7, 22, 44, 0.96) 0%, rgba(15, 52, 110, 0.96) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.75);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  padding: 9px 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.rs-ad-sticky-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rs-ad-sticky-close:hover {
  background: #ef4444;
  border-color: #f87171;
}

/* =========================================================================
   5. FULL MULTI-DEVICE RESPONSIVE MEDIA QUERIES (100% ALL DEVICES)
   ========================================================================= */

/* Laptop & Large Tablet (<= 1120px) */
@media (max-width: 1120px) {
  .thesports-partner,
  .brand-sep {
    display: none;
  }

  .modern-search {
    width: 220px;
  }

  .page-container {
    grid-template-columns: 210px 1fr;
    gap: 12px;
    padding: 0 12px;
  }

  .rs-ad-top-wrap {
    padding: 0 12px;
  }

  .modern-match-row {
    grid-template-columns: 30px 64px 58px 1fr 145px 168px;
    padding: 8px 10px;
  }

  .modern-league-bar {
    grid-template-columns: 30px 1fr auto 168px;
  }

  .odds-col-titles,
  .m-odds-grid {
    grid-template-columns: repeat(3, 56px);
  }
}

/* Tablet Portrait & Small Laptop (<= 920px) */
@media (max-width: 920px) {
  .header-tier-1 {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-actions-right {
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-container {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .left-sidebar-col {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .rs-ad-slot.sidebar-vip-slot {
    grid-column: 1 / -1;
    min-height: auto;
    flex-direction: row;
    text-align: left;
    padding: 12px 16px;
  }

  .rs-ad-slot.sidebar-vip-slot .rs-ad-badge-top {
    margin: 0 0 4px 0;
  }

  .rs-ad-slot.sidebar-vip-slot .rs-ad-title {
    justify-content: flex-start;
  }

  .rs-ad-slot.sidebar-vip-slot .rs-ad-right-meta {
    align-items: flex-end;
    margin-top: 0;
  }

  .spotlight-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .spotlight-cards-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .rs-ad-dual-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Mobile Devices & Phablets (<= 768px) */
@media (max-width: 768px) {
  .header-wrap {
    padding: 0 12px;
  }

  .brand-main-name {
    font-size: 19px;
  }

  .brand-sub-caption {
    font-size: 10px;
  }

  .header-actions-right {
    width: 100%;
    justify-content: space-between;
  }

  .modern-search {
    width: 100%;
    order: 4;
  }

  .ai-mode-header-btn,
  .ad-kit-header-btn,
  .live-clock-pill {
    height: 34px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  .header-football-nav {
    height: 42px;
    gap: 6px;
  }

  .fb-nav-tab {
    height: 36px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .fav-Quick-tab {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Left Sidebar becomes Horizontal Swipeable League Bar + Compact Pitch Card */
  .left-sidebar-col {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sidebar-league-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
    padding: 8px 10px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-lg-item {
    flex-shrink: 0;
    margin-bottom: 0;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 6px 10px;
    gap: 6px;
  }

  .spotlight-cards-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .matches-board-card {
    padding: 12px 10px 18px;
  }

  .board-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-group-left {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .modern-filter-pill {
    flex-shrink: 0;
    height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .filter-group-right {
    width: 100%;
    justify-content: space-between;
  }

  .modern-outline-ctrl {
    flex: 1;
    justify-content: center;
    height: 34px;
    font-size: 12px;
    padding: 0 10px;
  }

  /* League Header on Mobile */
  .modern-league-bar {
    grid-template-columns: 26px 1fr auto;
    height: auto;
    min-height: 38px;
    padding: 6px 8px;
    gap: 4px;
  }

  .odds-col-titles {
    display: none;
  }

  .lg-popularity-badge {
    padding-right: 4px;
    font-size: 11px;
  }

  /* Match Row on Mobile: Clean 2-Deck Sports Card Layout (Zero Horizontal Overflow) */
  .modern-match-row {
    grid-template-columns: 26px 54px 52px 1fr;
    gap: 6px 4px;
    padding: 10px 8px;
  }

  .m-teams-grid {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 60px 1fr;
    gap: 6px;
    padding: 4px 0;
  }

  .m-team-name {
    font-size: 13px;
  }

  .m-meta-col {
    grid-column: 1 / 3;
    justify-content: flex-start;
    padding-right: 0;
    gap: 6px;
  }

  .m-odds-grid {
    grid-column: 3 / -1;
    justify-self: end;
    grid-template-columns: repeat(3, 52px);
    height: 32px;
    font-size: 11.5px;
  }

  .m-ai-subrow {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11.5px;
    padding: 6px 10px;
  }

  /* Responsive Ad Banners on Mobile */
  .rs-ad-slot,
  .rs-ad-slot.sidebar-vip-slot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    min-height: 58px;
    padding: 10px 12px;
    gap: 8px;
  }

  .rs-ad-slot.sidebar-vip-slot .rs-ad-main-info {
    align-items: flex-start;
  }

  .rs-ad-right-meta,
  .rs-ad-slot.sidebar-vip-slot .rs-ad-right-meta {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
  }

  .rs-ad-title {
    font-size: 13.5px;
  }

  .rs-ad-sub {
    font-size: 11.5px;
  }

  .rs-ad-sticky-bottom {
    padding: 8px 11px;
    bottom: 6px;
    width: calc(100% - 14px);
  }
}

/* Compact Smartphones (<= 420px) */
@media (max-width: 420px) {
  .brand-badge-icon {
    width: 32px;
    height: 32px;
  }

  .brand-main-name {
    font-size: 17px;
  }

  .m-odds-grid {
    grid-template-columns: repeat(3, 46px);
  }

  .m-team-logo {
    width: 18px;
    height: 18px;
  }

  .m-score-badge {
    font-size: 12.5px;
    padding: 2px 6px;
  }
}

/* =========================================================================
   REDESIGNED SMART HEADER MENU, MODERN SITE FOOTER & MOBILE BOTTOM NAV
   ========================================================================= */
.rs-primary-header-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.rs-hdr-menu-btn {
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.rs-hdr-menu-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.rs-hdr-menu-btn.active {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #07162c;
  border-color: #fde047;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.rs-hdr-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: livePulse 1.2s infinite;
}

button.fb-nav-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Kanit', sans-serif;
}

button.fb-nav-tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

button.fb-nav-tab.active {
  background: #ffffff;
  color: var(--primary-blue);
  border-color: #ffffff;
  font-weight: 700;
}

button.fav-Quick-tab {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.16);
  color: #fde047;
  font-family: 'Kanit', sans-serif;
}

button.fav-Quick-tab:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #07162c;
}

/* MODERN EASY-TO-USE SITE FOOTER */
.rs-modern-footer {
  background: linear-gradient(180deg, #07162c 0%, #040d1a 100%);
  color: #cbd5e1;
  border-top: 3px solid #1d74f5;
  margin-top: 32px;
  padding: 32px 18px 96px;
  font-family: 'Kanit', sans-serif;
}

.rs-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.rs-footer-top-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.35fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rs-footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rs-footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
}

.rs-footer-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d74f5, #00d4ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.rs-footer-logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.rs-footer-logo-text small {
  font-size: 11px;
  background: #fbbf24;
  color: #07162c;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

.rs-footer-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.rs-footer-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.rs-footer-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 14px;
}

.rs-footer-cta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rs-footer-action-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.rs-footer-action-btn.primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #07162c;
  border: none;
}

.rs-footer-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.rs-footer-action-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rs-footer-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.rs-footer-heading {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.rs-footer-links-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.rs-footer-link-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 10px;
  color: #cbd5e1;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rs-footer-link-btn:hover {
  background: rgba(29, 116, 245, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateX(2px);
}

.rs-footer-league-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rs-footer-league-chip {
  background: rgba(15, 82, 186, 0.28);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
  color: #e0f2fe;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rs-footer-league-chip:hover {
  background: linear-gradient(135deg, #00d4ff, #1d74f5);
  color: #07162c;
  border-color: #00d4ff;
  font-weight: 800;
}

.rs-footer-bottom-bar {
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.rs-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rs-footer-bottom-links a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.rs-footer-bottom-links a:hover {
  color: #fde047;
  text-decoration: underline;
}

/* MOBILE BOTTOM QUICK NAVIGATION BAR (HIDDEN ON DESKTOP, VISIBLE ON MOBILE/TABLET) */
.rs-mobile-bottom-nav {
  display: none;
}

@media (max-width: 1120px) {
  .rs-primary-header-menu {
    width: 100%;
    order: 3;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .rs-primary-header-menu::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .rs-footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rs-modern-footer {
    padding: 24px 14px 135px;
  }

  .rs-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    background: rgba(7, 22, 44, 0.98);
    border-top: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
    z-index: 995;
    backdrop-filter: blur(10px);
  }

  .rs-mob-nav-item {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: 'Kanit', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 2px;
    text-decoration: none;
  }

  .rs-mob-nav-ico {
    font-size: 16px;
    line-height: 1;
  }

  .rs-mob-nav-txt {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
  }

  .rs-mob-nav-item.active {
    color: #fde047;
    background: rgba(251, 191, 36, 0.12);
  }

  .rs-mob-nav-item.highlight .rs-mob-nav-txt {
    color: #38bdf8;
  }

  /* ยกป้ายโฆษณาติดขอบล่าง #A5 ให้อยู่เหนือแถบเมนูล่างบนมือถือ ไม่ทับกัน */
  .rs-ad-sticky-bottom {
    bottom: 62px !important;
  }
}

/* =========================================================================
   UNIVERSAL ALL-DEVICE ADAPTIVE ENGINE FOR HOMEPAGE (PC, MACBOOK, IPAD, MOBILE)
   ========================================================================= */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

/* 1. Large Desktop & Widescreen PC (>= 1440px) — สมส่วนพอดีสายตา รองรับ 3 คอลัมน์เต็มรูปแบบ */
@media (min-width: 1440px) {
  .header-wrap,
  .rs-ad-top-wrap,
  .page-container,
  .rs-footer-inner {
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
  }

  #adSlot-home-top-leaderboard {
    min-height: 56px;
    max-height: 64px;
    padding: 8px 16px;
  }
}

/* =========================================================================
   RIGHTMOST COLUMN: LIVE LEAGUE STANDINGS WIDGET (🏆 ตารางคะแนนแต่ละลีก)
   ========================================================================= */
.right-standings-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: var(--rs-top-header-offset, 118px);
  min-width: 0;
}

.standings-widget-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.standings-widget-card.standings-focus-pulse {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35), 0 12px 28px rgba(15, 82, 186, 0.18);
}

.standings-card-head {
  background: linear-gradient(135deg, #07162c 0%, #0d3878 60%, #1254b5 100%);
  color: #ffffff;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.st-head-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.st-head-title-wrap > div {
  min-width: 0;
  flex: 1;
}

.st-trophy-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.st-head-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-head-sub {
  font-size: 10.5px;
  color: #93c5fd;
  line-height: 1.2;
  margin-top: 1px;
}

.st-season-pill {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.standings-ctrl-box {
  padding: 10px 12px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.standings-select-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.st-select-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.standings-lg-select {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.standings-lg-select:focus {
  border-color: #1d74f5;
  box-shadow: 0 0 0 2px rgba(29, 116, 245, 0.16);
}

.standings-quick-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.standings-quick-pills::-webkit-scrollbar {
  display: none;
}

.st-q-pill {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.st-q-pill:hover {
  border-color: #1d74f5;
  color: #0f52ba;
  background: #eff6ff;
}

.st-q-pill.active {
  background: #0f52ba;
  border-color: #0f52ba;
  color: #ffffff;
  font-weight: 700;
}

.standings-table-scroll {
  max-height: 495px;
  overflow-y: auto;
  overflow-x: hidden;
}

.standings-table-scroll.is-expanded {
  max-height: 760px;
}

.rs-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rs-standings-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 5px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  white-space: nowrap;
}

.rs-standings-table thead th.col-tm {
  text-align: left;
  padding-left: 8px;
}

.rs-standings-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.14s ease;
}

.rs-standings-table tbody tr:hover {
  background: #f4f9ff;
}

.rs-standings-table tbody tr.is-match-highlight {
  background: #fef9c3;
}

.rs-standings-table td {
  padding: 6.5px 4px;
  text-align: center;
  font-family: 'Inter', 'Kanit', sans-serif;
  color: #334155;
  vertical-align: middle;
}

.rs-standings-table td.col-rk {
  width: 30px;
  padding-left: 6px;
}

.rk-badge {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}

.rk-badge.ucl {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.rk-badge.uel {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.rk-badge.rel {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.rs-standings-table td.col-tm {
  text-align: left;
  padding-left: 6px;
  max-width: 138px;
}

.st-team-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.st-team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.st-team-name {
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-standings-table td.col-wdl {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.rs-standings-table td.col-gd {
  font-size: 11px;
  font-weight: 600;
}

.rs-standings-table td.col-gd.pos {
  color: #059669;
}

.rs-standings-table td.col-gd.neg {
  color: #e11d48;
}

.pts-pill {
  display: inline-block;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eff6ff;
  color: #0f52ba;
  font-weight: 800;
  font-size: 12px;
}

.standings-card-foot {
  padding: 9px 12px 11px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-expand-btn {
  width: 100%;
  height: 30px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f52ba;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.st-expand-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.standings-zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 10.5px;
  color: #64748b;
}

.st-z-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.st-z-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.st-z-dot.ucl { background: #22c55e; }
.st-z-dot.uel { background: #3b82f6; }
.st-z-dot.rel { background: #f43f5e; }

/* Quick Standings Button inside each League Header Bar in Center Match List */
.lg-standings-quick-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lg-standings-quick-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #07162c;
  transform: translateY(-1px);
}

/* Balance Center Match Rows inside 3-Column Layout */
@media (min-width: 1121px) {
  .modern-match-row {
    grid-template-columns: 30px 64px 56px 1fr 132px 156px;
    padding: 8px 10px;
  }

  .modern-league-bar {
    grid-template-columns: 30px 1fr auto 156px;
    padding: 0 10px;
  }

  .odds-col-titles,
  .m-odds-grid {
    grid-template-columns: repeat(3, 52px);
  }
}

@media (max-width: 1120px) {
  .right-standings-col {
    position: static;
    grid-column: 1 / -1;
  }
}

/* 2. Notebook & MacBook 13"–16" (Height <= 860px or Width 1025px–1380px) */
@media (min-width: 769px) and (max-height: 860px), (min-width: 1025px) and (max-width: 1380px) {
  .header-tier-1 {
    height: 52px;
  }

  .header-football-nav {
    height: 40px;
  }

  .fb-nav-tab,
  .fav-Quick-tab {
    height: 32px;
    font-size: 12.5px;
    padding: 0 12px;
  }

  .rs-ad-top-wrap {
    margin-top: 8px;
  }

  #adSlot-home-top-leaderboard {
    min-height: 54px;
    max-height: 60px;
    padding: 6px 14px;
  }

  .page-container {
    margin-top: 10px;
    gap: 12px;
  }

  .spotlight-banner {
    padding: 10px 14px;
    margin-bottom: 10px;
  }

  .rs-ad-dual-grid {
    margin-bottom: 10px;
  }

  .rs-ad-dual-grid .rs-ad-slot {
    min-height: 52px;
    max-height: 60px;
    padding: 6px 12px;
  }

  .rs-ad-sticky-bottom {
    max-width: 520px;
    padding: 5px 12px;
    bottom: 6px;
  }
}

/* 3. iPad Pro / Air Landscape (921px – 1180px) */
@media (min-width: 921px) and (max-width: 1180px) {
  .page-container {
    grid-template-columns: 205px 1fr;
    gap: 10px;
    padding: 0 10px;
  }

  .modern-match-row {
    grid-template-columns: 28px 60px 54px 1fr 128px 156px;
    padding: 8px 8px;
  }

  .modern-league-bar {
    grid-template-columns: 28px 1fr auto 156px;
  }

  .odds-col-titles,
  .m-odds-grid {
    grid-template-columns: repeat(3, 52px);
  }
}

/* 4. iPad Mini / Air Portrait (769px – 920px) */
@media (min-width: 769px) and (max-width: 920px) {
  .spotlight-cards-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .modern-match-row {
    grid-template-columns: 28px 62px 56px 1fr 130px 156px;
    padding: 8px 10px;
  }

  .modern-league-bar {
    grid-template-columns: 28px 1fr auto 156px;
  }

  .odds-col-titles,
  .m-odds-grid {
    grid-template-columns: repeat(3, 52px);
  }
}

/* 5. Small Mobile Devices (<= 375px) */
@media (max-width: 375px) {
  .header-wrap,
  .page-container,
  .rs-ad-top-wrap {
    padding-left: 8px;
    padding-right: 8px;
  }

  .modern-match-row {
    padding: 8px 6px;
  }

  .m-team-name {
    font-size: 12px;
  }

  .m-odds-grid {
    grid-template-columns: repeat(3, 44px);
    font-size: 11px;
  }
}

/* =========================================================================
   MODERN HIGH-READABILITY UI PILLS & ICON BADGES (TALL & NON-BOLD)
   ========================================================================= */
.rs-hdr-menu-btn,
.ai-mode-header-btn,
.live-clock-pill,
.fb-nav-tab,
.fav-Quick-tab {
  min-height: 36px !important;
  height: auto !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-family: 'Kanit', 'Inter', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.25px !important;
  -webkit-font-smoothing: antialiased;
}

.st-q-pill,
.lg-standings-quick-btn {
  min-height: 30px !important;
  height: auto !important;
  padding: 4px 12px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* =========================================================================
   6. ALL-SCREEN ZERO-OVERLAP MATCH LIST & RESPONSIVE SCOREBOARD OVERHAUL
      รองรับครบทุกขนาดหน้าจอ: PC กว้าง, PC จอแคบ/แบ่งครึ่งจอ, iPad/Tablet, Mobile
   ========================================================================= */

/* 6.1 ล็อกป้ายสถานะ, สกอร์ครึ่งแรก (HT), เตะมุม และปุ่มดูสนามสด ไม่ให้ตัดคำแนวตั้งเด็ดขาด */
.lg-round-pill,
.m-time-text,
.m-status-pill,
.rs-row-live-beacon,
.ht-tag,
.corner-tag,
.pitch-25d-btn,
.ai-tag-pill,
.ai-subrow-cta {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
}

.lg-round-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.rs-row-live-beacon {
  min-height: 24px;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
  line-height: 1;
}

.ht-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.corner-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.pitch-25d-btn.is-live-broadcast {
  min-height: 25px;
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
}

/* 6.2 แถบวิเคราะห์ AI ฟันธง (.m-ai-subrow) อ่านง่าย ไม่ซ้อนทับปุ่มขวา */
.m-ai-subrow {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%) !important;
  border: 1px solid #dbeafe;
  border-left: 3.5px solid #1d74f5 !important;
  gap: 8px 14px !important;
  flex-wrap: wrap !important;
}

.ai-subrow-main {
  flex: 1 1 260px;
  min-width: 0;
  line-height: 1.45;
  color: #1e3a8a;
  font-size: 12px;
}

.ai-subrow-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(29, 116, 245, 0.10);
  border: 1px solid rgba(29, 116, 245, 0.24);
  color: #0f52ba;
  font-size: 11.5px;
  font-weight: 600;
  margin-left: auto;
  transition: all 0.15s ease;
}

.modern-match-row:hover .ai-subrow-cta {
  background: #1d74f5;
  color: #ffffff;
}

/* 6.3 โครงสร้างตารางแข่งขันสำหรับ PC จอปกติ, PC จอแคบ และ iPad/Tablet (>= 769px)
   แยกแถบ Meta (HT / เตะมุม / ปุ่ม LIVE) ลงมาอยู่ใต้กล่องสกอร์ตรงกลาง เพื่อให้ชื่อทีมเหย้า-เยือนกว้างเต็มที่ 100% */
@media (min-width: 769px) {
  .modern-league-bar {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto 156px !important;
    column-gap: 10px !important;
    padding: 6px 12px !important;
    min-height: 44px !important;
    height: auto !important;
    align-items: center !important;
  }

  .lg-header-title {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: hidden;
  }

  .lg-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lg-popularity-badge {
    padding-right: 4px;
    white-space: nowrap;
  }

  .odds-col-titles {
    grid-template-columns: repeat(3, 52px) !important;
  }

  .modern-match-row {
    display: grid !important;
    grid-template-columns: 28px 62px minmax(74px, max-content) minmax(0, 1fr) 156px !important;
    column-gap: 10px !important;
    row-gap: 6px !important;
    padding: 10px 12px !important;
    align-items: center !important;
  }

  .modern-match-row > .star-btn-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .modern-match-row > .m-time-text {
    grid-column: 2;
    grid-row: 1;
  }

  .modern-match-row > .m-status-pill {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
  }

  .modern-match-row > .m-teams-grid {
    grid-column: 4;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) !important;
    gap: 10px !important;
    min-width: 0;
  }

  .modern-match-row > .m-meta-col {
    grid-column: 4;
    grid-row: 2;
    justify-content: center !important;
    padding-right: 0 !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .modern-match-row > .m-odds-grid {
    grid-column: 5;
    grid-row: 1 / 3;
    align-self: center;
    grid-template-columns: repeat(3, 52px) !important;
    height: 38px !important;
  }

  .modern-match-row > .m-ai-subrow {
    grid-column: 2 / -1;
    grid-row: 3;
    margin-top: 2px !important;
  }
}

/* 6.4 จอ PC แบบแคบ / แบ่งครึ่งหน้าจอ / โน้ตบุ๊กขนาดกลาง (961px – 1340px)
   ย้ายคอลัมน์ตารางคะแนนขวาลงด้านล่างเพื่อให้ตารางคู่แข่งขันตรงกลางกว้างและอ่านชื่อทีมได้เต็ม 100% */
@media (min-width: 961px) and (max-width: 1340px) {
  .page-container {
    grid-template-columns: 205px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 0 14px !important;
  }

  .right-standings-col {
    position: static !important;
    grid-column: 1 / -1 !important;
  }
}

/* 6.5 จอ iPad / Tablet แนวตั้งและแนวนอนกะทัดรัด (769px – 960px) */
@media (min-width: 769px) and (max-width: 960px) {
  .page-container {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
  }

  .right-standings-col {
    position: static !important;
    grid-column: 1 / -1 !important;
  }
}

/* 6.6 จอสมาร์ทโฟน Mobile (<= 768px) — จัดเรียงเป็น์ดกีฬา 4 ชั้น อ่านง่าย ไม่ล้นจอ 100% */
@media (max-width: 768px) {
  .modern-league-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px 8px !important;
    padding: 8px 10px !important;
    height: auto !important;
    min-height: 42px !important;
  }

  .modern-league-bar > .star-btn-icon {
    flex-shrink: 0;
  }

  .lg-header-title {
    flex: 1 1 210px;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }

  .lg-title-text {
    white-space: normal;
    line-height: 1.35;
  }

  .odds-col-titles {
    display: none !important;
  }

  .modern-match-row {
    display: grid !important;
    grid-template-columns: 24px auto auto minmax(0, 1fr) !important;
    gap: 8px 6px !important;
    padding: 12px 10px !important;
    align-items: center !important;
  }

  .modern-match-row > .star-btn-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .modern-match-row > .m-time-text {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 11.5px !important;
  }

  .modern-match-row > .m-status-pill {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .modern-match-row > .m-meta-col {
    grid-column: 4 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    padding-right: 0 !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }

  .modern-match-row > .m-teams-grid {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px 8px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }

  .modern-match-row > .m-odds-grid {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    justify-self: stretch !important;
    grid-template-columns: repeat(3, 1fr) !important;
    height: 34px !important;
    font-size: 12px !important;
  }

  .modern-match-row > .m-ai-subrow {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    margin-top: 2px !important;
  }

  .ai-subrow-main {
    flex: 1 1 auto !important;
  }

  .ai-subrow-cta {
    align-self: flex-end;
  }
}

/* 6.7 จอมือถือขนาดเล็กพิเศษ (<= 380px) */
@media (max-width: 380px) {
  .ht-tag,
  .corner-tag {
    padding: 2px 5px !important;
    font-size: 10px !important;
  }

  .pitch-25d-btn.is-live-broadcast {
    padding: 0 6px !important;
  }

  .rs-row-live-beacon {
    padding: 2px 6px !important;
    font-size: 10.5px !important;
  }
}


