:root {
  --bg: #fff;
  --ink: #202527;
  --muted: #788184;
  --line: #e8eceb;
  --green: #16785c;
  --red: #b54337;
  --amber: #94691c;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, a, input, select, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
button { border: 0; background: none; color: inherit; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
a { color: var(--green); text-decoration: none; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; font-weight: 650; }
h2 { font-size: 18px; }
strong { font-weight: 600; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-header { height: 64px; display: flex; align-items: center; gap: 40px; padding: 0 max(24px, calc((100% - 1300px) / 2)); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; background: #24362f; color: #fff; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 10px; }
.brand strong { font-size: 20px; }
.brand span span { font-size: 11px; color: var(--muted); }
nav { display: flex; align-items: center; align-self: stretch; gap: 24px; }
.nav-button { position: relative; padding: 0 3px; font-size: 14px; color: var(--muted); }
.nav-button.active { color: var(--green); font-weight: 600; }
nav .nav-button.active::after { position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--green); content: ""; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; }
.icon-button { display: inline-grid; position: relative; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 5px; color: #606c68; }
.icon-button:hover, .dropdown[open] > summary { background: #f0f4f2; }
.icon-button.saved { color: var(--amber); }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; flex: none; }
.status-dot.error { background: var(--red); }
main { max-width: 1300px; margin: 0 auto; padding: 28px 24px 48px; }
.filters { display: flex; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; max-width: 370px; height: 36px; padding: 0 10px; background: #f7f9f8; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.search svg { width: 16px; height: 16px; }
.search input { min-width: 0; width: 100%; border: 0; outline: none; color: var(--ink); background: none; font-size: 12px; }
select { max-width: 100%; height: 36px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 12px; }
#lottery { width: 152px; flex: none; }
.filter-dropdown { margin-left: auto; }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: 254px; max-width: calc(100vw - 32px); padding: 16px; background: #fff; border: 1px solid #dfe6e2; border-radius: 6px; box-shadow: 0 8px 24px #20382a12; }
.filter-panel { display: grid; gap: 16px; font-size: 12px; }
.filter-panel > label:not(.toggle) { display: grid; gap: 6px; color: var(--muted); }
.filter-panel select { width: 100%; color: var(--ink); }
.filter-panel small, .more-menu small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.filter-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); position: absolute; right: 5px; top: 5px; }
.toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; }
input[type=checkbox] { accent-color: var(--green); width: 14px; height: 14px; margin: 0; }
.reset-button { display: flex; align-items: center; gap: 7px; width: fit-content; font-size: 12px; color: var(--muted); padding: 0; }
.reset-button svg { width: 14px; height: 14px; }
.more-menu { padding: 8px; }
.more-menu > button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px; text-align: left; border-radius: 4px; font-size: 12px; }
.more-menu > button:hover { background: #f1f5f3; }
.more-menu small { padding: 4px 9px; }
.menu-status { display: flex; align-items: center; gap: 7px; padding: 12px 9px 4px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.section-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 0; color: var(--muted); font-size: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 20px; }
.update-label { font-size: 11px; color: var(--muted); }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
th { background: #f7f9f8; color: var(--muted); font-weight: 400; white-space: nowrap; }
td, th { padding: 13px 14px; }
td { border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td strong { display: block; font-size: 13px; }
td small { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
td .link-button { display: block; padding: 0; text-align: left; color: var(--ink); }
td .link-button:hover { color: var(--green); }
.match-table tbody tr:hover { background: #fbfcfb; }
.match-table td:first-child { width: 112px; }
.match-table td:nth-child(4) { width: 230px; }
.match-table td:nth-child(5) { width: 90px; }
.match-table td:nth-child(6) { width: 100px; }
.match-table td:last-child { width: 48px; padding: 4px; }
.match-table td .mobile-match-info { display: none; }
.data-text { font-size: 12px; }
.green { color: var(--green); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }
.badge { display: inline-block; font-size: 11px; color: var(--muted); }
.badge.green { color: var(--green); }
.badge.amber { color: var(--amber); }
.badge.red { color: var(--red); }
.empty { color: var(--muted); text-align: center; padding: 70px 16px; }
.empty svg { width: 25px; height: 25px; margin-bottom: 10px; color: #a0aaa5; }
.empty strong { display: block; font-size: 14px; font-weight: 500; color: #53645c; }
.empty p { font-size: 12px; margin-top: 6px; }
.empty p:empty { display: none; }
.notice { padding: 10px 12px; margin-bottom: 16px; font-size: 12px; color: #73591e; background: #fcf7ed; border-left: 2px solid var(--amber); overflow-wrap: anywhere; }
.notice.error { background: #fff4f1; color: var(--red); border-color: var(--red); }
.notice.neutral { background: #f5f7f6; color: var(--muted); border-color: #b7c2bc; }
.secondary-details { color: var(--muted); font-size: 12px; margin-top: 16px; }
.secondary-details > summary { width: fit-content; }
.secondary-details > p, .period-info { padding: 10px 0; font-size: 12px; line-height: 1.8; }
.source-details { margin-top: 4px; font-size: 11px; color: var(--muted); }
.source-details p { margin-top: 5px; max-width: 260px; overflow-wrap: anywhere; }
.command { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.command:hover { border-color: #9cb9b0; }
.status-list { margin: 0 0 20px; border-top: 1px solid var(--line); }
.status-list > div { display: grid; grid-template-columns: 150px minmax(0,1fr); padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; overflow-wrap: anywhere; }
.event-list > div { display: grid; grid-template-columns: 45px minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event-list time { font-variant-numeric: tabular-nums; }
.event-list p { margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.detail-dialog { padding: 0; border: 0; margin: 0 0 0 auto; position: fixed; top: 0; right: 0; width: 600px; max-width: 100vw; height: 100dvh; max-height: 100dvh; background: #fff; color: var(--ink); box-shadow: -12px 0 35px #0000000a; }
.detail-dialog::backdrop { background: #132a2140; }
.detail-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; border-bottom: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); }
#detailContent { padding: 24px; }
.eyebrow { font-size: 11px; color: var(--muted); }
.fixture-heading h2 { margin: 8px 0; overflow-wrap: anywhere; }
.fixture-heading p { font-size: 12px; color: var(--muted); }
.official-score { margin-top: 14px; font-size: 15px; }
.detail-section { margin-top: 24px; }
.detail-section .empty { padding: 35px 0; text-align: left; }
.digest { padding: 16px 0; border-bottom: 1px solid var(--line); }
.digest-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.digest-head strong { color: var(--ink); }
.digest p { font-size: 13px; margin-top: 8px; overflow-wrap: anywhere; color: var(--ink); }
.digest .secondary-details { margin-top: 10px; font-size: 11px; }
.digest .original { font-size: 11px; color: var(--muted); padding: 0; }
.source-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; }
.source-link svg { width: 12px; height: 12px; }
.toast { position: fixed; z-index: 30; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 30px); padding: 10px 16px; background: #263731; color: #fff; border-radius: 5px; font-size: 12px; }
.login-view { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #f7f9f8; }
.login-form { display: grid; gap: 16px; width: min(100%, 360px); padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.login-form h1 { margin-top: 6px; }
.login-form p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.login-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.login-form input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: none; }
.login-form input:focus { border-color: var(--green); }
@media (max-width: 720px) {
  .app-header { gap: 18px; height: 58px; padding: 0 16px; }
  .brand > span:last-child { display: block; line-height: 1.3; }
  .brand strong { font-size: 18px; }
  .brand span span { display: none; }
  .brand-icon { width: 28px; height: 28px; }
  nav { gap: 16px; }
  .nav-button { font-size: 13px; }
  .header-actions { gap: 1px; }
  .icon-button { width: 34px; height: 34px; }
  main { padding: 20px 16px 32px; }
  .filters { gap: 8px; }
  #lottery { width: 127px; padding-left: 8px; }
  .search { flex: 1; max-width: none; padding: 0 8px; }
  .search svg { display: none; }
  .filter-dropdown { margin-left: 0; }
  td, th { padding: 11px 7px; }
  .match-table { table-layout: fixed; }
  .match-table td:nth-child(4), .match-table th:nth-child(4), .match-table td:nth-child(5), .match-table th:nth-child(5) { display: none; }
  .match-table td:first-child, .match-table th:first-child { width: 72px; }
  .match-table td:nth-child(6), .match-table th:nth-child(6) { width: 58px; }
  .match-table td:last-child, .match-table th:last-child { width: 28px; padding: 0; }
  .match-table td strong { font-size: 12px; overflow-wrap: anywhere; }
  .match-table td small, .match-table .data-text { font-size: 10px; }
  .match-table td .mobile-match-info { display: block; }
  .match-table .icon-button { width: 28px; height: 32px; }
  .match-table .icon-button svg { width: 15px; }
  .section-meta { font-size: 11px; }
  #backtestView table { min-width: 710px; }
  #sourcesView td { font-size: 11px; }
  #sourcesView td strong { font-size: 12px; }
  .status-list > div { grid-template-columns: 105px minmax(0,1fr); }
  .detail-top { padding: 10px 16px; }
  #detailContent { padding: 20px 16px; }
  .fixture-heading h2 { font-size: 18px; }
}
