/* WalletLab —— 精密仪器台面
   分层靠边框、底色差与极淡的网格纹理；黄铜色只留给"已解锁"。 */

:root {
  --bg:        #0B0E12;
  --bg-grid:   rgba(255,255,255,.014);
  --panel:     #12161C;
  --panel-2:   #171C23;
  --panel-3:   #1D232B;
  --panel-4:   #232A34;

  --line:      #242B35;
  --line-soft: #1A2029;
  --line-lit:  #333D4A;

  --text:      #E8E6E1;
  --text-dim:  #8B93A0;
  --text-mute: #5A626E;

  --brass:     #C9A05A;
  --brass-2:   #E0B978;
  --brass-dim: #7A6134;
  --copper:    #5FA79B;
  --rust:      #C2604C;
  --steel:     #6E93BE;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --rail: 330px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  overflow: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(201,160,90,.3); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 3px;
}

.bi {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ══ 顶栏 ══════════════════════════════════════════════════ */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  height: 62px;
  background: linear-gradient(180deg, #141920, #10141A);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,160,90,.28) 22%, transparent 60%);
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(201,160,90,.16), rgba(201,160,90,.04));
  border: 1px solid rgba(201,160,90,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.brand-mark svg {
  width: 19px; height: 19px;
  fill: none; stroke: var(--brass); stroke-width: 1.4;
  stroke-linejoin: round;
}
.brand-text h1 {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .01em;
  line-height: 1.15;
}
.brand-text span {
  display: block;
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: .04em;
}

.gauges {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-left: 6px;
}
.gauge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 74px;
  padding: 0 18px;
  border-left: 1px solid var(--line-soft);
  position: relative;
}
.gauge:first-child { border-left: none; }
.gauge-v {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -.01em;
}
.gauge-k {
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: .05em;
  margin-top: 1px;
}
.gauge-accent .gauge-v { color: var(--brass); }
.gauge-live .gauge-v { color: var(--copper); }
.gauge-live::before {
  content: "";
  position: absolute; left: 9px; top: 50%; width: 5px; height: 5px;
  margin-top: -2px; border-radius: 50%;
  background: var(--copper);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-dim);
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-4); border-color: var(--line-lit); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-quiet { background: transparent; }
.btn-quiet:hover { background: var(--panel-3); }

.btn-go {
  background: linear-gradient(180deg, var(--brass-2), var(--brass));
  border-color: var(--brass);
  color: #191307;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 2px 8px rgba(201,160,90,.16);
}
.btn-go:hover { background: linear-gradient(180deg, #EBC689, var(--brass-2)); color: #191307; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { color: var(--rust); border-color: rgba(194,96,76,.32); }
.btn-danger:hover { background: rgba(194,96,76,.1); border-color: var(--rust); color: #E08C79; }

/* ══ 台面 ══════════════════════════════════════════════════ */
.stage {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 0;
}

.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── 投放区 ── */
.drop {
  margin: 14px 14px 12px;
  padding: 18px 16px 16px;
  border: 1px dashed #2C3541;
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,.008);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.drop:hover { border-color: #3A4553; background: rgba(255,255,255,.018); }
.drop.is-drag {
  border-style: solid;
  border-color: var(--brass);
  background: rgba(201,160,90,.07);
  transform: scale(1.012);
}

.drop-ring {
  width: 46px; height: 46px;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color .16s ease, background .16s ease;
}
.drop-ring svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--text-mute); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .16s ease;
}
.drop:hover .drop-ring { border-color: var(--line-lit); }
.drop:hover .drop-ring svg { stroke: var(--text-dim); }
.drop.is-drag .drop-ring { border-color: rgba(201,160,90,.5); background: rgba(201,160,90,.1); }
.drop.is-drag .drop-ring svg { stroke: var(--brass); }

.drop-lead { margin: 0; font-size: 13px; color: var(--text-dim); }
.drop.is-drag .drop-lead { color: var(--brass-2); }
.drop-note {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .02em;
}

/* ── 证据架 ── */
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 18px 8px;
}
.rail-head h2 {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .02em;
}
.rail-count {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-mute);
  padding: 1px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
}

