:root {
  color-scheme: light;
  --ink: #132720;
  --muted: #62736a;
  --line: #dfebe2;
  --field: #f3f7f3;
  --green: #126a43;
  --green-dark: #0b5333;
  --green-pale: #e9f6ec;
  --orange: #a35416;
  --orange-pale: #fff2e2;
  --shadow: 0 16px 44px rgba(13, 50, 31, .075);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #edf5ed 0, #f7faf7 290px, #f7faf7 100%);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible { outline: 3px solid #8ce1ae; outline-offset: 2px; }

.site-shell { max-width: 1130px; min-height: 100vh; margin: 0 auto; padding: 18px 14px 24px; }
.site-header { display: flex; align-items: center; gap: 12px; padding: 8px 4px 24px; }
.brand-mark { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; background: #102821; font-size: 24px; box-shadow: 0 8px 17px rgba(16, 40, 33, .16); }
.site-header h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 2px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.app-layout { display: grid; gap: 16px; align-items: start; }
.panel { min-width: 0; border: 1px solid #e4eee6; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.match-list { padding: 20px 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-description { margin: 6px 0 20px; color: var(--muted); font-size: 13px; }
.list-controls { display: grid; gap: 10px; margin: -5px 0 16px; }
.match-search { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f9fcf9; color: var(--ink); font-size: 13px; }
.match-search::placeholder { color: #849489; }
.status-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.status-filters button { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #d8e5db; border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-filters button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.count-pill { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--green-pale); color: var(--green); font-size: 12px; font-weight: 800; text-align: center; }
.count-pill:empty { display: none; }
.match-cards { display: grid; gap: 10px; }
.match-card { display: block; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.match-card:hover { border-color: #a4d6b4; background: #f9fdf9; transform: translateY(-1px); }
.match-card[aria-current="true"] { border-color: #75bf91; background: #f2fbf4; }
.card-topline, .detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.card-topline { justify-content: space-between; }
.match-card h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.4; }
.match-card .versus { color: #8fa49a; font-size: 12px; font-weight: 500; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.card-scoreline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 10px 0 6px; }
.match-card .card-teams { display: grid; gap: 1px; margin: 0; font-size: 15px; }
.card-teams span { overflow-wrap: anywhere; }
.card-teams .versus { font-size: 10px; line-height: 1; }
.card-score { min-width: 35px; color: #7d9385; font-size: 13px; text-align: right; white-space: nowrap; }
.card-score.has-score { color: var(--ink); font-size: 18px; }
.card-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 7px 0; }
.card-odds { color: var(--muted); font-size: 11px; }
.card-link { color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.badge-demo { background: var(--orange-pale); color: var(--orange); }
.badge-ai { background: var(--green-pale); color: var(--green); }
.badge-neutral { background: #edf1ee; color: #596b61; }
.match-detail { min-height: 350px; overflow: hidden; }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px 0; }
.back-button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 0; border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 800; }
.back-button span { font-size: 20px; line-height: 1; }
.empty-detail { display: flex; min-height: 300px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 14px; border-radius: 18px; background: var(--green-pale); font-size: 29px; }
.empty-detail h2 { margin: 0; font-size: 20px; }
.empty-detail p { max-width: 280px; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.detail-hero { padding: 15px 20px 20px; border-bottom: 1px solid var(--line); }
.detail-meta { gap: 6px 8px; }
.detail-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 20px 0; }
.team-name { overflow-wrap: anywhere; font-size: clamp(18px, 5vw, 26px); font-weight: 900; line-height: 1.3; }
.team-name:last-child { text-align: right; }
.versus-large { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 10px; font-weight: 800; }
.score-center { display: grid; justify-items: center; gap: 4px; }
.versus-large.score-active { width: auto; min-width: 55px; padding: 0 8px; border-radius: 10px; color: var(--ink); font-size: 18px; white-space: nowrap; }
.half-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.detail-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 17px; }
.detail-odds { color: var(--muted); font-size: 12px; }
.match-facts { margin-top: 16px; padding: 13px; border: 1px solid #dce9df; border-radius: 14px; background: #f6faf6; }
.facts-heading { margin: 0 0 10px; color: var(--green-dark); font-size: 15px; }
.match-facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.match-fact { min-width: 0; padding: 9px 10px; border: 1px solid #e3ece5; border-left: 3px solid #59ad72; border-radius: 9px; background: #fff; }
.match-fact.fact-odds { border-left-color: #d39a38; background: #fffaf0; }
.match-fact.fact-cards { border-left-color: #7286c8; }
.match-fact.fact-special { border-left-color: #9b77c7; }
.fact-label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; }
.fact-value { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; line-height: 1.45; }
.source-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.evidence-content { padding: 6px 20px 24px; border-top: 1px solid var(--line); }
.data-heading { display: flex; align-items: center; gap: 9px; margin: 18px 0 5px; font-size: 18px; }
.data-heading::before { display: block; width: 4px; height: 23px; border-radius: 4px; background: #27a460; content: ""; }
.evidence-intro { margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.evidence-section { margin-top: 10px; border: 1px solid var(--line); border-left: 4px solid #53aa70; border-radius: 13px; background: #fff; overflow: hidden; }
.evidence-section:nth-of-type(3n + 1) { border-left-color: #5684c8; }
.evidence-section:nth-of-type(3n + 2) { border-left-color: #d39a38; }
.evidence-section:nth-of-type(3n) { border-left-color: #8a75bd; }
.evidence-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 51px; padding: 12px 14px; color: var(--ink); font-size: 15px; font-weight: 800; cursor: pointer; list-style: none; }
.evidence-summary::-webkit-details-marker { display: none; }
.evidence-summary::after { content: "⌄"; margin-left: auto; color: var(--green); font-size: 19px; line-height: .8; }
.evidence-section[open] .evidence-summary::after { transform: rotate(180deg); }
.evidence-section[open] .evidence-summary { border-bottom: 1px solid var(--line); background: #f2f8f3; }
.evidence-count { margin-left: auto; padding: 3px 8px; border-radius: 999px; background: #edf3ff; color: #526caa; font-size: 12px; font-weight: 700; white-space: nowrap; }
.result-list { display: grid; }
.result-row { padding: 12px 13px; border-bottom: 1px solid #e5edf0; background: #fff; }
.result-row:nth-child(even) { background: #f3f8ff; }
.result-row:last-child { border-bottom: 0; }
.historical-odds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.historical-odds-cell { display: grid; gap: 2px; min-width: 0; padding: 6px 8px; border: 1px solid #f0e2c4; border-radius: 7px; background: #fffaf0; }
.historical-odds-cell strong { color: #765624; font-size: 11px; }
.historical-odds-cell span { color: #493d26; font-size: 11px; overflow-wrap: anywhere; }
.result-meta, .result-extra { display: flex; flex-wrap: wrap; gap: 5px 9px; color: var(--muted); font-size: 12px; }
.result-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 7px 0; font-size: 14px; }
.result-team { overflow-wrap: anywhere; }
.result-team:last-child { text-align: right; }
.result-score { padding: 5px 9px; border: 1px solid #d5e5da; border-radius: 7px; background: #eaf5ed; color: #175c3a; font-size: 14px; white-space: nowrap; }
.result-extra span { padding: 3px 7px; border-radius: 6px; background: #e9eff8; color: #405c85; }
.record-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.record-team { min-width: 0; padding: 10px; border: 1px solid #dce9df; border-radius: 10px; background: #f5faf6; }
.record-team h4 { margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.record-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.record-value { display: grid; gap: 1px; padding: 6px 7px; border-radius: 7px; background: #fff; text-align: center; }
.record-value span { color: var(--muted); font-size: 11px; }
.record-value strong { color: var(--green-dark); font-size: 15px; }
.evidence-body { padding: 14px; }
.team-data-block + .team-data-block { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.team-data-block h4, .standing-row h4 { margin: 0; font-size: 14px; }
.data-grid { display: grid; gap: 5px; }
.data-entry { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 7px 8px; border: 1px solid #e7eee8; border-radius: 7px; background: #f9fbf9; font-size: 12px; }
.data-entry:last-child { border-bottom: 0; }
.data-key { color: var(--muted); }
.data-value { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.data-entry > .data-grid, .data-entry > .generic-list { flex-basis: 100%; padding-left: 10px; }
.generic-list { display: grid; gap: 7px; }
.generic-item { padding: 7px 9px; border-radius: 8px; background: var(--field); }
.generic-index { margin: 0 0 3px; color: var(--muted); font-size: 10px; }
.standing-list { padding: 0 10px 8px; }
.standing-list .scope-note { padding-top: 12px; }
.standing-row { padding: 11px 9px; border-bottom: 1px solid var(--line); }
.standing-row:last-child { border-bottom: 0; }
.standing-row:nth-child(even) { background: #f6f9ff; }
.standing-row.team-highlight { padding-left: 9px; border-left: 4px solid #4ab473; background: #eef8f0; }
.standing-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.standing-position { flex: 0 0 auto; min-width: 30px; padding: 3px 7px; border-radius: 6px; background: #edf1fa; color: #4c608f; font-size: 11px; font-weight: 800; text-align: center; }
.standing-group { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.standing-row .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.standing-row .data-entry { display: grid; justify-content: stretch; gap: 0; text-align: center; }
.standing-row .data-key { font-size: 11px; }
.standing-row .data-value { font-size: 14px; }
.odds-primary { display: inline-flex; margin: 0 5px 8px 0; padding: 7px 10px; border: 1px solid #f1dfb4; border-radius: 8px; background: #fff9eb; color: #765624; font-size: 13px; font-weight: 700; }
.odds-lines { margin: 4px 0 0; padding-left: 20px; color: #41554a; font-size: 13px; }
.odds-lines li + li { margin-top: 5px; }
.raw-stats-note, .missing-note { color: var(--muted); font-size: 12px; }
.raw-stats-note { margin: 0; }
.missing-note { margin: 15px 2px 0; }
.scope-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.stats-team + .stats-team { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.stats-team h4 { margin: 0 0 10px; font-size: 16px; }
.stat-scope { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; }
.stat-scope-featured { border-color: #8ac59b; background: #f2faf4; }
.stat-scope + .stat-scope { margin-top: 9px; }
.stat-scope-title { margin: 0 0 9px; color: var(--green); font-size: 13px; }
.stat-group + .stat-group { margin-top: 12px; }
.stat-group h5 { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.stat-cell { display: flex; gap: 7px; align-items: center; padding: 6px 8px; border: 1px solid #e3eee5; border-radius: 7px; background: #fff; font-size: 12px; }
.stat-cell span { color: var(--muted); }
.stat-cell strong { color: var(--ink); }
.stat-source-data { margin-top: 12px; padding: 11px; border: 1px dashed #c6d5cb; border-radius: 9px; background: #f9fbfa; }
.stat-source-data h5 { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.stat-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.stat-source-cell { display: grid; gap: 2px; min-width: 0; padding: 6px 8px; border-radius: 7px; background: #fff; }
.stat-source-cell span { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.stat-source-cell strong { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.chat-invite { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px 20px; padding: 16px; border-radius: 15px; background: #102821; color: #fff; }
.chat-invite h3 { margin: 0; font-size: 15px; }
.chat-invite p { margin: 3px 0 0; color: #b7d3bf; font-size: 12px; }
.chat-invite.chat-open { position: static; box-shadow: none; }
.ask-button { flex: 0 0 auto; padding: 10px 14px; border: 0; border-radius: 10px; background: #aef0be; color: #0b482c; font-size: 12px; font-weight: 900; }
.ask-button:hover { background: #c7f7d0; }
.chat-panel { margin: 0 20px 22px; border: 1px solid #c9dfcf; border-radius: 16px; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f2f9f3; }
.chat-header h3 { margin: 0; font-size: 14px; }
.chat-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.close-chat { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #e4eee6; color: #324e3b; font-size: 19px; }
.chat-messages { display: flex; max-height: min(45vh, 370px); min-height: 120px; flex-direction: column; gap: 12px; overflow-y: auto; padding: 16px 13px; overscroll-behavior: contain; }
.chat-welcome { max-width: 290px; margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
.message { max-width: 89%; }
.message-user { align-self: flex-end; }
.message-assistant { align-self: flex-start; }
.message-label { margin: 0 5px 4px; color: var(--muted); font-size: 10px; font-weight: 800; }
.message-user .message-label { text-align: right; }
.message-bubble { padding: 10px 13px; border-radius: 14px; background: #eef4ee; color: #283c2f; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-user .message-bubble { border-bottom-right-radius: 4px; background: #126a43; color: #fff; }
.message-assistant .message-bubble { border-bottom-left-radius: 4px; }
.message .badge { margin-top: 5px; }
.suggestions { display: flex; gap: 7px; overflow-x: auto; padding: 0 13px 13px; scrollbar-width: none; }
.suggestions::-webkit-scrollbar { display: none; }
.suggestion { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #d7e6db; border-radius: 999px; background: #fff; color: var(--green); font-size: 11px; font-weight: 700; }
.suggestion:hover { background: var(--green-pale); }
.chat-form { display: flex; align-items: center; gap: 7px; padding: 11px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #d8e4da; border-radius: 10px; background: #fff; color: var(--ink); font-size: 13px; }
.chat-form input::placeholder { color: #849489; }
.chat-form button { height: 42px; padding: 0 13px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.chat-form button:hover { background: var(--green-dark); }
.state-message { margin: 0; padding: 27px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.state-message strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 15px; }
.retry-button { margin-top: 14px; padding: 8px 13px; border: 1px solid #a6d5b1; border-radius: 9px; background: var(--green-pale); color: var(--green); font-size: 12px; font-weight: 800; }
.site-footer { padding: 20px 10px 0; color: #73867b; font-size: 11px; text-align: center; }

@media (max-width: 699px) {
  .site-shell[data-view="detail"] .match-list { display: none; }
  .site-shell[data-view="list"] .match-detail { display: none; }
  .site-header { padding-bottom: 18px; }
  .match-detail { min-height: calc(100vh - 130px); }
  .chat-invite { position: sticky; bottom: 12px; z-index: 2; box-shadow: 0 10px 27px rgba(16, 40, 33, .2); }
}

@media (min-width: 700px) {
  .site-shell { padding: 29px 24px 34px; }
  .site-header { padding-bottom: 28px; }
  .app-layout { grid-template-columns: minmax(255px, 340px) minmax(0, 1fr); gap: 20px; }
  .match-list { position: sticky; top: 20px; padding: 23px 18px; }
  .detail-toolbar { justify-content: flex-end; }
  .back-button { display: none; }
  .detail-hero { padding: 20px 28px 27px; }
  .match-facts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chat-invite, .chat-panel { margin-left: 28px; margin-right: 28px; }
  .evidence-content { padding-left: 28px; padding-right: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .match-card { transition: none; }
}

/* Compact source-style match report: shaded bars, grid headings and striped rows. */
.detail-hero { padding: 14px 15px 16px; background: #f6f7f7; }
.detail-meta { font-size: 12px; }
.detail-teams { margin: 14px 0; padding: 12px 10px; border: 1px solid #d7dfe2; background: #fff; }
.team-name { font-size: clamp(16px, 4.2vw, 22px); }
.versus-large.score-active { background: #eef6fb; }
.detail-state { margin: 0 0 10px; }
.detail-odds { padding: 3px 7px; border: 1px solid #d5dfe3; border-radius: 5px; background: #fff; }
.source-line { margin-top: 8px; font-size: 11px; }
.source-panel { min-width: 0; margin: 10px 12px; border: 1px solid #bbc6cd; border-radius: 2px; background: #fff; }
.source-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 10px; background: #5d6770; color: #fff; }
.source-bar h3 { margin: 0; font-size: 14px; font-weight: 800; }
.source-count { flex: 0 0 auto; padding: 2px 7px; border: 1px solid rgba(255,255,255,.42); border-radius: 2px; color: #fff; font-size: 11px; }
.table-viewport { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #8898a2 #e6ebee; }
.source-table { width: 100%; border-collapse: collapse; color: #17252c; font-size: 12px; line-height: 1.35; }
.source-table th, .source-table td { padding: 6px 7px; border: 1px solid #fff; text-align: center; vertical-align: middle; white-space: nowrap; }
.source-table th { position: sticky; top: 0; background: #eef0f1; color: #28353a; font-weight: 700; }
.source-table tbody tr:nth-child(odd) { background: #d6edf7; }
.source-table tbody tr:nth-child(even) { background: #b7dfee; }
.source-table tbody tr:hover { background: #ffeab4; }
.source-table td { background: transparent; }
.source-table td:first-child, .source-table th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 #fff; }
.source-table th:first-child { z-index: 2; background: #e3e8eb; }
.source-table tbody tr:nth-child(odd) td:first-child { background: #c5e2ee; }
.source-table tbody tr:nth-child(even) td:first-child { background: #a5d2e3; }
.source-table .competition-tag { display: inline-block; max-width: 120px; padding: 3px 6px; overflow: hidden; border-radius: 2px; color: #fff; text-overflow: ellipsis; vertical-align: middle; }
.competition-red { background: #c92d37; }
.competition-blue { background: #365dad; }
.competition-green { background: #59833d; }
.competition-gold { background: #a8893e; }
.competition-purple { background: #79599a; }
.history-table { min-width: 900px; font-size: 12px; }
.history-table th:nth-child(1), .history-table td:nth-child(1) { min-width: 72px; }
.history-table th:nth-child(2), .history-table td:nth-child(2) { min-width: 65px; }
.history-table th:nth-child(3), .history-table td:nth-child(3), .history-table th:nth-child(5), .history-table td:nth-child(5) { min-width: 118px; text-align: center; }
.history-table th:nth-child(4), .history-table td:nth-child(4) { min-width: 58px; color: #174ea1; font-weight: 800; }
.team-history-table th:nth-child(6), .team-history-table td:nth-child(6) { min-width: 48px; }
.team-history-table th:nth-child(7), .team-history-table td:nth-child(7), .team-history-table th:nth-child(8), .team-history-table td:nth-child(8) { min-width: 52px; }
.team-history-table th:nth-child(9), .team-history-table td:nth-child(9) { min-width: 105px; }
.team-history-table th:nth-child(10), .team-history-table td:nth-child(10) { min-width: 62px; }
.head-to-head-table th:nth-child(6), .head-to-head-table td:nth-child(6), .head-to-head-table th:nth-child(7), .head-to-head-table td:nth-child(7) { min-width: 52px; }
.head-to-head-table th:nth-child(8), .head-to-head-table td:nth-child(8) { min-width: 105px; }
.head-to-head-table th:nth-child(9), .head-to-head-table td:nth-child(9) { min-width: 62px; }
.match-fact-table { min-width: 720px; }
.match-fact-table th { background: #e7ebed; }
.match-fact-table td { font-weight: 700; }
.record-table { min-width: 360px; max-width: 660px; }
.record-table tbody td:not(:first-child) { min-width: 65px; font-weight: 700; }
.fixture-table { min-width: 640px; table-layout: fixed; }
.fixture-table td:nth-child(3) { min-width: 250px; text-align: center; }
.fixture-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; }
.fixture-team { display: block; min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.fixture-vs { color: #66757b; font-size: 10px; font-weight: 800; }
.standing-table { min-width: 690px; }
.standing-table th { background: #f2c900; color: #202a2e; }
.standing-table th:first-child { background: #f2c900; }
.standing-table td:last-child { min-width: 110px; text-align: left; }
.standing-group-row th { padding: 4px 8px; background: #e4e6e7; color: #38434a; text-align: left; }
.standing-table tbody tr:nth-child(even) { background: #d9e9ef; }
.standing-table tbody tr:nth-child(odd) { background: #eef5f7; }
.standing-table tbody tr.standing-team-highlight { background: #9bc9ee; }
.standing-team-name { text-align: center; }
.league-odds-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 11px; }
.league-odds-table th, .league-odds-table td { min-width: 0; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.league-odds-table th { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.league-odds-table th:first-child, .league-odds-table td:first-child { width: 20%; min-width: 0; text-align: center; }
.league-odds-table th:nth-child(9), .league-odds-table td:nth-child(9) { width: 12%; }
.league-odds-table th:last-child, .league-odds-table td:last-child { width: 16%; }
.league-odds-team-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds-table { min-width: 480px; }
.stat-table { min-width: 420px; }
.stat-table td:nth-child(1), .stat-table td:nth-child(2) { text-align: left; }
.stat-table td:last-child { min-width: 75px; font-weight: 700; }
.evidence-content { padding: 6px 0 20px; border-top: 1px solid #cbd4d8; }
.stats-body { padding: 0; }
.stats-team { margin: 0; padding: 0; border: 0; }
.stats-team + .stats-team { margin-top: 12px; padding-top: 0; border-top: 0; }
.stats-team-title { margin: 0; padding: 7px 10px; background: #5367b4; color: #fff; font-size: 14px; }
.stats-scope { margin: 0; padding: 0 9px 10px; border: 0; border-radius: 0; background: #fff; }
.stat-scope-title { margin: 0 -9px; padding: 5px 10px; background: #e6e8f0; color: #313c62; font-size: 12px; }
.fixture-tables { padding: 0 10px 10px; }
.team-data-block { margin-top: 8px; border: 1px solid #ccd5d9; }
.team-data-block > h4 { padding: 6px 9px; background: #e8ecee; font-size: 13px; }
.standing-list, .evidence-body { padding: 0; }
.missing-note { margin: 10px 14px; padding: 7px 9px; border-left: 3px solid #d2a540; background: #fff8e6; font-size: 12px; }
.chat-invite { margin: 8px 12px; padding: 9px 11px; border: 1px solid #c9d2d6; border-radius: 2px; background: #eef2f3; color: #1d2d34; }
.chat-invite h3 { font-size: 13px; }
.chat-invite p { color: #5d6a70; font-size: 11px; }
.ask-button { padding: 7px 11px; border-radius: 3px; background: #bde8c8; font-size: 12px; }
.chat-panel { margin: 0 12px 12px; border-radius: 3px; }

@media (max-width: 699px) {
  .source-panel { margin-left: 7px; margin-right: 7px; }
  .source-table { font-size: 12px; }
  .source-table th, .source-table td { padding: 6px; }
  .chat-invite, .chat-panel { margin-left: 7px; margin-right: 7px; }
  .chat-invite { position: static; box-shadow: none; }
}

/* Keep match pages close to a familiar football results table. */
body { background: #e9edef; color: #17252c; }
.site-shell { max-width: 1240px; padding-top: 12px; }
.site-header { padding-bottom: 14px; }
.brand-mark { width: 40px; height: 40px; border-radius: 5px; box-shadow: none; }
.panel { border-color: #c1cbd0; border-radius: 2px; box-shadow: none; }
.match-list { padding: 14px 12px; }
.section-heading h2 { font-size: 19px; }
.match-detail { border-radius: 2px; }
.detail-toolbar { padding: 8px 10px 0; }
.detail-hero { padding: 10px 12px 11px; background: #f2f4f5; }
.detail-teams { margin: 8px 0; padding: 8px 10px; border-color: #c1cbd0; }
.detail-meta { color: #33434a; }
.team-name { color: #17252c; }
.versus-large { border-radius: 3px; }
.source-panel { margin: 9px 9px; border-color: #b8c4ca; border-radius: 1px; }
.source-bar { min-height: 32px; background: #656b70; }
.source-bar h3 { font-size: 13px; }
.source-table th, .source-table td { padding: 5px 7px; }
.source-table th { background: #e7eaec; }
.source-table tbody tr:nth-child(odd) { background: #e5f2f8; }
.source-table tbody tr:nth-child(even) { background: #cde8f2; }
.source-table tbody tr:nth-child(odd) td:first-child { background: #d7eaf2; }
.source-table tbody tr:nth-child(even) td:first-child { background: #bbdce8; }
.source-table tbody tr:hover { background: #fff0c2; }
.match-fact-table { min-width: 0; }
.match-fact-table th:first-child, .match-fact-table td:first-child { width: 175px; min-width: 135px; text-align: left; }
.match-fact-table th:last-child, .match-fact-table td:last-child { text-align: left; white-space: normal; }
.match-fact-table td:first-child { color: #43525a; font-weight: 700; }
.detail-data-table { min-width: 480px; }
.detail-data-table th:first-child, .detail-data-table td:first-child { min-width: 190px; text-align: left; }
.detail-data-table td:last-child { text-align: left; white-space: normal; }
.chat-invite { display: flex; min-height: 44px; margin: 8px 9px 10px; padding: 6px 9px; border: 1px solid #bdc8cd; border-radius: 1px; background: #edf0f1; }
.chat-invite h3 { font-size: 12px; }
.chat-invite p { margin-top: 0; color: #5d6a70; font-size: 10px; }
.ask-button { padding: 5px 11px; border: 1px solid #9bb4a2; border-radius: 2px; background: #d5eadb; color: #17432a; }
.chat-panel { border-color: #bdc8cd; border-radius: 2px; }
.chat-header { background: #e7eaec; }
.chat-form input, .chat-form button { border-radius: 2px; }

@media (max-width: 699px) {
  .site-shell { padding: 10px 7px 18px; }
  .site-header { padding: 6px 2px 12px; }
  .panel { border-radius: 2px; }
  .detail-hero { padding: 8px; }
  .detail-teams { gap: 6px; }
  .team-name { font-size: clamp(15px, 4vw, 19px); }
  .source-panel { margin: 8px 5px; }
  .match-fact-table th:first-child, .match-fact-table td:first-child { width: 125px; min-width: 110px; }
  .source-table { font-size: 11px; }
  .source-table th, .source-table td { padding: 5px; }
  .chat-invite, .chat-panel { margin-left: 5px; margin-right: 5px; }
}

/* Goal7-style reading order and color cues for match results and statistics. */
.team-win { color: #cf2533; }
.team-loss { color: #11804b; }
.team-draw { color: #155fbb; }
.team-outcome, .history-team { font-weight: 700; }
.history-team-with-favorite { white-space: nowrap; }
.team-favorite-mark { margin-left: 2px; color: #a96111; font-size: .82em; font-weight: 900; line-height: 0; vertical-align: super; }
.history-score { color: #174ea1; white-space: nowrap; }

/* Keep match chat available as a match-scoped mobile action and native modal. */
.chat-panel { position: fixed; inset: auto 8px 8px; width: min(460px, calc(100vw - 16px)); max-width: none; max-height: min(78dvh, 620px); margin: 0 auto; padding: 0; border: 1px solid #bdc8cd; border-radius: 3px; overflow: hidden; background: #fff; color: var(--ink); }
.chat-panel:not([open]) { display: none; }
.chat-panel[open] { display: flex; flex-direction: column; }
.chat-panel::backdrop { background: rgba(15, 25, 29, .52); }
.chat-messages { flex: 1 1 auto; max-height: min(38dvh, 330px); min-height: 100px; }
.chat-header { flex: 0 0 auto; }
.suggestions, .chat-form { flex: 0 0 auto; }

@media (max-width: 699px) {
  .match-detail { overflow: visible; }
  .site-shell[data-view="detail"] #detail-content { padding-bottom: 72px; }
  .site-shell[data-view="detail"] .chat-invite:not(.chat-open) {
    position: fixed; inset: auto 7px max(8px, env(safe-area-inset-bottom)); z-index: 20;
    width: min(520px, calc(100vw - 14px)); margin: 0 auto; box-shadow: 0 5px 18px rgba(20, 40, 48, .22);
  }
  .site-shell[data-view="detail"] .chat-invite.chat-open { display: none; }
  .chat-panel { inset: auto 8px max(8px, env(safe-area-inset-bottom)); width: calc(100vw - 16px); max-width: 480px; max-height: min(78dvh, 620px); }
}

.match-groups { display: grid; gap: 12px; }
.match-group { min-width: 0; overflow: hidden; border: 1px solid #bdc8cd; background: #fff; }
.match-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: #5d6770; color: #fff; }
.match-group-heading h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.league-match-count { flex: 0 0 auto; padding: 2px 7px; border: 1px solid rgba(255,255,255,.48); color: #fff; font-size: 10px; }
.match-group .match-cards { gap: 0; }
.match-group .match-card { display: grid; gap: 7px; min-width: 0; padding: 9px 10px; border: 0; border-bottom: 1px solid #d1dce1; border-radius: 0; background: #f8fbfc; text-align: left; transition: background .15s; }
.match-group .match-card:last-child { border-bottom: 0; }
.match-group .match-card:hover { border-color: #d1dce1; background: #fff4d6; transform: none; }
.match-group .match-card[aria-current="true"] { border-left: 3px solid #177b4a; background: #e9f5f8; padding-left: 7px; }
.card-topline { min-width: 0; margin: 0; }
.card-kickoff { overflow: hidden; color: #56656c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-topline .badge { padding: 2px 6px; font-size: 9px; }
.badge-live { background: #c92836; color: #fff; }
.card-scoreline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; margin: 0; }
.card-team { display: block; min-width: 0; overflow: hidden; color: #1e2c32; font-size: 12px; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.card-score { min-width: 50px; padding: 3px 7px; border: 1px solid #d5dfe3; background: #edf2f4; color: #64747b; font-size: 13px; font-weight: 800; text-align: center; white-space: nowrap; }
.card-score.has-score { color: #17252c; font-size: 16px; }
.card-bottom { min-width: 0; margin: 0; }
.card-badges { min-width: 0; align-items: center; }
.card-badges .badge { padding: 2px 6px; font-size: 9px; }
.card-odds { color: #42545c; font-size: 10px; }
.card-link { color: #176b43; font-size: 10px; }

.detail-teams { padding-inline: 14px; }
.detail-teams .team-name { padding-inline: 5px; text-align: center; }
.detail-teams .team-name:last-child { text-align: center; }
.team-outcome-empty, .result-score-empty { color: #738087; }
.market-over { color: #cf2533; }
.market-under { color: #11804b; }
.market-level { color: #155fbb; }
.market-total { font-weight: 700; }
.readable-stats .stats-team { max-width: 780px; margin: 0 auto; border: 1px solid #c3cdd2; background: #fff; }
.readable-stats .stats-team + .stats-team { margin: 12px auto 0; padding: 0; border-top: 1px solid #c3cdd2; }
.readable-stats .stats-team-title { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 8px 11px; color: #fff; font-size: 15px; }
.readable-stats .stats-team-title strong { grid-column: 2; min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.readable-stats .stats-team-home .stats-team-title { background: #5368b4; }
.readable-stats .stats-team-away .stats-team-title { background: #b34d55; }
.readable-stats .stats-team-title span { grid-column: 3; justify-self: end; color: #fff; font-size: 11px; font-weight: 500; }
.readable-stat-table { width: 100%; max-width: 780px; min-width: 0; margin: 0 auto; table-layout: fixed; font-size: 13px; }
.readable-stat-table th, .readable-stat-table td { padding: 5px 7px; }
.readable-stat-table th:first-child, .readable-stat-table td:first-child { width: 42%; min-width: 0; text-align: center; }
.readable-stat-table th:nth-child(2), .readable-stat-table td:nth-child(2),
.readable-stat-table th:nth-child(3), .readable-stat-table td:nth-child(3) { width: 29%; }
.readable-stat-table .stat-group-row th { position: static; z-index: auto; padding: 6px 9px; border-top: 3px solid #fff; background: #58636b; color: #fff; text-align: center; font-size: 12px; font-weight: 800; }
.readable-stat-table .stat-item-row:nth-child(odd) { background: #e5f2f8; }
.readable-stat-table .stat-item-row:nth-child(even) { background: #cde8f2; }
.readable-stat-table .stat-win .stat-label, .readable-stat-table .stat-win .stat-count, .readable-stat-table .stat-win .stat-percent { color: #cf2533; font-weight: 700; }
.readable-stat-table .stat-draw .stat-label, .readable-stat-table .stat-draw .stat-count, .readable-stat-table .stat-draw .stat-percent { color: #155fbb; font-weight: 700; }
.readable-stat-table .stat-loss .stat-label, .readable-stat-table .stat-loss .stat-count, .readable-stat-table .stat-loss .stat-percent { color: #11804b; font-weight: 700; }
.stats-empty { margin: 0; padding: 10px; color: #56656c; font-size: 12px; }
.standing-table { min-width: 670px; }
.standing-table td:nth-child(2) { text-align: center; }

.match-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.match-summary-block { min-width: 0; border: 1px solid #c6d0d5; background: #f8fafb; }
.match-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #c6d0d5; background: #e7ecef; color: #27363d; font-size: 12px; }
.match-summary-heading span { color: #56656c; font-size: 10px; font-weight: 700; white-space: nowrap; }
.match-summary-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 7px; }
.match-summary-pill { display: grid; min-width: 0; align-content: center; justify-items: center; gap: 2px; padding: 5px 3px; border: 1px solid #d4dde1; background: #fff; font-size: 10px; font-weight: 700; line-height: 1.25; text-align: center; }
.match-summary-stat-label { max-width: 100%; overflow: hidden; color: #56656c; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.match-summary-stat-value { font-size: 11px; }
.match-summary-stat-percent { color: #56656c; font-size: 10px; font-weight: 600; }
.match-market-row { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid #d8e1e5; }
.match-market-row:last-child { border-bottom: 0; }
.match-summary-team { width: 100%; min-width: 0; overflow: hidden; color: #25343a; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.match-market-count { color: #5a676d; font-size: 10px; white-space: nowrap; }
.match-market-results { grid-column: 1 / -1; padding: 0; }

@media (max-width: 699px) {
  .readable-stats { width: 90%; max-width: 600px; margin: 0 auto; }
  .readable-stats .stats-team { max-width: none; }
  .readable-stat-table { width: 100%; font-size: 11px; }
  .readable-stat-table th, .readable-stat-table td { padding: 4px 5px; }
  .readable-stat-table th:first-child, .readable-stat-table td:first-child { width: 42%; text-align: center; }
  .readable-stat-table th:nth-child(2), .readable-stat-table td:nth-child(2),
  .readable-stat-table th:nth-child(3), .readable-stat-table td:nth-child(3) { width: 29%; }
}

@media (max-width: 699px) {
  .history-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 10px; line-height: 1.2; }
  .history-table th, .history-table td { min-width: 0; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; }
  .history-table th:first-child, .history-table td:first-child { font-size: 7px; }
  .team-history-table th:nth-child(n), .team-history-table td:nth-child(n),
  .head-to-head-table th:nth-child(n), .head-to-head-table td:nth-child(n) { min-width: 0; }
  .team-history-table th:nth-child(1), .team-history-table td:nth-child(1) { width: 8%; }
  .team-history-table th:nth-child(2), .team-history-table td:nth-child(2) { width: 9%; }
  .team-history-table th:nth-child(3), .team-history-table td:nth-child(3) { width: 14%; text-align: center; }
  .team-history-table th:nth-child(4), .team-history-table td:nth-child(4) { width: 9%; }
  .team-history-table th:nth-child(5), .team-history-table td:nth-child(5) { width: 14%; text-align: center; }
  .team-history-table th:nth-child(6), .team-history-table td:nth-child(6) { width: 7%; }
  .team-history-table th:nth-child(7), .team-history-table td:nth-child(7) { width: 11%; font-size: 11px; font-weight: 700; }
  .team-history-table th:nth-child(8), .team-history-table td:nth-child(8) { width: 7.5%; }
  .team-history-table th:nth-child(9), .team-history-table td:nth-child(9) { width: 13%; }
  .team-history-table th:nth-child(10), .team-history-table td:nth-child(10) { width: 7.5%; }
  .head-to-head-table th:nth-child(1), .head-to-head-table td:nth-child(1) { width: 8%; }
  .head-to-head-table th:nth-child(2), .head-to-head-table td:nth-child(2) { width: 9%; }
  .head-to-head-table th:nth-child(3), .head-to-head-table td:nth-child(3) { width: 18%; text-align: center; }
  .head-to-head-table th:nth-child(4), .head-to-head-table td:nth-child(4) { width: 9%; }
  .head-to-head-table th:nth-child(5), .head-to-head-table td:nth-child(5) { width: 18%; text-align: center; }
  .head-to-head-table th:nth-child(6), .head-to-head-table td:nth-child(6) { width: 11%; font-size: 11px; font-weight: 700; }
  .head-to-head-table th:nth-child(7), .head-to-head-table td:nth-child(7) { width: 7.5%; }
  .head-to-head-table th:nth-child(8), .head-to-head-table td:nth-child(8) { width: 11.5%; }
  .head-to-head-table th:nth-child(9), .head-to-head-table td:nth-child(9) { width: 8%; }
  .history-table .history-team { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .history-table .history-team-with-favorite { display: inline-flex; max-width: 100%; min-width: 0; vertical-align: bottom; }
  .history-table .history-team-with-favorite .history-team { flex: 0 1 auto; min-width: 0; }
  .history-table .competition-tag { max-width: 100%; padding: 2px 2px; font-size: 8px; }
  .history-table th[data-mobile-label] { font-size: 0; }
  .history-table th[data-mobile-label]::after { content: attr(data-mobile-label); font-size: 10px; }
  .fixture-table, .standing-table { width: 100%; min-width: 0; table-layout: fixed; }
  .fixture-table th:nth-child(n), .fixture-table td:nth-child(n) { min-width: 0; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; }
  .fixture-table th:nth-child(1), .fixture-table td:nth-child(1) { width: 11%; font-size: 8px; }
  .fixture-table th:nth-child(2), .fixture-table td:nth-child(2) { width: 17%; }
  .fixture-table th:nth-child(3), .fixture-table td:nth-child(3) { width: 72%; min-width: 0; text-align: center; }
  .fixture-table .competition-tag { max-width: 100%; padding: 2px; font-size: 8px; }
  .fixture-pair { gap: 3px; }
  .fixture-vs { font-size: 8px; }
  .standing-table th:nth-child(n), .standing-table td:nth-child(n) { min-width: 0; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; }
  .standing-table th:nth-child(1), .standing-table td:nth-child(1) { width: 8%; }
  .standing-table th:nth-child(2), .standing-table td:nth-child(2) { width: 32%; text-align: center; }
  .standing-table th:nth-child(3), .standing-table td:nth-child(3) { width: 10%; }
  .standing-table th:nth-child(4), .standing-table td:nth-child(4),
  .standing-table th:nth-child(5), .standing-table td:nth-child(5),
  .standing-table th:nth-child(6), .standing-table td:nth-child(6) { width: 10%; }
  .standing-table th:nth-child(9), .standing-table td:nth-child(9) { width: 20%; }
  .standing-table th:nth-child(7), .standing-table td:nth-child(7),
  .standing-table th:nth-child(8), .standing-table td:nth-child(8),
  .standing-table th:nth-child(10), .standing-table td:nth-child(10) { display: none; width: 0; }
  .match-summary { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px; }
  .match-summary-results { gap: 4px; padding: 6px; }
  .match-summary-pill { padding: 4px 2px; font-size: 9px; }
  .match-market-row { padding: 5px 7px; }
}

.schedule-date-heading {
  display: flex; align-items: center; gap: 9px; margin: 0 0 10px; padding: 10px 12px;
  border: 1px solid #b9d8d0; border-radius: 11px;
  background: linear-gradient(110deg, #e5f4ed, #edf6fb); color: #174f53;
}
.schedule-date-icon {
  display: grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px;
  border-radius: 8px; background: #176b59; color: #fff; font-size: 16px; line-height: 1;
}
.schedule-date-heading strong { font-size: 13px; font-weight: 800; }
.match-groups { gap: 14px; }
.match-group { border-color: #cad8de; border-radius: 12px; box-shadow: 0 3px 12px rgba(22, 61, 76, .06); }
.match-group-heading {
  min-height: 39px; padding: 7px 11px; border-left: 4px solid #56c5a0;
  background: linear-gradient(100deg, #17485b, #236879); color: #fff;
}
.league-match-count { border-radius: 999px; background: rgba(255,255,255,.12); }
.match-group .match-card { gap: 7px; padding: 9px 11px; background: #fff; }
.match-group .match-card:nth-child(even) { background: #f1f7fa; }
.match-group .match-card:hover { background: #e8f5f2; }
.match-group .match-card[aria-current="true"] { border-left: 4px solid #18845f; background: #e5f5ed; padding-left: 7px; }
.match-group .match-card.card-live { background: #fff9e9; }
.match-group .match-card.card-live:hover { background: #fff1ca; }
.match-group .match-card.card-finished .card-score { border-color: #bad9e6; background: #eaf5fa; }
.card-topline { min-height: 17px; }
.card-kickoff { color: #345865; font-size: 11px; font-variant-numeric: tabular-nums; }
.card-topline .badge-neutral { border: 1px solid #dce4e8; background: #edf2f4; color: #52636b; }
.card-topline .badge-live { border: 1px solid #bb2530; background: #c92836; color: #fff; }
.card-team { font-size: 13px; line-height: 1.35; }
.card-team-favorite { color: #c82132; font-weight: 900; }
.card-score-center { display: grid; min-width: 78px; justify-items: center; gap: 3px; }
.card-score { min-width: 52px; border-radius: 5px; }
.card-score-center .card-score { width: 100%; }
.card-handicap {
  max-width: 100%; overflow: hidden; padding: 1px 6px; border: 1px solid #ead49b; border-radius: 999px;
  background: #fff7df; color: #71520e; font-size: 9px; font-weight: 800; line-height: 1.45;
  text-overflow: ellipsis; white-space: nowrap;
}
.card-bottom { min-height: 17px; }
.card-link { color: #126a54; font-weight: 800; }

@media (max-width: 699px) {
  .schedule-date-heading { margin-bottom: 8px; padding: 8px 10px; }
  .schedule-date-heading strong { font-size: 12px; }
  .match-groups { gap: 10px; }
  .match-group { border-radius: 10px; }
  .match-group-heading { min-height: 35px; padding: 6px 9px; }
  .match-group-heading h3 { font-size: 12px; }
  .match-group .match-card { gap: 6px; padding: 8px; }
  .card-scoreline { gap: 4px; }
  .card-team { font-size: 11px; }
  .card-score-center { min-width: 74px; }
  .card-score { min-width: 47px; padding: 2px 5px; }
  .card-handicap { font-size: 8px; }
}

.match-list.panel {
  border-color: #9a7968;
  background: linear-gradient(180deg, #e6eaeb 0%, #d8dfe1 100%);
}
.match-list .section-heading h2 { font-size: 25px; }
.match-list .section-description { margin-bottom: 17px; color: #34434a; font-size: 14px; }
.match-list .match-search { height: 46px; background: #fff; font-size: 14px; }
.match-list .status-filters button { padding: 8px 12px; font-size: 13px; }
.schedule-date-heading {
  min-height: 52px; border: 1px solid #773c2b; border-radius: 7px;
  background: linear-gradient(105deg, #8d3827, #ad512e); color: #fff;
  box-shadow: 0 3px 8px rgba(71, 39, 28, .2);
}
.schedule-date-icon { width: 34px; height: 34px; flex-basis: 34px; background: #713524; color: #fff; font-size: 20px; }
.schedule-date-heading strong { font-size: 16px; }
.match-group { overflow: hidden; border: 2px solid #795744; border-radius: 6px; background: #d9c3b7; box-shadow: 0 2px 7px rgba(56, 42, 34, .12); }
.match-group-heading { min-height: 59px; gap: 12px; padding: 8px 12px; }
.league-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }
.league-logo, .league-logo-fallback {
  display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px;
  border: 1px solid #fff; border-radius: 5px; background: #fff;
}
.league-logo { object-fit: contain; padding: 3px; }
.league-logo-fallback { color: #813d2a; font-size: 22px; }
.match-group-heading {
  border-left: 5px solid #ff9c3d;
  background: linear-gradient(100deg, #873b29, #a94c2c);
  color: #fff;
}
.match-group-heading h3 { font-size: 16px; color: #fff; }
.league-match-count { padding: 4px 10px; border: 1px solid rgba(255,255,255,.5); border-radius: 5px; background: #753523; color: #fff; font-size: 12px; }
.match-group .match-card {
  gap: 8px; padding: 12px 13px; border-bottom: 2px solid #fff;
  border-left: 4px solid transparent; background: #ead1c4; color: #18252c;
}
.match-group .match-card:nth-of-type(even) { background: #dcbcac; }
.match-group .match-card:hover { background: #f0d8a9; }
.match-group .match-card.card-live:nth-of-type(odd) { background: #ead1c4; }
.match-group .match-card.card-live:nth-of-type(even) { background: #dcbcac; }
.match-group .match-card.card-live:hover { background: #f0d8a9; }
.match-group .match-card[aria-current="true"] { border-left: 5px solid #b6222b; background: #c9dce3; padding-left: 12px; }
.match-group .match-card.card-live { box-shadow: inset 0 0 0 1px rgba(184, 35, 45, .12); }
.schedule-date-sections { display: grid; gap: 15px; }
.schedule-date-section { display: grid; gap: 10px; }
.schedule-date-section .schedule-date-heading { margin: 0; }
.card-kickoff { color: #293c46; font-size: 13px; font-weight: 800; }
.card-topline .badge { padding: 4px 9px; font-size: 11px; }
.card-team { color: #18252c; font-size: 16px; font-weight: 800; }
.card-team-favorite { color: #bd1f2d; font-weight: 900; }
.card-score-center { min-width: 108px; gap: 4px; }
.card-score { min-width: 60px; padding: 4px 8px; border: 1px solid #aabcc3; background: #f0f4f4; color: #123c59; font-size: 16px; }
.card-score.has-score { font-size: 20px; }
.card-handicap { border-color: #d0a850; background: #fff0c5; color: #583b05; padding: 3px 9px; font-size: 13px; font-weight: 900; }
.card-bottom { min-height: 21px; }
.card-link { color: #075b45; font-size: 13px; }
.card-badges .badge { padding: 3px 8px; font-size: 10px; }

@media (max-width: 699px) {
  .match-list .section-heading h2 { font-size: 23px; }
  .match-list .section-description { font-size: 13px; }
  .schedule-date-heading { min-height: 47px; }
  .schedule-date-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .schedule-date-heading strong { font-size: 14px; }
  .match-group-heading { min-height: 52px; gap: 7px; padding: 6px 8px; }
  .league-brand { gap: 8px; }
  .league-logo, .league-logo-fallback { flex-basis: 36px; width: 36px; height: 36px; border-radius: 5px; }
  .match-group-heading h3 { font-size: 14px; }
  .league-match-count { padding: 3px 7px; font-size: 11px; }
  .match-group .match-card { gap: 7px; padding: 10px 8px; }
  .card-kickoff { font-size: 12px; }
  .card-topline .badge { padding: 3px 7px; font-size: 10px; }
  .card-team { font-size: 14px; }
  .card-scoreline { gap: 3px; }
  .card-score-center { min-width: 100px; }
  .card-score { min-width: 55px; padding: 3px 6px; font-size: 15px; }
  .card-score.has-score { font-size: 18px; }
  .card-handicap { padding: 3px 8px; font-size: 12px; }
  .card-link { font-size: 12px; }
}

.match-group .card-topline .badge {
  display: inline-flex; min-height: 27px; align-items: center; gap: 5px;
  padding: 4px 10px; border: 1px solid transparent; border-radius: 5px;
  font-size: 11px; font-weight: 900; line-height: 1.2;
}
.match-group .card-topline .badge-upcoming {
  border-color: #76a9d3; background: #d7eaff; color: #174b76;
}
.match-group .card-topline .badge-upcoming::before {
  content: "◷"; color: #1e639b; font-size: 15px; line-height: 1;
}
.match-group .card-topline .badge-finished {
  border-color: #344953; background: #455b66; color: #fff;
}
.match-group .card-topline .badge-finished::before {
  content: "✓"; color: #b8f0ca; font-size: 13px; line-height: 1;
}
.match-group .card-topline .badge-live {
  border-color: #991a25; background: #c82431; color: #fff;
  box-shadow: 0 2px 5px rgba(159, 20, 32, .24);
}
.match-group .card-topline .badge-live::before {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; content: "";
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .24);
}
.match-group .card-topline .badge-alert {
  border-color: #bc8117; background: #ffefc3; color: #694600;
}
.match-group .card-topline .badge-alert::before {
  display: grid; width: 14px; height: 14px; place-items: center; border-radius: 50%;
  background: #b77b0d; color: #fff; content: "!"; font-size: 10px; line-height: 1;
}
.match-group .card-topline .badge-neutral { border-color: #84969e; background: #e2e8eb; color: #364750; }

@media (max-width: 699px) {
  .match-group .card-topline .badge { min-height: 25px; padding: 4px 8px; font-size: 10px; }
}

/* Match detail navigation: one category visible at a time. */
.detail-tabs { min-width: 0; }
.detail-tab-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: sticky; top: 0; z-index: 3; border-bottom: 1px solid #b8c8cf; background: #edf3f6; }
.detail-tab { min-height: 48px; padding: 10px 4px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #536671; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.detail-tab[aria-selected="true"] { border-bottom-color: #126b59; background: #fff; color: #075842; }
.detail-tab:focus-visible { outline: 2px solid #126b59; outline-offset: -4px; }
.detail-tab-panel { min-width: 0; padding: 10px 8px 14px; }
.detail-tab-panel[hidden] { display: none !important; }
.detail-tab-panel .evidence-content { margin: 0; padding: 0; }
.detail-tab-panel .match-facts-panel { margin: 0 0 10px; }
.detail-tab-panel .source-panel:first-child { margin-top: 0; }
@media (max-width: 380px) { .detail-tab { font-size: 12px; } }

.card-team, .detail-teams .team-name { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.team-logo { flex: 0 0 auto; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.team-label-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-teams .team-logo { width: 54px; height: 54px; }
.detail-teams .team-label-name { white-space: normal; }
@media (max-width: 380px) { .card-team .team-logo { width: 34px; height: 34px; } }
