/* RealScore — Match Center Stylesheet (static/css/match_center.css) */
:root {
      --bg-page: #f2f3f5;
      --header-dark: #262626;
      --header-blue: #0d80da;
      --pitch-dark: #5e962f;
      --pitch-light: #659f33;
      --teal-dark: #063c44;
      --teal-deeper: #053037;
      --teal-divider: #0d525c;
      --gold-badge: #ffba5a;
      --gold-light: #ffc980;
      --chelsea-blue: #0d8cf8;
      --manutd-gold: #ffba5a;
      --stats-dark-bg: #1e2124;
      --stats-darker-bg: #181a1d;
    }

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

    .hidden {
      display: none !important;
    }

    body {
      font-family: 'Kanit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg-page);
      color: #222;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px 14px 32px;
      min-height: 100vh;
    }

    .page-shell {
      width: 100%;
      max-width: 1280px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* TOP AUTO-LIVE BAR */
    .mode-switcher-bar {
      background: linear-gradient(90deg, #063c44 0%, #0b5560 100%);
      color: #fff;
      padding: 8px 14px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 13px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

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

    .status-dot-live {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #ff3b30;
      box-shadow: 0 0 10px #ff3b30;
      animation: blinkLive 1s infinite;
    }

    @keyframes blinkLive {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.35; transform: scale(0.85); }
    }

    .match-select-dropdown {
      font-family: 'Kanit', sans-serif;
      font-size: 12.5px;
      font-weight: 600;
      background: #042b31;
      color: #ffba5a;
      border: 1px solid rgba(255, 186, 90, 0.65);
      border-radius: 5px;
      padding: 5px 10px;
      cursor: pointer;
      outline: none;
    }

    .top-quick-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .pill-btn {
      font-family: 'Kanit', sans-serif;
      font-size: 12px;
      font-weight: 600;
      padding: 5px 11px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.24);
      background: rgba(0,0,0,0.26);
      color: #fff;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .pill-btn:hover {
      background: rgba(255,255,255,0.18);
    }

    .pill-btn.active {
      background: #ffba5a;
      color: #111;
      border-color: #ffba5a;
      font-weight: 700;
    }

    /* 1. TOP IN-PLAY LIVE ODDS BAR */
    .live-odds-bar {
      background: #ffffff;
      border: 1px solid #e2e6ea;
      border-radius: 3px;
      display: grid;
      grid-template-columns: 230px 1fr 1fr 1fr 1.25fr 1.25fr 1fr;
      align-items: center;
      height: 42px;
      font-size: 14px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      overflow: hidden;
    }

    .odds-label-cell {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 14px;
      color: #333;
      font-weight: 500;
      border-right: 1px solid #8bc34a;
      height: 100%;
    }

    .live-pulse-dot {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(101, 159, 51, 0.22);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .live-pulse-dot::after {
      content: '';
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #659f33;
      animation: pulseDot 1.4s infinite ease-in-out;
    }

    @keyframes pulseDot {
      0%, 100% { transform: scale(0.9); opacity: 0.75; }
      50% { transform: scale(1.25); opacity: 1; }
    }

    .odds-cell {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      height: 100%;
      border-right: 1px solid #eceff2;
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 14px;
      font-weight: 500;
      color: #333;
      transition: background-color 0.35s ease, color 0.35s ease;
    }

    .odds-cell.group-divider {
      border-right: 1px solid #8bc34a;
    }

    .odds-handicap {
      color: #e66a1f;
      font-weight: 600;
    }

    .odds-up {
      background: rgba(34, 181, 115, 0.16);
      color: #16935b !important;
    }

    .odds-down {
      background: rgba(231, 76, 60, 0.16);
      color: #d63031 !important;
    }

    /* MAIN 2-COLUMN LAYOUT (LEFT: TRACKER, RIGHT: LIVE CHAT) */
    .main-broadcast-grid {
      display: grid;
      grid-template-columns: 1fr 340px;
      gap: 12px;
      align-items: stretch;
    }

    body.hide-chat .main-broadcast-grid {
      grid-template-columns: 1fr;
    }

    body.hide-chat .chat-sidebar {
      display: none;
    }

    @media (max-width: 1024px) {
      .main-broadcast-grid {
        grid-template-columns: 1fr;
      }
    }

    /* LEFT COLUMN: MATCH TRACKER WIDGET */
    .tracker-widget {
      background: var(--teal-dark);
      border-radius: 2px;
      overflow: hidden;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
      display: flex;
      flex-direction: column;
    }

    .tracker-header {
      background: var(--header-dark);
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 0 12px;
      color: #ffffff;
      font-size: 13.5px;
      font-weight: 500;
      overflow: hidden;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
    }

    #leagueHeaderTitle {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .blue-indicator {
      width: 4px;
      height: 16px;
      background: var(--header-blue);
      border-radius: 2px;
      flex-shrink: 0;
    }

    .header-status-right {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11.5px;
      color: #b5bcc4;
      flex-shrink: 0;
      white-space: nowrap;
    }

    #currentStateLabel {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 280px;
    }

    .sync-pill {
      background: rgba(255, 59, 48, 0.22);
      border: 1px solid #ff4757;
      color: #ff7f50;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 10.5px;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
    }

    /* PITCH STAGE — REALISTIC BROADCAST STADIUM PROPORTION (385px Desktop) */
    .pitch-stage {
      position: relative;
      width: 100%;
      height: 385px;
      background: #2b4c75;
      overflow: hidden;
      cursor: pointer;
    }

    #pitchCanvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    .live-coord-badge {
      display: none !important;
    }

    /* =========================================================================
       HALFTIME / STADIUM CENTER CAROUSEL OVERLAY CARD
       ========================================================================= */
    .ht-center-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 12;
      pointer-events: none;
      transition: opacity 0.28s ease, transform 0.28s ease;
    }

    .ht-center-overlay.hidden {
      opacity: 0;
      pointer-events: none;
      transform: scale(0.96);
    }

    .ht-card-box {
      width: 72%;
      max-width: 580px;
      height: auto;
      background: rgba(6, 56, 64, 0.94);
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
      color: #ffffff;
      padding: 14px 24px 16px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      flex-shrink: 0;
      pointer-events: auto;
      position: relative;
    }

    .ht-slide {
      display: none;
      width: 100%;
      height: auto;
      flex-direction: column;
      justify-content: flex-start;
      gap: 8px;
      animation: fadeSlide 0.25s ease;
    }

    .ht-slide.active {
      display: flex;
    }

    @keyframes fadeSlide {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .ht-stats-title {
      text-align: center;
      font-size: 17px;
      font-weight: 600;
      color: #ffffff;
      letter-spacing: 0.4px;
      margin-bottom: 2px;
      line-height: 1.25;
    }

    .ht-bars-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      align-items: end;
      text-align: center;
      padding: 2px 8px 4px;
    }

    .ht-bar-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .ht-bar-pair {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 10px;
      height: 62px;
    }

    .ht-vbar-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .ht-vbar-num {
      font-family: 'Inter', sans-serif;
      font-size: 14.5px;
      font-weight: 700;
      line-height: 1.1;
      color: #ffffff;
    }

    .ht-vbar {
      width: 14px;
      max-height: 42px;
      border-radius: 2px 2px 0 0;
      transition: height 0.4s ease;
    }

    .ht-vbar.home { background: #0d8cf8; }
    .ht-vbar.away { background: #ffba5a; }

    .ht-bar-label {
      font-size: 13.5px;
      font-weight: 500;
      line-height: 1.25;
      color: #f1f5f9;
      margin-top: 2px;
      white-space: nowrap;
    }

    .ht-bottom-counts-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      text-align: center;
      padding: 8px 8px 2px;
      margin-top: 2px;
      border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    .ht-count-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .ht-count-pair {
      display: flex;
      align-items: center;
      gap: 16px;
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.15;
    }

    .ht-count-val {
      position: relative;
      padding-bottom: 3px;
      min-width: 14px;
      text-align: center;
    }

    .ht-count-val.home::after {
      content: '';
      position: absolute;
      left: -2px;
      right: -2px;
      bottom: 0;
      height: 2.5px;
      background: #0d8cf8;
    }

    .ht-count-val.away::after {
      content: '';
      position: absolute;
      left: -2px;
      right: -2px;
      bottom: 0;
      height: 2.5px;
      background: #ffba5a;
    }

    .stadium-info-top {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 3px;
    }

    .stadium-name {
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 20px;
      font-weight: 700;
      color: #ffffff;
      margin-bottom: 2px;
    }

    .stadium-sub-label {
      font-size: 13.5px;
      color: #6c939b;
      font-weight: 500;
    }

    .stadium-sub-value {
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 17.5px;
      font-weight: 700;
      color: #ffffff;
      margin-bottom: 2px;
    }

    .coaches-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid rgba(255, 255, 255, 0.09);
      border-bottom: 1px solid rgba(255, 255, 255, 0.09);
      padding: 10px 4px;
    }

    .coach-side {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .coach-side.right {
      text-align: right;
    }

    .coach-crest {
      width: 38px;
      height: 38px;
      flex-shrink: 0;
    }

    .coach-text-wrap {
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    .coach-role {
      font-size: 13px;
      color: #6c939b;
    }

    .coach-name {
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 16.5px;
      font-weight: 700;
      color: #ffffff;
    }

    .weather-row {
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding-top: 2px;
      font-family: 'Inter', sans-serif;
      font-size: 16.5px;
      font-weight: 600;
      color: #ffffff;
    }

    .weather-item {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .ht-carousel-dots {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-top: 12px;
      pointer-events: auto;
    }

    .ht-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.45);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .ht-dot.active {
      background: #ffffff;
      transform: scale(1.2);
      box-shadow: 0 0 6px rgba(255,255,255,0.8);
    }

    /* =========================================================================
       IN-PLAY FLOATING GOAL / EVENT OVERLAY CARDS
       ========================================================================= */
    .event-overlay-stack {
      position: absolute;
      left: 24px;
      bottom: 22px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 10;
      pointer-events: none;
      transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    }

    .event-overlay-stack.hidden {
      opacity: 0;
      transform: translateY(14px) scale(0.96);
    }

    .event-banner-top {
      display: inline-flex;
      align-items: stretch;
      height: 54px;
      border-radius: 6px;
      overflow: hidden;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    }

    .event-type-box {
      background: var(--gold-light);
      color: #ffffff;
      font-size: 22px;
      font-weight: 700;
      padding: 0 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 92px;
      white-space: nowrap;
    }

    .event-team-box {
      background: var(--teal-dark);
      color: #ffffff;
      padding: 0 20px 0 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 17px;
      font-weight: 600;
      min-width: 215px;
    }

    .team-badge-svg {
      width: 32px;
      height: 32px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .team-badge-svg img, .mini-crest img, .coach-crest img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .event-banner-bottom {
      display: inline-flex;
      align-items: center;
      background: var(--teal-dark);
      height: 44px;
      padding: 0 20px 0 16px;
      border-radius: 6px;
      gap: 18px;
      width: fit-content;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    }

    .event-minute-pill {
      background: var(--gold-badge);
      color: #ffffff;
      font-weight: 700;
      font-size: 14px;
      padding: 3px 8px;
      border-radius: 3px;
    }

    .event-score-display {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: 'Inter', sans-serif;
      font-size: 22px;
      font-weight: 800;
      color: #ffffff;
    }

    .score-num {
      position: relative;
      padding-bottom: 3px;
      line-height: 1;
    }

    .score-num.home-underline::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: -2px;
      height: 3px;
      background: var(--chelsea-blue);
    }

    .score-num.away-underline::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: -2px;
      height: 3px;
      background: var(--manutd-gold);
    }

    /* =========================================================================
       ON-PITCH PLAYER POSSESSION & ACTION CALLOUT (AiScore Authentic Style)
       ========================================================================= */
    .player-possession-callout {
      position: absolute;
      left: 38%;
      top: 66%;
      transform: translate(-20%, -50%);
      z-index: 24;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      pointer-events: none;
      transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1), top 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .player-possession-callout.hidden {
      display: none !important;
    }

    .callout-action-title {
      font-family: 'Kanit', sans-serif;
      font-size: 27px;
      font-weight: 700;
      color: #ffffff;
      line-height: 1.12;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
      margin-bottom: 2px;
    }

    .callout-team-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .callout-team-name {
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 19px;
      font-weight: 500;
      color: #eef5ee;
      text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    }

    .callout-team-crest {
      width: 25px;
      height: 25px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .callout-team-crest img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
    }

    .player-pill-badge {
      display: inline-flex;
      align-items: center;
      background: rgba(6, 60, 68, 0.92);
      border-radius: 999px;
      height: 40px;
      padding-right: 16px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
      border: 1px solid rgba(255, 255, 255, 0.14);
      backdrop-filter: blur(4px);
    }

    .player-pill-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;
      background: #0c4d56;
      flex-shrink: 0;
      display: flex;
      align-items: flex-end;
      justify-content: center;
    }

    .player-pill-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
    }

    .player-pill-name {
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 15.5px;
      font-weight: 600;
      color: #e2f1f5;
      padding-left: 11px;
      letter-spacing: 0.2px;
      white-space: nowrap;
    }

    /* PROMINENT BROADCAST TV HERO SCOREBOARD (TOP OF STADIUM) */
    .hero-broadcast-scoreboard {
      background:
        radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.22) 0%, rgba(7, 25, 40, 0) 62%),
        linear-gradient(180deg, #071e30 0%, #0b2d46 52%, #061826 100%);
      border-top: 1px solid rgba(56, 189, 248, 0.28);
      border-bottom: 2px solid rgba(250, 204, 21, 0.48);
      padding: 8px 18px;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 16px;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
      position: relative;
      z-index: 15;
    }

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

    .hbs-team.hbs-home {
      justify-content: flex-end;
      text-align: right;
    }

    .hbs-team.hbs-away {
      justify-content: flex-start;
      text-align: left;
    }

    .hbs-team-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .hbs-team-name {
      color: #ffffff;
      font-family: 'Kanit', 'Inter', sans-serif;
      font-size: 19px;
      font-weight: 800;
      line-height: 1.15;
      letter-spacing: 0.2px;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .hbs-team-role {
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.6px;
      text-transform: uppercase;
    }

    .hbs-team-role.home-role {
      color: #38bdf8;
    }

    .hbs-team-role.away-role {
      color: #fbbf24;
    }

    .hbs-crest-box {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(15, 23, 42, 0.65) 100%);
      border: 1.5px solid rgba(255, 255, 255, 0.24);
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      padding: 5px;
    }

    .hbs-crest-box img,
    .hbs-crest-box svg {
      width: 100%;
      height: 100%;
      object-fit: contain;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
    }

    .hbs-center-pod {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 2px 14px;
    }

    .hbs-clock-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: linear-gradient(90deg, rgba(220, 38, 38, 0.28) 0%, rgba(15, 23, 42, 0.9) 100%);
      border: 1px solid rgba(250, 204, 21, 0.55);
      border-radius: 999px;
      padding: 2px 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .hbs-live-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #ef4444;
      box-shadow: 0 0 8px #ef4444;
      animation: hbsPulseDot 1.2s infinite ease-in-out;
    }

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

    .hbs-clock-text {
      color: #fde047;
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0.8px;
    }

    .hbs-score-board {
      display: flex;
      align-items: center;
      gap: 8px;
      background: linear-gradient(180deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
      border: 1.5px solid rgba(56, 189, 248, 0.55);
      border-radius: 12px;
      padding: 4px 14px;
      box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .hbs-score-digit {
      min-width: 34px;
      text-align: center;
      font-family: 'Inter', 'Kanit', sans-serif;
      font-size: 29px;
      font-weight: 900;
      line-height: 1.05;
      color: #ffffff;
      text-shadow: 0 2px 10px rgba(56, 189, 248, 0.55);
    }

    .hbs-score-digit.home-digit {
      color: #38bdf8;
    }

    .hbs-score-digit.away-digit {
      color: #fde047;
    }

    .hbs-score-sep {
      color: rgba(255, 255, 255, 0.65);
      font-size: 22px;
      font-weight: 900;
      line-height: 1;
      margin-top: -2px;
    }

    /* SCOREBOARD STRIP (UNDER PITCH — UPGRADED FOR CLARITY) */
    .scoreboard-strip {
      background: linear-gradient(90deg, #082338 0%, #0d3552 50%, #082338 100%);
      height: 52px;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      border-top: 1px solid rgba(56, 189, 248, 0.25);
      border-bottom: 1px solid var(--teal-divider);
      gap: 14px;
    }

    .team-side {
      display: flex;
      align-items: center;
      gap: 10px;
      height: 100%;
      padding: 0 16px;
      color: #ffffff;
      font-size: 16px;
      font-weight: 800;
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    }

    .team-side.home { justify-content: flex-end; border-left: 4px solid #38bdf8; }
    .team-side.away { justify-content: flex-start; border-right: 4px solid var(--manutd-gold); }

    .mini-crest { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

    .center-clock-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      min-width: 156px;
    }

    .clock-trapezoid {
      background: rgba(250, 204, 21, 0.18);
      border: 1px solid rgba(250, 204, 21, 0.45);
      color: #fde047;
      font-family: 'Inter', sans-serif;
      font-size: 12.5px;
      font-weight: 900;
      padding: 1px 16px;
      border-radius: 0 0 7px 7px;
      line-height: 1.25;
    }

    .center-score-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 2px;
    }

    .jersey-icon { width: 19px; height: 19px; }

    .center-score-text {
      color: #ffffff;
      font-family: 'Inter', sans-serif;
      font-size: 21px;
      font-weight: 900;
      letter-spacing: 1.5px;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
    }

    /* MOMENTUM HISTOGRAM TIMELINE SECTION */
    .momentum-timeline-wrap {
      background: var(--teal-deeper);
      padding: 6px 14px 8px;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .momentum-header-row, .momentum-footer-row {
      display: grid;
      grid-template-columns: minmax(140px, 180px) 1fr;
      align-items: center;
      font-size: 11.5px;
      color: #9ab3b8;
    }

    .momentum-team-name {
      color: #ffffff;
      font-weight: 600;
      font-size: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 8px;
    }

    .momentum-chart-row {
      display: grid;
      grid-template-columns: minmax(140px, 180px) 1fr;
      align-items: center;
    }

    .momentum-bars-box {
      position: relative;
      height: 40px;
      background: rgba(255, 255, 255, 0.04);
      border-top: 1px solid rgba(255,255,255,0.06);
      border-bottom: 1px solid rgba(255,255,255,0.06);
      display: flex;
      align-items: center;
    }

    .momentum-grid-line {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 1px;
      background: rgba(255, 255, 255, 0.08);
    }

    .momentum-baseline {
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      height: 1px;
      background: rgba(255, 255, 255, 0.14);
    }

    .m-bar {
      position: absolute;
      width: 5px;
      border-radius: 1px;
    }

    .m-bar.home {
      bottom: 50%;
      background: #0d8cf8;
    }

    .m-bar.away {
      top: 50%;
      background: #ffba5a;
    }

    .flag-pin-row {
      position: relative;
      height: 15px;
    }

    .flag-pin {
      position: absolute;
      transform: translateX(-50%);
      top: 0;
    }

    .time-ticks-row {
      position: relative;
      height: 15px;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      color: #8fa9af;
    }

    .time-tick-lbl {
      position: absolute;
      transform: translateX(-50%);
    }

    /* DARK BOTTOM POSSESSION ("สมบัติ") & ATTACK STATS PANEL */
    .dark-stats-footer {
      background: var(--stats-dark-bg);
      color: #e2e8ec;
      display: flex;
      flex-direction: column;
    }

    .possession-strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 18px;
      border-bottom: 1px solid #2b2f33;
      font-size: 12.5px;
      font-weight: 600;
    }

    .side-mini-icons {
      display: flex;
      align-items: center;
      gap: 18px;
      font-family: 'Inter', sans-serif;
    }

    .mini-stat-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .card-rect {
      width: 9px;
      height: 13px;
      border-radius: 1.5px;
      display: inline-block;
    }

    .card-rect.red { background: #d63031; }
    .card-rect.yellow { background: #f39c12; }

    .possession-center {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      max-width: 440px;
      justify-content: center;
    }

    .poss-bar-outer {
      width: 110px;
      height: 6px;
      background: #0d0f11;
      border-radius: 2px;
      overflow: hidden;
      display: flex;
    }

    .poss-bar-outer.home { justify-content: flex-end; }
    .poss-bar-outer.away { justify-content: flex-start; }

    .poss-fill-blue { background: #0d8cf8; height: 100%; transition: width 0.35s ease; }
    .poss-fill-gold { background: #ffba5a; height: 100%; transition: width 0.35s ease; }

    .detailed-stats-2col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      background: var(--stats-darker-bg);
      padding: 8px 16px 10px;
      gap: 20px;
      font-size: 12px;
    }

    .stats-col-half {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .stats-col-half:first-child {
      border-right: 1px solid #2c3035;
      padding-right: 18px;
    }

    .dual-compare-row {
      display: grid;
      grid-template-columns: 26px 1fr 92px 1fr 26px;
      align-items: center;
      gap: 8px;
    }

    .dual-compare-lbl {
      text-align: center;
      color: #cbd3d8;
      font-size: 12px;
      white-space: nowrap;
    }

    .dual-num {
      font-family: 'Inter', sans-serif;
      font-weight: 600;
      color: #ffffff;
    }

    .dual-num.right { text-align: right; }

    /* RIGHT COLUMN: LIVE CHAT ROOM ("ห้องแชต 🔥 9999+") */
    .chat-sidebar {
      background: #ffffff;
      border: 1px solid #e1e4e8;
      border-radius: 2px;
      display: flex;
      flex-direction: column;
      height: 100%;
      min-height: 560px;
      max-height: 600px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .chat-header {
      height: 42px;
      padding: 0 14px;
      border-bottom: 1px solid #eceff2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }

    .chat-hot-count {
      color: #ff5722;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .chat-messages-box {
      flex: 1;
      overflow-y: auto;
      padding: 10px 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: #fafbfc;
    }

    .chat-msg-row {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-size: 12.5px;
      line-height: 1.4;
      animation: fadeSlide 0.2s ease;
    }

    .chat-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .chat-user {
      color: #1976d2;
      font-weight: 500;
      margin-right: 4px;
    }

    .chat-text {
      color: #333;
      word-break: break-word;
    }

    .chat-input-area {
      padding: 10px;
      border-top: 1px solid #eceff2;
      background: #fff;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .chat-textarea {
      width: 100%;
      height: 54px;
      background: #f2f3f5;
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      padding: 8px 10px;
      font-family: 'Kanit', sans-serif;
      font-size: 12.5px;
      resize: none;
      outline: none;
    }

    .chat-bottom-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #9aa0a6;
      font-size: 12px;
    }

    .chat-send-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: #7c858e;
      display: flex;
      align-items: center;
      transition: color 0.15s ease;
    }

    .chat-send-btn:hover { color: #0d80da; }

    /* DIRECTOR PANEL BELOW */
    .director-panel {
      background: #182226;
      color: #e8f1f5;
      border-radius: 8px;
      padding: 12px 16px;
      border: 1px solid #28383e;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .director-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
    }

    .director-title {
      font-size: 14px;
      font-weight: 700;
      color: #ffba5a;
    }

    .btn-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .ctrl-btn {
      font-family: 'Kanit', sans-serif;
      font-size: 12px;
      font-weight: 600;
      padding: 6px 11px;
      border-radius: 5px;
      border: 1px solid transparent;
      cursor: pointer;
      color: #fff;
      transition: all 0.15s ease;
    }

    .ctrl-btn:hover { filter: brightness(1.12); }
    .btn-chelsea { background: #115d93; border-color: #1f7fc4; }
    .btn-manutd { background: #b8251a; border-color: #e03a2e; }
    .btn-gold { background: #d68910; border-color: #f39c12; }
    .btn-teal { background: #0f626f; border-color: #168596; }
    .btn-dark { background: #26353a; border-color: #394d54; }
    .btn-purple { background: #8e44ad; border-color: #9b59b6; }
    .btn-active { box-shadow: 0 0 0 2px #ffba5a; background: #229954 !important; }

    body.broadcast-mode .mode-switcher-bar,
    body.broadcast-mode .director-panel {
      display: none;
    }

    .floating-restore-btn {
      position: fixed;
      bottom: 14px;
      right: 14px;
      background: rgba(6, 60, 68, 0.92);
      color: #ffba5a;
      border: 1px solid #ffba5a;
      border-radius: 20px;
      padding: 6px 14px;
      font-family: 'Kanit', sans-serif;
      font-size: 12px;
      cursor: pointer;
      display: none;
      z-index: 999;
    }

    body.broadcast-mode .floating-restore-btn {
      display: block;
    }

    /* =========================================================================
       6-TAB AISCORE MATCH CENTER (BELOW LIVE TRACKER)
       ========================================================================= */
    .aiscore-match-center {
      background: #ffffff;
      border: 1px solid #dfe3e8;
      border-radius: 4px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      overflow: hidden;
    }

    .mc-tabs-header {
      display: flex;
      align-items: center;
      background: #1f2428;
      border-bottom: 2px solid #0d80da;
      overflow-x: auto;
    }

    .mc-tab-btn {
      background: transparent;
      border: none;
      color: #b8c4ce;
      font-family: 'Kanit', sans-serif;
      font-size: 13.5px;
      font-weight: 500;
      padding: 11px 18px;
      cursor: pointer;
      white-space: nowrap;
      border-bottom: 3px solid transparent;
      transition: all 0.15s ease;
    }

    .mc-tab-btn:hover {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.05);
    }

    .mc-tab-btn.active {
      color: #ffba5a;
      font-weight: 600;
      border-bottom-color: #ffba5a;
      background: rgba(255, 186, 90, 0.08);
    }

    .mc-tab-content {
      display: none;
      padding: 18px 20px;
      background: #ffffff;
      color: #222;
    }

    .mc-tab-content.active {
      display: block;
    }

    .mc-section-title {
      font-size: 15px;
      font-weight: 700;
      color: #063c44;
      margin-bottom: 12px;
      padding-bottom: 6px;
      border-bottom: 2px solid #eef2f5;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* Tab 1: Incidents Timeline */
    .incidents-timeline {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-width: 920px;
      margin: 0 auto;
    }

    .incident-item {
      display: grid;
      grid-template-columns: 1fr 68px 1fr;
      align-items: center;
      gap: 12px;
      padding: 8px 12px;
      border-radius: 6px;
      background: #f8fafb;
      border: 1px solid #edf1f5;
      font-size: 13px;
    }

    .incident-item.goal-highlight {
      background: #fff9ef;
      border-color: #ffd591;
      font-weight: 600;
    }

    .inc-side.home {
      text-align: right;
      color: #0b5394;
    }

    .inc-side.away {
      text-align: left;
      color: #b45f06;
    }

    .inc-min-badge {
      text-align: center;
      background: #063c44;
      color: #ffba5a;
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      font-size: 12px;
      padding: 4px 8px;
      border-radius: 14px;
    }

    /* Tab 2: 2D Tactical Pitch & Lineups */
    .tactical-pitch-box {
      position: relative;
      width: 100%;
      height: 360px;
      background: repeating-linear-gradient(
        90deg,
        #4e8c2b 0px,
        #4e8c2b 60px,
        #559630 60px,
        #559630 120px
      );
      border: 3px solid #ffffff;
      border-radius: 6px;
      box-shadow: inset 0 0 0 2px rgba(255,255,255,0.65);
      margin-bottom: 16px;
      overflow: hidden;
    }

    .tactical-half-line {
      position: absolute;
      left: 50%;
      top: 0;
      bottom: 0;
      width: 2px;
      background: rgba(255,255,255,0.75);
    }

    .tactical-center-circle {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 96px;
      height: 96px;
      border: 2px solid rgba(255,255,255,0.75);
      border-radius: 50%;
      transform: translate(-50%, -50%);
    }

    .tactical-pen-box {
      position: absolute;
      top: 20%;
      height: 60%;
      width: 13%;
      border: 2px solid rgba(255,255,255,0.75);
    }

    .tactical-pen-box.left { left: 0; border-left: none; }
    .tactical-pen-box.right { right: 0; border-right: none; }

    .formation-banner {
      position: absolute;
      top: 8px;
      background: rgba(6, 60, 68, 0.88);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 12px;
      z-index: 4;
    }

    .formation-banner.home { left: 12px; border-left: 3px solid #0d8cf8; }
    .formation-banner.away { right: 12px; border-right: 3px solid #ffba5a; }

    .pitch-player-token {
      position: absolute;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      z-index: 5;
      pointer-events: none;
    }

    .token-circle {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 700;
      color: #fff;
      border: 2px solid #fff;
      box-shadow: 0 2px 5px rgba(0,0,0,0.35);
    }

    .token-circle.home { background: #0d6efd; }
    .token-circle.away { background: #d9534f; }

    .token-name {
      margin-top: 2px;
      background: rgba(0, 0, 0, 0.72);
      color: #fff;
      font-size: 10.5px;
      padding: 1px 6px;
      border-radius: 8px;
      white-space: nowrap;
      max-width: 110px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .lineups-grid-2col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
    }

    .roster-card {
      border: 1px solid #e5e9ef;
      border-radius: 6px;
      overflow: hidden;
    }

    .roster-card-head {
      background: #063c44;
      color: #fff;
      padding: 8px 12px;
      font-weight: 600;
      font-size: 13.5px;
      display: flex;
      justify-content: space-between;
    }

    .roster-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 12px;
      border-bottom: 1px solid #f1f4f8;
      font-size: 12.5px;
    }

    .roster-jersey {
      display: inline-block;
      width: 24px;
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      color: #0d80da;
    }

    /* Tab 3: Full Match Stats */
    .full-stats-container {
      max-width: 820px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .full-stat-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .full-stat-top {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      font-weight: 600;
    }

    .full-stat-bars {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      height: 8px;
    }

    .fbar-track {
      background: #edf1f5;
      border-radius: 4px;
      overflow: hidden;
      display: flex;
    }

    .fbar-track.home { justify-content: flex-end; }
    .fbar-track.away { justify-content: flex-start; }

    /* Tab 4 & 6: Tables (Odds, H2H, Standings) */
    .mc-data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .mc-data-table th {
      background: #063c44;
      color: #ffffff;
      padding: 9px 10px;
      text-align: center;
      font-weight: 600;
    }

    .mc-data-table td {
      padding: 8px 10px;
      border-bottom: 1px solid #eef1f5;
      text-align: center;
    }

    .mc-data-table tr.highlight-team-row {
      background: #fff8e6;
      font-weight: 700;
    }

/* =========================================================================
   SOCIAL LOGIN (GOOGLE / FACEBOOK) & REAL-TIME FAN CHAT STYLES
   ========================================================================= */
.chat-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.chat-subtab-btn {
  height: 36px;
  border: none;
  background: transparent;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.chat-subtab-btn.active {
  color: #0f52ba;
  background: #ffffff;
  font-weight: 700;
  border-bottom-color: #0f52ba;
}

.chat-count-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.chat-messages-box.hidden {
  display: none !important;
}

.fan-chat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  animation: fadeSlide 0.2s ease;
}

.fan-chat-card.own-msg {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.fan-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #cbd5e1;
}

.fan-chat-body {
  flex: 1;
  min-width: 0;
}

.fan-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.fan-chat-user-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.fan-chat-username {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-provider-pill {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.chat-provider-pill.google {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.chat-provider-pill.facebook {
  background: #eff6ff;
  color: #1877F2;
  border: 1px solid #bfdbfe;
}

.fan-chat-time {
  font-size: 10.5px;
  color: #94a3b8;
  flex-shrink: 0;
}

.fan-chat-text {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.42;
  word-break: break-word;
}

.fan-chat-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.fan-like-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.14s;
}

.fan-like-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #e11d48;
}

/* SOCIAL AUTH BAR ABOVE CHAT INPUT */
.chat-auth-bar {
  padding: 8px 10px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.chat-login-gate {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-login-gate.hidden,
.chat-user-profile-strip.hidden,
.chat-emoji-picker.hidden,
.social-modal-overlay.hidden {
  display: none !important;
}

.chat-login-gate-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

.chat-login-btns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-login-btn {
  height: 34px;
  border-radius: 7px;
  font-family: 'Kanit', 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

.social-login-btn.google-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.social-login-btn.google-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.social-login-btn.facebook-btn {
  background: #1877F2;
  color: #ffffff;
  border: 1px solid #1877F2;
  box-shadow: 0 1px 3px rgba(24, 119, 242, 0.25);
}

.social-login-btn.facebook-btn:hover {
  background: #166fe5;
}

/* LOGGED-IN USER PROFILE BAR */
.chat-user-profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-user-profile-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-active-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0ea5e9;
  flex-shrink: 0;
}

.chat-active-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-active-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-active-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 125px;
}

.chat-active-status {
  font-size: 10.5px;
  color: #059669;
  font-weight: 500;
}

.chat-profile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chat-switch-btn,
.chat-logout-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  cursor: pointer;
}

.chat-logout-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.chat-emoji-picker {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 10px;
  background: #ffffff;
  border-top: 1px solid #eceff2;
  font-size: 17px;
}

.chat-emoji-picker span {
  cursor: pointer;
  transition: transform 0.12s;
  user-select: none;
}

.chat-emoji-picker span:hover {
  transform: scale(1.25);
}

/* SOCIAL LOGIN MODAL OVERLAY */
.social-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.social-modal-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: fadeSlide 0.2s ease;
}

.social-modal-header {
  padding: 16px 20px;
  background: #0a192f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-modal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.social-modal-title {
  font-size: 16px;
  font-weight: 700;
}

.social-modal-subtitle {
  font-size: 11.5px;
  color: #93c5fd;
}

.social-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.social-provider-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 6px;
  gap: 6px;
}

.sp-tab {
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.sp-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.social-modal-body {
  padding: 18px 20px 22px;
}

.social-quick-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.social-quick-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.social-acc-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.14s;
}

.social-acc-card:hover {
  border-color: #0f52ba;
  background: #f8fafc;
  transform: translateX(2px);
}

.social-acc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.social-acc-email {
  font-size: 11.5px;
  color: #64748b;
}

.social-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.social-divider::before,
.social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.social-field {
  margin-bottom: 10px;
}

.social-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.social-field input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  outline: none;
}

.social-field input:focus {
  border-color: #1877F2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.social-submit-btn {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #1a73e8;
  color: #ffffff;
  font-family: 'Kanit', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.social-popup-btn {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================================
   MATCH CENTER PRIME AD BANNER SLOTS (5 ตำแหน่งโฆษณาทองคำหน้า Match Center)
   ========================================================================= */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  padding-bottom: 88px;
}

.mc-ad-slot {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px dashed rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, #062c33 0%, #0b4853 52%, #0f6270 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mc-ad-slot:hover {
  border-color: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.22);
}

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

.mc-ad-slot.theme-navy {
  background: linear-gradient(135deg, #0b192e 0%, #12315c 55%, #1d4ed8 100%);
}

.mc-ad-slot.theme-crimson {
  background: linear-gradient(135deg, #3b0718 0%, #701a32 55%, #be123c 100%);
}

.mc-ad-slot.theme-emerald {
  background: linear-gradient(135deg, #052e16 0%, #065f46 55%, #059669 100%);
}

.mc-ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fde047;
  font-family: 'Inter', 'Kanit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 1.5px 8px;
  border-radius: 999px;
  margin-bottom: 3px;
  width: fit-content;
}

.mc-ad-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.mc-ad-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

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

.mc-ad-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.mc-ad-size {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #7dd3fc;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.mc-ad-cta {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #04242a;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

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

/* Chat Sidebar Sponsor Banner (#M3 Removed for Clean Chat UX) */
.mc-chat-sponsor-strip,
#adSlot-match-chat-sponsor,
[data-slot-code="M3"] {
  display: none !important;
}

.chat-messages-box {
  padding: 14px 12px !important;
  min-height: 290px;
}

/* Sticky Bottom Anchor Banner (#M5) */
.mc-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(6, 44, 51, 0.96) 0%, rgba(11, 72, 83, 0.96) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.78);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 9px 15px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(10px);
}

/* =========================================================================
   COMPLETE 100% MULTI-DEVICE RESPONSIVE RULES FOR MATCH CENTER
   ========================================================================= */

/* Tablet & Small Laptop (<= 1024px) */
@media (max-width: 1024px) {
  .main-broadcast-grid {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    min-height: 440px;
    max-height: 500px;
  }

  .mc-ad-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Phablet Devices (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 6px 8px 82px;
  }

  .page-shell {
    gap: 8px;
  }

  .mode-switcher-bar {
    padding: 8px 10px;
    gap: 8px;
  }

  .switcher-left {
    width: 100%;
  }

  .match-select-dropdown {
    width: 100%;
    max-width: 100%;
    font-size: 12px;
  }

  .top-quick-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .pill-btn {
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 5px 10px;
  }

  /* Responsive Live Odds Bar on Mobile */
  .live-odds-bar {
    grid-template-columns: repeat(3, 1fr);
    height: auto;
    font-size: 12.5px;
  }

  .odds-label-cell {
    grid-column: 1 / -1;
    padding: 6px 10px;
    border-right: none;
    border-bottom: 1px solid #eceff2;
    font-size: 12px;
  }

  .odds-cell {
    padding: 6px 4px;
    font-size: 12.5px;
    border-bottom: 1px solid #f1f5f9;
  }

  /* Responsive Tracker Header & Pitch Stage */
  .tracker-header {
    height: auto;
    padding: 7px 10px;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12.5px;
  }

  .header-status-right {
    width: 100%;
    justify-content: space-between;
    font-size: 11px;
  }

  .pitch-stage {
    height: 245px;
  }

  .live-coord-badge {
    display: none !important;
  }

  .player-possession-callout {
    transform: translate(-50%, -50%) scale(0.76);
  }

  .ht-card-box {
    width: 94%;
    height: auto;
    min-height: 215px;
    padding: 12px 14px;
  }

  .ht-stats-title {
    font-size: 15px;
  }

  .ht-bar-pair {
    height: 58px;
  }

  .ht-bar-label {
    font-size: 12px;
  }

  /* Scoreboard Strip on Mobile */
  .scoreboard-strip {
    height: auto;
    min-height: 46px;
    padding: 6px 8px;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
  }

  .team-side {
    font-size: 12.5px;
    gap: 5px;
    min-width: 0;
  }

  .team-side span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .center-score-text {
    font-size: 16px;
  }

  /* Momentum & Bottom Stats on Mobile */
  .momentum-timeline-wrap {
    padding: 6px 8px;
  }

  .possession-strip {
    height: auto;
    padding: 8px 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
  }

  .possession-center {
    order: -1;
    width: 100%;
    justify-content: center;
  }

  .detailed-stats-2col {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  .stats-col-half:first-child {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #2c3035;
    padding-bottom: 8px;
  }

  /* 6-Tab Match Center on Mobile */
  .mc-tab-btn {
    padding: 9px 13px;
    font-size: 12.5px;
  }

  .mc-tab-content {
    padding: 12px 10px;
    overflow-x: auto;
  }

  .mc-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13.5px;
  }

  .tactical-pitch-box {
    height: 255px;
  }

  .formation-banner {
    font-size: 10.5px;
    padding: 2px 7px;
  }

  .token-circle {
    width: 24px;
    height: 24px;
    font-size: 10.5px;
  }

  .token-name {
    font-size: 9.5px;
    max-width: 74px;
    padding: 1px 4px;
  }

  .lineups-grid-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .incident-item {
    grid-template-columns: 1fr 54px 1fr;
    gap: 6px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .mc-data-table {
    font-size: 12px;
  }

  .mc-data-table th,
  .mc-data-table td {
    padding: 6px 6px;
  }

  /* Mobile Ad Slots */
  .mc-ad-slot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
  }

  .mc-ad-right {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .mc-ad-title {
    font-size: 13px;
  }

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

@media (max-width: 420px) {
  .pitch-stage {
    height: 220px;
  }

  .tactical-pitch-box {
    height: 230px;
  }
}

/* =========================================================================
   REDESIGNED COMPACT SMART HEADER, MODERN FOOTER & MOBILE BOTTOM NAV
   ========================================================================= */
body {
  padding-top: var(--rs-top-header-offset, 106px) !important;
}

.mc-smart-header.mode-switcher-bar {
  background: linear-gradient(135deg, #052e35 0%, #063c44 50%, #0a4f5a 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 0;
  padding: 9px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 9999 !important;
  box-shadow: 0 6px 22px rgba(4, 36, 42, 0.32);
}

.mc-hdr-top-row.switcher-left {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mc-hdr-brand-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.mc-brand-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 5px 11px;
  border-radius: 9px;
  color: #ffffff;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 14px;
  transition: all 0.15s ease;
}

.mc-brand-logo-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mc-home-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ffba5a, #f59e0b);
  color: #04242a;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 9px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: transform 0.15s ease;
}

.mc-home-back-btn:hover {
  transform: translateY(-1px);
}

.mc-live-table-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 9px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mc-live-table-btn:hover {
  background: rgba(239, 68, 68, 0.32);
  color: #ffffff;
}

.mc-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  justify-content: flex-end;
}

.mc-selector-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #bae6fd;
  white-space: nowrap;
}

.mc-selector-container .match-select-dropdown {
  flex: 1;
  max-width: 520px;
  height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  background: #032227;
  border: 1px solid rgba(255, 186, 90, 0.65);
  color: #fde047;
}

.mc-jump-live-pill {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #fca5a5 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.mc-smart-header .top-quick-actions {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-quick-lineup-btn {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}

/* Fix Full-Time Chart Title & Bar Number Spacing so numbers never touch the heading */
.ht-stats-title {
  margin-bottom: 16px !important;
  line-height: 1.25 !important;
}

.ht-bars-grid {
  padding-top: 8px;
}

/* MODERN EASY-TO-USE SITE FOOTER (MATCH CENTER) */
.rs-modern-footer {
  width: 100%;
  max-width: 1280px;
  background: linear-gradient(180deg, #05262c 0%, #03171b 100%);
  color: #cbd5e1;
  border-top: 3px solid #ffba5a;
  border-radius: 14px;
  margin-top: 24px;
  margin-bottom: 72px;
  padding: 28px 20px;
  font-family: 'Kanit', sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.rs-footer-inner {
  width: 100%;
}

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

.rs-footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  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, #ffba5a, #f59e0b);
  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: 10.5px;
  background: #10b981;
  color: #03171b;
  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.15);
  border: 1px solid rgba(16, 185, 129, 0.38);
  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.55;
  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, #ffba5a, #f59e0b);
  color: #04242a;
  border: none;
}

.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-heading {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 11px;
}

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

.rs-footer-link-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  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(255, 186, 90, 0.2);
  border-color: #ffba5a;
  color: #ffffff;
}

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

.rs-footer-league-chip {
  background: rgba(13, 128, 218, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.35);
  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: #ffba5a;
  color: #04242a;
  border-color: #ffba5a;
  font-weight: 800;
}

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

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

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

.rs-mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mc-smart-header.mode-switcher-bar {
    padding: 8px 10px;
    gap: 7px;
  }

  .mc-hdr-top-row.switcher-left {
    gap: 6px;
    padding-bottom: 6px;
  }

  .mc-hdr-brand-nav {
    width: 100%;
    justify-content: space-between;
  }

  .mc-selector-container {
    width: 100%;
    min-width: 0;
  }

  .mc-selector-label {
    display: none;
  }

  .mc-selector-container .match-select-dropdown {
    width: 100%;
    max-width: 100%;
    font-size: 12px;
    height: 32px;
  }

  /* จัดปุ่มโหมดบนมือถือเป็น Grid ที่มองเห็นครบทุกปุ่มโดยไม่ล้นตกขอบขวา */
  .mc-smart-header .top-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 5px;
    overflow: visible;
  }

  .mc-smart-header .top-quick-actions .pill-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 5px 4px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ht-stats-title {
    font-size: 13.5px !important;
    margin-bottom: 18px !important;
  }

  .rs-footer-top-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rs-modern-footer {
    padding: 20px 14px;
    margin-bottom: 130px;
  }

  .rs-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    background: rgba(4, 34, 40, 0.98);
    border-top: 1px solid rgba(255, 186, 90, 0.4);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
    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: #ffba5a;
    background: rgba(255, 186, 90, 0.14);
  }

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

/* =========================================================================
   UNIVERSAL ALL-DEVICE ADAPTIVE ENGINE (PC, NOTEBOOK, MACBOOK, IPAD, MOBILE)
   ========================================================================= */

/* 1. Ultra-Wide External Monitors (>= 1600px and tall >= 900px) */
@media (min-width: 1600px) and (min-height: 900px) {
  .page-shell,
  .rs-modern-footer {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }

  .mc-smart-header.mode-switcher-bar .mc-hdr-top-row,
  .mc-smart-header.mode-switcher-bar .top-quick-actions {
    max-width: 1320px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .main-broadcast-grid {
    grid-template-columns: 1fr 340px;
    gap: 12px;
  }

  .pitch-stage {
    height: 390px;
  }

  .chat-sidebar {
    min-height: 540px;
    max-height: 590px;
  }
}

/* 2. Precision Viewport-Height Budget Engine for MacBook / Notebook / Desktop Browser Windows
      (Covers 1440x680, 1440x760, 1366x768, 1512x780, and all viewports with height <= 880px or width 1025px–1599px) */
@media (min-width: 769px) and (max-height: 880px), (min-width: 1025px) and (max-width: 1599px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 52px;
  }

  .page-shell,
  .rs-modern-footer {
    max-width: min(1380px, calc(100vw - 24px));
    gap: 5px;
  }

  /* Compact 2-Row Locked Header (~58px total height so it doesn't eat vertical space) */
  .mc-smart-header.mode-switcher-bar {
    padding: 4px 14px !important;
    gap: 4px !important;
  }

  .mc-smart-header.mode-switcher-bar .mc-hdr-top-row,
  .mc-smart-header.mode-switcher-bar .top-quick-actions {
    max-width: min(1380px, calc(100vw - 24px));
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .mc-hdr-top-row.switcher-left {
    padding-bottom: 4px !important;
    gap: 6px !important;
  }

  .mc-brand-logo-pill {
    padding: 3px 9px;
    font-size: 13px;
    height: 26px;
  }

  .mc-home-back-btn,
  .mc-live-table-btn {
    padding: 3px 9px;
    font-size: 11.5px;
    height: 26px;
  }

  .mc-selector-container .match-select-dropdown {
    height: 26px !important;
    font-size: 11.5px !important;
    padding: 0 8px !important;
  }

  .mc-smart-header .top-quick-actions {
    gap: 8px !important;
    flex-wrap: wrap;
    padding: 2px 0;
  }

  .mc-smart-header .top-quick-actions .pill-btn {
    padding: 6px 14px !important;
    min-height: 34px !important;
    height: auto !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }

  /* Sleek Top Banner #M1 & Live Odds Bar */
  #adSlot-match-top-leaderboard {
    min-height: 42px !important;
    max-height: 48px !important;
    padding: 6px 14px !important;
  }

  #adSlot-match-top-leaderboard .mc-ad-title {
    font-size: 13px !important;
    font-weight: 400 !important;
  }

  #adSlot-match-top-leaderboard .mc-ad-cta {
    font-size: 12px !important;
    font-weight: 400 !important;
    padding: 4px 12px !important;
  }

  .live-odds-bar {
    height: 38px !important;
    font-size: 13.5px !important;
  }

  .odds-label-cell {
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 0 12px !important;
  }

  .odds-cell {
    font-size: 13.5px !important;
    font-weight: 500 !important;
  }

  /* Main Broadcast 2-Column Grid */
  .main-broadcast-grid {
    grid-template-columns: 1fr 330px;
    gap: 10px;
    align-items: stretch;
  }

  .tracker-header {
    min-height: 48px !important;
    height: auto !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    padding: 7px 14px !important;
  }

  .pitch25d-lang-btn {
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    min-height: 34px !important;
    height: auto !important;
  }

  .sync-pill {
    font-size: 12.5px !important;
    font-weight: 400 !important;
    padding: 6px 14px !important;
    min-height: 34px !important;
  }

  /* Realistic 105x68m Broadcast Stadium Pitch Proportion (370px – 395px) */
  .pitch-stage {
    height: clamp(370px, 37vw, 395px) !important;
  }

  .pitch-stage:has(.ht-center-overlay:not(.hidden)) {
    height: 435px !important;
  }

  .ht-card-box {
    width: 72%;
    max-width: 490px;
    height: calc(100% - 16px);
    max-height: 240px;
    padding: 10px 18px;
  }

  .ht-stats-title {
    font-size: 15.5px !important;
    margin-bottom: 6px !important;
  }

  .ht-bar-pair {
    height: 52px;
  }

  .ht-bar-label {
    font-size: 12.5px;
  }

  #slide0Score {
    font-size: 26px !important;
  }

  .coaches-row {
    padding: 8px 4px !important;
  }

  .coach-name {
    font-size: 13.5px;
  }

  /* Prominent Scoreboard + Momentum + Possession + 4 Detailed Stats Bars */
  .scoreboard-strip {
    height: 50px !important;
    padding: 0 14px !important;
  }

  .sb-team-name {
    font-size: 15.5px !important;
  }

  .sb-center-score {
    font-size: 20px !important;
  }

  .momentum-timeline-wrap {
    padding: 5px 12px 6px !important;
  }

  .momentum-header-row,
  .momentum-footer-row {
    font-size: 11px !important;
    height: 18px !important;
  }

  .momentum-bars-box {
    height: 36px !important;
  }

  .possession-strip {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
  }

  .detailed-stats-2col {
    padding: 5px 12px 8px !important;
    row-gap: 5px !important;
    font-size: 11.5px !important;
  }

  /* Right Column: Chat Sidebar matched to AiScore Tracker Widget */
  .chat-sidebar {
    min-height: 0 !important;
    height: clamp(575px, 60vw, 635px) !important;
    max-height: clamp(575px, 60vw, 635px) !important;
  }

  .chat-header {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
  }

  .chat-subtabs {
    height: 28px !important;
  }

  .chat-subtab-btn {
    padding: 3px 6px !important;
    font-size: 11.5px !important;
  }

  .chat-messages-box {
    padding: 8px 10px !important;
    min-height: 140px !important;
    flex: 1 1 auto !important;
  }

  .chat-auth-bar {
    padding: 5px 8px !important;
  }

  .chat-input-area {
    padding: 5px 8px !important;
    gap: 4px !important;
  }

  .chat-textarea {
    height: 36px !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  /* Compact Sticky Bottom Ad Pill (#M5) so it doesn't cover stats */
  .mc-ad-sticky-bottom {
    max-width: 460px !important;
    min-height: 34px !important;
    max-height: 38px !important;
    padding: 3px 12px !important;
    bottom: 4px !important;
    border-radius: 999px !important;
  }

  .mc-ad-sticky-bottom .mc-ad-title {
    font-size: 11.5px !important;
  }
}

/* 3. iPad Pro / Air Landscape & Small Laptops (901px – 1180px) */
@media (min-width: 901px) and (max-width: 1180px) {
  .main-broadcast-grid {
    grid-template-columns: 1fr 305px;
    gap: 10px;
  }

  .live-odds-bar {
    grid-template-columns: 185px repeat(6, 1fr);
    font-size: 12.5px;
  }

  .odds-label-cell {
    padding: 0 10px;
    font-size: 12px;
  }

  .pitch-stage {
    height: 295px;
  }

  .ht-card-box {
    width: 80%;
    height: 250px;
    padding: 12px 18px;
  }

  .tactical-pitch-box {
    height: 320px;
  }

  .pitch-player-token {
    transform: translate(-50%, -50%) scale(0.92);
  }
}

/* 4. iPad Mini / Air Portrait & Tablets (769px – 900px) */
@media (min-width: 769px) and (max-width: 900px) {
  body {
    padding: 8px 10px 120px;
  }

  .main-broadcast-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .live-odds-bar {
    grid-template-columns: 180px repeat(6, 1fr);
    font-size: 12.5px;
  }

  .pitch-stage {
    height: 310px;
  }

  .ht-card-box {
    width: 82%;
    height: 260px;
    padding: 14px 20px;
  }

  .chat-sidebar {
    min-height: 420px;
    max-height: 470px;
  }

  .tactical-pitch-box {
    height: 305px;
  }

  .pitch-player-token {
    transform: translate(-50%, -50%) scale(0.88);
  }

  .lineups-grid-2col {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .rs-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    background: rgba(4, 34, 40, 0.98);
    border-top: 1px solid rgba(255, 186, 90, 0.4);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
    z-index: 995;
    backdrop-filter: blur(10px);
  }

  .mc-ad-sticky-bottom {
    bottom: 62px !important;
  }
}

/* 5. Mobile Smartphones (<= 768px) Enhancements */
@media (max-width: 768px) {
  .ht-card-box {
    width: 94%;
    height: calc(100% - 16px);
    min-height: 0;
    max-height: 215px;
    padding: 10px 12px;
    overflow-y: auto;
  }

  #slide0Score {
    font-size: 24px !important;
  }

  .coaches-row {
    padding: 8px 2px !important;
  }

  .coach-crest {
    width: 28px;
    height: 28px;
  }

  .coach-name {
    font-size: 13px;
  }

  .coach-role {
    font-size: 11px;
  }

  .weather-row {
    font-size: 12px !important;
  }

  .tactical-pitch-box {
    height: 270px;
  }

  .pitch-player-token {
    transform: translate(-50%, -50%) scale(0.78);
  }

  .momentum-header-row,
  .momentum-footer-row,
  .momentum-chart-row {
    grid-template-columns: 82px 1fr;
  }

  .momentum-team-name {
    font-size: 11px;
  }

  .chat-sidebar {
    min-height: 410px;
    max-height: 460px;
  }
}

/* 6. Small Mobile Devices (<= 375px) */
@media (max-width: 375px) {
  body {
    padding: 4px 6px 125px;
  }

  .mc-brand-txt {
    font-size: 13px;
  }

  .mc-home-back-btn,
  .mc-live-table-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .mc-smart-header .top-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .pitch-stage {
    height: 215px;
  }

  .tactical-pitch-box {
    height: 245px;
  }

  .pitch-player-token {
    transform: translate(-50%, -50%) scale(0.70);
  }
}

/* =========================================================================
   MODERN HIGH-READABILITY UI BADGES, PILLS & TRACKER HEADER SYSTEM
   (Tall Divs • Clean Non-Bold Typography • Modern Slate/Teal/Indigo Palette)
   ========================================================================= */

/* 1. Top Smart Header & Mode Switcher Pills */
.mc-smart-header {
  background: linear-gradient(180deg, #0b192c 0%, #0f243c 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  padding: 10px 16px !important;
  gap: 10px !important;
}

.mc-brand-logo-pill,
.mc-home-back-btn,
.mc-live-table-btn {
  min-height: 36px !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.25px !important;
  -webkit-font-smoothing: antialiased;
}

.mc-home-back-btn {
  background: #0284c7 !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
}

.mc-live-table-btn {
  background: #1e293b !important;
  border: 1px solid #f87171 !important;
  color: #f8fafc !important;
}

.match-select-dropdown {
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #38bdf8 !important;
  border-radius: 10px !important;
  letter-spacing: 0.2px;
}

.mc-smart-header .top-quick-actions .pill-btn,
.pill-btn {
  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;
  background: #1e293b !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  -webkit-font-smoothing: antialiased;
}

.mc-smart-header .top-quick-actions .pill-btn:hover,
.pill-btn:hover {
  background: #334155 !important;
  border-color: #94a3b8 !important;
  color: #ffffff !important;
}

.mc-smart-header .top-quick-actions .pill-btn.active,
.pill-btn.active {
  background: #0284c7 !important;
  border-color: #7dd3fc !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

/* 2. Tracker Header Bar (Above Stadium Scoreboard) */
.tracker-header {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%) !important;
  min-height: 50px !important;
  height: auto !important;
  padding: 8px 16px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

#leagueHeaderTitle {
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  line-height: 1.35 !important;
  -webkit-font-smoothing: antialiased;
}

.header-status-right {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

/* 3. Player Name Language Switcher Buttons (Top Bar & Stadium Header) */
.player-lang-top-btn,
.pitch25d-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 36px !important;
  height: auto !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  background: #0f393b !important;
  border: 1px solid #2dd4bf !important;
  color: #f8fafc !important;
  font-family: 'Kanit', 'Inter', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.25px !important;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  transition: all 0.18s ease;
  -webkit-font-smoothing: antialiased;
}

.player-lang-top-btn.active-en,
.pitch25d-lang-btn.active-en {
  background: #172a54 !important;
  border: 1px solid #60a5fa !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.player-lang-top-btn:hover,
.pitch25d-lang-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.player-lang-top-btn .lang-mode-badge,
.pitch25d-lang-btn .lang-main-lbl,
.pitch25d-lang-btn strong {
  background: transparent !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-weight: 400 !important;
  font-size: 13.5px !important;
  letter-spacing: 0.25px !important;
}

.player-lang-top-btn .lang-swap-arrow,
.pitch25d-lang-btn .swap-chip {
  background: rgba(45, 212, 191, 0.18) !important;
  border: 1px solid rgba(45, 212, 191, 0.42) !important;
  padding: 2px 9px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #ccfbf1 !important;
}

.player-lang-top-btn.active-en .lang-swap-arrow,
.pitch25d-lang-btn.active-en .swap-chip {
  background: rgba(96, 165, 250, 0.22) !important;
  border-color: rgba(147, 197, 253, 0.48) !important;
  color: #e0f2fe !important;
}

/* 4. Live Opta Feed Sync Pill (#liveSyncBadge) */
.sync-pill,
.sync-pill.sync-live {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 36px !important;
  height: auto !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  background: #0b3b2e !important;
  border: 1px solid #34d399 !important;
  color: #ecfdf5 !important;
  font-family: 'Kanit', 'Inter', sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0.25px !important;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  -webkit-font-smoothing: antialiased;
}

.sync-pill.sync-ht {
  background: #3b2a10 !important;
  border-color: #fbbf24 !important;
  color: #fef3c7 !important;
}

.sync-pill.sync-ft {
  background: #1e293b !important;
  border-color: #94a3b8 !important;
  color: #f1f5f9 !important;
}

/* 5. 2D Tactical Pitch & Lineups Header Segmented Control */
.mc-lineup-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mc-lineup-title-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.player-lang-switch-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 5px 10px 5px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.player-lang-switch-bar .pls-label {
  font-family: 'Kanit', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: #1e293b;
  white-space: nowrap;
}

.pls-segmented-group {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  border-radius: 9px;
  padding: 3px;
  gap: 4px;
}

.pls-seg-btn {
  border: none;
  background: transparent;
  color: #334155;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 400;
  padding: 5px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.pls-seg-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}

.pls-seg-btn.active {
  background: #0d9488;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

#btnPlayerLangEn.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

@media (max-width: 767px) {
  .player-lang-switch-bar {
    width: 100%;
    justify-content: space-between;
    padding: 6px 10px;
  }
  .pls-seg-btn {
    padding: 5px 10px;
    font-size: 12.5px;
  }
}

/* 6. Live AI Football Commentator Broadcast Button & HUD */
#ttsToggleBtn.active {
  background: #be123c !important;
  color: #ffffff !important;
  border-color: #fda4af !important;
  font-weight: 400 !important;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.45);
}

.pitch25d-tts-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 36px !important;
  height: auto !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #64748b !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;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.pitch25d-tts-btn:hover {
  transform: translateY(-1px);
  background: #334155 !important;
  border-color: #94a3b8 !important;
  color: #ffffff !important;
}

.pitch25d-tts-btn.active {
  background: #be123c !important;
  color: #ffffff !important;
  border-color: #fda4af !important;
  box-shadow: 0 2px 10px rgba(190, 18, 60, 0.45);
}

.pitch25d-crowd-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-height: 36px !important;
  height: auto !important;
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #64748b !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  font-family: 'Kanit', 'Inter', sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.pitch25d-crowd-btn:hover {
  transform: translateY(-1px);
  background: #334155 !important;
  border-color: #94a3b8 !important;
  color: #ffffff !important;
}

.pitch25d-crowd-btn.active {
  background: #0f393b !important;
  color: #ecfdf5 !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.25);
}

.ai-commentator-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 30;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.48);
  border-radius: 12px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  color: #ffffff;
  flex-wrap: wrap;
}

.ai-commentator-hud.hidden {
  display: none !important;
}

.ai-comm-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.ai-comm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  background: #be123c;
  border: 1px solid #fda4af;
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.25px;
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.ai-comm-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: blinkDot 1s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.ai-comm-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 0 2px;
  flex-shrink: 0;
}

.ai-comm-eq span {
  display: block;
  width: 3px;
  height: 5px;
  background: #38bdf8;
  border-radius: 2px;
  transition: height 0.15s ease;
}

.ai-comm-eq.speaking span:nth-child(1) { animation: eqBar 0.55s infinite ease-in-out 0.0s; background: #34d399; }
.ai-comm-eq.speaking span:nth-child(2) { animation: eqBar 0.45s infinite ease-in-out 0.12s; background: #38bdf8; }
.ai-comm-eq.speaking span:nth-child(3) { animation: eqBar 0.62s infinite ease-in-out 0.22s; background: #fbbf24; }
.ai-comm-eq.speaking span:nth-child(4) { animation: eqBar 0.48s infinite ease-in-out 0.08s; background: #38bdf8; }
.ai-comm-eq.speaking span:nth-child(5) { animation: eqBar 0.58s infinite ease-in-out 0.18s; background: #34d399; }

@keyframes eqBar {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.ai-comm-text-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.4;
}

.ai-comm-speaker-tag {
  color: #7dd3fc;
  font-weight: 500;
  white-space: nowrap;
}

.ai-comm-subtitle {
  color: #f8fafc;
  font-weight: 400;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-comm-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ai-comm-ctrl-btn {
  min-height: 32px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #64748b;
  border-radius: 8px;
  padding: 4px 12px;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ai-comm-ctrl-btn:hover {
  background: #334155;
  color: #ffffff;
}

.ai-comm-ctrl-btn.active {
  background: #0f393b;
  border-color: #2dd4bf;
  color: #ecfdf5;
}

.ai-comm-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(190, 18, 60, 0.35);
  color: #fecaca;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-comm-close-btn:hover {
  background: #e11d48;
  color: #ffffff;
}

/* =========================================================================
   7. CENTER STADIUM / STATS OVERLAY CARD (.ht-card-box) & AI HUD POLISH
      (Desktop, Notebook, iPad/Tablet, and Mobile — Balanced Padding & Margin)
   ========================================================================= */

/* ป้องกันแถบพากย์สด AI ล้นขอบซ้าย-ขวาในทุกขนาดหน้าจอ */
.ai-commentator-hud {
  box-sizing: border-box !important;
  left: 14px !important;
  right: 14px !important;
  width: auto !important;
  max-width: calc(100% - 28px) !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  gap: 8px 12px !important;
}

/* เมื่อแถบพากย์สด AI เปิดอยู่ ให้ขยับการ์ดกลางสนามลงเล็กน้อยเพื่อไม่ให้ซ้อนทับกัน */
.ai-commentator-hud:not(.hidden) ~ .ht-center-overlay {
  padding-top: 52px !important;
}

.ht-center-overlay {
  box-sizing: border-box !important;
  padding: 12px 16px !important;
}

.ht-card-box {
  box-sizing: border-box !important;
  width: min(84%, 580px) !important;
  max-width: 580px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex-shrink: 0 !important;
  padding: 14px 24px 16px !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(8, 49, 60, 0.96) 0%, rgba(6, 33, 44, 0.98) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.34) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  gap: 8px !important;
}

.ht-slide {
  height: auto !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

.ht-stats-title {
  font-size: 16.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  margin-bottom: 2px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

/* สไลด์ข้อมูลสนาม (#htSlide-3): จัด สถานที่ + ความจุ เป็น 2 คอลัมน์คู่กัน ประหยัดพื้นที่แนวตั้งและมีระยะห่างสวยงาม */
.stadium-info-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: 18px !important;
  row-gap: 3px !important;
  width: 100% !important;
  text-align: center !important;
  padding: 2px 6px 6px !important;
}

.stadium-info-top .stadium-name {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  color: #f8fafc !important;
  margin-bottom: 6px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.stadium-info-top .stadium-sub-label:nth-of-type(2) {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

.stadium-info-top #venueCityText {
  grid-column: 1 !important;
  grid-row: 3 !important;
}

.stadium-info-top .stadium-sub-label:nth-of-type(4) {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.stadium-info-top #venueCapText {
  grid-column: 2 !important;
  grid-row: 3 !important;
}

.stadium-sub-label {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #7dd3fc !important;
  letter-spacing: 0.3px !important;
}

.stadium-sub-value {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #f8fafc !important;
  margin-bottom: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* แถวชื่อโค้ช 2 ฝั่ง (#htSlide-3): แยก Grid 2 คอลัมน์พร้อมระยะห่างกลาง 22px ไม่ให้ข้อความชนกันตรงกลางเด็ดขาด */
#htSlide-3 .coaches-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: 22px !important;
  align-items: center !important;
  padding: 10px 14px !important;
  margin: 2px 0 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 12px !important;
}

/* แถวสรุปผล (#htSlide-0): 3 คอลัมน์ (เจ้าบ้าน | สกอร์ | ทีมเยือน) */
#htSlide-0 .coaches-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  column-gap: 16px !important;
  align-items: center !important;
  padding: 14px 12px !important;
  margin: 4px 0 !important;
  background: rgba(15, 23, 42, 0.42) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 12px !important;
}

.coach-side {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.coach-side.right {
  justify-content: flex-end !important;
  text-align: right !important;
}

.coach-crest {
  width: 34px !important;
  height: 34px !important;
  flex-shrink: 0 !important;
}

.coach-text-wrap {
  min-width: 0 !important;
  gap: 2px !important;
}

.coach-role {
  font-size: 11.5px !important;
  font-weight: 400 !important;
  color: #94a3b8 !important;
}

.coach-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.weather-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-evenly !important;
  padding: 6px 10px 2px !important;
  margin-top: 2px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #e2e8f0 !important;
}

.ht-carousel-dots {
  margin-top: 10px !important;
  gap: 10px !important;
}

/* =========================================================================
   8. TABLET & IPAD RESPONSIVE POLISH (769px – 1180px)
      (Covers iPad Mini, iPad Air, iPad Pro Portrait & Landscape)
   ========================================================================= */
@media (min-width: 769px) and (max-width: 1180px) {
  body {
    padding-top: var(--rs-top-header-offset, 118px) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: 92px !important;
  }

  .page-shell {
    gap: 10px !important;
  }

  .mc-smart-header.mode-switcher-bar {
    padding: 10px 16px !important;
    gap: 8px !important;
  }

  .mc-hdr-top-row.switcher-left {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 12px !important;
    padding-bottom: 6px !important;
  }

  .mc-hdr-brand-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .mc-selector-container {
    flex: 1 1 340px !important;
    min-width: 280px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .mc-selector-container .match-select-dropdown {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .mc-smart-header .top-quick-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 2px 0 !important;
  }

  .mc-smart-header .top-quick-actions .pill-btn,
  .mc-smart-header .top-quick-actions .player-lang-top-btn {
    flex: 1 1 auto !important;
    min-width: max-content !important;
    justify-content: center !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    min-height: 36px !important;
  }

  .pitch-stage {
    height: 390px !important;
  }

  /* แถบพากย์สด AI บน iPad/Tablet: เรียงกระชับไม่บังการ์ดกลางสนาม */
  .ai-commentator-hud {
    top: 10px !important;
    left: 14px !important;
    right: 14px !important;
    padding: 8px 14px !important;
    gap: 8px 12px !important;
  }

  .ai-comm-left {
    flex: 1 1 320px !important;
    min-width: 260px !important;
  }

  .ai-commentator-hud:not(.hidden) ~ .ht-center-overlay {
    padding-top: 64px !important;
  }

  .ht-card-box {
    width: min(86%, 560px) !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 14px 22px 15px !important;
    border-radius: 16px !important;
  }

  /* แถบเมนูล่างบน iPad Portrait */
  .rs-mob-nav-item {
    border: none !important;
    background: transparent !important;
    color: #94a3b8 !important;
    font-family: 'Kanit', sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    cursor: pointer !important;
    padding: 4px 2px !important;
    text-decoration: none !important;
  }

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

  .rs-mob-nav-txt {
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .rs-mob-nav-item.active {
    color: #ffba5a !important;
    background: rgba(255, 186, 90, 0.14) !important;
  }
}

/* =========================================================================
   9. MOBILE VERSION FULL-READABILITY & SPACING OVERRIDES (<= 768px)
      - Zero truncated buttons (no '...' cutoff on any icon pill)
      - Auto-fitting Flex-Wrap pills so every button text is 100% visible
      - Generous stadium height (365px) & clean card padding/margin on mobile
   ========================================================================= */
@media (max-width: 768px) {
  body {
    padding-top: var(--rs-top-header-offset, 246px) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-bottom: 115px !important;
  }

  .page-shell {
    gap: 8px !important;
  }

  .mc-smart-header.mode-switcher-bar {
    padding: 10px 10px !important;
    gap: 8px !important;
  }

  .mc-hdr-top-row.switcher-left {
    gap: 7px !important;
    padding-bottom: 4px !important;
  }

  .mc-hdr-brand-nav {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .mc-brand-logo-pill,
  .mc-home-back-btn,
  .mc-live-table-btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-height: 35px !important;
    padding: 5px 10px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
    white-space: nowrap !important;
  }

  .mc-selector-container .match-select-dropdown {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 12.5px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
  }

  /* แถบปุ่มไอคอน 9 ปุ่มบนมือถือ: ใช้ Flex-Wrap ขยายตามความยาวข้อความจริง 100% ห้ามตัดคำ (...) หรือหลุดขอบเด็ดขาด */
  .mc-smart-header .top-quick-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 2px 0 !important;
  }

  .mc-smart-header .top-quick-actions .pill-btn,
  .mc-smart-header .top-quick-actions .player-lang-top-btn {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: max-content !important;
    min-height: 35px !important;
    height: auto !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    letter-spacing: 0.15px !important;
    border-radius: 9px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .mc-smart-header .top-quick-actions .player-lang-top-btn .lang-mode-badge {
    font-size: 12px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
  }

  .mc-smart-header .top-quick-actions .player-lang-top-btn .lang-swap-arrow {
    font-size: 11px !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  /* แถบหัวสนาม (.tracker-header) บนมือถือ: ซ่อนปุ่มสลับภาษาซ้ำซ้อนเพื่อให้กะทัดรัด */
  .tracker-header {
    padding: 8px 10px !important;
    gap: 6px !important;
    min-height: 0 !important;
    flex-wrap: wrap !important;
  }

  #leagueHeaderTitle {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .header-status-right {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .tracker-header .pitch25d-lang-btn {
    display: none !important;
  }

  .pitch25d-tts-btn,
  .pitch25d-crowd-btn,
  .sync-pill,
  .sync-pill.sync-live {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-height: 29px !important;
    padding: 3px 7px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    white-space: nowrap !important;
  }

  /* Hero Broadcast Scoreboard บนมือถือ: วางซ้อนโซนหลังคาอัฒจันทร์ด้านบนเหมือนเวอร์ชัน PC */
  .hero-broadcast-scoreboard {
    position: relative !important;
    z-index: 25 !important;
    width: calc(100% - 14px) !important;
    margin: 6px auto -34px auto !important;
    padding: 6px 10px !important;
    gap: 6px !important;
    grid-template-columns: 1fr auto 1fr !important;
    border-radius: 12px !important;
    background:
      radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.28) 0%, rgba(7, 25, 40, 0) 68%),
      linear-gradient(180deg, rgba(7, 30, 48, 0.90) 0%, rgba(11, 45, 70, 0.94) 55%, rgba(6, 24, 38, 0.96) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.48) !important;
    border-bottom: 2px solid rgba(250, 204, 21, 0.72) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48) !important;
    backdrop-filter: blur(6px) !important;
    pointer-events: none !important;
  }

  .hbs-team {
    gap: 6px !important;
  }

  .hbs-crest-box {
    width: 28px !important;
    height: 28px !important;
    padding: 2px !important;
  }

  .hbs-team-name {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }

  .hbs-team-role {
    font-size: 9px !important;
    letter-spacing: 0.2px !important;
  }

  .hbs-center-pod {
    padding: 1px 4px !important;
    gap: 3px !important;
  }

  .hbs-clock-pill {
    padding: 1px 8px !important;
    gap: 4px !important;
  }

  .hbs-clock-text {
    font-size: 11px !important;
  }

  .hbs-score-board {
    padding: 2px 9px !important;
    gap: 5px !important;
    border-radius: 8px !important;
  }

  .hbs-score-digit {
    font-size: 19px !important;
    min-width: 18px !important;
  }

  .hbs-score-sep {
    font-size: 15px !important;
  }

  /* ปรับสัดส่วนความสูงสนามบนมือถือให้กว้างสมจริงเหมือนสนามจริง (105x68m) และขยายอัตโนมัติเมื่อเปิดการ์ดสถิติ */
  .pitch-stage {
    height: clamp(195px, 53vw, 215px) !important;
  }

  .pitch-stage:has(.ht-center-overlay:not(.hidden)) {
    height: 355px !important;
  }

  /* ปรับขนาดป้ายชื่อนักเตะและทีมที่ครองบอลบนสนามมือถือให้สมดุลไม่บังลูกบอล */
  .player-possession-callout {
    transform: translate(-15%, -48%) !important;
  }

  .callout-action-title {
    font-size: 18px !important;
    line-height: 1.1 !important;
    margin-bottom: 1px !important;
  }

  .callout-team-row {
    gap: 5px !important;
    margin-bottom: 5px !important;
  }

  .callout-team-name {
    font-size: 13px !important;
    font-weight: 500 !important;
  }

  .callout-team-crest {
    width: 18px !important;
    height: 18px !important;
  }

  .player-pill-badge {
    height: 30px !important;
    padding-right: 11px !important;
  }

  .player-pill-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .player-pill-name {
    font-size: 12.5px !important;
    padding-left: 8px !important;
  }

  /* กล่องพากย์ AI บนสนามในเวอร์ชันมือถือ */
  .ai-commentator-hud {
    top: 6px !important;
    left: 8px !important;
    right: 8px !important;
    max-width: calc(100% - 16px) !important;
    padding: 7px 10px !important;
    gap: 5px !important;
    border-radius: 10px !important;
  }

  .ai-comm-left {
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
  }

  .ai-comm-badge {
    min-height: 24px !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
  }

  .ai-comm-text-wrap {
    flex: 1 1 100% !important;
    width: 100% !important;
    font-size: 11.5px !important;
  }

  .ai-comm-controls {
    width: 100% !important;
    justify-content: flex-end !important;
    gap: 5px !important;
  }

  .ai-comm-ctrl-btn {
    min-height: 24px !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
  }

  .ai-comm-close-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
  }

  /* การ์ดกลางสนาม (.ht-card-box) บนมือถือ */
  .ht-center-overlay {
    padding: 40px 10px 8px !important;
  }

  .ai-commentator-hud:not(.hidden) ~ .ht-center-overlay {
    padding-top: 92px !important;
  }

  .ht-card-box {
    width: calc(100% - 8px) !important;
    max-width: 440px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 12px 14px 14px !important;
    border-radius: 14px !important;
    gap: 6px !important;
  }

  .stadium-info-top .stadium-name {
    font-size: 15.5px !important;
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
  }

  .stadium-sub-label {
    font-size: 11px !important;
  }

  .stadium-sub-value {
    font-size: 13px !important;
  }

  #htSlide-3 .coaches-row {
    column-gap: 12px !important;
    padding: 8px 10px !important;
  }

  .coach-crest {
    width: 28px !important;
    height: 28px !important;
  }

  .coach-name {
    font-size: 12.5px !important;
  }

  .weather-row {
    font-size: 12.5px !important;
    padding: 4px 6px 0 !important;
  }

  .ht-carousel-dots {
    margin-top: 7px !important;
  }

  /* แถบสกอร์ใต้สนาม (.scoreboard-strip) บนมือถือ */
  .scoreboard-strip {
    height: auto !important;
    min-height: 44px !important;
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .team-side {
    padding: 0 6px !important;
    gap: 6px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
  }

  .mini-crest {
    width: 24px !important;
    height: 24px !important;
  }

  .center-clock-box {
    min-width: 84px !important;
  }
}

/* =========================================================================
   10. PC & TABLET STADIUM JUMBOTRON SCOREBOARD POSITIONING (>= 769px)
       วางสกอร์บอร์ดหลักลงในโซนอัฒจันทร์/ไฟสปอตไลท์เหนือขอบสนาม (RealScore.com)
       เพื่อให้ดูบอลสด 2.5D พร้อมเห็นสกอร์บอร์ดในเฟรมเดียวกันโดยไม่ต้องเลื่อนขึ้นลง
   ========================================================================= */
@media (min-width: 769px) {
  .tracker-widget {
    position: relative;
  }

  .hero-broadcast-scoreboard {
    position: relative !important;
    z-index: 25 !important;
    width: min(95%, 820px) !important;
    margin: 10px auto -74px auto !important;
    padding: 5px 18px !important;
    gap: 10px !important;
    border-radius: 14px !important;
    background:
      radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.30) 0%, rgba(7, 25, 40, 0) 68%),
      linear-gradient(180deg, rgba(7, 30, 48, 0.88) 0%, rgba(11, 45, 70, 0.92) 55%, rgba(6, 24, 38, 0.94) 100%) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.50) !important;
    border-bottom: 2px solid rgba(250, 204, 21, 0.72) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52), 0 0 18px rgba(14, 165, 233, 0.22) !important;
    backdrop-filter: blur(8px) !important;
    pointer-events: none !important;
  }

  .hbs-crest-box {
    width: 36px !important;
    height: 36px !important;
    padding: 4px !important;
  }

  .hbs-team-name {
    font-size: clamp(13.5px, 1.45vw, 16.5px) !important;
  }

  .hbs-center-pod {
    padding: 1px 10px !important;
  }

  .hbs-score-board {
    padding: 2px 11px !important;
    border-radius: 10px !important;
  }

  .hbs-score-digit {
    font-size: 23px !important;
    min-width: 26px !important;
  }

  /* เมื่อเปิดแถบพากย์บอลสด AI บน PC ให้แสดงที่ด้านล่างสนามเพื่อไม่ให้บังสกอร์บอร์ดบนอัฒจันทร์ */
  .ai-commentator-hud {
    top: auto !important;
    bottom: 10px !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 32 !important;
  }

  /* เมื่อเปิดการ์ดสถิติ/ข้อมูลสนามกลางจอ ให้วางใต้สกอร์บอร์ดบนอัฒจันทร์อย่างสวยงามโดยไม่ล้นกรอบ */
  .ht-center-overlay {
    padding-top: 72px !important;
    padding-bottom: 10px !important;
    justify-content: center !important;
  }

  .ai-commentator-hud:not(.hidden) ~ .ht-center-overlay {
    padding-top: 68px !important;
    padding-bottom: 56px !important;
  }

  .ht-card-box {
    min-height: 0 !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    padding: 14px 24px 16px !important;
  }

  .ht-carousel-dots {
    margin-top: 8px !important;
    flex-shrink: 0 !important;
  }
}