.art-list {
  list-style: none; margin: 0;
  padding: 0 10px 16px;
  overflow-y: auto; flex: 1; min-height: 0;
}

.art-item {
  position: relative;
  padding: 10px 12px 10px 15px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .13s ease, border-color .13s ease, transform .13s ease;
}
.art-item + .art-item { margin-top: 3px; }
.art-item:hover { background: var(--panel-2); transform: translateX(1px); }
.art-item.is-active {
  background: var(--panel-2);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.art-item::before {
  content: "";
  position: absolute; left: 5px; top: 12px; bottom: 12px; width: 2px;
  border-radius: 1px; background: var(--line);
  transition: background .13s ease;
}
.art-item[data-cap~="keystore"]::before,
.art-item[data-cap~="tonhub"]::before,
.art-item[data-cap~="coin98"]::before,
.art-item[data-cap~="tokenpocket"]::before { background: var(--steel); }
.art-item.is-solved::before { background: var(--brass); box-shadow: 0 0 6px rgba(201,160,90,.5); }

.art-top { display: flex; align-items: center; gap: 7px; }
.art-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-badge {
  flex: none;
  font-size: 9.5px; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--text-mute);
  font-family: var(--mono);
}
.art-badge.ok { border-color: var(--brass-dim); color: var(--brass); background: rgba(201,160,90,.07); }
.art-badge.cap { border-color: rgba(110,147,190,.35); color: var(--steel); }

.art-meta {
  display: flex; gap: 9px; margin-top: 4px;
  font-size: 10.5px; color: var(--text-mute);
  font-family: var(--mono);
}
.art-wallet { color: var(--text-dim); font-family: var(--sans); font-size: 11px; }

