:root {
  --ink: #20262b;
  --muted: #68747a;
  --line: #e3e7e7;
  --canvas: #f3f5f4;
  --surface: #ffffff;
  --nav: #252c2d;
  --red: #b63842;
  --red-soft: #fbf0f0;
  --shadow: 0 3px 16px rgba(27, 42, 43, .04);
}

body { background: var(--canvas); color: var(--ink); }
.app-header { background: #fff; color: var(--ink); border-bottom: 1px solid #e4e8e7; box-shadow: none; }
.header-inner { min-height: 72px; }
.brand { gap: 12px; }
.brand-mark { width: 40px; height: 40px; flex-basis: 40px; border: 1px solid #efd8d9; border-radius: 8px; background: #fbf0f0; color: #ad3741; }
.brand h1 { color: #202a2b; font-size: 19px; font-weight: 700; }
.brand p { margin-top: 3px; color: #7c8786; font-size: 11px; }
.header-actions { gap: 12px; }
.connection, .connection.good { color: #53645f; background: #f4f7f5; border-color: #e0e9e2; }
.account-button { color: #586360; border-color: transparent; background: transparent; font-weight: 600; }
.account-button:hover { color: #a82e39; background: #fbf0f0; border-color: transparent; }
.header-actions #authTrigger { border-color: #283632; background: #283632; color: #fff; }
.header-actions #authTrigger:hover { border-color: #40564e; background: #40564e; color: #fff; }
.seo-summary { background: #f8faf9; border-color: #e8ecea; }
.seo-summary-details > summary { min-height: 30px; color: #687974; font-weight: 500; }
.shell { max-width: 1440px; grid-template-columns: 172px minmax(0, 1fr); gap: 28px; padding: 32px 28px 80px; }
.side-nav { border: 0; padding-left: 0; }
.side-nav::before { padding-left: 12px; color: #8b9792; font-size: 11px; letter-spacing: 0; }
.side-nav .nav-button { min-height: 46px; padding-left: 14px; border-radius: 6px; font-weight: 600; }
.side-nav .nav-button.active { color: #a6323c; background: #f9eaea; }
.side-nav .nav-button.active::before { display: none; }
.view.active { gap: 20px; }
.page-head h2 { color: #20292a; font-size: 26px; font-weight: 700; }
.page-head p { color: #71807b; }
.date-field { min-height: 44px; border: 1px solid #dde4e0; border-radius: 6px; color: #293733; }
.panel { border-color: #e4e9e6; border-radius: 6px; box-shadow: var(--shadow); }
.panel-head { border-color: #ebeeec; }

/* The next match is the visual anchor of the schedule. */
#view-overview .hero-status { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); border: 0; border-radius: 6px; background: #293a36; overflow: hidden; }
#view-overview .scan-block { min-height: 144px; padding: 24px 28px; border: 0; background: #293a36; color: #fff; }
#view-overview .scan-block .eyebrow { color: #c9d7ce; font-size: 12px; font-weight: 500; }
#view-overview .scan-block .eyebrow::before { background: #e37a7c; box-shadow: none; }
#view-overview .scan-block h3 { margin-top: 10px; color: #fff; font-size: 23px; font-weight: 600; line-height: 1.35; }
#view-overview .scan-block p { color: #c4d1c9; }
#view-overview .scan-row { margin-top: 16px; }
#view-overview .scan-row .btn.primary { min-height: 36px; border: 1px solid #aabdb2; background: transparent; color: #fff; }
#view-overview .scan-row .btn.primary:hover { background: #3e5149; }
#view-overview .scan-meta { color: #c1cfc5; }
#view-overview .stat-grid { border-color: #53645c; }
#view-overview .stat, #view-overview .stat:first-child { min-height: 72px; padding: 14px 18px; border-color: #52635b !important; background: #344740; }
#view-overview .stat strong, #view-overview .stat:first-child strong { color: #fff; font-weight: 600; }
#view-overview .stat span { color: #c9d7ce; }

#view-overview .fixture-ledger-panel { border: 1px solid #e3e8e5; border-radius: 6px; background: #fff; }
#view-overview .fixture-ledger-panel .panel-head { min-height: 68px; padding: 16px 20px; }
#view-overview .fixture-ledger-panel .panel-head h3 { font-size: 17px; font-weight: 700; }
#view-overview .fixture-ledger-kicker { color: #ad3c45; font-weight: 600; letter-spacing: 0; }
#view-overview .fixture-play-tabs { padding: 0 16px; border-bottom: 1px solid #e8edeb; }
#view-overview .fixture-play-tab { min-height: 56px; border-right: 0; color: #62716c; }
#view-overview .fixture-play-tab.active { border-color: #b63842; background: #fff; }
#view-overview .fixture-play-tab strong { font-size: 13px; font-weight: 600; }
#view-overview .fixture-play-tab.active strong, #view-overview .fixture-play-tab.active span { color: #aa303a; }
#view-overview .fixture-ledger-panel .match-tools { gap: 12px; padding: 12px 20px; background: #f8faf9; }
#view-overview .match-filter { min-height: 36px; border-color: transparent; background: transparent; color: #64736d; font-weight: 500; }
#view-overview .match-filter.active { border-color: #ecd3d5; background: #fff; color: #aa3540; }
#view-overview .match-search { border-color: #e0e7e3; background: #fff; }
#view-overview .fixture-context-bar { padding-inline: 20px; background: #fff; }
#view-overview .fixture-row { border-bottom: 1px solid #e9eeeb; }
#view-overview .fixture-row .match-number { border: 0; border-left: 2px solid #b63842; background: #f7f9f7; }
#view-overview .fixture-row .match-number strong { color: #aa3440; background: transparent; }
#view-overview .fixture-row .match-league { background: #eef3f0; color: #65756d; }
#view-overview .fixture-row .match-teams strong { color: #202b28; font-size: 17px; font-weight: 650; }
#view-overview .fixture-market-line { border-color: #e7ece9; background: #f9fbfa; }
#view-overview .fixture-market-cell b { color: #24342f; }
#view-overview .fixture-row .ai-match { border-color: #ad3440; background: #ad3440; box-shadow: none; }
#view-overview .fixture-row .ai-match:hover { border-color: #922630; background: #922630; }

.report-switcher { background: #eaf0ed; border-color: #dfe7e2; }
.report-tab { border-radius: 5px; }
.membership-card, .membership-card.active { border-color: #293a36; background: #293a36; }
.membership-card h3, .membership-price strong { letter-spacing: 0; }
.membership-card p { color: #d0ddd5; }
.daily-recommendations-panel .channel-mark { flex: 0 0 8px; font-size: 0; }
.recommendation-schedule-item, .daily-recommendation-card { border-radius: 6px; }
#view-settings .account-identity { border-color: #293a36; background: #293a36; }
#view-settings .membership-summary { border-color: #e1e9e3; background: #fff; }
.mobile-nav { background: #fff; }
.site-footer { color: #6f7f78; }

@media (max-width: 980px) {
  .shell { padding: 8px 0 calc(88px + env(safe-area-inset-bottom)); }
  .view.active { gap: 10px; }
  .view.active > .page-head { min-height: 56px; padding: 10px 16px; }
  .mobile-nav { border-top: 1px solid #e4eae6; background: #fff; box-shadow: 0 -4px 16px rgba(33, 48, 41, .05); }
  .mobile-nav .nav-button { color: #6b7972; font-size: 12px; }
  .mobile-nav .nav-button.active { color: #aa3440; background: #fbf0f0; box-shadow: none; }
  .mobile-nav .nav-button.active::before { position: static; inset: auto; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 0; background: transparent; color: #aa3440; }
}

@media (min-width: 761px) and (max-width: 980px) {
  .mobile-nav { position: fixed; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-nav .nav-button { display: flex; justify-content: center; align-items: center; min-height: 52px; padding: 8px; text-decoration: none; }
  .mobile-nav .nav-button::before, .mobile-nav .nav-button.active::before { display: none; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 60px; padding-inline: 16px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand h1 { font-size: 17px; }
  .header-actions { gap: 8px; }
  .header-actions #authTrigger { min-width: 84px; min-height: 36px; padding-inline: 10px; font-size: 12px; }
  .header-actions .connection, .header-actions .connection.good { border-color: #dce8df; background: #f2f7f3; }
  .seo-summary-details > summary { min-height: 30px; padding-inline: 16px; }
  #view-overview .page-head { background: #fff; }
  #view-overview .page-head h2 { font-size: 21px; }
  #view-overview .fixture-ledger-panel { border-right: 0; border-left: 0; border-radius: 0; }
  #view-overview .fixture-ledger-panel .panel-head { min-height: 54px; padding: 12px 16px; border-top: 0; }
  #view-overview .fixture-play-tabs { padding: 0 8px; }
  #view-overview .fixture-play-tab { min-height: 48px; }
  #view-overview .fixture-play-tab strong { font-size: 12px; }
  #view-overview .fixture-ledger-panel .match-tools { padding: 12px 16px; background: #f8faf9; }
  #view-overview .match-filter { min-height: 36px; padding-inline: 10px; }
  #view-overview .fixture-context-bar { padding: 8px 16px; background: #f1f6f2; }
  #view-overview .fixture-next-kickoff > span { color: #a43640; }
  #view-overview .fixture-ledger-panel .fixture-list { background: #f3f5f4; }
  #view-overview .fixture-ledger-panel .fixture-row,
  #view-overview .fixture-ledger-panel .fixture-row:nth-child(even) {
    gap: 8px; margin: 8px 10px; padding: 16px; border: 1px solid #e3eae5; border-radius: 6px; background: #fff;
  }
  #view-overview .fixture-row .match-number { min-height: 28px; padding: 0; border: 0; background: transparent; }
  #view-overview .fixture-row .match-number strong { color: #a6313c; font-size: 13px; }
  #view-overview .fixture-row .match-number span { color: #64756d; font-size: 12px; font-weight: 600; }
  #view-overview .fixture-row .match-meta { margin-bottom: 10px; }
  #view-overview .fixture-row .match-teams strong { font-size: 16px; line-height: 1.35; }
  #view-overview .fixture-row .match-vs { color: #98a69f; font-size: 11px; font-weight: 500; }
  #view-overview .fixture-row .match-foot { margin-top: 14px; }
  #view-overview .fixture-market-line { min-height: 50px; border-color: #e6ede8; background: #f8faf8; }
  #view-overview .fixture-market-cell b { font-size: 15px; }
  #view-overview .fixture-row .row-actions .btn { min-height: 44px; }
  #view-overview .fixture-row .match-side { margin-top: 2px; }
  #view-overview .fixture-row .match-state .pill { border: 0; background: #eff5f1; color: #60786a; }
  #view-reports > .panel, #view-settings > .panel { margin-inline: 10px; }
  #view-reports .membership-card { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; padding: 18px 16px; }
  #view-reports .membership-card > div:first-child { min-width: 0; }
  #view-reports .membership-card p { max-width: none; font-size: 11px; }
  #view-reports .membership-price { min-width: 0; }
  #view-reports .membership-price strong { font-size: 22px; }
  #view-reports .membership-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  #view-reports .membership-quick span { flex-basis: 100%; font-size: 11px; }
  #view-reports .membership-quick .btn { min-height: 36px; }
  #view-reports .report-tab strong { font-size: 12px; }
  #view-recommendations .page-head, #view-reports .page-head, #view-settings .page-head { background: #fff; }
}

@media (max-width: 360px) {
  #view-overview .fixture-play-tab strong { font-size: 11px; }
  #view-overview .fixture-ledger-panel .fixture-row { margin-inline: 8px; padding: 12px; }
  #view-overview .fixture-row .match-teams strong { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* Match desk: keep the odds and match number ahead of the surrounding chrome. */
:root {
  --ink: #202a30;
  --muted: #67757b;
  --line: #dce3e3;
  --canvas: #f2f5f4;
  --nav: #263638;
  --red: #b93643;
  --red-soft: #fcf0f0;
}
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.app-header { border-bottom: 2px solid #b93643; }
.brand-mark { background: #b93643; border-color: #b93643; color: #fff; }
.brand h1 { font-size: 20px; letter-spacing: 0; }
.shell { gap: 24px; padding-top: 24px; }
.side-nav .nav-button { border-radius: 4px; }
.side-nav .nav-button.active { background: #fae9e9; color: #a42e39; box-shadow: inset 3px 0 #b93643; }
.page-head h2 { letter-spacing: 0; }
#view-overview .hero-status { grid-template-columns: minmax(0, 1fr) minmax(320px, .65fr); background: #263638; }
#view-overview .scan-block { min-height: 104px; padding: 18px 24px; background: #263638; }
#view-overview .scan-block h3 { margin-top: 6px; font-size: 19px; }
#view-overview .scan-row { margin-top: 10px; }
#view-overview .stat, #view-overview .stat:first-child { min-height: 52px; padding: 10px 16px; background: #304340; }
#view-overview .fixture-ledger-panel { border-color: #dce4e1; }
#view-overview .fixture-ledger-panel .panel-head { min-height: 60px; }
#view-overview .fixture-play-tabs { gap: 4px; }
#view-overview .fixture-play-tab { min-height: 48px; border-bottom-width: 3px; }
#view-overview .fixture-play-tab.active { background: #fcf2f2; }
#view-overview .fixture-ledger-panel .match-tools { background: #f6f8f7; }
#view-overview .fixture-row .match-number { border-left: 3px solid #b93643; background: #f5f7f6; }
#view-overview .fixture-row .match-number strong { font-weight: 700; }
#view-overview .fixture-row .match-teams strong { letter-spacing: 0; }
.fixture-market-line { border-radius: 4px; }
.fixture-market-unavailable { grid-column: span 3; display: grid; place-items: center; min-width: 0; color: #78878b; font-size: 12px; font-weight: 500; }
.fixture-market-cell b { font-variant-numeric: tabular-nums; }
#view-overview .fixture-market-cell b { color: #20322f; font-size: 15px; font-weight: 700; }
#view-overview .fixture-market-cell i { color: #a94349; }
#view-overview .fixture-row .ai-match { background: #b93643; border-color: #b93643; }
.report-switcher { background: #f0f4f2; }
.membership-card, .membership-card.active, #view-settings .account-identity { background: #263638; border-color: #263638; }
.btn:focus-visible, .nav-button:focus-visible, .fixture-play-tab:focus-visible, input:focus-visible { outline: 3px solid #d78589; outline-offset: 2px; }
#authDialog { border-radius: 8px; }
#authDialog .auth-mode.active, #authDialog #authSubmitBtn { background: #263638; border-color: #263638; }

@media (max-width: 760px) {
  .app-header { border-bottom-width: 2px; }
  .header-inner { min-height: 56px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 5px; }
  .brand h1 { font-size: 17px; }
  .header-actions #authTrigger { background: #263638; border-color: #263638; }
  .seo-summary-details > summary { min-height: 28px; font-size: 11px; }
  #view-overview .page-head { min-height: 52px; padding: 8px 12px; }
  #view-overview .page-head h2 { font-size: 19px; }
  #view-overview .fixture-ledger-panel .panel-head { min-height: 48px; padding: 10px 12px; }
  #view-overview .fixture-ledger-panel .panel-head h3 { font-size: 16px; }
  #view-overview .fixture-play-tabs { padding: 0 4px; gap: 0; }
  #view-overview .fixture-play-tab { min-height: 44px; padding: 6px 8px; }
  #view-overview .fixture-ledger-panel .match-tools { gap: 8px; padding: 8px 12px; }
  #view-overview .match-filter { min-height: 32px; }
  #view-overview .match-search { margin-top: 4px; }
  #view-overview .fixture-context-bar { padding: 6px 12px; }
  #view-overview .fixture-ledger-panel .fixture-list { padding: 0; background: #eef2f0; }
  #view-overview .fixture-ledger-panel .fixture-row,
  #view-overview .fixture-ledger-panel .fixture-row:nth-child(even) {
    gap: 4px 0; margin: 0 0 6px; padding: 12px; border: 0; border-radius: 0; background: #fff;
  }
  #view-overview .fixture-row .match-number { padding: 0; border: 0; }
  #view-overview .fixture-row .match-number strong { color: #af3440; font-size: 13px; }
  #view-overview .fixture-row .match-number span { color: #72817e; }
  #view-overview .fixture-row .match-meta { margin-bottom: 8px; }
  #view-overview .fixture-row .match-league { padding: 3px 6px; border-radius: 3px; background: #eef2f0; color: #51635d; }
  #view-overview .fixture-row .match-teams strong { font-size: 16px; font-weight: 700; }
  #view-overview .fixture-row .match-foot { margin-top: 10px; }
  #view-overview .fixture-market-line { min-height: 44px; background: #f8faf9; }
  #view-overview .fixture-market-cell b { font-size: 14px; }
  #view-overview .fixture-market-cell i { font-size: 10px; font-weight: 600; }
  #view-overview .fixture-row .match-side { margin-top: 8px; }
  #view-overview .fixture-row .row-actions .btn { min-height: 38px; }
  .mobile-nav { border-top: 1px solid #dce4e1; box-shadow: 0 -2px 12px rgba(23, 40, 35, .06); }
  .mobile-nav .nav-button.active { color: #ac303c; background: #fcf0f0; }
  #authDialog { border-radius: 8px 8px 0 0; }
}
