:root {
  --bg: #f3f4f6;
  --paper: #f8fafc;
  --card: #ffffff;
  --ink: #111827;
  --mute: #6b7280;
  --line: #e5e7eb;
  --pri: #2563eb;
  --pri2: #1d4ed8;
  --ok: #166534;
  --okbg: #dcfce7;
  --warn: #92400e;
  --warnbg: #fef3c7;
  --bad: #991b1b;
  --info: #1e40af;
  --infobg: #dbeafe;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { min-height: 100vh; }

header {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 16px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
h1 { margin: 0; font-size: 16px; font-weight: 650; }
.sub { color: var(--mute); font-size: 12px; }
.who { color: var(--mute); font-size: 13px; }
.stamp { font-size: 12px; color: var(--mute); background: var(--paper); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

main { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 1440px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr; } header { flex-wrap: wrap; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 650; }
.hint { color: var(--mute); font-size: 12px; margin: 0 0 10px; }
label { display: block; font-size: 12px; color: var(--mute); margin: 10px 0 4px; }

input, button, select { font: inherit; }
input[type=text], input[type=password], input[type=file], select {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink);
}
input[type=file] { height: auto; padding: 8px; }
input:focus, select:focus { outline: 2px solid #bfdbfe; border-color: var(--pri); }
button { background: var(--pri); color: #fff; border: 0; border-radius: 6px; height: 36px; padding: 0 12px; cursor: pointer; }
button:hover { background: var(--pri2); }
button:disabled { opacity: .6; cursor: default; }
button.sec { background: #111827; }
button.sec:hover { background: #000; }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover { background: var(--paper); }
button.danger { background: #fff; color: var(--bad); border: 1px solid #fecaca; }
button.danger:hover { background: #fef2f2; }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px; color: var(--mute); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 0 4px 4px 0; }
.ok { background: var(--okbg); color: var(--ok); }
.warn { background: var(--warnbg); color: var(--warn); }
.info { background: var(--infobg); color: var(--info); }
.badp { background: #fee2e2; color: var(--bad); }
.mute { color: var(--mute); }

.lane-bar { height: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.lane-bar i { display: block; height: 100%; width: 0; background: var(--pri); }
.lane-num { font-size: 16px; font-weight: 650; line-height: 1.3; margin: 0 0 8px; }
.lane-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
@media (max-width: 720px) { .lane-grid { grid-template-columns: 1fr 1fr; } }
.lane-cell { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.lane-cell b { display: block; font-variant-numeric: tabular-nums; font-size: 20px; }
.lane-cell span { color: var(--mute); font-size: 12px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.hide { display: none !important; }

#toast { position: sticky; top: 53px; z-index: 8; color: #92400e; font-size: 13px; margin: 0;
  background: #fffbeb; border: 1px solid #fde68a; padding: 8px 12px; border-radius: 6px; cursor: pointer; }

.login-wrap { max-width: 400px; margin: 48px auto 0; }
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; align-items: center; }
.picks { display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.pick input { width: auto; height: auto; }
.pick .tag { font-size: 12px; color: var(--mute); }

.filters { display: grid; grid-template-columns: minmax(0, 1fr) 160px 120px 72px; gap: 8px; align-items: center; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 12px; }

.acc-head, .acc { display: grid; grid-template-columns: 120px minmax(168px, 1.1fr) 128px 140px 112px 200px 88px; gap: 8px; align-items: start; min-width: 980px; }
.acc-head { color: var(--mute); font-size: 12px; font-weight: 600; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.acc { padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc > div { min-width: 0; overflow: hidden; }
.acc .row { flex-wrap: nowrap; margin-top: 6px; }
.acc button { height: 30px; padding: 0 8px; flex: 0 0 auto; }
.acc input[type=text] { height: 32px; margin-top: 6px; width: 100%; min-width: 0; }
@media (max-width: 1100px) {
  .acc-head { display: none; }
  .acc, .acc-head { min-width: 0; }
  .acc { grid-template-columns: 1fr; }
}

.tabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 4px; }
.tabs button { height: 36px; background: transparent; color: var(--mute); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 0 12px; }
.tabs button.on { color: var(--pri); border-bottom-color: var(--pri); font-weight: 650; }
.why { background: var(--paper); border: 1px solid var(--line); padding: 8px 10px; margin: 0 0 10px; font-size: 12px; color: var(--mute); border-radius: 6px; }
pre.mono { background: var(--paper); border: 1px solid var(--line); padding: 10px; white-space: pre-wrap; border-radius: 6px; }
.term { min-height: 88px; max-height: 220px; overflow: auto; margin: 10px 0 0;
  background: #111827; color: #d1d5db; border-radius: 6px; padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.term.idle { color: #9ca3af; }
.term.busy { color: #fbbf24; }
.term.ok { color: #86efac; }
.term.bad { color: #fca5a5; }
