:root {
    color-scheme: dark;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #10141b;
    color: #edf1f6;
}

body { margin: 0; }
.app-version { max-width: 1040px; margin: 0 auto; padding: 0 24px 20px; color: #aebaca; font-size: .875rem; }
a { color: #8bdcc6; }
.topbar { border-bottom: 1px solid #2b3441; }
.topbar-content, main { max-width: 1040px; margin: auto; padding: 0 24px; }
.topbar-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 650; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #9de8d0; color: #13231e; }
.environment, .page-heading p, .empty-state span, dt { color: #aebaca; }
.environment, .status, dt { font-size: .875rem; }
main { padding-top: clamp(32px, 7vw, 84px); padding-bottom: 48px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.04em; }
.page-heading p { margin: 8px 0 28px; }
.market-panel { overflow: hidden; border: 1px solid #2b3441; border-radius: 14px; background: #181f29; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; }
h2 { margin: 0; font-size: 1.15rem; }
.status { padding: 6px 10px; border-radius: 6px; color: #ffda91; background: #3b3024; }
.empty-state { margin: 0 20px; padding: 40px 16px; border: 1px dashed #3a4859; border-radius: 9px; text-align: center; }
.empty-state p { margin: 0 0 8px; font-weight: 600; }
.metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 18px; margin: 0; padding: 20px; }
dd { margin: 4px 0 0; }
#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; padding: 16px 24px; background: #3b3024; }
.market-panel + .market-panel { margin-top: 20px; }
nav { display: flex; gap: 6px; }
nav a { padding: 8px 12px; border-radius: 8px; color: #aebaca; text-decoration: none; }
nav .active, nav a:hover { background: #26313d; color: #edf1f6; }
.source-link { display: inline-block; margin-top: 5px; font-size: .875rem; }
.empty-state { margin-bottom: 20px; }
.highlights { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.highlights > div { padding: 14px; border: 1px solid #324051; border-radius: 10px; background: #131a23; }
.highlights dd { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.footnote, .summary-note, .muted { color: #aebaca; font-size: .875rem; }
.footnote { margin: 8px 20px 16px; }
.summary-note { margin: 20px 0; }
.table-wrap { margin: 0 20px 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid #2b3441; white-space: nowrap; }
th { font-size: .875rem; color: #aebaca; }
tbody tr:hover { background: #1e2935; }
.form-panel { padding: 0 20px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 6px; }
input, select, button { box-sizing: border-box; padding: 8px 12px; border: 1px solid #43546a; border-radius: 8px; background: #10141b; color: inherit; font: inherit; }
input { min-width: 0; }
button { border-color: transparent; background: #9de8d0; color: #13231e; font-weight: 650; cursor: pointer; }
button:disabled { background: #313e4c; color: #aebaca; cursor: default; }
.secondary-button { margin-left: 8px; border-color: #43546a; background: transparent; color: inherit; }
.feedback { display: inline-block; margin: 10px; color: #ffda91; }
.chart-wrap { margin: 0 20px 20px; padding: 16px; background: #131a23; border-radius: 10px; }
.chart-wrap h3 { margin: 0 0 8px; }
.chart-bars { display: flex; align-items: end; gap: clamp(1px, .35vw, 4px); height: 175px; padding: 4px 0; border-bottom: 1px solid #43546a; }
.chart-bars span { flex: 1; min-width: 0; background: #6bcbb4; border-radius: 3px 3px 0 0; }
.chart-bars span:hover { background: #c8fcec; }
.chart-scale { display: flex; justify-content: space-between; color: #aebaca; font-size: .875rem; margin-top: 8px; }
.highlights small { display: block; margin-top: 8px; color: #aebaca; overflow-wrap: anywhere; }
.practice-note { display: block; margin-top: 4px; color: #aebaca; font-size: .875rem; }
.football-board { display: grid; gap: 24px; }
.football-heading { padding: clamp(22px, 5vw, 48px); margin-bottom: 22px; border: 1px solid #365c4c; border-radius: 18px; background: linear-gradient(115deg, #183d30, #131e25 75%); }
.football-heading p { margin-bottom: 0; }
.football-review { padding: 18px 22px; border: 1px solid #365c4c; border-left: 4px solid #8bdcc6; border-radius: 12px; background: #16241f; }
.football-review p { margin: 8px 0 0; }
.football-board > .footnote { margin: 0; }
.football-section h2 { font-size: 1.45rem; margin: 0 0 12px; }
.football-section > .muted { margin: -4px 0 14px; }
.football-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 315px), 1fr)); gap: 14px; }
.football-card { min-width: 0; padding: clamp(14px, 3vw, 22px); background: #181f29; border: 1px solid #324051; border-radius: 16px; }
.football-card-live { border-top: 3px solid #8bdcc6; }
.football-card-meta { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 12px; color: #aebaca; font-size: .875rem; }
.football-card-live .football-card-meta { color: #9de8d0; }
.football-card h3 { margin: 0; font-size: 1.14rem; line-height: 1.35; overflow-wrap: anywhere; }
.football-card h3 a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.football-card h3 span { color: #aebaca; }
.football-score { margin: 14px 0 0; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.football-outcome, .football-goals { margin: 12px 0 0; color: #c5d0dc; font-size: .875rem; }
.football-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; }
.football-rates > div { min-width: 0; padding: 8px 4px; border-radius: 8px; text-align: center; background: #101920; }
.football-rates dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.football-form { margin-top: 14px; padding-top: 10px; border-top: 1px solid #324051; color: #c5d0dc; font-size: .875rem; }
.football-form summary { cursor: pointer; }
.football-form p { margin: 10px 0 0; }
.match-heading h1 { margin-block: 10px; overflow-wrap: anywhere; }
.match-heading .football-score { display: block; margin-top: 8px; color: #a2e8ce; }
.match-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin-top: 14px; }
.match-columns > div { min-width: 0; background: #111b22; padding: 14px; border-radius: 12px; }
.match-columns p { margin: 6px 0 0; }
.match-forecast { background: #192a28; border-color: #41675b; padding: clamp(16px, 3.6vw, 32px); }
.match-forecast-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 16px; }
.match-forecast-summary > div { padding: 14px; border-radius: 12px; background: #101d1e; }
.match-forecast-summary span { display: block; color: #b8cec6; font-size: .875rem; }
.match-forecast-summary strong { display: block; margin-top: 6px; color: #def8ee; font-size: clamp(1.2rem, 3vw, 1.75rem); overflow-wrap: anywhere; }
.match-outcomes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); }
.match-outcomes > div { padding: 12px 8px; overflow-wrap: anywhere; }
.match-outcomes dd { font-size: clamp(1.1rem, 3vw, 1.55rem); }
.match-readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.match-readings > div { padding: 12px; border: 1px solid #324051; border-radius: 10px; background: #111b22; }
.match-readings dd { font-weight: 650; }
.match-readings small { display: block; margin-top: 6px; color: #aebaca; }
.competition-toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.competition-toolbar h2 { font-size: 1.5rem; }
.competition-toolbar p { margin: 6px 0 0; }
.competition-search { display: grid; gap: 5px; width: min(100%, 300px); color: #aebaca; font-size: .875rem; }
.football-heading .competition-search { margin-top: 18px; width: min(100%, 390px); }
.competition-list { display: grid; gap: 8px; }
.competition-group { border: 1px solid #324051; border-radius: 12px; background: #181f29; }
.competition-group summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.competition-group summary::-webkit-details-marker { display: none; }
.competition-group summary::before { content: "▸"; color: #8bdcc6; }
.competition-group[open] summary::before { content: "▾"; }
.competition-group[open] summary { background: #203229; border-radius: 11px 11px 0 0; }
.competition-name { flex: 1 1 180px; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.competition-flag, .competition-logo { flex: 0 0 auto; object-fit: contain; }
.competition-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fixture-teams { display: grid; gap: 7px; width: fit-content; }
.team-mark { display: inline-flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; }
.team-mark img, .team-mark-placeholder { flex: 0 0 auto; width: 26px; height: 26px; object-fit: contain; }
.team-mark-placeholder { display: grid; place-items: center; border-radius: 50%; background: #253c34; color: #bfe6d7; font-size: .65rem; }
.match-team-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.match-team-heading .team-mark img, .match-team-heading .team-mark-placeholder { width: 44px; height: 44px; }
.competition-count, .competition-time, .competition-state small { color: #aebaca; font-size: .875rem; }
.competition-live { color: #a2e8ce; font-size: .875rem; }
.competition-fixtures { list-style: none; margin: 0; padding: 0 16px; }
.competition-fixtures li { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(0, 5fr) minmax(80px, 1fr); align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #324051; }
.competition-fixtures a { overflow-wrap: anywhere; }
.competition-state { text-align: right; }
.competition-state small { display: block; }
.match-players { list-style: none; padding: 0; margin-bottom: 0; }
.match-players li { padding: 7px 0; border-bottom: 1px solid #324051; overflow-wrap: anywhere; }
.match-players li span { display: inline-block; min-width: 2ch; color: #8bdcc6; }
.match-players li small { color: #aebaca; }
.match-stats { margin-top: 12px; table-layout: fixed; text-align: center; }
.match-stats th, .match-stats td { white-space: normal; overflow-wrap: anywhere; padding: 8px 4px; }
@media (max-width: 520px) {
    .topbar-content, main { padding-right: 14px; padding-left: 14px; }
    .topbar-content { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
    nav { gap: 0; }
    nav a { padding: 8px; }
}

/* Shared presentation for desktop and Android. */
:root {
    --surface: #14252c;
    --surface-deep: #0b1a21;
    --edge: #29434b;
    --accent: #85f1bf;
    --secondary: #aac4ca;
    color: #f2f8f8;
    background: #09151b;
    font-family: "Segoe UI", Roboto, system-ui, sans-serif;
}
body { background: radial-gradient(ellipse at 75% 0%, #142e32 0%, transparent 45rem), #09151b; min-height: 100vh; }
.topbar { background: #0c1b22; border-bottom-color: var(--edge); }
.topbar-content, main, .app-version { max-width: 1160px; }
.topbar-content { min-height: 68px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); font-weight: 800; }
nav a { min-height: 28px; display: grid; align-items: center; font-weight: 600; }
nav .active, nav a:hover { color: var(--accent); background: #223a3e; }
main { padding-top: clamp(20px, 4vw, 46px); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.football-heading {
    position: relative; overflow: hidden; border-color: #43685c; border-radius: 24px;
    background: linear-gradient(110deg, #143b34 0%, #10262d 78%);
}
.football-heading::after {
    content: ""; position: absolute; inset: 0 0 0 68%; pointer-events: none;
    background: repeating-linear-gradient(140deg, transparent 0 17px, #c2ffdb0c 17px 18px);
}
.football-heading > * { position: relative; z-index: 1; }
.football-heading h1 { letter-spacing: -.045em; line-height: 1.08; }
.competition-search input { min-height: 44px; border-color: #4a7770; background: #0e2228; }
.football-board { gap: 18px; }
.football-card, .competition-group { background: var(--surface); border-color: var(--edge); }
.football-card { box-shadow: 0 10px 26px #03101345; }
.football-card > h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.competition-group summary { min-height: 27px; padding-block: 13px; }
.competition-group summary:hover, .competition-group[open] summary { background: #203b3e; }
.competition-fixtures li { border-color: var(--edge); }
.competition-fixtures a { color: inherit; text-decoration: none; }
.competition-fixtures a:hover, .football-card a:hover { color: var(--accent); text-decoration: underline; }
.fixture-teams { gap: 5px; font-weight: 650; }
.match-columns > div, .match-readings > div, .football-rates > div { background: var(--surface-deep); border-color: var(--edge); }
.match-forecast { background: #19342f; border-color: #3b675a; }
.match-readings dd, .football-rates dd, .football-score { color: var(--accent); }
.footnote, .muted, dt, .competition-time, .competition-count, .competition-state small { color: var(--secondary); }
.match-team-heading .team-mark img, .match-team-heading .team-mark-placeholder { width: clamp(32px, 6vw, 55px); height: clamp(32px, 6vw, 55px); }
.recent-results h3 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.recent-results h3 small, .result-list time { color: var(--secondary); font-size: .78rem; }
.result-list { list-style: none; padding: 0; margin: 10px 0 0; }
.result-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px 10px; padding: 9px 0; align-items: center; border-top: 1px solid var(--edge); }
.result-list time { grid-column: 1 / -1; }
.result-list strong { padding: 3px 7px; background: #233a3e; border-radius: 6px; color: #f8fffd; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-list .team-mark { font-size: .85rem; }
.result-list .team-mark img, .result-list .team-mark-placeholder { width: 22px; height: 22px; }
@media (max-width: 520px) {
    .topbar-content { gap: 4px; }
    .football-heading { border-radius: 18px; }
    .competition-fixtures { padding-inline: 10px; }
    .competition-fixtures li { grid-template-columns: 55px minmax(0, 1fr) 72px; gap: 6px; }
    .result-list .team-mark { gap: 5px; }
}
