:root{
  --bg:#f6f8fb;--surface:#fff;--surface-2:#f1f4f8;--surface-3:#e8eef5;
  --text:#17202a;--muted:#697586;--line:#e2e7ef;--accent:#0b6b95;--accent-2:#e6f4fb;
  --green:#167a59;--amber:#a96800;--red:#b42318;--shadow:0 12px 32px rgba(20,35,55,.12)
}
html[data-theme=dark]{
  --bg:#0d1620;--surface:#101a24;--surface-2:#152333;--surface-3:#1b2c3d;
  --text:#e7eef6;--muted:#8c9bac;--line:#213244;--accent:#8bd7fb;--accent-2:#0b4a63;
  --green:#59dda8;--amber:#f2c46d;--red:#ff9b9b;--shadow:0 18px 44px rgba(0,0,0,.45)
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;background:var(--bg);color:var(--text)}
body{font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
button,select,input{font:inherit}button{cursor:pointer}
a{color:var(--accent)}
.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}
.topbar{max-width:1440px;margin:0 auto;display:flex;align-items:center;gap:22px;padding:16px 24px 10px;min-height:72px}
.brand{font-size:28px;font-weight:800;letter-spacing:.2px;color:var(--text)}.brand-tab{display:none;font-size:14px;font-weight:500;color:var(--muted);margin-left:8px;letter-spacing:0}
nav{display:flex;gap:6px}
nav button{border:1px solid transparent;background:transparent;color:var(--muted);padding:10px 18px;border-radius:4px;font-weight:600}
nav button.active{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] nav button.active{color:#07131c}
.head-actions{margin-left:auto;display:flex;gap:8px;align-items:center}
button{background:var(--surface);border:1px solid var(--line);color:var(--text);border-radius:4px;padding:8px 12px}
button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] button.primary{color:#07131c}
button.ghost{background:transparent}
.theme{min-width:58px;color:var(--muted);border-color:var(--line);background:transparent}
main{max-width:1440px;margin:0 auto;padding:0 24px 28px}
.login{display:grid;place-items:center;min-height:70vh}.login-card{width:min(380px,92vw);background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:26px;display:grid;gap:10px;box-shadow:var(--shadow)}
.login-card h1{margin:0 0 4px;font-size:30px}.login-card input{padding:11px;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--text)}
.muted{color:var(--muted)}.msg{min-height:18px;margin:0;color:var(--red)}
.statusline{font-size:12px;color:var(--muted);padding:6px 0 10px;border-bottom:0;margin:0 0 2px;line-height:1.7;white-space:normal}
.page-head{display:flex;align-items:baseline;gap:14px;margin:10px 0 14px}.page-head h1{font-size:28px;line-height:1.2;margin:0;letter-spacing:.2px}
#preDate{font-size:16px;font-weight:600;color:var(--text);margin-left:8px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.chips button{background:var(--surface);border:1px solid var(--line);color:var(--text);padding:9px 18px;border-radius:4px;min-width:84px;text-align:center;font-weight:600}
.chips button.on{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] .chips button.on{color:#07131c}
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 12px}
.filters select,.filters input{background:var(--surface);border:1px solid var(--line);color:var(--text);border-radius:4px;padding:9px 12px;min-height:38px}
.filters input{flex:1;min-width:220px}
.filters #status{min-width:160px}.filters #league{min-width:150px}.filters #market{min-width:120px}.filters .scope{min-width:120px}
.filters button{min-height:38px}
.list{min-height:80px}
.matches{width:100%;border-collapse:collapse;table-layout:fixed;background:var(--surface);border:1px solid var(--line)}
.matches th,.matches td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;font-size:13px}
.matches th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:12px}
.matches th:nth-child(1),.matches td:nth-child(1){width:70px}
.matches th:nth-child(2),.matches td:nth-child(2){width:86px}
.matches th:nth-child(3),.matches td:nth-child(3){width:auto}
.matches th:nth-child(4),.matches td:nth-child(4),.matches th:nth-child(5),.matches td:nth-child(5){width:27%}
.matches th:nth-child(6),.matches td:nth-child(6){width:105px}
.matches th:nth-child(7),.matches td:nth-child(7){width:64px}
.matches tr{cursor:pointer}.matches tr:hover td{background:var(--surface-2)}
.matches b{font-weight:700}.matches small{color:var(--muted)}
.cell-main{font-weight:600}.cell-main.rec{color:var(--green)}.cell-main.no{color:var(--red)}.cell-main.pend{color:var(--amber)}.cell-main.miss{color:var(--muted)}
.cell-sub{display:block;color:var(--muted);font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.push{font-size:12px;color:var(--muted)}.push.ok{color:var(--muted)}.push.pending{color:var(--amber)}.push.failed{color:var(--red)}
.detail-link{background:none;border:0;color:var(--accent);padding:0;font-weight:600}
.mobile-cards{display:none}
.pager{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 0;font-size:12px;color:var(--muted);flex-wrap:wrap}
.pager-controls{display:flex;align-items:center;gap:8px}.pager button{padding:6px 10px}
.count{color:var(--muted)}
.detail{position:fixed;right:0;top:0;height:100vh;width:440px;max-width:100vw;background:var(--surface);border-left:1px solid var(--line);padding:16px 20px 28px;overflow:auto;z-index:20;box-shadow:var(--shadow)}
.detail-head{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);margin-bottom:10px}.detail-head button{padding:7px 10px}
.detail h2{font-size:22px;line-height:1.35;margin:10px 0 4px}
.detail .meta{font-size:12px;color:var(--muted);line-height:1.7}
.detail .market-tabs{display:flex;gap:8px;margin:14px 0 10px}.detail .market-tabs button{flex:1;text-align:center;padding:9px;color:var(--muted)}.detail .market-tabs button.on{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] .detail .market-tabs button.on{color:#07131c}
.detail .rec-title{font-size:22px;font-weight:700;color:var(--green);margin:8px 0 4px}.detail .rec-title.no{color:var(--red)}.detail .rec-title.pend{color:var(--amber)}
.detail .reason{font-size:13px;line-height:1.7;margin:8px 0 14px;color:var(--text)}
.kv{display:grid;grid-template-columns:110px 1fr;gap:6px 10px;font-size:13px;margin:12px 0}.kv dt{color:var(--muted)}.kv dd{margin:0}
.entry-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.entry-form input,.entry-form select{padding:8px;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--text);min-width:0}
.entry-form .wide{grid-column:1/-1}.entry-form button{min-height:38px}
.entry-btn{width:100%;margin-top:12px}
.tech-wrap{margin-top:18px;color:var(--muted);font-size:12px}.tech{font-size:12px;color:var(--muted);margin:6px 0}.tech summary{cursor:pointer}.tech code{word-break:break-all}
.empty{color:var(--muted);padding:24px;text-align:center;border:1px dashed var(--line);border-radius:4px;background:var(--surface)}
.table-scroll{overflow-x:auto}.table-scroll .matches{min-width:900px}
.stats{margin-top:22px}.stats .net-summary{font-size:22px;font-weight:700;color:var(--green);margin:14px 0 4px}.stats .net-summary small{font-size:13px;color:var(--muted);font-weight:400}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.stat{background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:12px}.stat b{font-size:20px;display:block}
.group-title{font-size:16px;margin:18px 0 8px}
.post-tools{display:block;margin:8px 0 14px}.post-tools .second{margin-top:8px}
.segmented{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.segmented button{background:transparent;color:var(--muted);min-width:78px;padding:9px 14px}.segmented button.on{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] .segmented button.on{color:#07131c}
.segmented.second button.on{background:var(--accent);}
.net-summary{font-size:20px;color:var(--muted);margin:12px 0 16px;line-height:1.7}.net-summary .net{display:block;color:var(--green);font-size:28px;font-weight:700;margin-bottom:2px}
.post-tools .muted{font-size:12px}
#postList .matches,#refList .matches,#stats .matches,#outboxList .matches{background:var(--surface)}
.hist{background:none;border:0;color:var(--accent);padding:0;font-size:12px}
.tech-wrap{color:var(--muted)}
@media (min-width:1101px){body.detail-open main{padding-right:464px}}
@media (max-width:1100px){.detail{width:min(440px,100vw)}}
@media (max-width:700px){
  body{padding-bottom:64px}
  .topbar{padding:12px 14px;min-height:54px;gap:10px}.brand{font-size:20px}.brand-tab{display:inline}
  .head-actions .theme{min-width:0;padding:6px 10px;font-size:12px}
  nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;gap:8px;background:var(--surface);border-top:1px solid var(--line);padding:8px 14px calc(8px + env(safe-area-inset-bottom))}
  nav button{flex:1;padding:10px 6px;font-size:13px;border-radius:4px}
  main{padding:0 14px 18px}
  .page-head{display:block;margin:8px 0 10px}.page-head h1{display:none}#preDate{display:block;font-size:13px;margin:0;color:var(--muted)}
  .chips{gap:6px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.chips button{min-width:78px;padding:8px 10px;font-size:12px;white-space:nowrap}
  .filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.filters select,.filters input{width:100%;min-width:0;padding:8px;font-size:12px}.filters input{grid-column:1/-1}.filters .scope{grid-column:1/-1}.filters #status,.filters #league,.filters #market{min-width:0}
  .filters #resetFilters{grid-column:1/-1;min-height:34px;font-size:12px}
  .statusline{font-size:11px;line-height:1.6;padding:4px 0 8px;white-space:normal}
  #list>.matches{display:none}.mobile-cards{display:block}
  .card{border:0;border-top:1px solid var(--line);background:var(--surface);padding:10px 0;border-radius:0}
  .card-top{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--muted)}
  .card-teams{font-size:15px;font-weight:700;margin:3px 0 4px}
  .card-market{font-size:12px;line-height:1.7;color:var(--text)}.card-market .label{display:inline-block;width:26px;color:var(--muted)}
  .card .cell-sub{display:inline;white-space:normal}
  .pager{display:block;font-size:11px}.pager-controls{justify-content:flex-end;margin-top:8px}.count{display:block;line-height:1.6}
  .detail{width:100%;padding:14px 14px 24px;border-left:0}
  .detail h2{font-size:19px}.detail .rec-title{font-size:19px}
  .kv{grid-template-columns:92px 1fr;font-size:12px}
  .entry-form{grid-template-columns:1fr 1fr}.entry-form input,.entry-form select{padding:8px;font-size:13px}
  .post-tools{display:block}.segmented{margin-bottom:8px;overflow-x:auto;flex-wrap:nowrap}.segmented button{min-width:68px;padding:8px 10px;font-size:12px}
  .net-summary{font-size:14px}.net-summary .net{font-size:24px}
  .stats .net-summary{font-size:14px}
  .table-scroll .matches{min-width:760px}
  #postList .matches th,#postList .matches td,#stats .matches th,#stats .matches td{font-size:11px;padding:8px}
}
#postList .matches,#refList .matches,#stats .matches,#outboxList .matches{table-layout:auto;min-width:820px}
#postList .matches th,#postList .matches td,#refList .matches th,#refList .matches td,#stats .matches th,#stats .matches td{width:auto!important;white-space:nowrap}
#postList .matches td:nth-child(2),#postList .matches td:nth-child(3),#stats .matches td:nth-child(1){white-space:normal;min-width:110px}
#postList .table-scroll,#refList .table-scroll,#stats .table-scroll,#outboxList .table-scroll{border:1px solid var(--line);background:var(--surface)}
@media(max-width:700px){#postList .matches,#refList .matches,#stats .matches{min-width:760px}}

#list .matches th:nth-child(4),#list .matches th:nth-child(5){font-size:0}
#list .matches th:nth-child(4)::before{content:"AH 让球 · 原因";font-size:12px}
#list .matches th:nth-child(5)::before{content:"OU 大小 · 原因";font-size:12px}
.history-row{border-bottom:1px solid var(--line);padding:10px 0}.history-row:last-child{border-bottom:0}.history-row .kv{margin:8px 0}