.rail-empty { padding: 6px 18px 20px; }
.rail-empty p { margin: 0; font-size: 12px; color: var(--text-mute); }
.rail-empty .dim { margin-top: 5px; font-size: 11.5px; color: #464E59; line-height: 1.6; }

/* ── 左栏分页 ── */
.rail-tabs {
  display: flex; gap: 2px; padding: 10px 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.rtab {
  flex: 1; padding: 8px 8px 9px;
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; font-size: 12.5px; color: var(--text-mute);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: color .13s ease, border-color .13s ease;
}
.rtab:hover { color: var(--text-dim); }
.rtab.is-on { color: var(--text); border-bottom-color: var(--brass); }
.rtab-n {
  font-family: var(--mono); font-size: 10px;
  padding: 0 5px; border-radius: 100px;
  background: var(--panel-3); color: var(--text-mute);
}
.rtab.is-on .rtab-n { background: rgba(201,160,90,.16); color: var(--brass); }

.rail-pane { display: none; flex-direction: column; min-height: 0; flex: 1; }
.rail-pane.is-on { display: flex; }

/* ── 设备库 ── */
.src-bar { display: flex; gap: 5px; padding: 12px 14px 2px; flex-wrap: wrap; }
.src-chip {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 100px;
  background: transparent; cursor: pointer;
  font-size: 11.5px; color: var(--text-mute);
  transition: border-color .13s ease, color .13s ease, background .13s ease;
}
.src-chip:hover { border-color: var(--line-lit); color: var(--text-dim); }
.src-chip.is-on { border-color: var(--brass-dim); color: var(--brass); background: rgba(201,160,90,.07); }
.src-chip small { opacity: .55; margin-left: 5px; font-family: var(--mono); }

.dev-list {
  list-style: none; margin: 0;
  padding: 0 10px 16px; overflow-y: auto; flex: 1; min-height: 0;
}
.dev-item {
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 10px 12px; cursor: pointer;
  transition: background .13s ease, border-color .13s ease;
}
.dev-item + .dev-item { margin-top: 3px; }
.dev-item:hover { background: var(--panel-2); }
.dev-item.is-open { background: var(--panel-2); border-color: var(--line); }
.dev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dev-model { font-size: 12.5px; font-weight: 600; }
.dev-short { font-family: var(--mono); font-size: 10.5px; color: var(--text-mute); }
.dev-meta {
  display: flex; gap: 10px; margin-top: 4px;
  font-size: 10.5px; color: var(--text-mute); font-family: var(--mono);
}
.dev-meta .hl { color: var(--steel); }

.dev-wallets { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.wl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 4px; font-size: 12px;
  transition: background .12s ease;
}
.wl-row:hover { background: var(--panel-3); }
.wl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-kind { font-size: 10px; color: var(--text-mute); font-family: var(--mono); flex: none; }
.wl-kind.wallet { color: var(--steel); }
.wl-load {
  flex: none; font-size: 11px; padding: 2px 9px; border-radius: 4px;
  border: 1px solid var(--line); background: transparent; color: var(--text-mute);
  cursor: pointer; transition: border-color .12s ease, color .12s ease;
}
.wl-load:hover { border-color: var(--brass-dim); color: var(--brass); }
.wl-load:disabled { opacity: .5; cursor: default; }

/* ══ 操作台 ════════════════════════════════════════════════ */
.bench { min-width: 0; overflow-y: auto; padding: 26px 30px 48px; }

/* ── 欢迎页 ── */
.welcome { max-width: 940px; }
.welcome-head h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .005em;
  margin-bottom: 8px;
}
.welcome-head p {
  margin: 0; max-width: 62ch;
  color: var(--text-mute); font-size: 13px; line-height: 1.7;
}

.steps {
  list-style: none; margin: 24px 0 34px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  counter-reset: step;
}
.steps li {
  background: var(--panel);
  padding: 14px 16px;
  counter-increment: step;
  position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--brass-dim);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.steps b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.steps span { font-size: 11.5px; color: var(--text-mute); line-height: 1.6; }

.matrix-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.matrix-head h3 { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.matrix-note { font-size: 11.5px; color: var(--text-mute); }

.matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.wcard {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--panel);
  padding: 11px 13px;
  position: relative;
  overflow: hidden;
}
.wcard::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--line);
}
.wcard[data-state="solved"]::before { background: var(--brass); }
.wcard[data-state="password"]::before { background: var(--steel); }
.wcard[data-state="blocked"]::before { background: #3A414C; }

.wcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wcard-name { font-size: 12.5px; font-weight: 600; }
.wcard-yield {
  font-size: 10px; font-family: var(--mono);
  padding: 1px 5px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--text-mute);
}
.wcard[data-state="solved"] .wcard-yield { border-color: var(--brass-dim); color: var(--brass); }
.wcard-cipher {
  margin-top: 6px; font-size: 10.5px; color: var(--text-mute);
  font-family: var(--mono); line-height: 1.5;
}
.wcard-note {
  margin-top: 5px; font-size: 11px; color: #4E5763; line-height: 1.55;
}

/* ── 详情 ── */
.bench-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.bench-title {
  font-family: var(--serif);
  font-size: 20px; font-weight: 600;
  word-break: break-all; line-height: 1.3;
}
.bench-sub {
  margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px 16px;
  font-size: 11.5px; color: var(--text-mute); font-family: var(--mono);
}
.bench-sub .k { color: var(--text-dim); }
.bench-actions { display: flex; gap: 7px; flex: none; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 14px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 11px 16px;
  background: linear-gradient(180deg, var(--panel-2), #151A20);
  border-bottom: 1px solid var(--line);
}
.panel-head h3 {
  font-family: var(--serif);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.panel-head h3::before {
  content: "";
  width: 3px; height: 12px; border-radius: 2px;
  background: var(--line-lit);
}
.panel-hint { font-size: 11.5px; color: var(--text-mute); }
.panel-body { padding: 16px; }
.panel-body + .panel-body { border-top: 1px solid var(--line-soft); }

/* 识别摘要 */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); overflow: hidden;
}
.fact { background: var(--panel); padding: 11px 13px; }
.fact dt { font-size: 11px; color: var(--text-mute); margin: 0 0 4px; }
.fact dd {
  margin: 0; font-size: 12.5px; color: var(--text);
  font-family: var(--mono); word-break: break-all; line-height: 1.45;
}
.fact dd.plain { font-family: var(--sans); font-size: 12px; color: var(--text-dim); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 11.5px; color: var(--text-dim); background: var(--panel-2);
}
.chip-cap { border-color: rgba(110,147,190,.4); color: var(--steel); background: rgba(110,147,190,.06); }
.chip-solved { border-color: var(--brass-dim); color: var(--brass); background: rgba(201,160,90,.08); }
.chip-warn { border-color: rgba(194,96,76,.4); color: var(--rust); }

