
    /* =====================================================================
       Match detail page — mirrors legacy sportscore.com layout:
       navy title bar -> scoreboard card -> tabs -> odds -> live tracker
       -> events -> legend. Right column: voting / chat / stats / about.
       ===================================================================== */

    /* -------- Breadcrumb -------- */
    .fb-crumbs {
      color: #6c757d;
      font-size: 0.82rem;
      padding: 0.75rem 0 0.5rem 0;
    }
    .fb-crumbs a { color: #243447; text-decoration: none; }
    .fb-crumbs a:hover { text-decoration: underline; }
    .fb-crumbs .sep { margin: 0 6px; color: #b0b8c4; }

    /* -------- Navy title bar (dark purple) -------- */
    .fb-title-bar {
      background: #1a1142;
      color: #fff;
      border-radius: 8px 8px 0 0;
      padding: 10px 16px;
      font-size: 0.9rem;
      font-weight: 500;
    }
    /* #6: section card headers (contain an <h2>) go light; the top H1
       page-title bar stays dark as the page anchor. */
    .fb-title-bar:has(h2) {
      background: #f2f4f8;
      color: #1a1142;
      border-bottom: 1px solid #e4e7ef;
    }
    .fb-title-bar:has(h2) h2 {
      color: #1a1142 !important;
      font-weight: 600 !important;
    }
    /* keep star/action icons readable on the now-light section headers */
    .fb-title-bar:has(h2) .fb-title-bar-star:hover {
      background: rgba(26,17,66,0.08) !important;
    }
    .fb-title-bar:has(h2) .fb-title-bar-star:focus-visible {
      outline-color: #1a1142 !important;
    }
    .fb-title-bar h1 {
      color: #fff;
      font-size: 0.95rem;
      font-weight: 500;
      margin: 0;
      line-height: 1.3;
    }

    /* -------- Scoreboard card -------- */
    .fb-scoreboard {
      background: #fff;
      border-radius: 0;
      padding: 32px 24px;
      display: grid;
      grid-template-columns: 1fr auto auto auto 1fr;
      grid-template-areas: "home hscore status ascore away";
      align-items: center;
      gap: 20px;
    }
    .fb-scoreboard .team { display: flex; align-items: center; gap: 14px; }
    .fb-scoreboard .team.home {
      grid-area: home;
      justify-content: flex-end;
      text-align: right;
    }
    .fb-scoreboard .team.away {
      grid-area: away;
      justify-content: flex-start;
      text-align: left;
    }
    .fb-scoreboard .fb-score.home-score { grid-area: hscore; }
    .fb-scoreboard .fb-score.away-score { grid-area: ascore; }
    .fb-scoreboard .fb-status { grid-area: status; }
    .fb-scoreboard .team-name {
      font-size: 1.25rem;
      font-weight: 700;
      color: #1a2332;
      margin: 0;
      line-height: 1.2;
    }
    .fb-scoreboard .team-name a {
      color: inherit;
      text-decoration: none;
    }
    .fb-scoreboard .team-name a:hover { text-decoration: underline; }
    .fb-scoreboard .team-logo {
      width: 56px;
      height: 56px;
      object-fit: contain;
      flex-shrink: 0;
    }
    /* The star-favourite button in the scoreboard shares the global
       ``.favorites-star-toggle`` styles from base.html but needs a tiny
       nudge to fit between the team-name and logo at the scoreboard's
       horizontal rhythm. */
    .fb-scoreboard .fb-scoreboard-star { padding: 2px; }
    /* Dark title bar override — navy bg needs a translucent hover. */
    .fb-title-bar-star:hover { background: rgba(255,255,255,0.12) !important; }
    .fb-title-bar-star:focus-visible { outline-color: #fff !important; }
    .fb-scoreboard .fb-score {
      font-size: 3rem;
      font-weight: 700;
      color: #d90429;
      line-height: 1;
      min-width: 48px;
      text-align: center;
    }
    .fb-scoreboard .fb-status {
      text-align: center;
      padding: 0 12px;
    }
    .fb-scoreboard .fb-status .status-label {
      color: #6c757d;
      font-size: 0.85rem;
      font-weight: 500;
      display: block;
      margin-bottom: 2px;
    }
    .fb-scoreboard .fb-status .status-minute {
      color: #d90429;
      font-size: 1.05rem;
      font-weight: 700;
    }
    .fb-scoreboard .fb-status .status-ft {
      color: #198754;
      font-size: 0.95rem;
      font-weight: 600;
    }

    /* Responsive scoreboard — 3x2 grid on mobile: team | score | team, with
       status centered across both rows. Home/away team blocks stack (logo over
       name) to echo the legacy mobile view. */
    @media (max-width: 767px) {
      .fb-scoreboard {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
          "home   status away"
          "hscore status ascore";
        gap: 10px 14px;
        padding: 18px 12px;
      }
      .fb-scoreboard .team.home {
        flex-direction: column;
        gap: 6px;
      }
      /* away DOM is [logo, name] (desktop mirror of home); on mobile use
         column-reverse so the NAME sits above the logo, matching home. */
      .fb-scoreboard .team.away {
        flex-direction: column-reverse;
        gap: 6px;
      }
      .fb-scoreboard .team-name { font-size: 0.9rem; }
      .fb-scoreboard .team-logo { width: 44px; height: 44px; }
      .fb-scoreboard .fb-scoreboard-star { display: none; }
      .fb-scoreboard .fb-score { font-size: 2rem; min-width: 32px; }
      .fb-scoreboard .fb-score.home-score { justify-self: center; }
      .fb-scoreboard .fb-score.away-score { justify-self: center; }
      .fb-scoreboard .fb-status { padding: 0 4px; align-self: center; }
    }

    /* -------- Tabs row -------- */
    .fb-tabs {
      background: #fff;
      border-top: 1px solid #eef0f5;
      padding: 0 16px;
      display: flex;
      gap: 20px;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
    }
    .fb-tabs .fb-tab {
      color: #6c757d;
      font-size: 0.95rem;
      font-weight: 600;
      padding: 14px 4px;
      text-decoration: none;
      border-bottom: 3px solid transparent;
      transition: color 0.15s, border-color 0.15s;
    }
    .fb-tabs .fb-tab:hover {
      color: #1a1142;
      text-decoration: none;
    }
    .fb-tabs .fb-tab.is-active {
      color: #1a1142;
      border-bottom-color: #1a1142;
    }

    /* -------- Odds table (AiScore-style) -------- */
    .fb-odds-card {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
      margin-top: 16px;
      overflow-x: auto;
    }
    .fb-odds-table {
      width: 100%;
      min-width: 540px;
      border-collapse: collapse;
      font-size: 0.85rem;
    }
    .fb-odds-table th,
    .fb-odds-table td {
      padding: 8px 6px;
      text-align: center;
      border-bottom: 1px solid #f1f3f5;
      white-space: nowrap;
    }
    /* Pin the label / bookmaker column so it never clips when the
       markets overflow into a horizontal scroll on a narrow column. */
    .fb-odds-table th:first-child,
    .fb-odds-table td:first-child {
      position: sticky;
      left: 0;
      z-index: 1;
      background: #fff;
    }
    .fb-odds-table thead th:first-child { background: #f8f9fb; }
    .fb-odds-table thead th {
      background: #f8f9fb;
      color: #6c757d;
      font-weight: 600;
      font-size: 0.8rem;
    }
    /* group separators at the start of each market block */
    .fb-odds-table th.grp,
    .fb-odds-table td.grp {
      border-left: 1px solid #e9eaf1;
    }
    .fb-odds-table tbody th {
      text-align: left;
      color: #6c757d;
      font-weight: 500;
      white-space: nowrap;
    }
    .fb-odds-book { text-align: left; }
    .fb-odds-book__chip {
      display: inline-block;
      padding: 3px 9px;
      border-radius: 5px;
      background: #126e51;
      color: #fff;
      font-weight: 700;
      font-size: 0.74rem;
      letter-spacing: 0.02em;
    }
    /* Asian-handicap cell: orange line + decimal price inline */
    .fb-odds-table td.fb-odds-ah { min-width: 76px; }
    .fb-odds-table td.fb-odds-ah .ln { margin-right: 6px; }
    .fb-odds-table .ln { color: #e8730c; font-weight: 600; }
    .fb-odds-table td .pr { color: #2b2245; }
    /* row tints per bucket */
    .fb-odds-row--opening td,
    .fb-odds-row--opening th { background: #f6f9fd; }
    .fb-odds-row--prematch td,
    .fb-odds-row--prematch th { background: #fffdf4; }
    .fb-odds-row--live td,
    .fb-odds-row--live th { background: #f3fbf5; }
    .fb-odds-table tbody tr:last-child td,
    .fb-odds-table tbody tr:last-child th {
      border-bottom: none;
    }
    /* "Live odds" row label: red text + pulsing dot (reuses
       @keyframes tracker-pulse from the tracker card). */
    .fb-odds-table th.is-live { color: #ff3b3b; }
    .fb-odds-table th.is-live::before {
      content: "";
      display: inline-block;
      width: 7px;
      height: 7px;
      margin-right: 7px;
      border-radius: 50%;
      background: #ff3b3b;
      vertical-align: middle;
      animation: tracker-pulse 1.4s ease-in-out infinite;
    }
    .fb-odds-table td.fb-odds-empty-row {
      color: #9aa0a6;
      font-style: italic;
      text-align: center;
      font-size: 0.82rem;
    }
    /* Empty-state card when NO odds exist for the match at all. */
    .fb-odds-card--empty { padding: 18px 20px; }
    .fb-odds-empty__head {
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #6c757d;
      margin-bottom: 6px;
    }
    .fb-odds-empty__body {
      font-size: 0.88rem;
      line-height: 1.55;
      color: #4a4565;
      margin: 0;
    }


    /* -------- Statistics period tabs (Match / 1st Half / 2nd Half) -------- */
    .stat-periods { display: flex; gap: 8px; margin: 2px 0 14px; flex-wrap: wrap; }
    .stat-periods .sp-tab {
      border: 0; cursor: pointer;
      background: #eef0f6; color: #5a5570;
      font-weight: 600; font-size: 0.8rem;
      padding: 6px 16px; border-radius: 16px;
    }
    .stat-periods .sp-tab.is-active { background: #5b4fd6; color: #fff; }
    .sp-panel[hidden] { display: none; }

    /* -------- Live tracker card (self-hosted, no iframe) -------- */
    .fb-tracker-card {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
      margin-top: 16px;
      overflow: hidden;
    }

    /* Score header — replaces the iframe header */
    .tracker-score {
      background: linear-gradient(180deg, #1a1142 0%, #251a52 100%);
      color: #fff;
      padding: 18px 16px 14px;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 12px;
    }
    .tracker-score .team {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .tracker-score .team.home { justify-content: flex-end; }
    .tracker-score .team.away { justify-content: flex-start; }
    .tracker-score .team img { width: 40px; height: 40px; object-fit: contain; }
    .tracker-score .team .name {
      font-weight: 600;
      font-size: 0.95rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tracker-score .center {
      text-align: center;
      min-width: 110px;
    }
    .tracker-score .center .scoreline {
      font-size: 1.8rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      line-height: 1.05;
    }
    .tracker-score .center .scoreline .sep { opacity: 0.5; margin: 0 6px; }
    .tracker-score .center .clock {
      font-size: 0.78rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.8);
      margin-top: 4px;
    }
    .tracker-score .center .clock .live-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #ff3b3b;
      margin-right: 6px;
      vertical-align: middle;
      animation: tracker-pulse 1.4s ease-in-out infinite;
    }
    .tracker-score .center.is-finished .clock,
    .tracker-score .center.is-not-started .clock { color: rgba(255, 255, 255, 0.6); }
    .tracker-score .center.is-finished .live-dot,
    .tracker-score .center.is-not-started .live-dot { display: none; }
    @keyframes tracker-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%      { opacity: 0.45; transform: scale(0.85); }
    }

    /* TheSports hosted live-tracker iframe. Single uncropped frame —
       the previous dual-iframe crop rearranged the widget's sections
       using hardcoded pixel offsets and broke whenever TheSports
       changed their layout. Letting the widget render as-is is less
       brittle and avoids header duplication. */
    .tracker-frame {
      position: relative;
      width: 100%;
      height: 34rem;
      overflow: hidden;
      background: #138a3c;  /* fallback grass colour while iframe loads */
    }
    .tracker-frame #match-live-view {
      display: block;
      width: 100%;
      height: 100%;
      border: 0;
    }

    /* "sportscore.com" watermark — small, bottom-center of the pitch.
       Non-interactive so it never blocks widget interaction. */
    .tracker-frame .tracker-watermark {
      position: absolute;
      left: 50%;
      bottom: 0.9rem;
      transform: translateX(-50%);
      font-family: "Helvetica Neue", Arial, sans-serif;
      font-weight: 600;
      font-size: 0.78rem;
      letter-spacing: 0.05em;
      color: rgba(255, 255, 255, 0.55);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
      pointer-events: none;
      user-select: none;
      white-space: nowrap;
      z-index: 2;
      line-height: 1;
    }

    @media (max-width: 767px) {
      .tracker-frame { height: 32rem; aspect-ratio: auto; overflow: hidden; position: relative; }
      .tracker-frame #match-live-view {
        position: static;
        width: 100%; height: 100%;
        transform: none;
      }
      .tracker-frame .tracker-watermark {
        font-size: 0.7rem;
        bottom: 0.65rem;
      }
    }

    /* Placeholder shown in lieu of the iframe when the match isn't live.
       Same outer dimensions as .tracker-frame so the page doesn't reflow
       when the JS poller flips data-is-live=1 and we swap in the iframe.
       Background is the same grass colour the iframe falls back on while
       loading, with a subtle radial highlight so the card doesn't read
       as a pure flat green rectangle. */
    .tracker-frame--placeholder {
      background:
        radial-gradient(ellipse at center, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 60%),
        #138a3c;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      color: #fff;
    }
    .tracker-placeholder {
      max-width: 28rem;
      padding: 1.5rem 1.25rem;
    }
    .tracker-placeholder__badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 1rem;
    }
    .tracker-placeholder__badge--upcoming {
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
    }
    .tracker-placeholder__badge--finished {
      background: rgba(0, 0, 0, 0.35);
      color: #fff;
    }
    .tracker-placeholder__badge--live {
      background: #e11d48; color: #fff;
      display: inline-flex; align-items: center; gap: 6px;
    }
    .tp-livedot {
      width: 7px; height: 7px; border-radius: 50%; background: #fff;
      animation: tp-live-pulse 1.4s ease-in-out infinite;
    }
    @keyframes tp-live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
    .tracker-placeholder__headline {
      font-size: 1.4rem;
      font-weight: 700;
      line-height: 1.25;
      margin-bottom: 0.4rem;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    .tracker-placeholder__time {
      font-size: 2.6rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      font-variant-numeric: tabular-nums;
      margin: 0.2rem 0 0.8rem;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    }
    .tracker-placeholder__sub {
      font-size: 0.95rem;
      font-weight: 600;
      opacity: 0.92;
      margin-bottom: 0.6rem;
    }
    .tracker-placeholder__hint {
      font-size: 0.82rem;
      opacity: 0.78;
      max-width: 24rem;
      margin: 0 auto;
      line-height: 1.4;
    }
    @media (max-width: 767px) {
      .tracker-placeholder__headline { font-size: 1.15rem; }
      .tracker-placeholder__time { font-size: 2.1rem; }
      .tracker-placeholder__sub { font-size: 0.85rem; }
      .tracker-placeholder__hint { font-size: 0.75rem; }
    }

    /* Live tracker bottom card — corners, cards, real possession bar,
       and the four real attack/shots progress rows. Mirrors legacy
       SportScore live_tracker_bottom.html with new field names. */
    .tracker-bottom-card {
      background: #fff;
      padding: 14px 16px 16px;
      border-top: 1px solid #eef0f4;
    }
    /* The four progress rows are always present in the DOM so polling can
       light them up mid-match, but stay hidden until any stat goes non-zero. */
    .tracker-bottom-card.no-stats { padding-bottom: 12px; }
    .tracker-bottom-card.no-stats .bottom-stats-rows { display: none; }

    .bottom-summary {
      display: grid;
      grid-template-columns: auto auto auto 1fr auto auto auto;
      align-items: center;
      gap: 10px 14px;
      font-size: 0.82rem;
      color: #1a1142;
    }
    .bottom-summary .cell {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 700;
    }
    .bottom-summary .cell.away { justify-content: flex-end; }
    .bottom-summary .cell .icon.corner {
      display: inline-block;
      width: 12px;
      height: 12px;
      border-radius: 0 0 0 12px;
      background: #6c7480;
    }
    .bottom-summary .cell .card-pip {
      display: inline-block;
      width: 9px;
      height: 13px;
      border-radius: 1px;
    }
    .bottom-summary .cell .card-pip.yellow { background: #ffce3a; }
    .bottom-summary .cell .card-pip.red    { background: #e23a3a; }
    /* Timeline card chips drawn in CSS (not emoji) so red & yellow render
       identically on every device — 🟥/🟨 fail on some Android emoji fonts. */
    .tl-card { display: inline-block; width: 9px; height: 12px; border-radius: 2px;
      vertical-align: -1px; margin: 0 1px; box-shadow: 0 1px 1px rgba(0,0,0,0.25); }
    .tl-card--yellow { background: #ffce3a; }
    .tl-card--red { background: #e23a3a; }

    /* Possession bar — real ball-possession % from TheSports stat 25. */
    .possession {
      min-width: 0;
      padding: 0 10px;
    }
    .possession-row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 8px;
      font-size: 0.78rem;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .possession-row .label {
      text-align: center;
      color: #6c7480;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 0.7rem;
    }
    .possession-row .pct.home { color: #1564d4; text-align: left; }
    .possession-row .pct.away { color: #c23636; text-align: right; }
    .possession-bar {
      display: flex;
      height: 8px;
      border-radius: 99px;
      overflow: hidden;
      background: #eef0f4;
    }
    .possession-bar .fill {
      transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .possession-bar .fill.home { background: linear-gradient(90deg, #1564d4, #2a8bff); }
    .possession-bar .fill.away { background: linear-gradient(90deg, #ff8a8a, #c23636); }

    /* Real attack / shots stat rows — mirrored bars with the label centered. */
    .bottom-stats-rows {
      margin-top: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .bottom-stat-row {
      display: grid;
      grid-template-columns: 30px 1fr auto 1fr 30px;
      align-items: center;
      gap: 10px;
      font-size: 0.82rem;
      color: #1a1142;
    }
    .bottom-stat-row .home-val { text-align: right; font-weight: 700; }
    .bottom-stat-row .away-val { text-align: left;  font-weight: 700; }
    .bottom-stat-row .label {
      text-align: center;
      color: #6c7480;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 0.7rem;
      white-space: nowrap;
    }
    .bottom-stat-row .bar {
      height: 6px;
      border-radius: 99px;
      background: #eef0f4;
      overflow: hidden;
    }
    .bottom-stat-row .bar.home-bar { display: flex; justify-content: flex-end; }
    .bottom-stat-row .bar.away-bar { display: flex; justify-content: flex-start; }
    .bottom-stat-row .bar .fill {
      height: 100%;
      transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .bottom-stat-row .bar .fill.home { background: linear-gradient(90deg, #1564d4, #2a8bff); }
    .bottom-stat-row .bar .fill.away { background: linear-gradient(90deg, #ff8a8a, #c23636); }

    /* Ticker — recent events list (real Match.incidents rows, not synthetic). */
    .tracker-ticker {
      padding: 12px 16px 14px;
      background: #fff;
      border-top: 1px solid #eef0f4;
    }
    .tracker-ticker .ticker-head {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #6c7480;
      margin-bottom: 8px;
    }
    .tracker-ticker ul {
      list-style: none;
      padding: 0;
      margin: 0;
      max-height: 192px;
      overflow-y: auto;
    }
    .tracker-ticker li {
      display: grid;
      grid-template-columns: 36px 24px 1fr auto;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
      border-bottom: 1px solid #f3f5f9;
      font-size: 0.85rem;
      color: #1a1142;
    }
    .tracker-ticker li:last-child { border-bottom: 0; }
    .tracker-ticker li .min { font-weight: 700; color: #6c7480; font-size: 0.78rem; }
    .tracker-ticker li .icon { font-size: 1rem; line-height: 1; }
    .tracker-ticker li .player {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tracker-ticker li a {
      color: #1a1142;
      text-decoration: none;
      border-bottom: 1px dotted rgba(26, 17, 66, 0.35);
    }
    .tracker-ticker li a:hover,
    .tracker-ticker li a:focus {
      color: #1564d4;
      border-bottom-color: #1564d4;
      text-decoration: none;
    }
    .tracker-ticker li .side {
      font-size: 0.7rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #8a92a2;
    }
    .tracker-ticker li.is-home .side { color: #1564d4; }
    .tracker-ticker li.is-away .side { color: #c23636; }
    .tracker-ticker .ticker-empty {
      text-align: center;
      color: #b0b8c4;
      padding: 18px 0;
      font-size: 0.85rem;
    }

    @media (max-width: 767px) {
      .bottom-summary {
        grid-template-columns: auto auto 1fr auto auto;
        gap: 8px 10px;
      }
      .bottom-summary .cell.cards { display: none; }  /* hide cards on mobile, possession+corners only */
      .bottom-stat-row {
        grid-template-columns: 24px 1fr auto 1fr 24px;
        font-size: 0.78rem;
      }
      .tracker-score .center .scoreline { font-size: 1.5rem; }
      .tracker-score .team img { width: 32px; height: 32px; }
      .tracker-score .team .name { font-size: 0.85rem; }
    }

    /* -------- Events timeline -------- */
    .fb-events-card {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
      margin-top: 16px;
      overflow: hidden;
    }
    .fb-events-card .events-body {
      padding: 18px 16px;
      min-height: 120px;
    }
    .fb-events-card .events-empty {
      text-align: center;
      color: #b0b8c4;
      font-size: 1.4rem;
      padding: 18px 0;
    }

    /* -------- Related fixtures (same-competition recent + upcoming) --------
       Side-by-side on desktop, stacked on mobile. Each match row shows
       date/time, teams, and score (finished) or kickoff (upcoming). Gives
       match-page visitors an at-a-glance view of what's happening in the
       wider competition + internal link equity for those adjacent hubs. */
    .fb-related {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      padding: 16px 18px 18px 18px;
    }
    .fb-related .col {
      min-width: 0;
    }
    .fb-related .col h3 {
      font-size: 0.78rem;
      color: #6c757d;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin: 0 0 8px 0;
      padding-bottom: 6px;
      border-bottom: 1px solid #eef0f4;
    }
    .fb-related ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .fb-related li {
      padding: 0;
    }
    .fb-related li + li {
      border-top: 1px dashed #f1f3f5;
    }
    .fb-related a.row {
      display: grid;
      grid-template-columns: 46px 1fr auto;
      gap: 8px;
      align-items: center;
      padding: 8px 4px;
      text-decoration: none;
      color: #243447;
      transition: background 120ms ease;
      border-radius: 4px;
    }
    .fb-related a.row:hover {
      background: #f8fafc;
      text-decoration: none;
    }
    .fb-related .when {
      font-size: 0.72rem;
      color: #6c757d;
      font-weight: 600;
      white-space: nowrap;
    }
    .fb-related .when .day {
      display: block;
      font-size: 0.68rem;
      color: #8a94a6;
      font-weight: 500;
    }
    .fb-related .teams {
      min-width: 0;
      font-size: 0.82rem;
      font-weight: 600;
      line-height: 1.3;
    }
    .fb-related .teams .tm {
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .fb-related .score {
      font-variant-numeric: tabular-nums;
      font-weight: 700;
      font-size: 0.85rem;
      color: #1a1142;
      white-space: nowrap;
    }
    .fb-related .score.kick {
      color: #6c757d;
      font-weight: 500;
      font-size: 0.76rem;
    }
    .fb-related .empty {
      font-size: 0.78rem;
      color: #b0b8c4;
      padding: 8px 4px;
    }
    @media (max-width: 575.98px) {
      .fb-related {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px 14px 16px 14px;
      }
    }

    /* -------- SEO long-form card (bottom of main column) --------
       Mirrors legacy TheSportsFootballClient/templates/football/includes/match/info.html.
       Keyword-rich copy so every match page has real body content for Google
       instead of just a scoreline. Uses the same visual chrome as fb-events-card
       (navy title bar + white body) so the card feels like part of the set. */
    .fb-seo-card .fb-seo-body {
      padding: 16px 18px 20px 18px;
      color: #3a4452;
      font-size: 0.92rem;
      line-height: 1.55;
    }
    .fb-seo-card .seo-block {
      margin: 0 0 14px 0;
    }
    .fb-seo-card .seo-block:last-child {
      margin-bottom: 0;
    }
    .fb-seo-card .seo-block h3 {
      font-size: 0.98rem;
      font-weight: 700;
      color: #1a1142;
      margin: 0 0 6px 0;
      letter-spacing: -0.005em;
    }
    .fb-seo-card .seo-block p {
      margin: 0 0 6px 0;
    }
    .fb-seo-card .seo-block p:last-child {
      margin-bottom: 0;
    }
    .fb-seo-card .seo-block a {
      color: #4d2cd8;
      text-decoration: none;
      font-weight: 500;
    }
    .fb-seo-card .seo-block a:hover {
      text-decoration: underline;
    }
    .fb-seo-card .seo-stats-list {
      margin: 4px 0 0 0;
      padding: 0 0 0 18px;
      color: #4a5364;
    }
    .fb-seo-card .seo-stats-list li {
      margin: 2px 0;
    }
    .fb-seo-card .seo-teams-inline {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      margin: 4px 0 0 0;
      padding: 0;
      list-style: none;
    }
    .fb-seo-card .seo-teams-inline li {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .fb-seo-card .seo-teams-inline img {
      width: 18px;
      height: 18px;
      object-fit: contain;
    }
    /* FAQ Q&A pairs inside the SEO card — smaller question heading */
    /* than an <h3> so the visual hierarchy stays: card-title > section  */
    /* heading > faq question.                                          */
    .fb-seo-card .seo-block .faq-q {
      font-size: 0.92rem;
      font-weight: 600;
      color: #1a1142;
      margin: 10px 0 3px 0;
      letter-spacing: -0.003em;
    }
    .fb-seo-card .seo-block .faq-q:first-of-type {
      margin-top: 2px;
    }
    .fb-seo-card .seo-block .faq-a {
      margin: 0 0 6px 0;
      color: #4a5364;
    }
    @media (max-width: 575px) {
      .fb-seo-card .fb-seo-body {
        padding: 14px 14px 16px 14px;
        font-size: 0.88rem;
      }
      .fb-seo-card .seo-block h3 {
        font-size: 0.94rem;
      }
    }

    /* Classic timeline (same as before but wrapped by the card) */
    /* ===== Match timeline — centre spine, circular minute badges, notched
       event cards with player avatars (AiScore-style, brand-coloured). ===== */
    .match-timeline {
      position: relative;
      padding: 8px 0 34px 0;
    }
    .match-timeline::before {                 /* the spine */
      content: "";
      position: absolute;
      top: 4px; bottom: 26px;
      left: 50%;
      width: 2px;
      background: #d7ddf3;
      transform: translateX(-1px);
    }
    .match-timeline::after {                   /* clock at the base of the spine */
      content: "";
      position: absolute; left: 50%; bottom: 0;
      width: 24px; height: 24px; transform: translateX(-50%);
      border-radius: 50%;
      background: #fff center/15px 15px no-repeat;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E80F1' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
      box-shadow: 0 0 0 3px #fff, 0 0 0 4px #d7ddf3;
    }
    .timeline-item {
      display: grid;
      grid-template-columns: 1fr 44px 1fr;
      align-items: center;
      gap: 10px;
      padding: 6px 0;
      position: relative;
    }
    /* circular minute badge, on the spine */
    .timeline-item .minute {
      grid-column: 2; justify-self: center;
      width: 36px; height: 36px; min-width: 0; padding: 0;
      display: flex; align-items: center; justify-content: center;
      border-radius: 50%;
      background: #3E80F1; color: #fff;
      font-weight: 700; font-size: 0.7rem; line-height: 1;
      box-shadow: 0 0 0 4px #fff;
      position: relative; z-index: 2;
    }
    .timeline-item.goal .minute { background: #1a1142; }
    /* event card box — holds one or more stacked player chips */
    .timeline-item .home-body,
    .timeline-item .away-body {
      position: relative; min-height: 42px;
      background: #fff; border: 1px solid #e7eaf3; border-radius: 11px;
      padding: 8px 12px; font-size: 0.9rem; line-height: 1.25;
      box-shadow: 0 1px 2px rgba(20, 20, 60, .05);
      display: flex; flex-direction: column; gap: 8px;
    }
    .timeline-item.home .home-body { grid-column: 1; justify-self: end; text-align: right; align-items: flex-end; }
    .timeline-item.away .away-body { grid-column: 3; justify-self: start; text-align: left; align-items: flex-start; }
    .timeline-item.home .away-body,
    .timeline-item.away .home-body { display: none; }
    /* notch pointing at the spine */
    .timeline-item .home-body::after,
    .timeline-item .away-body::after {
      content: ""; position: absolute; top: 50%;
      width: 9px; height: 9px; background: #fff;
      border: 1px solid #e7eaf3; transform: translateY(-50%) rotate(45deg);
    }
    .timeline-item.home .home-body::after { right: -5px; border-left: 0; border-bottom: 0; }
    .timeline-item.away .away-body::after { left: -5px; border-right: 0; border-top: 0; }
    /* per-type card accent */
    .timeline-item.goal .home-body,   .timeline-item.goal .away-body   { border-color: #bfe3c8; }
    .timeline-item.yellow .home-body, .timeline-item.yellow .away-body { border-color: #f6e2a0; }
    .timeline-item.red .home-body,    .timeline-item.red .away-body    { border-color: #f2b6b6; }
    .timeline-item.sub .home-body,    .timeline-item.sub .away-body    { border-color: #c4d6f7; }
    /* a player chip: photo (with corner role badge) + name */
    .tl-chip { display: flex; align-items: center; gap: 9px; max-width: 100%; }
    .timeline-item.home .tl-chip { flex-direction: row-reverse; }
    .tl-ava {
      position: relative; flex: 0 0 auto;
      width: 36px; height: 36px; border-radius: 50%;
      background: #eef1fa; display: flex; align-items: center; justify-content: center;
    }
    .tl-ava--sm { width: 30px; height: 30px; }
    .tl-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
    .tl-ini { font-weight: 700; font-size: 0.82rem; color: #6E6896; }
    .tl-ava--sm .tl-ini { font-size: 0.72rem; }
    .tl-badge {
      position: absolute; right: -3px; bottom: -3px;
      width: 17px; height: 17px; border-radius: 50%;
      background: #fff; box-shadow: 0 0 0 1.5px #fff;
      display: flex; align-items: center; justify-content: center;
    }
    .tl-badge svg { width: 14px; height: 14px; display: block; }
    .tl-badge--card { width: 11px; height: 15px; border-radius: 2px; }
    .tl-badge--yellow { background: #f5c518; }
    .tl-badge--red { background: #e23a3a; }
    /* names */
    .tl-nm { font-weight: 700; font-size: 0.9rem; color: #1A1142; min-width: 0; }
    .tl-nm a { color: inherit; text-decoration: none; }
    .tl-nm a:hover { color: #3E80F1; }
    .tl-nm--minor { font-weight: 600; font-size: 0.82rem; color: #4a4470; }
    .tl-in { color: #1a8f3c; }
    .tl-out { color: #c0392b; }
    .timeline-item .text-muted { color: #8985AE; }
    .timeline-item small.text-muted { font-size: 0.72rem; font-weight: 500; }
    .tl-nm .score-snap {
      display: inline-block; background: #1A1142; color: #fff; border-radius: 5px;
      padding: 1px 7px; margin-left: 4px; font-weight: 700; font-size: 0.72rem;
    }
    .tl-varbox { font-weight: 800; font-size: 0.68rem; color: #563EF1; border: 1.5px solid #563EF1; border-radius: 4px; padding: 2px 5px; letter-spacing: .03em; }
    /* card chips (also used in the legend) */
    .tl-card { display: inline-block; vertical-align: middle; width: 12px; height: 16px; border-radius: 2px; }
    .tl-card--yellow { background: #f5c518; }
    .tl-card--red { background: #e23a3a; }
    /* legend icons */
    .fb-legend .legend-grid > div { display: flex; align-items: center; gap: 7px; }
    .lg-ico { display: inline-flex; align-items: center; }
    .lg-ico svg { width: 18px; height: 18px; display: block; }
    .lg-ico--sub svg { width: 15px; height: 15px; }
    .lg-var { font-weight: 800; font-size: 0.64rem; color: #563EF1; border: 1.5px solid #563EF1; border-radius: 4px; padding: 1px 4px; }
    /* neutral / unknown */
    .timeline-item.neutral { grid-template-columns: 1fr; justify-items: center; }
    .timeline-item.neutral .minute { grid-column: auto; }
    .timeline-item.neutral .body { text-align: center; color: #8985AE; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
    @media (max-width: 560px) {
      .timeline-item { grid-template-columns: 1fr 38px 1fr; gap: 6px; }
      .tl-ava { width: 32px; height: 32px; }
    }
    /* Full-width FT / HT divider rows — same idea as the old half-time row. */
    .timeline-divider {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 14px 0 6px 0;
      position: relative;
    }
    .timeline-divider::before,
    .timeline-divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: #e4e7eb;
    }
    .timeline-divider .badge-text {
      flex: 0 0 auto;
      background: #f1f3f5;
      color: #243447;
      border: 1px solid #e4e7eb;
      border-radius: 999px;
      padding: 4px 14px;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .timeline-divider.ft .badge-text {
      background: #1a1142;
      color: #fff;
      border-color: #1a1142;
    }

    /* -------- Legend -------- */
    .fb-legend {
      padding: 14px 16px;
      font-size: 0.82rem;
      color: #6c757d;
      border-top: 1px solid #f1f3f5;
    }
    .fb-legend .legend-title {
      font-weight: 600;
      color: #1a2332;
      margin-bottom: 8px;
    }
    .fb-legend .legend-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px 18px;
    }
    @media (max-width: 767px) {
      .fb-legend .legend-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* -------- Right sidebar cards -------- */
    .fb-side-card {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
      margin-bottom: 16px;
      overflow: hidden;
    }
    .fb-side-card .side-head {
      background: #f2f4f8;
      color: #1a1142;
      border-bottom: 1px solid #e4e7ef;
      padding: 10px 16px;
      font-size: 0.9rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .fb-side-card .side-body {
      padding: 14px 16px;
    }

    /* Voting — client-side widget (localStorage, no backend).
       Buttons use soft radius with emphasized logo; after voting, buttons
       lock and a 1 / X / 2 horizontal bar chart reveals the distribution. */
    .fb-voting .vote-options {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin-top: 4px;
    }
    .fb-voting .vote-btn {
      background: #fff;
      border: 1px solid #e4e7eb;
      border-radius: 8px;
      padding: 10px 6px;
      font-size: 0.78rem;
      cursor: pointer;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      font-weight: 600;
      color: #34384a;
      transition: border-color 0.15s, background 0.15s, transform 0.15s;
    }
    .fb-voting .vote-btn:hover {
      border-color: #1a1142;
      background: #f8f9fb;
      transform: translateY(-1px);
    }
    .fb-voting .vote-btn:disabled {
      cursor: default;
      opacity: 0.85;
      transform: none;
    }
    .fb-voting .vote-btn:disabled:hover {
      border-color: #e4e7eb;
      background: #fff;
      transform: none;
    }
    .fb-voting .vote-btn.is-selected {
      border-color: #1a1142;
      background: #1a1142;
      color: #fff;
    }
    .fb-voting .vote-btn img {
      width: 24px;
      height: 24px;
      object-fit: contain;
    }
    .fb-voting .vote-label {
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    .fb-voting .vote-label--big {
      font-size: 1.1rem;
    }
    .fb-voting .vote-sub {
      font-size: 0.68rem;
      color: #8a94a6;
      font-weight: 500;
    }
    .fb-voting .vote-btn.is-selected .vote-sub {
      color: #c7c2e8;
    }
    .fb-voting .vote-results {
      margin-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .fb-voting .vote-result-row {
      display: grid;
      grid-template-columns: 16px 1fr 38px;
      align-items: center;
      gap: 8px;
    }
    .fb-voting .vote-result-label {
      font-size: 0.72rem;
      font-weight: 700;
      color: #6c757d;
      text-align: center;
    }
    .fb-voting .vote-result-bar {
      height: 8px;
      background: #eef0f4;
      border-radius: 999px;
      overflow: hidden;
    }
    .fb-voting .vote-result-fill {
      height: 100%;
      background: #1a1142;
      border-radius: 999px;
      transition: width 400ms ease;
    }
    .fb-voting .vote-result-fill.is-draw {
      background: #8a94a6;
    }
    .fb-voting .vote-result-fill.is-away {
      background: #e85a4f;
    }
    .fb-voting .vote-result-pct {
      font-size: 0.72rem;
      font-weight: 700;
      color: #34384a;
      font-variant-numeric: tabular-nums;
      text-align: right;
    }
    .fb-voting .vote-foot {
      text-align: center;
      font-size: 0.76rem;
      color: #6c757d;
      margin-top: 10px;
    }

    /* Chat */
    .fb-chat .chat-body {
      min-height: 180px;
      max-height: 320px;
      overflow-y: auto;
      background: #fff;
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-size: 0.85rem;
    }
    .fb-chat .chat-msg {
      display: flex;
      flex-direction: column;
      line-height: 1.3;
    }
    .fb-chat .chat-msg .who {
      font-size: 0.7rem;
      color: #1a1142;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .fb-chat .chat-msg .what {
      color: #243447;
      word-wrap: break-word;
      overflow-wrap: anywhere;
    }
    .fb-chat .chat-msg .when {
      font-size: 0.65rem;
      color: #b0b8c4;
    }
    .fb-chat .chat-empty {
      color: #b0b8c4;
      font-size: 0.78rem;
      text-align: center;
      padding: 24px 8px;
    }
    .fb-chat .chat-error {
      color: #c0392b;
      font-size: 0.72rem;
      padding: 4px 14px;
    }
    .fb-chat .chat-compose {
      border-top: 1px solid #f1f3f5;
      background: #fff;
      padding: 10px 14px;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .fb-chat .chat-input {
      flex: 1;
      border: 1px solid #e4e7eb;
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 0.85rem;
      outline: none;
      background: #fff;
      /* Explicit text color — global .chat-input rule in main.min.css
         cascades height/overflow/border, and the .fb-chat descendant
         selector above wins specificity, so without an explicit color
         the typed text renders in the inherited foreground (which is
         set to #fff by the surrounding panel on some layouts → invisible). */
      color: #1a1142;
      -webkit-text-fill-color: #1a1142;
      caret-color: #1a1142;
    }
    .fb-chat .chat-input::placeholder {
      color: #8985ae;
      -webkit-text-fill-color: #8985ae;
      opacity: 1;
    }
    .fb-chat .chat-input:focus { border-color: #1a1142; }
    .fb-chat .send-btn {
      background: #0d6efd;
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 8px 16px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .fb-chat .send-btn:hover { background: #0b5ed7; }
    .fb-chat .send-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
    .fb-chat .chat-foot {
      text-align: center;
      padding: 8px 0;
      color: #6c757d;
      font-size: 0.8rem;
      cursor: pointer;
      border-top: 1px solid #f1f3f5;
      background: #f8f9fb;
    }

    /* Stats side-card */
    .fb-stats-side .stats-match-label {
      display: inline-block;
      background: #e7e9f0;
      color: #1a1142;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-radius: 999px;
      padding: 3px 10px;
      margin-bottom: 10px;
    }
    .fb-stats-side .stats-team-header,
    #stats .stats-team-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
      font-weight: 600;
      font-size: 0.88rem;
    }
    .fb-stats-side .stats-team-header > span,
    #stats .stats-team-header > span {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex: 1 1 50%;
    }
    .fb-stats-side .stats-team-header > span + span,
    #stats .stats-team-header > span + span {
      justify-content: flex-end;
      text-align: right;
    }
    .fb-stats-side .stats-team-header img,
    #stats .stats-team-header img {
      width: 20px; height: 20px;
      flex-shrink: 0;
    }
    /* Main-column Match Stats card — wider bars than the sidebar variant
       to fill the col-lg-8 container nicely on desktop. */
    #stats .stat-bar {
      max-width: 560px;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 14px;
    }
    .stat-bar {
      margin-bottom: 10px;
    }
    .stat-bar .stat-label {
      text-align: center;
      font-size: 0.82rem;
      font-weight: 600;
      color: #1a2332;
      margin-bottom: 4px;
    }
    .stat-bar .stat-row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
    }
    .stat-bar .home-val,
    .stat-bar .away-val {
      font-weight: 700;
      min-width: 22px;
    }
    .stat-bar .home-val { text-align: right; }
    .stat-bar .away-val { text-align: left; }
    .stat-bar .bar {
      background: #eef0f5;
      border-radius: 999px;
      height: 8px;
      overflow: hidden;
      display: flex;
    }
    .stat-bar .bar .fill-home { background: #0d6efd; height: 100%; }
    .stat-bar .bar .fill-away { background: #198754; height: 100%; }

    /* About the match */
    .fb-about .about-line {
      margin-bottom: 8px;
      font-size: 0.88rem;
    }
    .fb-about .about-line .label {
      font-weight: 600;
      color: #1a2332;
    }
    .fb-about .about-line a {
      color: #0d6efd;
      text-decoration: none;
    }
    .fb-about .about-line a:hover { text-decoration: underline; }
    .fb-about .about-line__badge {
      display: inline-block;
      margin-left: 6px;
      padding: 1px 7px;
      border-radius: 10px;
      font-size: 0.66rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      vertical-align: middle;
      white-space: nowrap;
    }
    .fb-about .about-line__badge--green { background: #e3f5e9; color: #19703a; }
    .fb-about .about-line__badge--amber { background: #fff4d6; color: #8a5a00; }
    .fb-about .about-line__badge--blue  { background: #e3eefa; color: #1a5298; }
    .fb-about .show-more {
      display: block;
      text-align: center;
      margin-top: 10px;
      color: #6c757d;
      font-size: 0.85rem;
      text-decoration: none;
    }

    /* ======== H2H tab — summary bar + history list ======== */
    .h2h-summary {
      padding: 1rem 1.25rem 1.25rem;
      border-bottom: 1px solid #eef0f4;
    }
    .h2h-summary .nums {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 0.5rem 1rem;
      align-items: center;
      margin-bottom: 0.75rem;
    }
    .h2h-summary .num-cell {
      text-align: center;
    }
    .h2h-summary .num-cell .n {
      display: block;
      font-size: 1.6rem;
      font-weight: 700;
      line-height: 1;
      letter-spacing: -0.01em;
    }
    .h2h-summary .num-cell .n.home { color: #1e73e8; }
    .h2h-summary .num-cell .n.draw { color: #6c7480; }
    .h2h-summary .num-cell .n.away { color: #dc3545; }
    .h2h-summary .num-cell .lbl {
      display: block;
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #6c7480;
      margin-top: 0.25rem;
    }
    .h2h-summary .meetings-total {
      text-align: center;
      font-size: 0.72rem;
      color: #6c7480;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      padding: 0 0.5rem;
    }
    .h2h-summary .meetings-total strong {
      display: block;
      color: #1a1142;
      font-size: 1.05rem;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0;
      text-transform: none;
      margin-bottom: 2px;
    }
    .h2h-bar {
      display: flex;
      height: 8px;
      border-radius: 4px;
      overflow: hidden;
      background: #eef0f4;
    }
    .h2h-bar .seg.home { background: #1e73e8; }
    .h2h-bar .seg.draw { background: #adb5bd; }
    .h2h-bar .seg.away { background: #dc3545; }
    .h2h-bar-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 0.35rem;
      font-size: 0.7rem;
      color: #6c7480;
      font-weight: 600;
    }
    .h2h-meetings-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .h2h-meetings-list li {
      display: grid;
      grid-template-columns: 78px 1fr 60px 1fr 28px;
      align-items: center;
      gap: 0.75rem;
      padding: 0.6rem 1.25rem;
      border-bottom: 1px solid #f1f3f5;
      font-size: 0.85rem;
    }
    .h2h-meetings-list li:last-child { border-bottom: none; }
    .h2h-meetings-list li:hover { background: #fafbfc; }
    .h2h-meetings-list .date { color: #6c7480; font-size: 0.72rem; }
    .h2h-meetings-list .home-name {
      text-align: right;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .h2h-meetings-list .home-name.bold { font-weight: 700; }
    .h2h-meetings-list .score {
      text-align: center;
      font-weight: 700;
      background: #f6f7fa;
      border-radius: 4px;
      padding: 3px 0;
      font-variant-numeric: tabular-nums;
    }
    .h2h-meetings-list .away-name {
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .h2h-meetings-list .away-name.bold { font-weight: 700; }
    .h2h-meetings-list .result-pill {
      display: inline-block;
      width: 20px;
      height: 20px;
      line-height: 20px;
      border-radius: 50%;
      text-align: center;
      font-size: 0.62rem;
      font-weight: 700;
      color: #fff;
      justify-self: center;
    }
    .h2h-meetings-list .result-pill.w { background: #198754; }
    .h2h-meetings-list .result-pill.d { background: #6c757d; }
    .h2h-meetings-list .result-pill.l { background: #dc3545; }

    /* ======== Standings tab ======== */
    .standings-table {
      width: 100%;
      min-width: 520px;
      border-collapse: collapse;
      font-size: 0.85rem;
    }
    .standings-table thead th {
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #6c7480;
      font-weight: 600;
      padding: 0.6rem 0.4rem;
      border-bottom: 1px solid #eef0f4;
      background: #fafbfc;
      text-align: center;
    }
    .standings-table thead th.team-col { text-align: left; padding-left: 1rem; }
    .standings-table tbody td {
      padding: 0.55rem 0.4rem;
      border-bottom: 1px solid #f1f3f5;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .standings-table tbody tr:last-child td { border-bottom: none; }
    .standings-table tbody td.pos {
      width: 34px;
      font-weight: 700;
      color: #6c7480;
    }
    .standings-table tbody td.team {
      text-align: left;
      padding-left: 0.6rem;
    }
    .standings-table tbody td.team a {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #1a1142;
      text-decoration: none;
      font-weight: 500;
      max-width: 100%;
      overflow: hidden;
    }
    .standings-table tbody td.team a .logo {
      width: 18px;
      height: 18px;
      object-fit: contain;
      flex-shrink: 0;
    }
    .standings-table tbody td.team a .name {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .standings-table tbody td.pts { font-weight: 700; color: #1a1142; }
    .standings-table tbody tr.is-home,
    .standings-table tbody tr.is-away {
      background: rgba(30, 115, 232, 0.06);
    }
    .standings-table tbody tr.is-away {
      background: rgba(220, 53, 69, 0.06);
    }
    .standings-table tbody tr.is-home td.pos { color: #1e73e8; }
    .standings-table tbody tr.is-away td.pos { color: #dc3545; }
    .standings-table .form-pills {
      display: inline-flex;
      gap: 2px;
      justify-content: center;
    }
    .standings-table .form-pill {
      display: inline-block;
      width: 14px;
      height: 14px;
      line-height: 14px;
      border-radius: 50%;
      font-size: 0.56rem;
      font-weight: 700;
      color: #fff;
      text-align: center;
    }
    .standings-table .form-pill.w { background: #198754; }
    .standings-table .form-pill.d { background: #6c757d; }
    .standings-table .form-pill.l { background: #dc3545; }
    .standings-scroll { overflow-x: auto; }
    @media (max-width: 575px) {
      .standings-table tbody td.team a .name { max-width: 90px; }
      .standings-table thead th.form-col,
      .standings-table tbody td.form-col { display: none; }
    }

    /* ======== Lineups tab — smart empty state ======== */
    .lineups-empty {
      padding: 2rem 1.5rem;
      text-align: center;
    }
    .lineups-empty .icon {
      display: inline-flex;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: linear-gradient(135deg, #f6f7fa 0%, #eef0f4 100%);
      align-items: center;
      justify-content: center;
      margin-bottom: 0.75rem;
      font-size: 1.6rem;
    }
    .lineups-empty .msg {
      font-size: 0.92rem;
      color: #1a1142;
      font-weight: 600;
      margin: 0 0 0.25rem;
    }
    .lineups-empty .sub {
      font-size: 0.78rem;
      color: #6c7480;
      margin: 0;
    }
    .lineups-empty .teams-row {
      display: flex;
      justify-content: center;
      gap: 1.25rem;
      margin-top: 1.25rem;
      padding-top: 1.25rem;
      border-top: 1px solid #eef0f4;
    }
    .lineups-empty .teams-row .t {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.82rem;
      color: #1a1142;
      text-decoration: none;
      font-weight: 600;
    }
    .lineups-empty .teams-row .t img {
      width: 22px;
      height: 22px;
      object-fit: contain;
    }

    /* ======== Lineups tab — real data render ======== */
    .lineups-head {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 1rem;
      align-items: center;
      padding: 14px 16px 10px;
      border-bottom: 1px solid #eef0f4;
    }
    .lineups-head .team-side {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      min-width: 0;
    }
    .lineups-head .team-side.away {
      justify-content: flex-end;
    }
    .lineups-head .team-side img {
      width: 28px;
      height: 28px;
      object-fit: contain;
      flex-shrink: 0;
    }
    .lineups-head .team-side .meta {
      display: flex;
      flex-direction: column;
      line-height: 1.15;
      min-width: 0;
    }
    .lineups-head .team-side.away .meta {
      align-items: flex-end;
    }
    .lineups-head .team-side .team-name {
      font-size: 0.86rem;
      font-weight: 700;
      color: #1a1142;
      text-decoration: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .lineups-head .team-side .formation {
      font-size: 0.72rem;
      color: #6c7480;
      font-weight: 500;
      letter-spacing: 0.02em;
    }
    .lineups-head .vs-divider {
      font-size: 0.72rem;
      font-weight: 700;
      color: #b0b8c4;
      padding: 0 0.25rem;
    }
    .lineup-confirmed-badge {
      display: inline-block;
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding: 2px 8px;
      border-radius: 999px;
      background: #e6f6ed;
      color: #1f8a4c;
      margin-top: 2px;
    }
    .lineup-confirmed-badge.provisional {
      background: #fff4e5;
      color: #b86e00;
    }

    /* ======== Lineups — pitch visualisation ========
       Portrait pitch with both teams placed by their TheSports x/y (0-100).
       Home team attacks the top half (GK at bottom); away team attacks the
       bottom half (GK at top). Subs with x=y=0 are excluded (the bench is
       rendered in the list below). Mirrors the aiscore.com layout pattern. */
    .lineups-pitch {
      position: relative;
      margin: 12px;
      aspect-ratio: 8 / 5;
      background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 9.09%, rgba(255,255,255,0) 9.09% 18.18%),
        linear-gradient(90deg, #1e8c47 0%, #2aa057 50%, #1e8c47 100%);
      border-radius: 8px;
      overflow: hidden;
      color: #fff;
      font-family: "Helvetica Neue", Arial, sans-serif;
    }
    /* Pitch markings — vertical halfway line + centre circle. */
    .lineups-pitch::before,
    .lineups-pitch::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }
    .lineups-pitch::before {
      top: 0; bottom: 0; left: 50%;
      width: 2px; margin-left: -1px;
      background: rgba(255,255,255,0.55);
    }
    .lineups-pitch::after {
      top: 50%; left: 50%;
      width: 22%; aspect-ratio: 1;
      transform: translate(-50%, -50%);
      border: 2px solid rgba(255,255,255,0.5);
      border-radius: 50%;
      background: transparent;
    }
    /* Penalty boxes at the two ends (goal lines). */
    .lineups-pitch__box {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      height: 58%;
      width: 15%;
      border: 2px solid rgba(255,255,255,0.5);
      pointer-events: none;
    }
    .lineups-pitch__box--top { left: 0; border-left: 0; }
    .lineups-pitch__box--bot { right: 0; border-right: 0; }
    /* Each XI fills half the width; home left, away right. */
    .pitch-side {
      position: absolute;
      top: 0;
      width: 50%;
      height: 100%;
    }
    .pitch-side--home { left: 0; }
    .pitch-side--away { right: 0; }
    .pitch-player {
      position: absolute;
      width: 0; height: 0;
      text-align: center;
      pointer-events: auto;
    }
    .pitch-player__link,
    .pitch-player__link:hover,
    .pitch-player__link:focus {
      color: inherit;
      text-decoration: none;
      cursor: pointer;
    }
    .pitch-player__link:hover .pitch-player__name { text-decoration: underline; }
    .pitch-player__shirt,
    .pitch-player__photo {
      display: block;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      margin: 0 auto;
      box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    }
    .pitch-player__shirt {
      line-height: 30px;
      font-weight: 700;
      font-size: 0.78rem;
      color: #fff;
      text-align: center;
    }
    .pitch-player__photo {
      width: 32px !important;
      height: 32px !important;
      max-width: none !important;
      object-fit: cover;
      border: 2px solid #fff;
      background: #d5dae2;
    }
    .pitch-side--home .pitch-player__shirt { background: #1a1142; }
    .pitch-side--away .pitch-player__shirt { background: #d90429; }
    .pitch-side--home .pitch-player__photo { border-color: #fff; }
    .pitch-side--away .pitch-player__photo { border-color: #fff; box-shadow: 0 0 0 1px #d90429, 0 1px 3px rgba(0,0,0,0.35); }
    .pitch-player__number {
      position: absolute;
      left: 50%;
      top: -4px;
      transform: translate(-50%, 0);
      display: inline-block;
      min-width: 16px;
      padding: 0 3px;
      height: 14px;
      line-height: 14px;
      font-size: 0.62rem;
      font-weight: 700;
      color: #1a1142;
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.35);
    }
    .pitch-player__rating {
      position: absolute;
      left: 50%;
      top: 8px;
      transform: translate(-50%, 0);
      min-width: 22px;
      padding: 0 3px;
      height: 14px;
      line-height: 14px;
      font-size: 0.6rem;
      font-weight: 700;
      color: #fff;
      border-radius: 3px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.4);
      z-index: 2;
    }
    .pitch-player__rating--hi { background: #1f9d57; }
    .pitch-player__rating--mid { background: #e0932f; }
    .pitch-player__rating--lo { background: #d1495b; }
    .pitch-player__num { color: #d7dbe4; font-weight: 700; }
    .pitch-player__name {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 22px;
      min-width: 66px;
      max-width: 116px;
      font-size: 0.66rem;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-shadow: 0 1px 2px rgba(0,0,0,0.75);
    }
    .pitch-player__name .pn-full { display: inline; }
    .pitch-player__name .pn-short { display: none; }
    .pitch-player__capt {
      display: inline-block;
      width: 12px; height: 12px; line-height: 12px;
      font-size: 9px;
      background: #ffca3a;
      color: #1a1142;
      border-radius: 50%;
      margin-left: 3px;
      vertical-align: middle;
    }
    @media (max-width: 767px) {
      /* Stay landscape on phones; shrink discs + surname-only names. */
      .lineups-pitch { aspect-ratio: 4 / 3; margin: 10px 8px; }
      .lineups-pitch__box { width: 16%; height: 54%; }
      .pitch-player__shirt,
      .pitch-player__photo { width: 26px; height: 26px; }
      .pitch-player__photo { width: 26px !important; height: 26px !important; }
      .pitch-player__shirt { line-height: 26px; font-size: 0.66rem; }
      .pitch-player__rating { top: 5px; height: 12px; line-height: 12px; min-width: 17px; font-size: 0.5rem; }
      .pitch-player__name { top: 18px; font-size: 0.56rem; min-width: 44px; max-width: 70px; line-height: 1.05; }
      .pitch-player__name .pn-full { display: none; }
      .pitch-player__name .pn-short { display: inline; }
    }

    .pitch-avg {
      position: absolute;
      top: 8px;
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.66rem;
      font-weight: 800;
      color: #fff;
      background: rgba(14,16,23,0.72);
      border-radius: 6px;
      padding: 4px 8px;
      z-index: 4;
    }
    .pitch-avg--home { left: 8px; }
    .pitch-avg--away { right: 8px; }
    .pitch-avg::before {
      content: "";
      width: 8px; height: 14px;
      border-radius: 2px;
      background: #888;
    }
    .pitch-avg--hi::before { background: #1f9d57; }
    .pitch-avg--mid::before { background: #e0932f; }
    .pitch-avg--lo::before { background: #d1495b; }
    @media (max-width: 767px) {
      .pitch-avg { font-size: 0.6rem; padding: 3px 6px; top: 6px; }
    }
    /* Surname-only + compact labels so player names don't collide near the
       centre line (full names stay in the XI list). Small centre gap too. */
    .pitch-player__name .pn-full { display: none; }
    .pitch-player__name .pn-short { display: inline; }
    .pitch-side { width: 48%; }
    @media (min-width: 768px) {
      .pitch-player__name { max-width: 96px; font-size: 0.64rem; }
    }

    .lineups-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
    }
    .lineups-grid .side {
      padding: 12px 16px 16px;
    }
    .lineups-grid .side.home {
      border-right: 1px solid #eef0f4;
    }
    .lineups-section-title {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #6c7480;
      margin: 8px 0 6px;
      padding: 0;
    }
    .lineups-section-title:first-child {
      margin-top: 0;
    }
    .lineup-player-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .lineup-player-list li {
      display: grid;
      grid-template-columns: 26px 28px 1fr auto;
      align-items: center;
      gap: 0.5rem;
      padding: 6px 4px;
      border-bottom: 1px solid #f4f5f8;
      font-size: 0.83rem;
      color: #1a1142;
    }
    .lineup-player-list li:last-child {
      border-bottom: none;
    }
    .lineup-player-list .shirt {
      text-align: center;
      font-weight: 700;
      font-size: 0.78rem;
      color: #6c7480;
      font-variant-numeric: tabular-nums;
    }
    .lineup-player-list .pos {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 18px;
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      border-radius: 3px;
      background: #eef0f4;
      color: #1a1142;
    }
    .lineup-player-list .pos.pos-g { background: #fff4e5; color: #b86e00; }
    .lineup-player-list .pos.pos-d { background: #e6f6ed; color: #1f8a4c; }
    .lineup-player-list .pos.pos-m { background: #e7effd; color: #1d4ed8; }
    .lineup-player-list .pos.pos-f { background: #fde8ea; color: #b91c1c; }
    .lineup-player-list .name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 500;
    }
    .lineup-player-list .name a {
      color: inherit;
      text-decoration: none;
    }
    .lineup-player-list .name a:hover {
      color: #1d4ed8;
      text-decoration: underline;
    }
    .lineup-player-list .captain-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: #1a1142;
      color: #fff;
      font-size: 0.58rem;
      font-weight: 700;
      margin-left: 4px;
      vertical-align: 1px;
    }
    .lineup-player-list .sub-on-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: #1f8a4c;
      color: #fff;
      font-size: 0.7rem;
      font-weight: 700;
      margin-left: 4px;
      vertical-align: 1px;
      line-height: 1;
    }
    .lineup-player-list .rating {
      font-size: 0.74rem;
      font-weight: 700;
      color: #fff;
      background: #1f8a4c;
      padding: 2px 6px;
      border-radius: 4px;
      font-variant-numeric: tabular-nums;
    }
    .lineup-player-list .rating.mid { background: #b86e00; }
    .lineup-player-list .rating.low { background: #b91c1c; }

    .lineups-coach {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      border-top: 1px solid #eef0f4;
      padding: 10px 16px;
      font-size: 0.76rem;
      color: #6c7480;
    }
    .lineups-coach .coach-cell {
      display: flex;
      align-items: baseline;
      gap: 0.4rem;
      min-width: 0;
    }
    .lineups-coach .coach-cell.away {
      justify-content: flex-end;
    }
    .lineups-coach .coach-label {
      font-weight: 700;
      text-transform: uppercase;
      font-size: 0.65rem;
      letter-spacing: 0.04em;
      color: #b0b8c4;
    }
    .lineups-coach .coach-name {
      font-weight: 600;
      color: #1a1142;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    @media (max-width: 640px) {
      .lineups-grid { grid-template-columns: 1fr; }
      .lineups-grid .side.home { border-right: none; border-bottom: 1px solid #eef0f4; }
      .lineups-coach { grid-template-columns: 1fr; gap: 4px; }
      .lineups-coach .coach-cell.away { justify-content: flex-start; }
    }
  
    /* "About the match" SEO block — collapse with a Show more toggle (content
       stays in the DOM, so it remains fully indexable). */
    .fb-seo-card.sc-clamp .fb-seo-inner {
      max-height: 380px; overflow: hidden;
      -webkit-mask-image: linear-gradient(#000 74%, transparent);
      mask-image: linear-gradient(#000 74%, transparent);
    }
    .fb-seo-card.sc-clamp.sc-clamp-open .fb-seo-inner {
      max-height: none; -webkit-mask-image: none; mask-image: none;
    }
    .fb-seo-more {
      display: block; margin: 14px auto 2px; padding: 8px 24px;
      border: 1.5px solid #d6dcf5; border-radius: 9px; background: #fff;
      color: #563EF1; font-weight: 700; font-size: .85rem; cursor: pointer;
    }
    .fb-seo-more:hover { border-color: #563EF1; background: #f6f4ff; }

    /* Team crests in H2H + "more in competition" rows */
    .h2h-crest, .rf-crest { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; margin-right: 6px; flex: 0 0 auto; }
    .h2h-sum-crest { width: 34px; height: 34px; object-fit: contain; display: block; margin: 0 auto 5px; }
    .fb-related .tm { display: flex; align-items: center; }
