:root {
  --bg: #0a1120;
  --bg2: #0e1728;
  --panel: #111c2f;
  --panel2: #16233a;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #e9eef8;
  --muted: #8ea1be;
  --cyan: #4cc9f0;
  --green: #3ddc97;
  --amber: #f5b955;
  --red: #ff7a7a;
  --violet: #9b8cff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(76, 201, 240, .10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(155, 140, 255, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding-left: 18px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  background: rgba(10, 17, 32, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 300px; }

.mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 18px;
  color: #03121c;
  background: linear-gradient(135deg, var(--cyan), #7ee3c1);
  box-shadow: 0 6px 18px rgba(76, 201, 240, .28);
}

.brand-text h1 { font-size: 16px; letter-spacing: .3px; }
.brand-text p { font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }

.shop-switch { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }

.shop-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  transition: all .18s ease;
}
.shop-btn:hover { border-color: var(--line2); color: var(--text); }
.shop-btn.on {
  color: #041420;
  background: linear-gradient(135deg, #8fe3ff, #6ff0c0);
  border-color: transparent;
  font-weight: 600;
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.mode-pill {
  font-size: 11.5px;
  color: var(--cyan);
  border: 1px solid rgba(76, 201, 240, .35);
  background: rgba(76, 201, 240, .08);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.mode-pill.llm { color: var(--green); border-color: rgba(61, 220, 151, .4); background: rgba(61, 220, 151, .1); }

button { font-family: inherit; }

.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all .18s ease;
}
.ghost:hover { color: var(--text); border-color: var(--line2); background: rgba(255, 255, 255, .05); }
.ghost.small { padding: 3px 9px; font-size: 12px; }

.primary {
  border: none;
  background: linear-gradient(135deg, var(--cyan), #57e0b5);
  color: #041420;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(76, 201, 240, .22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(76, 201, 240, .3); }
.primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 344px;
  gap: 16px;
  padding: 16px 20px 24px;
  max-width: 1760px;
  margin: 0 auto;
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 40%), rgba(13, 23, 40, .66);
  backdrop-filter: blur(14px) saturate(125%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.card.grow { flex: 1; min-height: 120px; }

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.card-title h3 { font-size: 13.5px; letter-spacing: .3px; }

.tiny { font-size: 11.5px; color: var(--muted); }
.badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--muted);
}
.badge.amber { color: var(--amber); border-color: rgba(245, 185, 85, .35); background: rgba(245, 185, 85, .08); }

/* ---------- 任务输入 ---------- */
textarea, input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color .18s ease;
}
textarea:focus, input:focus { border-color: rgba(76, 201, 240, .5); }
::placeholder { color: #5d708c; }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.composer .card-title { flex-wrap: wrap; row-gap: 4px; }
.composer .card-title h3 { white-space: nowrap; }
#policyHint { flex: 1 1 100%; text-align: left; line-height: 1.5; font-size: 10.5px; }
.primary { white-space: nowrap; }
.card { transition: border-color .25s ease, box-shadow .25s ease; }
.card:hover { border-color: rgba(120, 220, 255, .16); box-shadow: 0 14px 34px rgba(0, 0, 0, .24); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 220, 255, .16); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 220, 255, .3); }

.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all .18s ease;
}
.task:hover { border-color: rgba(76, 201, 240, .45); background: rgba(76, 201, 240, .07); transform: translateY(-1px); }
.task span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

.run-list { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow: auto; }
.run-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all .18s ease;
}
.run-item:hover { border-color: var(--line2); background: rgba(255, 255, 255, .03); }
.run-item .goal { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-item .meta { display: flex; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---------- 执行区 ---------- */
.stage { min-height: 480px; padding: 18px 20px 24px; }

.empty { text-align: center; padding: 60px 30px; color: var(--muted); }
.empty-mark { font-size: 40px; color: rgba(76, 201, 240, .5); margin-bottom: 8px; }
.empty h2 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty p { max-width: 460px; margin: 0 auto 16px; font-size: 13px; }
.empty ul { display: inline-block; text-align: left; font-size: 12.5px; line-height: 2; }

.run-head { border-bottom: 1px dashed var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.run-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.run-goal { font-size: 15px; font-weight: 600; }
.run-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}
.chip.green { color: var(--green); border-color: rgba(61, 220, 151, .3); }
.chip.amber { color: var(--amber); border-color: rgba(245, 185, 85, .3); }
.chip.red { color: var(--red); border-color: rgba(255, 122, 122, .3); }

.summary {
  margin: 14px 0 4px;
  padding: 13px 15px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(61, 220, 151, .07), rgba(61, 220, 151, .02));
  border: 1px solid rgba(61, 220, 151, .18);
  font-size: 13px;
  white-space: pre-line;
}
.summary.pending { background: linear-gradient(180deg, rgba(245, 185, 85, .08), rgba(245, 185, 85, .02)); border-color: rgba(245, 185, 85, .22); }

.timeline { position: relative; margin-top: 16px; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(76, 201, 240, .5), rgba(255, 255, 255, .05));
}