/* 地址 */
.addr-group + .addr-group { margin-top: 16px; }
.addr-chain { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.addr-chain-name {
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em;
  padding: 1px 7px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.addr-chain-n { font-size: 11px; color: var(--text-mute); font-family: var(--mono); }

.addr-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  transition: border-color .13s ease;
}
.addr-row + .addr-row { margin-top: 4px; }
.addr-row:hover { border-color: var(--line-lit); }
.addr-val {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px;
  color: var(--text); word-break: break-all;
}
.addr-src { font-size: 10.5px; color: var(--text-mute); white-space: nowrap; font-family: var(--mono); }
.addr-bal { font-family: var(--mono); font-size: 12px; white-space: nowrap; color: var(--text-mute); }
.addr-bal.has { color: var(--brass); font-weight: 600; }
.addr-bal.err { color: var(--rust); }

.icon-btn {
  background: none; border: none; padding: 3px 7px; cursor: pointer;
  color: var(--text-mute); border-radius: 4px; font-size: 11.5px;
  transition: color .12s ease, background .12s ease;
}
.icon-btn:hover { color: var(--text); background: var(--panel-4); }

/* 表单 */
.field-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; color: var(--text-mute); }
.input {
  padding: 8px 12px;
  background: #0D1116;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px; min-width: 0;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input:focus {
  border-color: var(--brass-dim);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,160,90,.09);
}
.input-mono { font-family: var(--mono); font-size: 12.5px; }
.input-grow { flex: 1; }
select.input { cursor: pointer; }

/* 解锁揭晓 */
.reveal {
  border: 1px solid var(--brass-dim);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(201,160,90,.09), rgba(201,160,90,.02));
  padding: 14px 16px;
  box-shadow: 0 0 0 1px rgba(201,160,90,.06), 0 6px 20px -8px rgba(201,160,90,.28);
  animation: unlock .34s cubic-bezier(.2,.8,.3,1);
}
@keyframes unlock {
  from { opacity: 0; transform: translateY(6px) scale(.995); }
  to   { opacity: 1; transform: none; }
}
.reveal + .reveal { margin-top: 10px; }
.reveal-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.reveal-kind {
  font-size: 11.5px; color: var(--brass); letter-spacing: .04em;
  display: flex; align-items: center; gap: 7px;
}
.reveal-kind::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 8px rgba(201,160,90,.7);
}
.reveal-secret {
  font-family: var(--mono); font-size: 13px; line-height: 1.8;
  color: var(--text); word-break: break-all;
  background: #0C1014;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  user-select: all;
}
.reveal-meta {
  margin-top: 10px; font-size: 11.5px; color: var(--text-mute);
  font-family: var(--mono); display: flex; flex-wrap: wrap; gap: 6px 16px;
}

/* 爆破 */
.modes {
  display: flex; gap: 3px; padding: 3px;
  background: #0D1116; border: 1px solid var(--line);
  border-radius: var(--r-sm); margin-bottom: 14px; flex-wrap: wrap;
}
.mode {
  flex: 1; min-width: 84px; padding: 7px 10px;
  background: transparent; border: none; border-radius: 4px;
  cursor: pointer; font-size: 12.5px; color: var(--text-mute);
  transition: background .13s ease, color .13s ease;
}
.mode:hover { color: var(--text-dim); }
.mode.is-on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }

