:root {
  --bg: #f2f4f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #191d20;
  --muted: #69737a;
  --line: #dce2e4;
  --line-strong: #c7d0d3;
  --brand: #15191b;
  --green: #08765a;
  --green-soft: #e6f4ee;
  --amber: #946200;
  --amber-soft: #fff2d4;
  --red: #b13b46;
  --red-soft: #fbe8ea;
  --blue: #285f8e;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 25, 29, .05), 0 6px 16px rgba(20, 25, 29, .035);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--bg); scroll-behavior: auto; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(40, 95, 142, .25); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-bar { position: sticky; z-index: 20; top: 0; background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.app-bar__inner { display: flex; align-items: center; justify-content: space-between; width: min(1240px, 100%); min-height: 56px; margin: 0 auto; padding: 7px 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.brand img { display: block; flex: 0 0 auto; width: 32px; height: 32px; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: 16px; font-weight: 730; }
.brand small { margin-top: 3px; color: #aeb6bc; font-size: 11px; }
.connection { display: inline-flex; align-items: center; gap: 6px; color: #cfd5d9; font-size: 12px; white-space: nowrap; }
.connection__dot { width: 7px; height: 7px; border-radius: 50%; background: #e1a328; }
.connection.is-online .connection__dot { background: #4bc596; }
.connection.is-offline .connection__dot { background: #ef6b75; }

.shell { width: min(1240px, 100%); margin: 0 auto; padding: 18px 20px 34px; }
.summary-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 26px; align-items: end; padding-bottom: 15px; border-bottom: 1px solid var(--line-strong); }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: 12px; font-weight: 720; }
.summary-band h1 { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 740; }
.muted { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); margin: 0; }
.summary-metrics div { min-width: 0; padding: 0 16px; border-left: 1px solid var(--line); }
.summary-metrics dt { color: var(--muted); font-size: 11px; }
.summary-metrics dd { margin: 1px 0 0; font-size: 22px; font-weight: 740; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; }
.segmented { display: inline-grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); min-height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.segmented__button { min-width: 72px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 660; }
.segmented__button.is-active { background: var(--brand); color: #fff; }
.search-field { display: block; width: min(260px, 32vw); }
.search-field input { width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.search-field input::placeholder { color: #92999f; }
.progress-strip { margin-bottom: 10px; padding: 8px 11px; border-left: 3px solid var(--blue); background: #eaf1f6; }
.progress-strip__copy { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.progress-strip__copy span { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 3px; margin-top: 6px; overflow: hidden; background: rgba(40, 95, 142, .15); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--blue); transition: width 180ms ease; }

.section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin-bottom: 6px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 730; }
.section-count { color: var(--muted); font-size: 12px; }
.match-list, .skeleton-list { display: grid; gap: 7px; }
.match-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.match-card.is-small-match { border-left: 3px solid #d39a24; }
.match-card.is-finished { box-shadow: none; opacity: .78; }
.match-card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.competition-heading { display: flex; min-width: 0; align-items: center; gap: 9px; }
.competition-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 17px; font-weight: 740; line-height: 1.25; }
.competition-mark { width: 5px; height: 24px; flex: 0 0 auto; border-radius: 2px; background: var(--green); box-shadow: 7px 0 0 #b9d8cc; }
.match-card__header-meta { display: flex; min-width: 0; flex: 0 1 auto; align-items: center; justify-content: flex-end; gap: 10px; }
.competition-history { display: grid; min-width: 250px; grid-template-columns: repeat(2, minmax(118px, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; white-space: nowrap; }
.water-history { display: grid; min-width: 0; grid-template-columns: auto auto; align-items: baseline; justify-content: center; gap: 1px 6px; padding: 4px 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.water-history + .water-history { border-left: 1px solid var(--line); }
.water-history b { color: var(--ink); font-size: 10px; font-weight: 740; }
.water-history strong { color: #556168; font-size: 12px; font-weight: 760; }
.water-history small { grid-column: 1 / -1; color: #7a858a; font-size: 9px; line-height: 1.2; overflow-wrap: anywhere; text-align: center; white-space: normal; }
.water-history.is-qualified { background: #edf8f2; }
.water-history.is-qualified b, .water-history.is-qualified strong { color: var(--green); }
.competition-history--empty { background: #f5f7f7; }
.live-updated { flex: 0 0 auto; color: #8a949a; font-size: 10px; font-variant-numeric: tabular-nums; }
.match-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 35px; padding: 5px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.match-context time { color: var(--ink); font-size: 13px; font-weight: 730; font-variant-numeric: tabular-nums; }
.live-state { padding: 2px 6px; border-radius: 3px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 680; white-space: nowrap; }
.live-state.is-finished { background: #edf0f1; color: var(--muted); }
.selection-source { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; background: #f3f5f5; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.selection-source.is-080 { border-color: #b8ddcd; background: var(--green-soft); color: var(--green); }
.selection-source.is-090 { border-color: #e6cf9b; background: var(--amber-soft); color: #795000; }
.selection-source.is-both { border-color: #b9cfe1; background: #edf4f8; color: var(--blue); }
.selection-source.is-unknown { border-style: dashed; color: #7b858a; }

.match-card__body { display: grid; grid-template-columns: minmax(480px, 60fr) minmax(320px, 40fr); align-items: stretch; min-height: 166px; }
.fixture { display: grid; min-width: 0; grid-template-rows: auto auto; align-content: space-between; gap: 8px; padding: 9px 12px 8px; background: #fff; }
.fixture-main { display: grid; width: 100%; min-width: 0; grid-template-columns: 60px minmax(0, 1fr); min-height: 108px; }
.scoreboard { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); overflow: hidden; border-radius: 5px 0 0 5px; background: #242a2d; color: #fff; }
.scoreboard strong { display: grid; place-items: center; min-width: 0; font-size: 26px; font-weight: 720; line-height: 1; font-variant-numeric: tabular-nums; }
.scoreboard strong + strong { border-top: 1px solid rgba(255, 255, 255, .15); }
.team-stack { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); min-width: 0; border: 1px solid var(--line); border-left: 0; border-radius: 0 5px 5px 0; }
.team-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 7px 11px; }
.team-line + .team-line { border-top: 1px solid var(--line); }
.team-line > span:first-child { color: var(--muted); font-size: 11px; font-weight: 700; }
.team-line strong { display: -webkit-box; min-width: 0; overflow: hidden; overflow-wrap: anywhere; font-size: 16px; font-weight: 700; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.red-card { display: inline-grid; width: 20px; min-width: 20px; height: 24px; place-items: center; border-radius: 3px; background: #d94e57; color: #fff; font-size: 12px; font-weight: 750; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14); }

.market-panel { display: block; min-width: 0; border-left: 1px solid var(--line); background: #fbfcfc; }
.odds-board { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 7px; }
.odds-group { min-width: 0; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.odds-group.is-current { border-top: 3px solid var(--green); }
.odds-group.is-opening { border-top: 3px solid #aeb7bb; }
.odds-group__title { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 18px; }
.odds-group__title strong { font-size: 11px; font-weight: 730; }
.odds-group__title span { color: var(--muted); font-size: 9px; }
.odds-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 0 0 2px; color: var(--muted); font-size: 9px; text-align: center; }
.odds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 4px; }
.market-cell { display: grid; min-width: 0; min-height: 33px; place-content: center; padding: 1px 3px; border: 1px solid var(--line); border-radius: 4px; background: #fcfdfd; text-align: center; }
.market-cell strong { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 650; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.market-cell em { color: var(--red); font-size: 11px; font-style: normal; font-weight: 720; line-height: 1.15; font-variant-numeric: tabular-nums; }
.odds-group.is-opening .market-cell em { color: #9e4b52; }

.forecast { display: grid; min-width: 0; grid-template-columns: minmax(145px, 1.45fr) minmax(82px, .8fr) minmax(82px, .8fr); align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.score-at-70, .primary-probability, .secondary-probability { display: flex; min-width: 0; min-height: 39px; align-items: baseline; justify-content: center; gap: 7px; padding: 7px 8px; background: #fff; }
.primary-probability, .secondary-probability { border-left: 1px solid var(--line); }
.score-at-70 span, .primary-probability span, .secondary-probability span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.score-at-70 strong, .primary-probability strong, .secondary-probability strong { font-size: 17px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-at-70 strong { color: var(--ink); }
.score-at-water-080 { display: grid; min-height: 58px; grid-template-rows: auto auto auto; align-content: center; gap: 2px; text-align: center; }
.score-at-water-080 span, .score-at-water-080 small { min-width: 0; overflow: visible; overflow-wrap: anywhere; text-align: center; white-space: normal; }
.score-at-water-080 small { color: #7b858a; font-size: 9px; line-height: 1.2; }
.score-at-water-080.is-entered strong { color: var(--green); }
.score-at-water-080.is-waiting strong, .score-at-water-080.is-unavailable strong { color: #7b858a; }
.score-at-water-080.is-no_entry strong, .score-at-water-080.is-goal_before_entry strong { color: var(--red); font-size: 13px; }
.score-at-water-080.is-unverified strong { color: var(--amber); font-size: 13px; }
.score-observation { display: grid; min-height: 78px; grid-template-rows: auto auto auto auto; align-content: center; gap: 2px; padding: 6px 8px; text-align: center; }
.score-observation__row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px; }
.score-observation__row span { min-width: 0; overflow: visible; color: var(--muted); font-size: 9px; line-height: 1.15; overflow-wrap: anywhere; white-space: normal; }
.score-observation__row strong { min-width: 0; color: var(--ink); font-size: 15px; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-observation__target { color: var(--blue); font-size: 9px; line-height: 1.15; overflow-wrap: anywhere; }
.score-observation__entry { padding-top: 3px; border-top: 1px solid var(--line); }
.score-observation__entry strong { color: var(--green); }
.score-observation.is-no_entry .score-observation__entry strong, .score-observation.is-goal_before_entry .score-observation__entry strong { color: var(--red); font-size: 12px; }
.score-observation.is-unverified .score-observation__entry strong, .score-observation.is-unavailable .score-observation__entry strong { color: var(--amber); font-size: 12px; }
.score-observation small { min-width: 0; color: #7b858a; font-size: 8px; line-height: 1.15; overflow-wrap: anywhere; }
.primary-probability strong { color: var(--red); }
.secondary-probability strong { color: var(--amber); }
.live-stats { display: grid; grid-template-columns: minmax(118px, 1.1fr) repeat(7, minmax(70px, 1fr)); gap: 4px 9px; min-width: 0; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 10px; }
.live-stats > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stats b { margin-right: 3px; color: var(--ink); font-weight: 700; }
.live-stats__head { display: grid; min-width: 0; gap: 1px; }
.live-stats__head b { color: var(--green); font-size: 10px; }
.live-stats__head small { min-width: 0; overflow: hidden; color: #8a949a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.live-stats__empty { grid-column: 1 / -1; color: #9a8385; }

.skeleton-card { height: 245px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(90deg, #fff 0, #e9edef 45%, #fff 90%); background-size: 240% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -240% 0; } }
.state-panel { padding: 36px 20px; border: 1px dashed var(--line-strong); background: var(--surface); text-align: center; }
.state-panel strong { font-size: 15px; }
.state-panel p { margin: 5px 0 0; color: var(--muted); }
.state-panel button { min-height: 34px; margin-top: 12px; padding: 6px 12px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand); color: #fff; }
.footer { width: min(1240px, 100%); margin: 0 auto; padding: 0 20px calc(21px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 10px; }
.footer p { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .summary-band { grid-template-columns: 1fr; gap: 12px; }
  .summary-metrics div:first-child { padding-left: 0; border-left: 0; }
  .match-card__body { grid-template-columns: minmax(380px, 60fr) minmax(260px, 40fr); }
  .live-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .live-stats__head { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  html, body { min-width: 0; }
  body { font-size: 14px; }
  .app-bar__inner { min-height: 53px; padding: 6px 12px; }
  .brand img { width: 29px; height: 29px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .shell { padding: 14px 10px 27px; }
  .summary-band { padding-bottom: 12px; }
  .summary-band h1 { font-size: 21px; }
  .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-metrics div { padding: 0 9px; }
  .summary-metrics dd { font-size: 20px; }
  .toolbar { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 10px 0 8px; }
  .segmented { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmented__button { min-width: 0; padding: 4px 5px; font-size: 11px; }
  .search-field { width: 100%; }
  .match-card__header { display: grid; min-height: 43px; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 6px; padding: 7px 9px; }
  .competition-heading { gap: 8px; }
  .competition-heading strong { font-size: 15px; }
  .match-card__header-meta { width: 100%; flex: 0 1 auto; justify-content: stretch; gap: 0; }
  .competition-history { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-history { grid-template-columns: auto auto; gap: 1px 4px; padding: 3px 5px; }
  .water-history b { font-size: 9px; }
  .water-history strong { font-size: 11px; }
  .water-history small { font-size: 8px; }
  .competition-mark { height: 22px; }
  .live-updated { display: none; }
  .match-context { min-height: 34px; padding: 5px 9px; }
  .match-context time { font-size: 12px; }
  .selection-source { flex: 1 1 100%; }
  .match-card__body { grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); min-height: 0; }
  .fixture { padding: 7px; }
  .fixture-main { grid-template-columns: 48px minmax(0, 1fr); min-height: 108px; }
  .scoreboard strong { font-size: 22px; }
  .team-line { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 5px; padding: 7px 6px; }
  .team-line > span:first-child { font-size: 10px; }
  .team-line strong { font-size: 14px; }
  .red-card { width: 18px; min-width: 18px; height: 22px; font-size: 11px; }
  .odds-board { gap: 5px; padding: 5px; }
  .odds-group { padding: 4px; }
  .odds-group__title { min-height: 17px; }
  .odds-group__title strong { font-size: 10px; }
  .odds-group__title span { font-size: 8px; }
  .odds-columns { padding: 0 0 2px; font-size: 9px; }
  .odds-grid { gap: 3px; }
  .market-cell { min-height: 28px; padding: 1px 2px; }
  .market-cell strong { font-size: 11px; }
  .market-cell em { font-size: 10px; }
  .forecast { grid-template-columns: minmax(100px, 1.25fr) minmax(58px, .8fr) minmax(58px, .8fr); }
  .score-at-70, .primary-probability, .secondary-probability { display: grid; min-height: 44px; place-content: center; gap: 1px; padding: 4px 3px; text-align: center; }
  .score-at-water-080 { min-height: 58px; }
  .score-observation { min-height: 78px; padding: 5px 5px; }
  .score-observation__row { grid-template-columns: minmax(0, 1fr); gap: 1px; justify-items: center; }
  .score-observation__row span { font-size: 8px; }
  .score-observation__row strong { font-size: 14px; }
  .score-observation__target, .score-observation small { font-size: 8px; }
  .score-at-70 span, .primary-probability span, .secondary-probability span { font-size: 9px; }
  .score-at-70 strong, .primary-probability strong, .secondary-probability strong { font-size: 15px; }
  .live-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 6px; padding: 7px 8px; border-top: 1px solid var(--line); border-left: 0; font-size: 9px; }
  .live-stats__head { grid-column: 1 / -1; }
  .live-stats__head b { font-size: 10px; }
  .footer { padding-right: 10px; padding-left: 10px; }
  .skeleton-card { height: 430px; }
}

@media (max-width: 620px) {
  .match-card__body { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
  .odds-board { grid-template-columns: 1fr; gap: 4px; padding: 4px; }
  .odds-group { padding: 3px; }
  .odds-group__title { min-height: 15px; }
  .odds-columns { font-size: 8px; }
  .market-cell { min-height: 23px; }
  .market-cell strong { font-size: 10px; line-height: 1; }
  .market-cell em { font-size: 9px; line-height: 1; }
}

@media (max-width: 420px) {
  .competition-heading strong { font-size: 16px; }
  .match-card__body { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
  .fixture { padding: 7px 6px; }
  .fixture-main { grid-template-columns: 43px minmax(0, 1fr); }
  .scoreboard strong { font-size: 20px; }
  .team-line { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 6px; }
  .team-line > span:first-child { display: none; }
  .team-line strong { font-size: 13px; }
  .odds-board { padding: 4px; }
  .odds-grid { gap: 3px; }
  .market-cell strong { font-size: 10px; }
  .market-cell em { font-size: 9px; }
  .market-cell strong { overflow: visible; text-overflow: clip; }
  .forecast { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
  .score-at-70, .primary-probability, .secondary-probability { min-height: 44px; padding: 4px 2px; }
  .score-at-water-080 { min-height: 78px; }
  .score-observation { min-height: 78px; padding: 4px 3px; }
  .primary-probability span, .secondary-probability span { width: 100%; overflow: visible; text-overflow: clip; }
  .score-at-70 span { overflow: visible; text-overflow: clip; }
  .score-at-water-080 small { font-size: 8px; }
  .score-at-70 strong, .primary-probability strong, .secondary-probability strong { font-size: 14px; }
  .live-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 5px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
