/* ====== 便民工具 · 站内工具页统一风格（暗色，自包含） ====== */
:root{
  --bg:#0d1117; --panel:#161b22; --panel2:#1c2230; --border:#2a3240;
  --text:#e6edf3; --muted:#9aa7b4; --primary:#3b82f6; --primary-h:#2f6fe0;
  --accent:#22c55e; --danger:#ef4444; --radius:12px;
}
*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:15px; line-height:1.6; padding:18px;
}
.wrap{max-width:880px; margin:0 auto;}
.tool-head{margin-bottom:14px;}
.tool-head h1{font-size:21px; margin:0 0 4px; display:flex; align-items:center; gap:8px;}
.tool-head p{margin:0; color:var(--muted); font-size:13px;}
.card{background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:14px;}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:10px;}
.row.end{justify-content:flex-end;}
label.lbl{font-size:13px; color:var(--muted); display:block; margin-bottom:6px;}
textarea, input[type=text], input[type=number], select{
  width:100%; background:var(--panel2); color:var(--text);
  border:1px solid var(--border); border-radius:10px; padding:10px 12px;
  font-size:14px; font-family:inherit; outline:none; resize:vertical;
}
textarea{min-height:140px; line-height:1.55; font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;}
textarea:focus, input:focus, select:focus{border-color:var(--primary);}
.out{background:var(--panel2); border:1px solid var(--border); border-radius:10px; padding:12px; min-height:120px; white-space:pre-wrap; word-break:break-all; font-family:Consolas,Menlo,monospace; font-size:13px; overflow:auto; max-height:420px;}
button{
  background:var(--primary); color:#fff; border:0; border-radius:10px;
  padding:9px 16px; font-size:14px; cursor:pointer; transition:.15s;
}
button:hover{filter:brightness(1.08);}
button.ghost{background:var(--panel2); color:var(--text); border:1px solid var(--border);}
button.ghost:hover{background:var(--border);}
button.sm{padding:6px 12px; font-size:13px;}
button.danger{background:var(--danger);}
.btn-group{display:flex; gap:8px; flex-wrap:wrap;}
.chk{display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--muted);}
.hint{font-size:12px; color:var(--muted); margin-top:6px;}
.result-pill{display:inline-block; background:var(--panel2); border:1px solid var(--border); border-radius:999px; padding:2px 10px; font-size:12px; color:var(--muted); margin:2px;}
.copy{position:relative;}
.toast{
  position:fixed; left:50%; bottom:30px; transform:translateX(-50%);
  background:#111; color:#fff; border:1px solid var(--border); padding:10px 18px;
  border-radius:10px; font-size:14px; opacity:0; pointer-events:none; transition:.25s; z-index:99;
}
.toast.show{opacity:1;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media(max-width:620px){.grid2{grid-template-columns:1fr;}}
.swatch{width:100%; height:60px; border-radius:10px; border:1px solid var(--border);}
.kv{display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed var(--border); font-size:13px;}
.kv:last-child{border-bottom:0;}