.mode-pane { display: none; }
.mode-pane.is-on { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.dict-list {
  max-height: 220px; overflow-y: auto;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  background: #0D1116;
}
.dict-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: background .12s ease;
}
.dict-row:last-child { border-bottom: none; }
.dict-row:hover { background: var(--panel-2); }
.dict-row input { accent-color: var(--brass); width: 14px; height: 14px; cursor: pointer; }
.dict-name {
  font-family: var(--mono); font-size: 12px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dict-lines { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.dict-size { font-family: var(--mono); font-size: 11px; color: var(--text-mute); width: 66px; text-align: right; }

.hint-line { margin: 10px 0 0; font-size: 11.5px; color: var(--text-mute); line-height: 1.65; }
.hint-line b { color: var(--text-dim); font-weight: 600; }

/* ══ 作业 ══════════════════════════════════════════════════ */
.dock {
  background: var(--panel);
  border-top: 1px solid var(--line);
  max-height: 250px;
  display: flex; flex-direction: column;
}
.dock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 20px; border-bottom: 1px solid var(--line-soft);
}
.dock-head h2 { font-family: var(--serif); font-size: 13px; font-weight: 500; color: var(--text-dim); }
.dock-note { font-size: 11.5px; color: var(--text-mute); font-family: var(--mono); }

.job-list { list-style: none; margin: 0; padding: 9px 14px 14px; overflow-y: auto; }
/* 没有作业时不占高度，只留标题条 */
.dock:not(:has(.job)) { max-height: none; }
.dock:not(:has(.job)) .job-list { display: none; }
.job {
  display: grid;
  grid-template-columns: minmax(0,1fr) 190px 150px auto;
  align-items: center; gap: 14px;
  padding: 9px 11px; border-radius: var(--r-sm);
  transition: background .12s ease;
}
.job + .job { margin-top: 3px; }
.job:hover { background: var(--panel-2); }
.job-label b {
  font-weight: 500; font-size: 12.5px; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-src {
  font-size: 11px; color: var(--text-mute); font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar { height: 5px; background: var(--panel-4); border-radius: 3px; overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--copper), #79C0B2);
  transition: width .45s linear;
}
.job[data-status="found"] .bar > i { background: linear-gradient(90deg, var(--brass), var(--brass-2)); }
.job[data-status="error"] .bar > i,
.job[data-status="stopped"] .bar > i { background: var(--rust); }
.job-stats {
  font-family: var(--mono); font-size: 11px; color: var(--text-mute);
  text-align: right; font-variant-numeric: tabular-nums;
}
.job-result {
  grid-column: 1 / -1; margin-top: 5px; padding: 9px 12px;
  border: 1px solid var(--brass-dim); border-radius: var(--r-sm);
  background: rgba(201,160,90,.06);
  font-family: var(--mono); font-size: 12px; word-break: break-all; line-height: 1.7;
}
.job-result .k { color: var(--brass); }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  background: var(--panel-3);
  border: 1px solid var(--line-lit);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50; max-width: 76vw;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { border-color: rgba(194,96,76,.55); color: #E8B4A8; }
.toast.is-good { border-color: var(--brass-dim); color: #E3CB9E; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262E38; border-radius: 5px; border: 3px solid var(--panel); }
::-webkit-scrollbar-thumb:hover { background: #333D4A; }
.bench::-webkit-scrollbar-thumb { border-color: var(--bg); }

/* 响应式 */
@media (max-width: 1080px) {
  .gauges .gauge { min-width: 62px; padding: 0 12px; }
  .gauge-v { font-size: 16px; }
}
@media (max-width: 940px) {
  body { overflow: auto; height: auto; }
  .stage { grid-template-columns: minmax(0,1fr); }
  .rail { border-right: none; border-bottom: 1px solid var(--line); max-height: 44vh; }
  .bench { padding: 20px 18px 36px; }
  .job { grid-template-columns: minmax(0,1fr) auto; }
  .job-stats { text-align: left; }
  .gauges { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