.step {
  position: relative;
  margin-bottom: 12px;
  animation: rise .32s ease both;
}
.step::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(10, 17, 32, .9);
}
.step.think::before { background: var(--cyan); }
.step.tool::before { background: var(--green); }
.step.approval::before { background: var(--amber); }
.step.error::before { background: var(--red); }
.step.note::before { background: #5b6c85; }

.step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.step-title { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.step-tag {
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 6px;
}
.risk { font-size: 10.5px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.risk.read { color: #8fb6d8; }
.risk.write { color: var(--green); border-color: rgba(61, 220, 151, .3); }
.risk.critical { color: var(--amber); border-color: rgba(245, 185, 85, .35); }
.ms { font-size: 10.5px; color: #5e718c; margin-left: auto; }

.step-body {
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 13px;
}
.step.think .step-body { background: transparent; border: none; padding: 2px 0; color: #b9c8de; }
.step.approval .step-body { border-color: rgba(245, 185, 85, .3); background: rgba(245, 185, 85, .05); }
.step.error .step-body { border-color: rgba(255, 122, 122, .35); background: rgba(255, 122, 122, .06); }

.highlights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.highlights span {
  font-size: 11.5px;
  color: #b8c9e0;
  background: rgba(76, 201, 240, .06);
  border: 1px solid rgba(76, 201, 240, .16);
  padding: 2px 8px;
  border-radius: 6px;
}
.approve-row { display: flex; gap: 8px; margin-top: 10px; }
.mini {
  border: 1px solid rgba(61, 220, 151, .4);
  background: rgba(61, 220, 151, .12);
  color: #8ff0c6;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.mini.danger { border-color: rgba(255, 122, 122, .35); background: rgba(255, 122, 122, .08); color: #ffb3b3; }
.mini:hover { filter: brightness(1.15); }
.mini:disabled { opacity: .5; cursor: default; }

/* ---------- 右侧 ---------- */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi {
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.kpi .v { font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.kpi .l { font-size: 11px; color: var(--muted); margin-top: 1px; }
.kpi.warn .v { color: var(--amber); }

.risk-list, .approval-list, .audit-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow: auto; }
.risk-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 122, 122, .05); border: 1px solid rgba(255, 122, 122, .14); }
.risk-item .d { color: var(--red); font-size: 11.5px; white-space: nowrap; }

.approval-item {
  border: 1px solid rgba(245, 185, 85, .25);
  background: rgba(245, 185, 85, .05);
  border-radius: 10px;
  padding: 9px 10px;
}
.approval-item .t { font-size: 12.5px; font-weight: 600; }
.approval-item .r { font-size: 11.5px; color: var(--muted); margin: 3px 0 7px; }

.audit-item { font-size: 11.5px; color: var(--muted); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.audit-item b { color: #c8d6ea; font-weight: 500; }
.audit-item .o { float: right; }
.o.ok { color: var(--green); }
.o.bad { color: var(--red); }

.empty-line { font-size: 12px; color: #5f728e; padding: 8px 2px; }

/* ---------- 执行加载：太阳系 ---------- */
.orbit-empty {
  padding: 10px 20px 28px;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.orbit-empty #loader {
  width: min(560px, 84vw);
  height: 300px;
  display: block;
  margin: 0 auto 2px;
}
.orbit-empty h2 { margin-top: 4px; }

#bgfx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.layout { position: relative; z-index: 1; }

/* ---------- 量子锁屏 ---------- */
.lock {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #03070e;
}
.lock.hidden { display: none; }
#quantum { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lock-glow {
  position: absolute;
  width: 62vw; height: 62vw;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(76, 201, 240, .18), rgba(76, 201, 240, 0) 70%);
  filter: blur(28px);
  pointer-events: none;
  transition: opacity .7s ease;
}
.lock-card {
  position: relative;
  width: min(420px, 90vw);
  padding: 28px 30px 20px;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(180deg, rgba(14, 26, 44, .88), rgba(6, 12, 22, .94));
  border: 1px solid rgba(120, 220, 255, .22);
  box-shadow:
    0 0 0 1px rgba(120, 220, 255, .05),
    0 40px 90px rgba(0, 0, 0, .65),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 0 70px rgba(76, 201, 240, .12);
  backdrop-filter: blur(18px) saturate(130%);
  animation: lockIn .5s ease both;
  transition: opacity .45s ease, transform .45s ease;
}
.lock.collapsing .lock-card { animation: none; opacity: 0; transform: translateY(-8px) scale(.97); }
.lock.collapsing .lock-glow { opacity: .15; }
.lock-card::before,
.lock-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(120, 220, 255, .45);
  pointer-events: none;
}
.lock-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: 9px 0 0 0; }
.lock-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 9px 0; }
@keyframes lockIn {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: none; }
}
.lock-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.lock-top .mark {
  width: 42px; height: 42px; font-size: 18px; margin: 0;
  box-shadow: 0 0 0 1px rgba(120, 220, 255, .25), 0 8px 22px rgba(76, 201, 240, .35);
}
.lock-kicker { font-size: 9.5px; letter-spacing: .42em; color: rgba(120, 220, 255, .75); }
.lock-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .14em; margin-top: 3px; }
.lock-card h2 { font-size: 25px; letter-spacing: .07em; margin-bottom: 6px; }
.lock-card form { margin-top: 20px; }
.lock-input { display: flex; gap: 10px; }
.lock-input input {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  background: rgba(4, 10, 20, .85);
  border: 1px solid rgba(120, 220, 255, .2);
  letter-spacing: .2em;
}
.lock-input input:focus { border-color: rgba(120, 220, 255, .62); box-shadow: 0 0 0 3px rgba(76, 201, 240, .12); }
.lock-input .primary { height: 44px; padding: 0 22px; border-radius: 10px; }
.lock-card .tiny { margin-top: 10px; color: var(--amber); min-height: 16px; font-size: 11.5px; }
.lock-meta span { white-space: nowrap; }
.lock-meta {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 10.5px;
  color: #7d90ad;
  letter-spacing: .1em;
}
.lock-meta span::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 8px var(--cyan);
}

/* ---------- 执行中：全屏星链场景 ---------- */
.runfx {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #04080f;
  overflow: hidden;
}
.runfx.hidden { display: none; }
#runfxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.runfx-text {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.runfx-kicker { font-size: 9.5px; letter-spacing: .5em; color: rgba(140, 225, 255, .7); }
.runfx-text h2 { font-size: 21px; letter-spacing: .05em; margin: 9px 0 6px; }
.runfx-text p { font-size: 12px; color: var(--muted); letter-spacing: .12em; }

/* ---------- 视觉参数 ---------- */
.fx-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fx-title { font-size: 12px; margin-bottom: 9px; display: flex; justify-content: space-between; gap: 10px; }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.fx-cell { display: block; font-size: 11.5px; color: var(--muted); }
.fx-cell b { color: var(--cyan); font-weight: 600; margin-left: 4px; }
.fx-cell input[type="range"] {
  width: 100%;
  margin-top: 5px;
  accent-color: #4cc9f0;
  height: 18px;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 16, .72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.field { display: block; margin-top: 10px; }
.field span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- 提示 ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast {
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
  animation: rise .25s ease both;
  max-width: 360px;
}
.toast.bad { border-left-color: var(--red); }
.toast.good { border-left-color: var(--green); }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading { display: inline-flex; gap: 4px; align-items: center; }
.loading i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  animation: blink 1s infinite;
}
.loading i:nth-child(2) { animation-delay: .15s; }
.loading i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- 平台 / 板块 下拉 ---------- */
.shop-field { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.shop-select {
  background: rgba(10, 20, 34, .85);
  border: 1px solid var(--line2);
  color: var(--text);
  font-size: 12.5px;
  padding: 5px 8px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: border-color .18s ease;
}
.shop-select:hover, .shop-select:focus { border-color: rgba(76, 201, 240, .55); }
.shop-select option { background: #0b1524; color: #e6eefc; }

/* ---------- 数据星系 ---------- */
.arc { position: fixed; inset: 0; z-index: 85; background: #03070e; overflow: hidden; }
.arc.hidden { display: none; }
/* ---------- 主控星图 ---------- */
.view-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(10, 20, 34, .72); border: 1px solid var(--line); }
.view-tab {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 5px 13px; border-radius: 7px; transition: color .18s ease, background .18s ease;
}
.view-tab:hover { color: var(--text); }
.view-tab.on { background: linear-gradient(135deg, #8fe3ff, #6ff0c0); color: #041420; font-weight: 700; }
.view-hidden { display: none !important; }
.galaxy-view { position: fixed; inset: 60px 0 0 0; z-index: 5; }
#galaxyCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.galaxy-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-size: 11.5px; color: var(--muted); letter-spacing: .1em; pointer-events: none;
}
.galaxy-card {
  position: absolute; right: 34px; top: 34px; width: min(320px, 84vw);
  padding: 16px 18px 15px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(14, 26, 44, .92), rgba(6, 12, 22, .96));
  border: 1px solid rgba(120, 220, 255, .22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
}
.galaxy-card.hidden { display: none; }

/* ---------- 星图左侧指挥台 ---------- */
.gx-panel {
  position: absolute;
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: min(320px, 30vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 22, 38, .72), rgba(8, 10, 20, .78));
  border: 1px solid rgba(150, 170, 220, .16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px) saturate(130%);
  overflow: auto;
}
.gx-head { display: flex; align-items: center; gap: 10px; }
.gx-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 205, 120, .95), rgba(220, 90, 60, .95));
  color: #1a0d05; font-weight: 800; font-size: 15px;
}
.gx-title { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.gx-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gx-panel textarea {
  width: 100%; min-height: 84px; resize: vertical;
  background: rgba(6, 10, 20, .65);
  border: 1px solid rgba(150, 170, 220, .18);
  border-radius: 11px; padding: 10px 11px;
  color: var(--text); font-size: 12.5px; line-height: 1.6;
  outline: none;
}
.gx-panel textarea:focus { border-color: rgba(255, 205, 120, .55); }
.gx-actions { display: flex; align-items: center; gap: 10px; }
.gx-tip { font-size: 10.5px; color: var(--muted); }
.gx-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gx-task {
  border: 1px solid rgba(150, 170, 220, .16);
  background: rgba(255, 255, 255, .03);
  color: #cfe0f5; font-size: 11.5px; padding: 8px 6px;
  border-radius: 9px; cursor: pointer; transition: border-color .18s ease, background .18s ease;
}
.gx-task:hover { border-color: rgba(255, 205, 120, .45); background: rgba(255, 205, 120, .07); }
.gx-log {
  margin-top: auto;
  font-size: 11.5px; line-height: 1.7; color: #9db2cc;
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 10px;
}
.gx-log b { color: var(--text); font-weight: 600; }
.galaxy-card h3 { font-size: 15px; margin-bottom: 10px; }
#arcCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.arc-head {
  position: absolute; top: 26px; left: 30px; right: 30px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  pointer-events: none;
}
.arc-head .ghost { pointer-events: auto; }
.arc-kicker { font-size: 9.5px; letter-spacing: .5em; color: rgba(140, 225, 255, .7); }
.arc-head h2 { font-size: 22px; letter-spacing: .05em; margin: 8px 0 4px; }
.arc-head p { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.arc-card {
  position: absolute; right: 34px; top: 132px;
  width: min(330px, 86vw);
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(14, 26, 44, .92), rgba(6, 12, 22, .96));
  border: 1px solid rgba(120, 220, 255, .22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
}
.arc-card.hidden { display: none; }
.arc-card h3 { font-size: 15px; margin-bottom: 10px; }
.arc-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.arc-kv span { color: var(--muted); }
.arc-kv b { font-weight: 600; text-align: right; }
.arc-detail { margin-top: 10px; font-size: 12px; line-height: 1.6; color: #b9c8de; }

@media (max-width: 1280px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); }
  .layout > .col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .layout > .col:last-child { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .brand { min-width: 0; }
}

/* ---------- 平台 / 板块 两级切换 ---------- */
.shop-group { display: flex; align-items: center; gap: 8px; }
.shop-platform { font-size: 11px; color: var(--muted); letter-spacing: .6px; white-space: nowrap; }
.shop-items { display: flex; gap: 6px; }
.shop-group + .shop-group { padding-left: 10px; border-left: 1px solid var(--line); }
.shop-platform { display: inline-flex; align-items: center; gap: 5px; }
.shop-platform::after { content: '▸'; opacity: .45; font-size: 10px; }
.shop-item-gap { display: none; }

/* ---------- 粒子背景层：让负层级的画布落在内容之下、body 背景之上 ---------- */
body { isolation: isolate; }
#bg-particles { mix-blend-mode: screen; }

/* ---------- 星系详情：跃迁镜头 + 三层优先级 ---------- */
.galaxy-view.zoomed #galaxyCanvas {
  filter: blur(14px) brightness(.45);
  transform: scale(1.08);
  transition: filter .55s ease, transform .55s ease;
}
#galaxyCanvas { transition: filter .55s ease, transform .55s ease; }
.galaxy-view.detail-open .gx-panel,
.galaxy-view.detail-open .galaxy-hint,
.galaxy-view.detail-open .galaxy-card { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.gx-panel, .galaxy-hint, .galaxy-card { transition: opacity .3s ease; }
.gx-detail {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: 46% 54%;
  background: radial-gradient(120% 90% at 30% 45%, #0a0e1c 0%, #03050c 100%);
  animation: gxdIn .45s ease both;
}
.gx-detail.hidden { display: none; }
@keyframes gxdIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: none; }
}
.gxd-wrap { display: contents; }
.gxd-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.gxd-orbit {
  position: relative;
  width: min(560px, 40vw);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.gxd-star {
  width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, hsla(var(--hue), 100%, 88%, 1), hsla(var(--hue), 96%, 48%, .92) 45%, hsla(var(--hue), 90%, 22%, 1));
  box-shadow: 0 0 60px 12px hsla(var(--hue), 100%, 60%, .35), inset 0 0 40px rgba(0, 0, 0, .35);
  animation: gxdPulse 3.2s ease-in-out infinite;
}
@keyframes gxdPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px 12px hsla(var(--hue), 100%, 60%, .32); }
  50% { transform: scale(1.04); box-shadow: 0 0 80px 18px hsla(var(--hue), 100%, 62%, .45); }
}
.gxd-ring-1, .gxd-ring-2 {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(150, 200, 255, .12);
}
.gxd-ring-1 { width: 56%; height: 56%; }
.gxd-ring-2 { width: 84%; height: 84%; border-style: dashed; border-color: rgba(150, 200, 255, .10); }
.gxd-orbit-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; border-radius: 9px;
  background: rgba(10, 18, 32, .82);
  border: 1px solid rgba(120, 200, 255, .18);
  font-size: 11px; color: #a9bed8; white-space: nowrap;
}
.gxd-orbit-node b { color: #e8f6ff; font-size: 12px; font-weight: 600; }
.gxd-alerts {
  position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; width: min(360px, 34vw);
}
.gxd-node {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px; color: #b6c8de;
}
.gxd-node b { color: #eef7ff; font-weight: 600; }
.gxd-node.bad { border-color: rgba(235, 80, 70, .45); background: rgba(235, 80, 70, .10); animation: gxdWarn 1.6s ease-in-out infinite; }
.gxd-node.warn { border-color: rgba(245, 190, 90, .38); background: rgba(245, 190, 90, .08); }
.gxd-node.good { border-color: rgba(90, 220, 160, .30); background: rgba(90, 220, 160, .06); }
.gxd-node.pending { border-style: dashed; opacity: .7; }
@keyframes gxdWarn {
  0%, 100% { box-shadow: 0 0 0 rgba(235, 80, 70, 0); }
  50% { box-shadow: 0 0 22px rgba(235, 80, 70, .35); }
}
.gxd-panel { padding: 34px 38px 30px 10px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.gxd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.gxd-kicker { font-size: 9.5px; letter-spacing: .48em; color: rgba(150, 200, 255, .65); }
.gxd-head h2 { font-size: 24px; letter-spacing: .04em; margin-top: 6px; }
.gxd-tier-label { font-size: 10.5px; letter-spacing: .22em; color: #6f86a6; margin-top: 14px; }
.gxd-alert-list, .gxd-metrics { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.gxd-metric {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; padding: 7px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #9db2cc;
}
.gxd-metric b { color: #e6f2ff; font-weight: 600; }
.gxd-dust { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.gxd-chip {
  font-size: 11px; color: #8ea3bf; padding: 4px 9px; border-radius: 20px;
  border: 1px solid rgba(150, 170, 220, .18); background: rgba(255, 255, 255, .02);
}
.gxd-advice {
  margin-top: auto; padding: 13px 15px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 205, 120, .10), rgba(255, 140, 90, .05));
  border: 1px solid rgba(255, 205, 120, .28);
}
.gxd-advice b { font-size: 11px; letter-spacing: .18em; color: #ffd79a; }
.gxd-advice p { margin-top: 7px; font-size: 12.5px; line-height: 1.7; color: #d8c7ae; }

/* ---------- L1–L5 数据面板 ---------- */
.gxd-alert-badge {
  position: absolute; top: 5%; left: 50%; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  background: rgba(235, 70, 60, .14);
  border: 1px solid rgba(235, 80, 70, .55);
  color: #ffb9b0; font-size: 12px;
  animation: gxdWarn 1.8s ease-in-out infinite;
}
.gxd-diagnosis {
  margin: 4px 0 12px; padding: 12px 14px; border-radius: 13px;
  border: 1px solid rgba(255, 205, 120, .25);
  background: rgba(255, 205, 120, .05);
}
.gxd-diagnosis.bad { border-color: rgba(235, 80, 70, .45); background: rgba(235, 80, 70, .07); }
.gxd-diagnosis b { font-size: 13.5px; color: #ffd79a; }
.gxd-diagnosis.bad b { color: #ff9a8e; }
.gxd-diagnosis.good b { color: #8ff0c6; }
.gxd-diagnosis p { margin-top: 6px; font-size: 12px; line-height: 1.65; color: #c2b6a6; }
.gxd-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.gxd-options span {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(255, 205, 120, .28); color: #e8c9a0;
}
.gxd-tiers { display: flex; flex-direction: column; gap: 13px; padding-bottom: 6px; }
.gxd-tier { border-top: 1px solid rgba(255, 255, 255, .06); padding-top: 9px; }
.gxd-tier-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .16em; color: #7f93b3; margin-bottom: 4px;
}
.gxd-lv {
  font-size: 10px; padding: 1px 7px; border-radius: 5px;
  background: rgba(150, 170, 220, .12); color: #a9bed8; letter-spacing: .06em;
}
.gxd-tier.l1 .gxd-lv { background: rgba(235, 80, 70, .20); color: #ffb3aa; }
.gxd-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 2px; font-size: 12px; color: #9db2cc;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.gxd-row b { color: #e6f2ff; font-weight: 600; }

/* 星系节点 chips */
.gxd-nodes { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.gxd-node-chip {
  font-size: 11px; padding: 4px 9px; border-radius: 8px;
  border: 1px solid rgba(150, 170, 220, .16);
  color: #9db2cc; background: rgba(255, 255, 255, .02);
}
.gxd-node-chip.warn { border-color: rgba(245, 190, 90, .35); color: #ffd79a; }
.gxd-node-chip.bad { border-color: rgba(235, 80, 70, .40); color: #ff9a8e; }
.gxd-node-chip.good { border-color: rgba(90, 220, 160, .28); color: #8be3bd; }
.gxd-node-chip.pending { border-style: dashed; opacity: .62; }
.gxd-row.warn b { color: #ffd79a; }
.gxd-row.bad { border-radius: 6px; }
.gxd-row.bad b { color: #ff9a8e; }
.gxd-row.bad { animation: gxdWarn 1.8s ease-in-out infinite; }
.gxd-row.pending { opacity: .55; }
.gxd-row.pending b { color: #8aa0bd; font-weight: 500; }

/* ---------- 右侧 AI 备忘录：静默信息流 ---------- */
.gx-stream {
  position: absolute;
  right: 16px;
  top: 16px;
  bottom: 60px;
  width: 268px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 12, 22, .55), rgba(6, 9, 18, .35));
  border: 1px solid rgba(120, 160, 220, .10);
  backdrop-filter: blur(10px);
  overflow: hidden auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.75;
  color: #7f95b3;
  scrollbar-width: thin;
  mask-image: linear-gradient(180deg, transparent 0, #000 6%, #000 92%, transparent 100%);
}
.gx-stream:empty::before {
  content: '静默监测中…';
  color: #4d5f7a;
}
.gxl { display: flex; gap: 7px; padding: 2px 0; animation: gxlIn .5s ease both; }
.gxl-t { color: #4f6684; flex: 0 0 auto; }
.gxl.bad { color: #ff8f83; }
.gxl.warn { color: #e8c48a; }
.gxl.good { color: #7fd9b0; }
@keyframes gxlIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
.galaxy-view.detail-open .gx-stream { opacity: 0; pointer-events: none; }
.gx-stream { transition: opacity .3s ease; }

/* ---------- 顶部核心指标环 ---------- */
.gx-kpi {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(8, 12, 22, .55);
  border: 1px solid rgba(255, 205, 120, .16);
  backdrop-filter: blur(12px);
  pointer-events: none;
}
.gx-kpi:empty { display: none; }
.gxk {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 14px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  min-width: 108px;
}
.gxk:last-child { border-right: none; }
.gxk span { font-size: 10px; letter-spacing: .14em; color: #7f93b3; }
.gxk b { font-size: 17px; font-weight: 700; color: #f2f7ff; letter-spacing: .02em; }
.gxk.bad b { color: #ff9a8e; }
.gxk.warn b { color: #ffd79a; }
.galaxy-view.detail-open .gx-kpi { opacity: 0; }
.gx-kpi { transition: opacity .3s ease; }

/* ---------- 素材库 ---------- */
.assets-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 70px;
}
.drop {
  border: 1px dashed rgba(140, 190, 255, .25);
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  background: rgba(10, 18, 32, .45);
  transition: border-color .2s ease, background .2s ease;
}
.drop.hot { border-color: rgba(120, 225, 255, .7); background: rgba(76, 201, 240, .08); }
.drop-icon { font-size: 26px; color: #7fd3ff; }
.drop h2 { font-size: 18px; margin: 8px 0 4px; }
.drop p { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.assets-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px; padding: 46px 0; }
.acard {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 26, 44, .7);
  border: 1px solid rgba(120, 220, 255, .12);
}
.acard img { width: 100%; height: 152px; object-fit: cover; display: block; }
.acard figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.acard figcaption b { font-size: 12px; font-weight: 600; color: #e6f2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard figcaption span { font-size: 10.5px; color: #7f93b3; }
.acard-del {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(6, 10, 20, .7); color: #dbe8f8;
  opacity: 0; cursor: pointer; font-size: 14px; line-height: 1;
  transition: opacity .18s ease, border-color .18s ease, color .18s ease, width .18s ease;
}
.acard:hover .acard-del { opacity: 1; }
.acard-del:hover { border-color: rgba(235, 90, 80, .7); color: #ff9a8e; }
.acard.confirm { border-color: rgba(235, 90, 80, .5); }
.acard.confirm .acard-del { opacity: 1; width: auto; padding: 0 9px; border-radius: 8px; font-size: 11px; }
.acard.dissolving { animation: dissolve .42s ease forwards; }
@keyframes dissolve {
  to { opacity: 0; transform: scale(.92) translateY(-6px); filter: blur(8px); }
}
.acard.just-in { animation: justIn .5s ease; }
@keyframes justIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.assets-stream {
  position: fixed; left: 24px; bottom: 18px; z-index: 3;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px; color: #7f95b3;
  pointer-events: none;
}
.as-line { display: flex; gap: 8px; transition: opacity .8s ease; }
.as-line.fade { opacity: 0; }
.as-line.good { color: #7fd9b0; }
.as-line.warn { color: #e8c48a; }
.as-line.bad { color: #ff8f83; }

/* 素材库：选择、黑洞删除、撤销 */
.assets-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.assets-bar .hidden { display: none; }
.assets-count { font-size: 11.5px; color: var(--muted); }
.ghost.on { border-color: rgba(120, 225, 255, .6); color: #cdefff; }
.ghost.danger { border-color: rgba(235, 90, 80, .45); color: #ff9a8e; }
.acard img { transition: filter .2s ease; }
.acard:hover img { filter: brightness(.62); }
.acard.selected { border-color: rgba(235, 90, 80, .75); box-shadow: 0 0 0 1px rgba(235, 90, 80, .45), 0 0 22px rgba(235, 90, 80, .16); }
.acard.sucked { opacity: 0; transform: scale(.94); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.acard-del { display: grid; place-items: center; padding: 0; }
.acard-del i {
  width: 11px; height: 11px; border-radius: 50%;
  background: #04070f;
  box-shadow: 0 0 0 1px rgba(140, 220, 255, .6), 0 0 10px rgba(90, 180, 255, .6);
  transition: box-shadow .2s ease, transform .2s ease;
}
.acard-del:hover i { transform: scale(1.15); box-shadow: 0 0 0 1px rgba(180, 240, 255, .9), 0 0 16px rgba(120, 220, 255, .9); }
.suction-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, #e6faff, #58c8ff 65%, transparent 72%);
  box-shadow: 0 0 6px rgba(120, 225, 255, .9);
}
.as-undo {
  pointer-events: auto;
  margin-left: 4px; padding: 0; border: none; background: none;
  color: #8fd8ff; font-size: 11px; cursor: pointer; text-decoration: underline;
}
.acard.confirm .acard-del { width: 26px; padding: 0; border-radius: 50%; font-size: 14px; }

/* ---------- 快捷键面板 ---------- */
.gx-keys {
  position: absolute;
  right: 300px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(8, 12, 22, .5);
  border: 1px solid rgba(120, 160, 220, .12);
  font-size: 10.5px;
  color: #7f95b3;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.gx-keys b { color: #bcd6f5; font-weight: 600; margin-right: 3px; }
.galaxy-view.detail-open .gx-keys { opacity: 0; }
.gx-keys { transition: opacity .3s ease; }

/* ---------- 全链路分析 ---------- */
.ana-main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 20px 24px 60px; display: flex; flex-direction: column; gap: 16px; }
.ana-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ana-card { padding: 16px 18px; border-radius: 16px; background: rgba(13, 23, 40, .72); border: 1px solid rgba(120, 220, 255, .12); }
.ana-card span { font-size: 11px; letter-spacing: .14em; color: #7f93b3; }
.ana-card b { display: block; font-size: 24px; margin: 6px 0 2px; color: #eef7ff; }
.ana-card b.bad { color: #ff9a8e; }
.ana-card b.good { color: #8ff0c6; }
.ana-card em { font-style: normal; font-size: 11.5px; color: #8ea3bf; }
.ana-block { padding: 16px 18px; }
.ana-row { display: flex; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 13px; color: #9db2cc; }
.ana-row b { color: #e6f2ff; }
.ana-row.strong { border-bottom: none; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 205, 120, .25); }
.ana-row.strong b { color: #ffd79a; font-size: 15px; }
.ana-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.ana-mini { font-size: 11.5px; color: #8ea3bf; padding: 3px 0; }
.ana-issue { padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .02); margin-bottom: 8px; }
.ana-issue.l1 { border-color: rgba(235, 80, 70, .4); background: rgba(235, 80, 70, .06); }
.ana-issue-head { display: flex; align-items: center; gap: 8px; }
.ana-lv { font-size: 10px; padding: 1px 7px; border-radius: 5px; background: rgba(150, 170, 220, .14); color: #a9bed8; }
.ana-issue.l1 .ana-lv { background: rgba(235, 80, 70, .2); color: #ffb3aa; }
.ana-issue b { font-size: 13px; color: #eef7ff; }
.ana-issue p { margin-top: 5px; font-size: 12px; color: #9db2cc; line-height: 1.6; }
.ana-issue em { font-style: normal; font-size: 11.5px; color: #ffd79a; }
.ana-plan { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ana-plan-main { display: flex; flex-direction: column; gap: 3px; }
.ana-plan-main b { font-size: 13px; color: #eef7ff; }
.ana-plan-main span { font-size: 11.5px; color: #8ea3bf; }
.ana-search { display: flex; gap: 10px; margin-top: 6px; }
.ana-search input { flex: 1; }
.ana-results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ana-result { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .02); border: 1px solid rgba(120, 220, 255, .1); }
.ana-tag { font-size: 10px; color: #7fd3ff; letter-spacing: .1em; }
.ana-result b { display: block; font-size: 12.5px; margin: 3px 0; color: #e6f2ff; }
.ana-result p { font-size: 11.5px; color: #9db2cc; line-height: 1.6; }
@media (max-width: 900px) { .ana-cards { grid-template-columns: 1fr; } .ana-split { grid-template-columns: 1fr; } }

/* ---------- 昨夜分析回执 ---------- */
.nightly {
  position: absolute;
  top: 18px;
  left: 350px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(150, 170, 220, .2);
  background: rgba(8, 12, 22, .55);
  color: #9db2cc;
  font-size: 11.5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color .2s ease, color .2s ease;
}
.nightly:hover { border-color: rgba(120, 225, 255, .5); color: #cdefff; }
.nightly.done { border-color: rgba(90, 220, 160, .35); color: #8ff0c6; }
.nightly.skip { border-color: rgba(245, 190, 90, .35); color: #ffd79a; }
.nightly.fail { border-color: rgba(235, 80, 70, .45); color: #ff9a8e; }
.galaxy-view.detail-open .nightly { opacity: 0; pointer-events: none; }
.nightly { transition: opacity .3s ease, border-color .2s ease, color .2s ease; }

/* ---------- 成本假设 ---------- */
.ana-assume { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; margin-top: 6px; }
.ana-assume label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
.ana-assume input { height: 34px; }
.ana-note { display: block; margin-top: 6px; font-size: 10.5px; color: #8ea3bf; line-height: 1.5; }
@media (max-width: 900px) { .ana-assume { grid-template-columns: 1fr; } }

/* 头部紧凑：按钮变多后保持单行 */
.topbar { gap: 12px; flex-wrap: nowrap; }
.topbar-right { gap: 6px; }
.shop-field > span { display: none; }
.shop-select { padding: 4px 7px; font-size: 12px; }
.badge { padding: 4px 8px; font-size: 10.5px; }

/* ---------- 今日 ---------- */
.tdy-yesterday { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tdy-nodata { grid-column: 1 / -1; padding: 22px; border-radius: 16px; border: 1px dashed rgba(245, 190, 90, .35); background: rgba(245, 190, 90, .05); }
.tdy-nodata b { font-size: 14px; color: #ffd79a; }
.tdy-nodata p { margin-top: 8px; font-size: 12.5px; color: #9db2cc; line-height: 1.7; }
.tdy-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.tdy-metric { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .02); border: 1px solid rgba(120, 220, 255, .1); }
.tdy-metric span { font-size: 11px; color: #7f93b3; }
.tdy-metric b { display: block; font-size: 16px; margin: 4px 0 2px; color: #eef7ff; }
.tdy-metric em { font-style: normal; font-size: 10.5px; color: #8ea3bf; }
.tdy-metric.breach { border-color: rgba(235, 80, 70, .45); background: rgba(235, 80, 70, .06); }
.tdy-metric.breach b { color: #ff9a8e; }
@media (max-width: 900px) { .tdy-yesterday { grid-template-columns: 1fr; } .tdy-metrics { grid-template-columns: 1fr 1fr; } }

/* ---------- 执行态 HUD ---------- */
.runfx-hud {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  padding: 8px 20px;
  border-radius: 8px;
  background: rgba(6, 10, 18, .75);
  border: 1px solid rgba(120, 220, 255, .18);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: #8fd8ff;
  pointer-events: none;
}
.runfx-hud span:nth-child(4) { color: #ffd79a; }
.runfx-stats {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 34px;
  font-size: 10.5px;
  color: #7f95b3;
  letter-spacing: .08em;
  pointer-events: none;
}
.runfx-stats div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.runfx-stats b { font-size: 15px; color: #eef7ff; font-weight: 700; }
.runfx-stats em { font-style: normal; color: #6d82a0; }

/* ---------- 口径表 ---------- */
.tdy-defs { padding: 14px 18px; }
.tdy-defs summary { cursor: pointer; font-size: 13px; color: #cfe0f5; font-weight: 600; }
.tdy-defs table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.tdy-defs th, .tdy-defs td { text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #9db2cc; }
.tdy-defs th { color: #7f93b3; font-weight: 500; font-size: 11px; letter-spacing: .08em; }
.tdy-defs td:first-child { color: #e6f2ff; white-space: nowrap; }
.tdy-defs .tiny { margin-top: 10px; }

/* ---------- 赛博朋克：全局扫描线与霓虹 ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 96;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  opacity: .16;
}
.lock-card {
  border-color: rgba(255, 92, 225, .28);
  box-shadow:
    0 0 0 1px rgba(255, 92, 225, .18),
    0 0 46px rgba(0, 200, 255, .20),
    0 40px 90px rgba(0, 0, 0, .68),
    inset 0 1px 0 rgba(255, 255, 255, .07);
}
.lock-card::before { border-color: rgba(255, 92, 225, .55); }
.lock-card::after { border-color: rgba(0, 220, 255, .55); }
.lock-kicker { color: #ff6ee6; text-shadow: 0 0 10px rgba(255, 92, 225, .55); }
.lock-card h2 { text-shadow: 0 0 22px rgba(120, 225, 255, .35), 0 0 40px rgba(255, 92, 225, .18); }
.lock-card h2::after {
  content: "  /  白牙接口";
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(255, 110, 230, .75);
  vertical-align: middle;
}
.lock-input input { box-shadow: inset 0 0 18px rgba(0, 200, 255, .08); }
.lock-input .primary {
  background: linear-gradient(135deg, #5ff2ff, #b45cff);
  box-shadow: 0 0 18px rgba(0, 220, 255, .35);
}
.lock-meta span::before { background: #5ff2ff; box-shadow: 0 0 8px #5ff2ff; }

/* 卡片与指标轻微霓虹 */
.card:hover { border-color: rgba(255, 92, 225, .22); box-shadow: 0 14px 36px rgba(0, 0, 0, .26), 0 0 26px rgba(0, 200, 255, .08); }
.gxk b { text-shadow: 0 0 14px rgba(120, 225, 255, .25); }
.nightly.done { text-shadow: 0 0 10px rgba(90, 220, 160, .35); }
.ana-card b, .tdy-metric b { text-shadow: 0 0 12px rgba(120, 225, 255, .2); }

/* 视图切换淡入 */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.galaxy-view, .layout { animation: viewIn .35s ease both; }

/* 顶部栏：按钮多了以后保持单行，平台/板块不换行堆叠 */
.topbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.topbar::-webkit-scrollbar { display: none; }
.shop-switch { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.shop-field { flex: 0 0 auto; }
.shop-field > span { display: none; }

/* 顶部按钮不换行、更紧凑 */
.topbar button, .topbar a, .view-tab, .mode-pill, .badge { white-space: nowrap; }
.topbar { gap: 10px; padding: 10px 16px; }
.topbar .ghost, .topbar .primary { padding: 6px 10px; font-size: 12px; }
.view-tab { padding: 5px 10px; }
.brand { min-width: 220px; }

/* 昨夜分析回执下移，避开「当前平台」标识 */
.nightly { top: 96px; left: 352px; }

/* ---------- 入口态：HUD / 平台侧栏 / 操作提示 ---------- */
.lock-hud {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 24px;
  padding: 8px 20px;
  border-radius: 8px;
  background: rgba(6, 10, 18, .75);
  border: 1px solid rgba(120, 220, 255, .18);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: #8fd8ff;
}
.lock-hud .mode { color: #ffd79a; }

.lock-rail {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lock-plat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(120, 220, 255, .12);
  background: rgba(6, 12, 20, .55);
  font-size: 11px;
  color: #7f95b3;
  backdrop-filter: blur(6px);
}
.lock-plat i {
  width: 6px; height: 6px; border-radius: 50%;
  background: hsl(var(--h), 100%, 66%);
  box-shadow: 0 0 8px hsl(var(--h), 100%, 66%);
}
.lock-plat b { font-weight: 500; color: #b9cbe3; font-size: 11.5px; }
.lock-plat em { font-style: normal; font-size: 10px; color: #5f7a96; }
.lock-plat.on em { color: #6ff0c4; }
.lock-plat.on { border-color: rgba(111, 240, 196, .22); }

.lock-hint {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 6;
  text-align: right;
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(140, 165, 195, .7);
  letter-spacing: .04em;
}

/* 执行态右下操作提示 */
.runfx-hint {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 6;
  text-align: right;
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(140, 165, 195, .7);
  letter-spacing: .04em;
  pointer-events: none;
}

/* 入口平台栏：可点选 */
.lock-plat { cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.lock-plat:hover { border-color: rgba(120, 220, 255, .4); background: rgba(10, 20, 34, .75); }
.lock-plat.is-picked { border-color: rgba(95, 242, 255, .6); background: rgba(12, 28, 44, .85); }
.lock-plat.is-picked b { color: #e6f7ff; }

/* 执行态文案固定在中下部，不受星海层布局影响 */
.runfx .runfx-text {
  position: absolute !important;
  left: 50% !important;
  bottom: 132px !important;
  transform: translateX(-50%) !important;
  text-align: center;
  z-index: 5;
}
.runfx .runfx-hud { z-index: 6; }
.runfx .runfx-stats { z-index: 6; }

/* ---------- 入口/执行 双态切换（演示） ---------- */
.state-switch {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 96;
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(120, 220, 255, .18);
  background: rgba(6, 12, 20, .72);
  backdrop-filter: blur(8px);
}
.state-switch button {
  padding: 5px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8ea3bf;
  font-size: 11.5px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.state-switch button:hover { color: #cdefff; }
.state-switch button.on {
  background: linear-gradient(135deg, #5ff2ff, #b45cff);
  color: #041018;
  font-weight: 600;
}

/* 演示态：执行遮罩盖在锁屏之上 */
body.demo-run #runfx { z-index: 95; }
.demo-badge {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  z-index: 9;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 215, 154, .4);
  color: #ffd79a;
  font-size: 10.5px;
  letter-spacing: .08em;
  background: rgba(20, 14, 6, .6);
}

.state-switch[hidden] { display: none; }

/* 平台栏：已接脉冲 + 计数 + 悬浮说明 */
.lock-plat.on i { animation: platPulse 2.6s ease-in-out infinite; }
@keyframes platPulse {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.25); }
}
.lock-rail-foot {
  margin-top: 4px;
  padding-left: 2px;
  font-size: 9.5px;
  letter-spacing: .06em;
  color: #5f7a96;
}
@media (prefers-reduced-motion: reduce) {
  .lock-plat.on i { animation: none; opacity: .9; }
}
@media (max-width: 980px) {
  .lock-rail { display: none; }
  .lock-hint { display: none; }
  .lock-hud { gap: 12px; font-size: 9.5px; padding: 6px 12px; }
  .state-switch { bottom: 10px; left: 10px; }
}

/* ---------- 入口 12 信号环 ---------- */
.signal-ring { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.signal-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ff2ff;
  box-shadow: 0 0 9px rgba(95, 242, 255, .85);
  pointer-events: auto;
  cursor: help;
  transition: transform .16s ease, box-shadow .16s ease;
}
.signal-dot:hover { transform: scale(1.9); box-shadow: 0 0 16px rgba(95, 242, 255, 1); }
.signal-dot.warn { background: #ff7a5c; box-shadow: 0 0 9px rgba(255, 122, 92, .85); }

/* 执行计时 */
.runfx-hud .clock { color: #ffd79a; letter-spacing: .1em; }
.runfx-hud .clock[hidden] { display: none; }

/* 双态切换：键盘可达 */
.state-switch button:focus-visible { outline: 2px solid #5ff2ff; outline-offset: 2px; }

/* 窄屏（手机 / 小窗）：卡片与 HUD 收敛 */
@media (max-width: 720px) {
  .lock-hud { gap: 8px; font-size: 8.5px; padding: 5px 8px; top: 10px; letter-spacing: .08em; }
  .lock-card { width: min(420px, 92vw); padding: 20px 18px 16px; }
  .lock-card h2 { font-size: 22px; }
  .lock-rail, .lock-hint { display: none; }
  .signal-ring { display: none; }
  .state-switch { bottom: 10px; left: 10px; }
  .state-switch button { padding: 4px 9px; font-size: 10.5px; }
  .runfx-hud { gap: 8px; font-size: 8.5px; padding: 5px 8px; }
  .runfx-stats { gap: 14px; bottom: 16px; }
  .runfx-stats b { font-size: 12px; }
  .runfx-text { bottom: 92px !important; }
  .runfx-text h2 { font-size: 20px; }
  .runfx-hint { display: none; }
}

@media (max-width: 720px) {
  .lock-input { flex-direction: column; }
  .lock-input .primary { width: 100%; }
  .lock-hud span { white-space: nowrap; }
  .lock-hud { font-size: 8px; }
  .lock-card { overflow: hidden; }
}

@media (max-width: 720px) {
  .lock-card { width: min(420px, 92vw) !important; max-width: 92vw !important; }
}

@media (max-width: 720px) {
  html, body { max-width: 100vw; overflow-x: hidden; }
  #lock { width: 100vw !important; max-width: 100vw !important; }
  .lock-card { width: calc(100vw - 32px) !important; max-width: calc(100vw - 32px) !important; margin: 0 auto !important; }
}

/* 卡片统一按 border-box 计算宽度，避免 padding 撑出视口 */
.lock-card { box-sizing: border-box; }

/* ---------- 全息聊天面板 ---------- */
.chat-dock {
  position: fixed;
  right: 20px;
  bottom: 54px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.chat-toggle {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, .28);
  background: rgba(8, 14, 24, .78);
  color: #cfe6ff;
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.chat-toggle:hover { border-color: rgba(95, 242, 255, .7); box-shadow: 0 0 18px rgba(95, 242, 255, .25); }
.chat-body {
  width: min(420px, calc(100vw - 40px));
  border-radius: 14px;
  border: 1px solid rgba(120, 220, 255, .18);
  background: rgba(7, 12, 22, .86);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.chat-body.hidden { display: none; }
.chat-log { max-height: 280px; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-hint { font-size: 11.5px; color: #6f86a6; line-height: 1.6; }
.chat-msg { font-size: 12.5px; line-height: 1.65; color: #dbe9fb; }
.chat-msg.me { color: #8fd8ff; text-align: right; }
.chat-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-tools span { font-size: 10px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(120, 220, 255, .25); color: #8fd8ff; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(120, 220, 255, .12); }
.chat-form input { flex: 1; height: 34px; }
.chat-form .primary { height: 34px; padding: 0 14px; }

/* 聊天快捷问题 */
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-quick button {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, .22);
  background: rgba(12, 22, 36, .7);
  color: #9fc4e6;
  font-size: 11px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.chat-quick button:hover { border-color: rgba(95, 242, 255, .6); color: #d8f4ff; }
