:root {
  --bg: #f7f7f8;
  --card: #fff;
  --ink: #1a1a1f;
  --muted: #8a8a94;
  --line: #e6e6ea;
  --accent: #5b5bd6;
  --accent-soft: #ececfb;
  --ok: #15a36a;
  --bad: #d04646;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: .5px; }
.sub { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }

.fbtn { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 13px; color: var(--ink); cursor: pointer; }
.fbtn:hover { border-color: var(--accent); }
.fbtn.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.fbtn-pre { flex: 0 1 auto; }
.fbtn-suf { flex: 0 0 auto; margin-left: auto; opacity: 0.7; }   /* 尾缀靠右、略淡 */
.fbtn.on .fbtn-suf { opacity: 0.85; }

/* 创作Query Demo：多列(轴列 + Query列) */
.cdemo { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.axcol { flex: 0 0 auto; width: 114px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.axcol.qcol { flex: 1 1 auto; min-width: 560px; }
.axhd { font-size: 13px; font-weight: 700; padding: 9px 11px; border-bottom: 1px solid var(--line); background: #fafafb;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.axhd.qhd { color: var(--accent); }
.axhd .gn { font-size: 11px; font-weight: 600; color: var(--muted); background: #f0f0f3; border-radius: 10px; padding: 1px 7px; }
.qhd-metrics { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.avgcreation { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.avgcreation.done { color: var(--ok); background: #e6f6ee; }
.avgcreation.pending { color: #9a6a00; background: #fff6df; }
.axlist { max-height: 62vh; overflow: auto; }
.axv { font-size: 12.5px; padding: 5px 11px; border-bottom: 1px solid #f3f3f5; color: #555; white-space: nowrap; }
.axv.grp { font-weight: 700; color: #222; background: #fafafb; }
.axv.child { padding-left: 26px; color: #666; }
.axv.child::before { content: '·'; color: var(--muted); margin-right: 6px; }
.qrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; padding: 6px 11px; border-bottom: 1px solid #f3f3f5; font-size: 13px; }
.qrow.keep .qmark { color: var(--ok); font-weight: 700; }
.qrow.drop { color: var(--muted); }
.qrow.drop .qmark { color: var(--bad); }
.qrow.drop .qtext { text-decoration: line-through; }
.qmark { flex: 0 0 auto; }
.qvalid { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 9px; }
.qvalid.ok { color: var(--ok); background: #e6f6ee; }
.qvalid.low { color: var(--bad); background: #fbeaea; }
.qtext { flex: 1 1 auto; white-space: normal; word-break: break-word; }   /* 长 query 换行显示，别截断 */
.qreason { flex: 1 0 100%; margin-left: 20px; color: var(--muted); font-size: 11.5px; }   /* 理由独占一行、占满宽 */
.qdetail { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  border-radius: 8px; padding: 2px 7px; font-size: 11.5px; color: var(--muted); background: #fff; }
button.qdetail { font: inherit; cursor: pointer; }
.qdetail.on { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.qdetail.active { color: #3f3fa8; border-color: #d9d9f4; background: #f4f4ff; font-weight: 700; }
.qdetail.decode-on { color: var(--ok); border-color: #d8eadf; background: #e6f6ee; font-weight: 700; }
.qdetail span { color: inherit; opacity: .8; }
.qcreation { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.qcreation.searched { color: #53606d; background: #eef2f6; }
.qcreation.done { color: var(--ok); background: #e6f6ee; }
.qcreation.pending { color: #9a6a00; background: #fff6df; }
.qcreation.knowledge { color: #5b47bd; background: #f0edff; }
.qcreation.decoded { color: var(--ok); background: #e6f6ee; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent);
  border-radius: 6px; padding: 1px 7px; font-size: 12px; margin: 1px 3px 1px 0; white-space: nowrap; }
.tag.k { background: #f0f0f3; color: #555; }

.decode-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 16, 28, .52);
}
.decode-modal-panel {
  width: min(1180px, calc(100vw - 36px));
  height: min(88vh, 920px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .34);
  background: #f5f5f7;
}

.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 13.5px; }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: #f0f0f3;
  color: #555;
}
.pill.decoded,
.pill.ingested {
  background: #e6f6ee;
  color: var(--ok);
}
.pill.rejected,
.pill.failed {
  background: #fbeaea;
  color: var(--bad);
}
.pill.draft,
.pill.pending {
  background: #fff6df;
  color: #9a6a00;
}

/* 老版 Decode 知识详情页视觉系统：用于知识弹窗和帖子详情页右侧 */
.legacy-decode-page {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f5f5f7;
  color: #111827;
  font: 13px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.legacy-decode-page.embedded-decode-page {
  height: 100%;
  min-height: 0;
  border-radius: 12px;
}
.legacy-decode-page.embedded-decode-page .app {
  height: 100%;
}
.legacy-decode-page * { box-sizing: border-box; }
.legacy-decode-page a { color: #2563eb; text-decoration: none; }
.legacy-decode-page a:hover { text-decoration: underline; }
.legacy-decode-page .app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.legacy-decode-page header.top {
  flex: none;
  padding: 11px 18px 9px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.legacy-decode-page header.top h1 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}
.legacy-decode-page .picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.legacy-decode-page .picker .lab {
  font-size: 11.5px;
  color: #9ca3af;
  margin-right: 2px;
}
.legacy-decode-page .pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 4px 11px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
}
.legacy-decode-page .pill:hover {
  background: #f3f4f6;
  text-decoration: none;
}
.legacy-decode-page .pill.on {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
  font-weight: 600;
}
.legacy-decode-page .pill .n {
  font-size: 10px;
  opacity: .7;
  margin-left: 4px;
}
.legacy-decode-page .scroll {
  flex: 1;
  overflow: auto;
  background: #f5f5f7;
  padding-bottom: 40px;
}
.legacy-decode-page .empty {
  color: #9ca3af;
  padding: 50px;
  text-align: center;
}
.legacy-decode-page details.src {
  display: block;
  margin: 10px 18px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.legacy-decode-page details.src summary {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  list-style: none;
}
.legacy-decode-page details.src summary::-webkit-details-marker { display: none; }
.legacy-decode-page details.src summary::before {
  content: '▶ ';
  color: #94a3b8;
  font-size: 10px;
}
.legacy-decode-page details.src[open] summary::before { content: '▼ '; }
.legacy-decode-page .srcbody {
  padding: 4px 16px 12px;
  font-size: 12px;
}
.legacy-decode-page .srcbody a {
  color: #2563eb;
  word-break: break-all;
}
.legacy-decode-page .srcimgs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.legacy-decode-page .srcimgs img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
}
.legacy-decode-page .srcvideo {
  margin-top: 8px;
}
.legacy-decode-page .srcvideo video {
  width: min(720px, 100%);
  max-height: 360px;
  background: #000;
  border-radius: 5px;
}
.legacy-decode-page .srcread {
  font-size: 12.5px;
  color: #1f2937;
  line-height: 1.6;
  margin-top: 6px;
  background: #fff;
  border-left: 3px solid #0e7490;
  padding: 6px 9px;
}
.legacy-decode-page .barhint {
  margin: 8px 18px 0;
  font-size: 11.5px;
  color: #6b7280;
}
.legacy-decode-page .ribbon {
  margin: 11px 18px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
}
.legacy-decode-page .rcap {
  font-size: 11.5px;
  color: #6b7280;
  margin-bottom: 8px;
}
.legacy-decode-page .rsteps {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.legacy-decode-page .rstep {
  flex: 1;
  min-width: 118px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
  background: #f8fafc;
}
.legacy-decode-page .rstep:hover {
  background: #ecfeff;
  border-color: #99d5d0;
}
.legacy-decode-page .rstep.auto {
  cursor: default;
  background: #f1f5f9;
  opacity: .9;
}
.legacy-decode-page .rstep.auto:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.legacy-decode-page .rtop {
  display: flex;
  align-items: center;
  gap: 7px;
}
.legacy-decode-page .rn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0e7490;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.legacy-decode-page .rstep.auto .rn { background: #94a3b8; }
.legacy-decode-page .rlab {
  font-size: 13.5px;
  font-weight: 600;
}
.legacy-decode-page .rdesc {
  font-size: 11.5px;
  color: #6b7280;
  margin: 5px 0 7px;
  line-height: 1.5;
}
.legacy-decode-page .rbtn {
  font-size: 11.5px;
  color: #0e7490;
}
.legacy-decode-page .rstep.auto .rbtn { color: #94a3b8; }
.legacy-decode-page .rarrow {
  display: flex;
  align-items: center;
  color: #cbd5e1;
  font-size: 18px;
  padding: 0 4px;
  flex: none;
}
.legacy-decode-page .lbtn {
  padding: 3px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font-size: 11.5px;
  color: #334155;
  font-family: inherit;
}
.legacy-decode-page .lbtn:hover {
  background: #f1f5f9;
  text-decoration: none;
}
.legacy-decode-page .kcard {
  margin: 12px 18px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.legacy-decode-page .khead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid #eef2f7;
  flex-wrap: wrap;
}
.legacy-decode-page .kno {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #475569;
  border-radius: 4px;
  padding: 1px 7px;
}
.legacy-decode-page .ktype {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 8px;
}
.legacy-decode-page .ty-how { background: #cffafe; color: #155e75; }
.legacy-decode-page .ty-what { background: #fae8ff; color: #86198f; }
.legacy-decode-page .ty-why { background: #fef9c3; color: #854d0e; }
.legacy-decode-page .ktitle {
  font-size: 14px;
  font-weight: 600;
}
.legacy-decode-page .krole {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #f1f5f9;
  color: #64748b;
}
.legacy-decode-page .kbiz {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
}
.legacy-decode-page .kacts {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.legacy-decode-page .kbody {
  padding: 6px 14px 13px;
}
.legacy-decode-page .twrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 8px;
}
.legacy-decode-page table.proc {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
  border: 0;
  border-radius: 0;
}
.legacy-decode-page table.proc th,
.legacy-decode-page table.proc td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  vertical-align: top;
  line-height: 1.5;
}
.legacy-decode-page table.proc thead th {
  font-weight: 600;
  text-align: center;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
}
.legacy-decode-page table.proc thead tr:nth-child(2) th { top: 30px; }
.legacy-decode-page td.idx {
  width: 30px;
  text-align: center;
  color: #6b7280;
  background: #f8fafc;
}
.legacy-decode-page th.c-intent,
.legacy-decode-page td.intent {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  white-space: pre-wrap;
}
.legacy-decode-page th.c-cstage,
.legacy-decode-page td.cstage {
  width: 54px;
  text-align: center;
  background: #ecfeff;
}
.legacy-decode-page th.c-act,
.legacy-decode-page td.act {
  min-width: 110px;
  max-width: 140px;
  word-break: break-word;
  background: #ecfeff;
}
.legacy-decode-page th.c-dir,
.legacy-decode-page td.dir {
  min-width: 230px;
  max-width: 330px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #ecfeff;
}
.legacy-decode-page th.c-out,
.legacy-decode-page td.out {
  min-width: 160px;
  max-width: 240px;
  white-space: pre-wrap;
  background: #ecfeff;
}
.legacy-decode-page th.c-scope,
.legacy-decode-page td.scope {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  word-break: break-word;
}
.legacy-decode-page th.g-frame { background: #0e7490; color: #fff; }
.legacy-decode-page th.g-scope { background: #7c3aed; color: #fff; }
.legacy-decode-page th.c-idx {
  background: #475569;
  color: #fff;
  vertical-align: middle;
}
.legacy-decode-page thead tr:nth-child(2) th.c-intent,
.legacy-decode-page thead tr:nth-child(2) th.c-cstage,
.legacy-decode-page thead tr:nth-child(2) th.c-act,
.legacy-decode-page thead tr:nth-child(2) th.c-dir,
.legacy-decode-page thead tr:nth-child(2) th.c-out {
  background: #0891b2;
  color: #fff;
}
.legacy-decode-page thead tr:nth-child(2) th.s-substance { background: #dc2626; color: #fff; }
.legacy-decode-page thead tr:nth-child(2) th.s-form { background: #2563eb; color: #fff; }
.legacy-decode-page thead tr:nth-child(2) th.s-feeling { background: #db2777; color: #fff; }
.legacy-decode-page thead tr:nth-child(2) th.s-effect { background: #16a34a; color: #fff; }
.legacy-decode-page thead tr:nth-child(2) th.s-intent { background: #d97706; color: #fff; }
.legacy-decode-page td.scope.s-substance { background: #fef2f2; }
.legacy-decode-page td.scope.s-form { background: #eff6ff; }
.legacy-decode-page td.scope.s-feeling { background: #fdf2f8; }
.legacy-decode-page td.scope.s-effect { background: #f0fdf4; }
.legacy-decode-page td.scope.s-intent { background: #fffbeb; }
.legacy-decode-page tr.step > td { border-top: 1.5px solid #cbd5e1; }
.legacy-decode-page .cstage-chip {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #ede9fe;
  color: #5b21b6;
}
.legacy-decode-page .act-chip {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}
.legacy-decode-page .dir-txt {
  font-size: 11.5px;
  color: #33312c;
  line-height: 1.65;
}
.legacy-decode-page .out-txt {
  font-size: 11.5px;
  color: #166534;
}
.legacy-decode-page .in-txt {
  font-size: 11.5px;
  color: #1e40af;
  line-height: 1.6;
}
.legacy-decode-page .kindb {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 9px;
  margin-right: 8px;
  vertical-align: middle;
}
.legacy-decode-page .kind-子集 { background: #dbeafe; color: #1e40af; }
.legacy-decode-page .kind-多维关系 { background: #dcfce7; color: #166534; }
.legacy-decode-page .kind-序列 { background: #fef3c7; color: #92400e; }
.legacy-decode-page .dimrule {
  font-size: 10.5px;
  padding: 1px 8px;
  border-radius: 9px;
  background: #ecfccb;
  color: #3f6212;
  margin-right: 8px;
  vertical-align: middle;
}
.legacy-decode-page .def {
  font-size: 13px;
  background: #fdf4ff;
  border-left: 3px solid #a21caf;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin: 6px 0 10px;
}
.legacy-decode-page table.elem {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
  background: #fff;
  border: 0;
}
.legacy-decode-page table.elem td {
  border: 1px solid #f0e6f5;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.legacy-decode-page table.elem td.el {
  font-weight: 600;
  color: #86198f;
  background: #fdf4ff;
  width: 130px;
}
.legacy-decode-page .why-exp {
  font-size: 12.5px;
  line-height: 1.72;
  color: #1f2937;
  background: #fdf4ff;
  border-left: 3px solid #a21caf;
  border-radius: 0 6px 6px 0;
  padding: 9px 13px;
  margin: 6px 0;
}
.legacy-decode-page .kscopes {
  margin-top: 9px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.legacy-decode-page .kscopes .lab {
  font-size: 11px;
  color: #9ca3af;
}
.legacy-decode-page .sv {
  display: inline-block;
  cursor: pointer;
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.7);
  margin: 1px 0;
}
.legacy-decode-page .sv:hover { box-shadow: 0 0 0 1px #1e293b; }
.legacy-decode-page .sv .k {
  font-size: 11.5px;
  opacity: .85;
  font-weight: 700;
  margin-right: 4px;
}
.legacy-decode-page table.proc th.c-scope { font-size: 13.5px; }
.legacy-decode-page .sv .mk {
  font-size: 9px;
  padding: 0 3px;
  border-radius: 2px;
  margin-left: 3px;
  vertical-align: top;
}
.legacy-decode-page .mk-new { background: #fde68a; color: #92400e; }
.legacy-decode-page .mk-reuse { background: #bbf7d0; color: #166534; }
.legacy-decode-page .sv.s-substance { background: #fef2f2; }
.legacy-decode-page .sv.s-form { background: #eff6ff; }
.legacy-decode-page .sv.s-feeling { background: #fdf2f8; }
.legacy-decode-page .sv.s-effect { background: #f0fdf4; }
.legacy-decode-page .sv.s-intent { background: #fffbeb; }
.legacy-decode-page .modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: auto;
  max-height: none;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}
.legacy-decode-page .mbox {
  background: #fff;
  width: 760px;
  max-width: 94vw;
  max-height: 86vh;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.legacy-decode-page .mbox h2 {
  margin: 0;
  padding: 13px 18px;
  background: #0f766e;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0;
}
.legacy-decode-page .mbox h2 .x {
  margin-left: auto;
  cursor: pointer;
  font-size: 18px;
}
.legacy-decode-page .mbox .body {
  padding: 15px 18px;
  overflow: auto;
}
.legacy-decode-page .mbox pre {
  margin: 0;
  font: 12.5px/1.7 ui-monospace, Menlo, monospace;
  white-space: pre-wrap;
  color: #1f2937;
}
.legacy-decode-page .copybtn {
  margin-left: auto;
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.28);
}
.legacy-decode-page .copybtn:hover { background: rgba(255,255,255,.2); }
.legacy-decode-page .lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  cursor: zoom-out;
}
.legacy-decode-page .lb img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .lanes { grid-template-columns: 1fr; }
  .source-panel { grid-template-columns: 1fr; }
  .decode-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-grid, .payload-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 18px 12px 48px; }
  .lightbox img { max-width: 96vw; max-height: 82vh; }
  .lbnav { bottom: 10px; top: auto; transform: none; }
  .lbnav.prev { left: 26px; }
  .lbnav.next { right: 26px; }
  .legacy-decode-page .rsteps { display: block; }
  .legacy-decode-page .rstep { margin-top: 7px; }
  .legacy-decode-page .rarrow { display: none; }
  .legacy-decode-page .khead { align-items: flex-start; }
  .legacy-decode-page .kacts {
    margin-left: 0;
    width: 100%;
  }
}

/* 正式后台看板视觉壳：参考 AIGC 管理台的 Arco 风格 */
:root {
  --bg: #f2f3f5;
  --card: #fff;
  --ink: #1d2129;
  --muted: #86909c;
  --line: #e5e8ef;
  --line-strong: #d8dee9;
  --accent: #1677ff;
  --accent-soft: #e8f3ff;
  --ok: #00a870;
  --ok-soft: #e8fff3;
  --bad: #f53f3f;
  --sidebar: #fff;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.admin-shell {
  min-height: 100vh;
  background: var(--bg);
}

.admin-main {
  min-width: 0;
  padding: 10px 16px 24px;
  background: var(--bg);
}

.admin-main-full {
  min-height: 100vh;
}

.dashboard-page {
  min-width: 980px;
}

.dashboard-toolbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 14px;
}

.family-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.family-switch {
  min-height: 32px;
}

.clear-filter {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 12px;
}

.clear-filter:hover {
  color: var(--accent);
}

.dashboard-page .fbtn {
  align-items: center;
  height: 32px;
  max-width: 280px;
  padding: 0 10px;
  border-radius: 6px;
  border-color: #d8dee9;
  color: #4e5969;
  background: #fff;
  font-size: 12px;
}

.dashboard-page .fbtn.on {
  border-color: #94bfff;
  background: #e8f3ff;
  color: #165dff;
}

.dashboard-page .fbtn-pre {
  font-weight: 700;
}

.dashboard-page .fbtn-suf {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .86;
}

.dashboard-page .cdemo {
  display: grid;
  grid-template-columns: 280px 138px 168px 170px 504px minmax(480px, 1fr);
  gap: 0;
  min-height: calc(100vh - 210px);
  padding: 0;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.dashboard-page .cdemo.single {
  display: block;
  min-height: auto;
}

.dashboard-page .axcol {
  width: auto;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fff;
}

.dashboard-page .axcol:first-child {
  border-radius: 8px 0 0 8px;
}

.dashboard-page .axcol.qcol {
  width: auto;
  min-width: 0;
  max-width: none;
  border-right: 1px solid var(--line-strong);
}

.dashboard-page .axcol.qresult-col {
  width: auto;
  min-width: 0;
  max-width: none;
  border-right: 0;
}

.dashboard-page .axcol.qcol.wide {
  width: 100%;
  max-width: none;
}

.dashboard-page .axhd {
  min-height: 96px;
  display: block;
  padding: 12px 12px 9px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.dashboard-page .qhd {
  color: var(--ink);
}

.axis-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #1d2129;
  font-size: 14px;
  font-weight: 700;
}

.axis-icon,
.query-search-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #eef3ff;
  color: #165dff;
  font-size: 12px;
  font-weight: 800;
}

.axis-metrics {
  margin-top: 9px;
}

.dashboard-page .qhd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-page .qhd-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.run-progress {
  color: #4e5969;
  font-size: 10px;
  font-weight: 500;
}

.dashboard-page .axhd .gn {
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #4e5969;
  font-size: 11px;
}

.dashboard-page .axlist {
  max-height: calc(100vh - 312px);
  overflow: auto;
  padding: 9px 0;
}

.dashboard-page .cdemo.single .axlist {
  max-height: calc(100vh - 260px);
}

.dashboard-page .axv {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 18px;
  border-bottom: 0;
  color: #1d2129;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.dashboard-page button.axv {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.dashboard-page button.axv:hover {
  background: #f7f9fc;
}

.dashboard-page .axv.level-4 {
  padding-left: 34px;
}

.dashboard-page .axv.muted {
  color: #1d2129;
}

.tree-caret {
  width: 10px;
  color: #a9b4c4;
  font-size: 13px;
  flex: 0 0 10px;
}

.tree-caret.empty {
  color: transparent;
  padding: 0;
}

.tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-width: 32px;
  justify-content: flex-end;
}

.tree-count b {
  color: #86909c;
  font-size: 9px;
  font-weight: 700;
}

.dashboard-page .qrow {
  position: relative;
  min-height: 41px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-bottom: 0;
  color: #1d2129;
  font-size: 13px;
}

.dashboard-page button.qrow {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dashboard-page button.qrow:disabled {
  cursor: default;
}

.dashboard-page .qrow:hover {
  background: #f7f8fa;
}

.dashboard-page .query-select-row.selected {
  background: #f2f7ff;
  box-shadow: inset 3px 0 0 #165dff;
}

.dashboard-page .qmark {
  color: #00a870;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-page .qvalid,
.dashboard-page .qcreation,
.dashboard-page .qdetail,
.dashboard-page .qreason {
  flex: 0 0 auto;
}

.dashboard-page .qvalid {
  justify-self: start;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}

.dashboard-page .qvalid.ok {
  color: #00875a;
  background: #e8fff3;
}

.dashboard-page .qtext {
  flex: 1 1 150px;
  min-width: 0;
  color: #1d2129;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .qcreation,
.dashboard-page .qdetail {
  border-radius: 999px;
  padding: 2px 8px;
  border: 0;
  font-size: 11px;
}

.dashboard-page .qcreation.searched {
  color: #4e5969;
  background: #eef2f7;
}

.dashboard-page .qcreation.knowledge {
  color: #165dff;
  background: #e8f3ff;
}

.dashboard-page .qcreation.decoded {
  color: #00875a;
  background: #e8fff3;
}

.dashboard-page .qdetail {
  color: #165dff;
  background: #f0f4ff;
  font-weight: 600;
}

.dashboard-page .qdetail.on {
  color: #165dff;
  background: #f0f4ff;
}

.dashboard-page .qreason {
  flex-basis: 100%;
  margin: -4px 0 0;
  padding-left: 26px;
  color: #86909c;
  font-size: 11px;
  line-height: 1.45;
}

.qresult-hd {
  display: block;
}

.qresult-sub {
  margin-top: 10px;
  color: #4e5969;
  font-size: 12px;
  line-height: 1.45;
  max-height: 36px;
  overflow: hidden;
}

.qresult-list {
  height: calc(100vh - 312px);
  overflow: auto;
  padding: 0;
  background: #fff;
}

.qresult-empty {
  color: #86909c;
  font-size: 12px;
  line-height: 1.6;
  padding: 18px 16px;
}

.qresult-empty.error {
  color: #f53f3f;
}

.result-mini {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  min-height: 96px;
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
}

.result-mini.knowledge {
  background: #fbfffd;
  box-shadow: inset 3px 0 0 #00a870;
}

.result-mini img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid #e5e8ef;
  background: #f2f3f5;
}

.result-mini-main {
  min-width: 0;
}

.result-mini-title {
  color: #1d2129;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-mini-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.platform-mini,
.knowledge-mini,
.score-mini {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

.platform-mini.xhs {
  color: #f53f3f;
  background: #fff0f0;
  border: 1px solid #ffd6d6;
}

.platform-mini.wx {
  color: #00875a;
  background: #e8fff3;
  border: 1px solid #b7efd4;
}

.platform-mini.dy {
  color: #1d2129;
  background: #eef2f7;
  border: 1px solid #d8dee9;
}

.knowledge-mini {
  color: #86909c;
  background: #f2f3f5;
}

.knowledge-mini.yes {
  color: #00875a;
  background: #e8fff3;
}

.score-mini {
  margin-left: auto;
  color: #00a870;
  background: transparent;
  padding-right: 0;
}

.result-mini-text {
  margin-top: 7px;
  color: #86909c;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-detail-btn {
  margin-top: 8px;
  height: 24px;
  border: 1px solid #b7efd4;
  border-radius: 5px;
  background: #e8fff3;
  color: #00875a;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}

.run-title-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 15px 18px 8px;
}

.dashboard-page .sub {
  margin: 5px 0 0;
  color: #86909c;
}

@media (max-width: 1100px) {
  .dashboard-page {
    min-width: 860px;
  }
  .dashboard-page .cdemo {
    grid-template-columns: 250px 120px 150px 150px 468px minmax(360px, 1fr);
  }
}
