:root { --bg:#0f1419; --panel:#161d25; --line:#26313d; --text:#d8dee6; --muted:#8a96a3; --acc:#e0b354; --bad:#e06c5a; --good:#6cc08b; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; display:flex; flex-direction:column; background:var(--bg); color:var(--text); font:13px/1.55 -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
header#top { display:flex; align-items:center; gap:18px; padding:8px 14px; border-bottom:1px solid var(--line); background:#121920; flex-wrap:wrap; }
.brand { font-size:16px; font-weight:600; letter-spacing:1px; }
.brand .sub { font-size:11px; color:var(--muted); margin-left:8px; font-weight:400; }
.year { font-size:22px; font-weight:700; color:var(--acc); min-width:170px; }
.kpis span { margin-right:14px; color:var(--muted); }
.kpis b { color:var(--text); }
#kledger.ok { color:var(--good); } #kledger.bad { color:var(--bad); }
.ctrl { display:flex; gap:6px; align-items:center; margin-left:auto; }
button, select, input { background:#1d2732; color:var(--text); border:1px solid var(--line); border-radius:4px; padding:4px 8px; font:inherit; }
button { cursor:pointer; } button:hover { border-color:var(--acc); }
.rate { color:var(--muted); font-size:12px; min-width:150px; }
main { display:flex; flex:1; min-height:0; }
#mapwrap { position:relative; flex:1; min-width:300px; overflow:hidden; background:#0b1a2a; }
#map { width:100%; height:100%; display:block; cursor:grab; }
#maptools { position:absolute; top:8px; left:8px; display:flex; gap:4px; }
#legend { position:absolute; left:8px; bottom:44px; background:rgba(15,20,25,.88); border:1px solid var(--line); padding:6px 8px; border-radius:4px; max-height:45%; overflow:auto; font-size:12px; max-width:280px; }
#legend .it { display:flex; align-items:center; gap:6px; cursor:pointer; white-space:nowrap; }
#legend .sw { width:12px; height:12px; border-radius:2px; flex:none; border:1px solid rgba(255,255,255,.2); }
#scalebar { position:absolute; right:10px; bottom:44px; background:rgba(15,20,25,.7); padding:2px 6px; border-radius:3px; font-size:11px; color:#ccd; text-align:center; }
#scalebar .bar { height:6px; border:1px solid #ccd; border-top:none; }
#tip { position:absolute; pointer-events:none; background:rgba(10,14,18,.94); border:1px solid var(--line); padding:6px 8px; border-radius:4px; font-size:12px; display:none; max-width:300px; }
#mapnote { position:absolute; bottom:4px; left:8px; right:8px; font-size:11px; color:var(--muted); background:rgba(11,26,42,.75); padding:1px 4px; }
aside#side { width:min(480px, 45vw); min-height:0; border-left:1px solid var(--line); display:flex; flex-direction:column; background:var(--panel); }
#tabs { display:flex; flex-wrap:wrap; gap:2px; padding:6px; border-bottom:1px solid var(--line); }
#tabs button { padding:3px 7px; font-size:12px; }
#tabs button.on { background:var(--acc); color:#111; border-color:var(--acc); }
#panes { flex:1; overflow:hidden; position:relative; }
.pane { display:none; height:100%; overflow:auto; padding:8px 10px; }
.pane.on { display:block; }
#p-news.on { display:flex; flex-direction:column; }
#news { flex:1; overflow:auto; }
.list .ev { padding:5px 2px; border-bottom:1px solid var(--line); }
.ev .y { color:var(--acc); font-size:12px; margin-right:6px; }
.ev .t { font-weight:600; }
.ev .x { color:#aeb8c3; font-size:12px; }
.ev .tag { font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:3px; padding:0 4px; margin-left:4px; }
.imp4 .t, .imp5 .t { color:#ffd27a; } .imp5 { background:rgba(224,108,90,.08); }
.badge { background:var(--acc); color:#111; padding:4px 8px; border-radius:4px; cursor:pointer; margin:4px 0; text-align:center; }
.hidden { display:none !important; }
.muted { color:var(--muted); }
.row { display:flex; gap:6px; align-items:center; margin-bottom:6px; flex-wrap:wrap; }
.filters { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:6px; }
.filters input#hq { flex:1; min-width:160px; }
.pager { display:flex; gap:6px; align-items:center; margin:4px 0; color:var(--muted); }
.civ { display:grid; grid-template-columns: 14px 1fr auto; gap:6px; padding:4px 2px; border-bottom:1px solid var(--line); cursor:pointer; align-items:center; }
.civ:hover, .clk:hover { background:#1c2631; }
.clk { cursor:pointer; }
.sw { display:inline-block; width:12px; height:12px; border-radius:2px; }
h3 { margin:10px 0 4px; font-size:14px; color:var(--acc); }
h2 { margin:4px 0; font-size:17px; }
table { border-collapse:collapse; width:100%; font-size:12px; }
td, th { border-bottom:1px solid var(--line); padding:2px 4px; text-align:left; vertical-align:top; }
th { color:var(--muted); font-weight:500; }
td.num { text-align:right; font-variant-numeric:tabular-nums; }
.st-维持中 { color:var(--good); } .st-曾掌握，当前无法维持 { color:var(--bad); } .st-未掌握 { color:#5f6b78; }
.kv { display:grid; grid-template-columns: 1fr auto; gap:0 10px; font-size:12px; }
.kv div:nth-child(odd) { color:var(--muted); }
canvas.chart { width:100%; height:130px; background:#121920; border:1px solid var(--line); border-radius:3px; }
#modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:10; }
#modal .box { background:var(--panel); border:1px solid var(--line); border-radius:6px; width:min(900px, 92vw); max-height:88vh; overflow:auto; padding:16px 20px; position:relative; }
#modal .close { position:absolute; right:10px; top:8px; }
.narr { white-space:pre-wrap; line-height:1.85; font-size:14px; }
.pill { display:inline-block; padding:0 6px; border-radius:8px; font-size:11px; border:1px solid var(--line); margin-right:4px; }
.pill.ok { color:var(--good); border-color:var(--good); } .pill.bad { color:var(--bad); border-color:var(--bad); } .pill.run { color:var(--acc); border-color:var(--acc); }
pre { white-space:pre-wrap; font-size:12px; background:#0f141a; padding:6px; border-radius:4px; }
.warn { color:var(--bad); }

@media (max-width: 1100px) { .brand .sub { display:none; } .kpis span { margin-right:8px; } .year { font-size:18px; min-width:0; } }
#endbanner { background:#5a2a22; color:#ffe2c8; padding:6px 14px; border-bottom:1px solid var(--line); }
#chatpresets .preset { font-size:12px; padding:3px 8px; border-radius:12px; }
.introbtn { background:var(--acc); color:#111; border-color:var(--acc); font-weight:600; }
.introbtn:hover { filter:brightness(1.08); }
.intro { max-width:680px; margin:0 auto; line-height:1.85; font-size:14px; }
.intro h2 { font-size:20px; text-align:center; margin:4px 0 10px; color:var(--acc); }
.intro h3 { margin:16px 0 4px; }
.intro ul { margin:4px 0; padding-left:22px; }
