*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:-apple-system,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif;color:#2b2118;background:#f6f1e7}
body{display:flex;flex-direction:column}
header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#7a2e1d;color:#fff8ec}
.brand{font-size:17px;letter-spacing:1px}.brand .sub{font-size:11px;margin-left:6px;padding:1px 5px;border:1px solid #f3d9b1;border-radius:3px}
.btn{border:1px solid #c9b79c;background:#fffaf1;color:#5a2a1a;border-radius:6px;padding:4px 10px;font-size:14px;cursor:pointer}
header .btn{display:none}
#filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 12px;background:#fbf6ec;border-bottom:1px solid #e3d6bf;font-size:14px}
#filters select,#filters input[type=search]{font-size:14px;padding:4px 6px;border:1px solid #c9b79c;border-radius:6px;background:#fff}
#filters input[type=search]{width:150px}
.seg{display:inline-flex;border:1px solid #c9b79c;border-radius:6px;overflow:hidden}
.seg button{border:0;background:#fff;padding:4px 9px;font-size:14px;cursor:pointer;color:#5a2a1a}
.seg button.on{background:#7a2e1d;color:#fff}
.chk{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.stat{color:#7a6a55;font-size:13px}
#map{flex:1;min-height:200px}
#timeline{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fbf6ec;border-top:1px solid #e3d6bf;flex-wrap:wrap}
#year{flex:1;min-width:160px;accent-color:#7a2e1d}
#yearLabel{width:100%;font-size:13px;color:#5a2a1a}
#panel{position:absolute;z-index:1000;right:10px;top:110px;bottom:90px;width:380px;background:#fffdf8;border:1px solid #d9c8aa;border-radius:10px;box-shadow:0 4px 20px rgba(60,30,10,.25);display:flex;flex-direction:column}
#panel.hidden{display:none}
.phead{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid #eee2cc}
#pTitle{font-size:18px;font-weight:600;color:#7a2e1d}
#pMeta{padding:6px 12px;font-size:12px;color:#7a6a55;border-bottom:1px solid #eee2cc}
#pList{overflow-y:auto;flex:1;padding:4px 0}
.item{border-bottom:1px solid #f1e8d8;padding:8px 12px}
.item .h{cursor:pointer;display:flex;justify-content:space-between;gap:8px}
.item .t{font-weight:600}
.item .y{color:#8a7a65;font-size:12px;white-space:nowrap}
.tag{white-space:nowrap;font-size:11px;padding:0 4px;border-radius:3px;margin-left:4px;font-weight:normal}
.tag.ok{background:#e1efdc;color:#2f6a24}.tag.wait{background:#fbe6c8;color:#8a4b00}.tag.ci{background:#e4e3f6;color:#3a3790}
.body{display:none;margin-top:6px;font-size:14px;line-height:1.75}
.item.open .body{display:block}
.body .poem{font-family:"Songti SC","STSong","Noto Serif CJK SC",serif;font-size:16px;white-space:pre-wrap;background:#faf4e6;padding:8px 10px;border-radius:6px}
.body .bg{color:#4d4033;margin-top:6px}
.body .vf{color:#8a7a65;font-size:12px;margin-top:4px}
.body a{color:#9b3b22;font-size:13px;margin-right:10px}
.more{display:block;margin:8px auto}
.pm{display:flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;font-size:11px;font-weight:600;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35);background:rgba(155,59,34,.85)}
.pm.dim{opacity:.25}
.pm.hl{background:#d4380d;box-shadow:0 0 0 4px rgba(212,56,13,.35),0 0 12px rgba(212,56,13,.8);opacity:1}
.leaflet-tooltip.plab{background:rgba(255,250,241,.92);border:1px solid #d9c8aa;color:#5a2a1a;font-size:12px;padding:1px 5px;box-shadow:none}
.leaflet-control-attribution{font-size:11px!important}
@media (max-width:700px){
  header .btn{display:inline-block}
  #filters{display:none}
  #filters.show{display:flex}
  #filters input[type=search]{width:100%}
  #panel{left:0;right:0;width:auto;top:auto;bottom:0;height:58%;border-radius:12px 12px 0 0}
}
