:root {
  color-scheme: dark;
  --bg-deep: #050811;
  --bg-panel: rgba(11, 16, 29, 0.88);
  --bg-card: rgba(16, 23, 41, 0.92);
  --bg-card-hi: rgba(24, 34, 58, 0.96);
  --border-dim: rgba(148, 163, 184, 0.13);
  --border-mid: rgba(148, 163, 184, 0.24);

  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --blue: #60a5fa;
  --purple: #a78bfa;
  --pink: #f472b6;
  --rose: #fb7185;
  --amber: #fbbf24;
  --orange: #fb923c;
  --lime: #a3e635;
  --emerald: #34d399;
  --up: #10b981;
  --down: #f43f5e;

  --text-1: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #8392ab;
  --text-4: #596780;

  --paper-bg: #f8fafc;
  --paper-text: #0f172a;
  --paper-sub: #334155;
  --paper-muted: #64748b;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Monaco", Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.cyan { color: var(--cyan); }
.pink { color: var(--pink); }
.amber { color: var(--amber); }
.lime { color: var(--lime); }
.emerald { color: var(--emerald); }
.up-txt { color: var(--up); }
.down-txt { color: var(--down); }

/* 背景微网格与环境极光 */
.factory-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr) 128px 24px;
  gap: 8px;
  padding: 8px 10px 6px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 8%, rgba(34, 211, 238, 0.085), transparent 68%),
    radial-gradient(ellipse 40% 35% at 12% 70%, rgba(167, 139, 250, 0.07), transparent 70%),
    radial-gradient(ellipse 40% 35% at 88% 30%, rgba(244, 114, 182, 0.06), transparent 70%),
    linear-gradient(180deg, #060913 0%, #05070f 100%);
  overflow: hidden;
}

.factory-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.factory-shell > * {
  position: relative;
  z-index: 1;
}

/* 顶部指挥栏 */
.f-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  background: rgba(9, 14, 26, 0.9);
  border: 1px solid var(--border-dim);
  border-radius: 9px;
  backdrop-filter: blur(12px);
  min-width: 0;
}

.f-brand-zone {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.f-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(229, 189, 100, 0.34);
  background: rgba(223, 180, 86, 0.10);
  color: #f3cf7a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, transform 0.14s;
}

.f-back-btn:hover {
  background: rgba(223, 180, 86, 0.22);
  border-color: rgba(243, 207, 122, 0.6);
  transform: translateY(-1px);
}

.f-logo-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.f-title-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.f-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(92deg, #ffffff 0%, #bae6fd 58%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.f-subtitle {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  white-space: nowrap;
}

.f-metrics-zone {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.f-kpi {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.f-kpi-lbl {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.f-kpi-val {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.f-kpi-unit {
  font-size: 11px;
  color: var(--text-3);
  margin-left: -3px;
}

.f-controls-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.f-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(163, 230, 53, 0.11);
  border: 1px solid rgba(163, 230, 53, 0.36);
  color: #bef264;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.f-live-pill.paused {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.38);
  color: #fde68a;
}

.f-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a3e635;
  box-shadow: 0 0 8px #a3e635;
  animation: pulseDot 1.6s ease-in-out infinite;
}

.f-live-pill.paused .f-live-dot {
  background: #fbbf24;
  box-shadow: none;
  animation: none;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.f-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.f-ctrl-btn {
  appearance: none;
  border: 1px solid var(--border-dim);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.f-ctrl-btn:hover {
  border-color: rgba(34, 211, 238, 0.45);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.9);
}

.f-ctrl-btn.active {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
}

/* 面板通用容器 */
.f-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.f-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(15, 23, 42, 0.55);
  flex-shrink: 0;
}

.f-panel-head-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.f-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.f-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-rate-badge,
.f-count-chip {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.f-rate-badge {
  color: var(--lime);
  font-weight: 700;
}

/* 主三栏布局 */
.f-main-grid {
  display: grid;
  grid-template-columns: minmax(240px, 276px) minmax(0, 1fr) minmax(255px, 296px);
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

/* 左栏 FEED */
.f-feed-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 7px;
  position: relative;
}

.f-feed-viewport::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 24, 0.96));
  pointer-events: none;
}

.f-feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.f-feed-card {
  position: relative;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.14);
  cursor: pointer;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s, transform 0.22s;
  animation: feedSlideIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.f-feed-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: var(--bg-card-hi);
}

.f-feed-card.adopted {
  border-color: rgba(163, 230, 53, 0.48);
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.14), 0 0 14px rgba(163, 230, 53, 0.08);
}

.f-feed-card.flash {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

@keyframes feedSlideIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.f-fc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.f-fc-src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.f-fc-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.f-fc-channel {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
}

.f-fc-tag {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-2);
  white-space: nowrap;
}

.f-fc-heat {
  font-size: 10px;
  color: var(--amber);
  font-weight: 700;
  white-space: nowrap;
}

.f-fc-quote {
  font-size: 11.5px;
  line-height: 1.38;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.f-fc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.f-fc-extract {
  font-size: 10.5px;
  color: #67e8f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-fc-adopt {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-3);
  background: rgba(15, 23, 42, 0.7);
  transition: all 0.2s;
}

.f-feed-card.adopted .f-fc-adopt {
  background: rgba(163, 230, 53, 0.18);
  border-color: rgba(163, 230, 53, 0.65);
  color: #bef264;
}

/* 中栏布局 */
.f-center-col {
  display: grid;
  grid-template-rows: 178px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

/* 中上：雷达地球仪 + 16 源矩阵 */
.f-radar-matrix {
  display: grid;
  grid-template-columns: 162px minmax(0, 1fr);
  padding: 8px 10px;
  gap: 10px;
  align-items: stretch;
  background:
    radial-gradient(circle at 86px 86px, rgba(34, 211, 238, 0.13), transparent 62%),
    var(--bg-panel);
}

.f-globe-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  padding-right: 8px;
}

.f-globe-tag {
  align-self: flex-start;
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.f-globe-canvas-wrap {
  width: 132px;
  height: 132px;
  position: relative;
  display: grid;
  place-items: center;
}

#globeCanvas {
  width: 132px;
  height: 132px;
  display: block;
}

.f-globe-foot {
  font-size: 9.5px;
  color: var(--cyan);
  opacity: 0.85;
  white-space: nowrap;
}

.f-matrix-zone {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 5px;
}

.f-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.f-matrix-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
}

.hl-cyan {
  color: var(--cyan);
}

.f-matrix-conn {
  font-size: 11px;
  color: var(--text-3);
}

.f-source-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
  flex: 1;
}

.f-src-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.13);
  cursor: pointer;
  user-select: none;
  transition: transform 0.14s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 0;
}

.f-src-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(30, 41, 59, 0.9);
}

.f-src-tile.hit {
  border-color: var(--tile-color, #22d3ee);
  background: rgba(23, 35, 58, 0.96);
  box-shadow: 0 0 14px color-mix(in srgb, var(--tile-color, #22d3ee) 45%, transparent),
              inset 0 0 8px color-mix(in srgb, var(--tile-color, #22d3ee) 24%, transparent);
}

.f-src-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: var(--tile-color, #22d3ee);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.f-src-name {
  font-size: 9.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 600;
}

.f-src-cnt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  color: var(--text-3);
}

.f-src-tile.hit .f-src-cnt {
  color: #ffffff;
  font-weight: 700;
}

.f-cli-bar {
  font-size: 10.5px;
  color: #6ee7b7;
  background: rgba(2, 6, 17, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 中下：3 张高反差白纸协同工单区 */
.f-docs-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

.f-doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #0d1424;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
  min-height: 0;
  min-width: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.f-doc-card.swapping {
  opacity: 0.18;
  transform: translateY(-10px) scale(0.975);
}

.f-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 9px;
  background: #0c1324;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  flex-shrink: 0;
}

.f-doc-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.f-doc-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  color: #ffffff;
}

.badge-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.badge-cyan { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.badge-amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }

.f-doc-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-doc-status {
  font-size: 10px;
  color: #38bdf8;
  white-space: nowrap;
  font-weight: 700;
}

.f-doc-status.done {
  color: #a3e635;
}

.f-doc-refs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.f-doc-refs-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

.f-doc-ref-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.f-mini-src {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.f-doc-refs-count {
  font-size: 10px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

/* 明亮高反差白纸区（核心视觉焦点） */
.f-doc-paper {
  position: relative;
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--paper-text);
  padding: 10px 11px 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.f-doc-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  color: #090d16;
  min-height: 18px;
}

.f-doc-blocks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

.f-doc-row {
  font-size: 11.5px;
  line-height: 1.48;
  color: #1e293b;
  word-break: break-word;
}

.f-doc-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: 1px;
  color: #ffffff;
}

.tag-pink { background: #ec4899; }
.tag-purple { background: #8b5cf6; }
.tag-blue { background: #2563eb; }
.tag-amber { background: #d97706; }
.tag-emerald { background: #059669; }
.tag-rose { background: #e11d48; }

.f-caret {
  display: inline-block;
  width: 2px;
  height: 12px;
  margin-left: 1px;
  vertical-align: -2px;
  background: #ec4899;
  animation: blinkCaret 0.55s steps(1) infinite;
}

@keyframes blinkCaret {
  50% { opacity: 0; }
}

/* 弹跳倾斜印章（真实朱砂叠印质感，不死挡正文） */
.f-stamp {
  position: absolute;
  top: 7px;
  right: 9px;
  padding: 3px 8px;
  border: 2.2px solid rgba(225, 29, 72, 0.88);
  border-radius: 5px;
  color: #e11d48;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.72);
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.3), 0 3px 10px rgba(225, 29, 72, 0.14);
  transform: rotate(-14deg) scale(2.1);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.16s ease;
}

.f-stamp.stamp-cyan {
  border-color: rgba(2, 132, 199, 0.88);
  color: #0284c7;
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.3), 0 3px 10px rgba(2, 132, 199, 0.14);
}

.f-stamp.stamped {
  opacity: 0.9;
  transform: rotate(-11deg) scale(1);
}

.f-doc-jump {
  position: absolute;
  right: 8px;
  bottom: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(226, 232, 240, 0.78);
  opacity: 0.72;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.f-doc-card:hover .f-doc-jump {
  opacity: 1;
  color: #0f172a;
  background: #e2e8f0;
}

/* 右栏：上拆解室 + 下评分榜 */
.f-right-col {
  display: grid;
  grid-template-rows: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

.f-analysis-list {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.f-analysis-list::after,
.f-bench-list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(11, 16, 29, 0.96));
  pointer-events: none;
}

.f-ana-card {
  position: relative;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: border-color 0.22s, box-shadow 0.22s;
  animation: feedSlideIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.f-ana-card.verified {
  border-color: rgba(163, 230, 53, 0.45);
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.1);
}

.f-ana-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.f-ana-src {
  font-size: 10px;
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-ana-stat {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.f-ana-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
  line-height: 1.32;
}

.f-ana-points {
  margin: 0;
  padding-left: 13px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-2);
}

.f-ana-points li {
  margin-bottom: 1px;
}

.f-ana-points li.checked {
  color: #f8fafc;
}

.f-ana-badge {
  position: absolute;
  right: 8px;
  bottom: 7px;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  background: #a3e635;
  color: #091104;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.2s, transform 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.f-ana-card.verified .f-ana-badge {
  opacity: 1;
  transform: scale(1);
}

/* 右下：黑话反指胜率榜 */
.f-bench-list {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.f-bench-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: border-color 0.2s, background 0.2s;
}

.f-bench-row.active {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.86);
}

.f-bench-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.f-bench-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  color: #071019;
  white-space: nowrap;
}

.f-bench-bar-track {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.f-bench-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.f-bench-meta {
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-bench-score {
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
}

/* 底部 8 阶段彩色流水线 */
.f-pipeline-panel {
  padding: 5px 8px 6px;
  background: rgba(8, 12, 24, 0.92);
}

.f-pipeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.f-pipe-speed {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber);
}

.f-pipeline-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.f-pipe-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  padding: 2px 3px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.f-pipe-col.receive {
  border-color: var(--stage-color, #22d3ee);
  background: rgba(30, 41, 59, 0.5);
}

.f-pipe-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.f-pipe-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-pipe-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--stage-color, #22d3ee);
  flex-shrink: 0;
}

.f-pipe-cnt {
  font-size: 9.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.f-pipe-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow: hidden;
}

.f-pipe-chip {
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #071019;
  background: var(--stage-color, #22d3ee);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  animation: chipPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes chipPop {
  from { opacity: 0; transform: translateX(-8px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* 底部极细状态栏 */
.f-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}

.f-status-left,
.f-status-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.f-status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a3e635;
  font-weight: 700;
}

.f-dot-xs {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a3e635;
  display: inline-block;
}

.f-statusbar b {
  color: var(--text-1);
  font-weight: 700;
}

/* 全局粒子画布与 18-Agent 光标层 */
.f-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 40;
}

.f-agent-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.f-agent-cursor {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.f-agent-arrow {
  display: block;
  width: 16px;
  height: 18px;
}

.f-agent-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 1.5px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  color: #060912;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.f-agent-carry {
  position: absolute;
  left: 14px;
  top: 30px;
  max-width: 132px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  color: #071019;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.16s, transform 0.16s;
}

.f-agent-cursor.carrying .f-agent-carry {
  opacity: 0.96;
  transform: scale(1);
}

/* 录屏纯享模式 */
.factory-shell.cinema-mode .f-back-btn,
.factory-shell.cinema-mode .f-doc-jump {
  opacity: 0.12;
}

.factory-shell.cinema-mode .f-back-btn:hover {
  opacity: 1;
}

/* 中等宽度与 1280×720 矮屏精调（保证 3 张白纸 4 段完整零裁切） */
@media (max-width: 1320px) {
  .f-subtitle { display: none; }
  .f-metrics-zone { gap: 11px; }
  .f-kpi-val { font-size: 14px; }
  .f-main-grid {
    grid-template-columns: 228px minmax(0, 1fr) 244px;
  }
  .f-doc-badge { padding: 1.5px 5px; font-size: 9.5px; }
  .f-doc-id { font-size: 10.5px; }
  .f-doc-status { font-size: 9.5px; }
}

@media (min-width: 1041px) and (max-height: 780px) {
  .factory-shell {
    grid-template-rows: 42px minmax(0, 1fr) 108px 22px;
    gap: 6px;
    padding: 6px 8px 4px;
  }
  .f-center-col {
    grid-template-rows: 152px minmax(0, 1fr);
    gap: 6px;
  }
  .f-radar-matrix {
    grid-template-columns: 142px minmax(0, 1fr);
    padding: 6px 8px;
    gap: 8px;
  }
  .f-globe-canvas-wrap,
  #globeCanvas {
    width: 108px;
    height: 108px;
  }
  .f-src-icon { width: 18px; height: 18px; font-size: 10px; }
  .f-src-name { font-size: 9px; }
  .f-src-cnt { font-size: 9px; }
  .f-doc-head { padding: 4px 7px; }
  .f-doc-refs { padding: 3px 7px; }
  .f-doc-paper { padding: 7px 9px 18px; gap: 4px; }
  .f-doc-title { font-size: 11.8px; line-height: 1.28; min-height: 15px; }
  .f-doc-blocks { gap: 4px; }
  .f-doc-row { font-size: 10.6px; line-height: 1.35; }
  .f-doc-tag { font-size: 9px; padding: 0.5px 4px; }
  .f-ana-card { padding: 5px 7px; }
  .f-ana-title { font-size: 11px; margin-bottom: 2px; }
  .f-ana-points { font-size: 10px; line-height: 1.3; }
  .f-bench-row { padding: 3px 5px; }
  .f-bench-score { font-size: 12.5px; }
  .f-pipe-chip { font-size: 9px; padding: 1.5px 5px; }
}

/* 平板与移动端：解锁单屏锁死，转为顺滑纵向指挥仪表盘，严防破相与横向溢出 */
@media (max-width: 1040px) {
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .factory-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 10px 16px;
    overflow: visible;
  }

  .f-header {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }

  .f-metrics-zone {
    order: 3;
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
  }

  .f-kpi {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .f-kpi-lbl { font-size: 10px; }
  .f-kpi-val { font-size: 14px; }
  .f-kpi-unit { display: none; }

  .f-main-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .f-center-col {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .f-radar-matrix {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .f-globe-zone {
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-right: 0;
    padding-bottom: 8px;
    flex-direction: row;
    justify-content: space-between;
  }

  .f-globe-canvas-wrap,
  #globeCanvas {
    width: 96px;
    height: 96px;
  }

  .f-source-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .f-docs-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .f-doc-paper {
    min-height: 210px;
  }

  .f-right-col {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .f-feed-panel {
    order: 3;
  }

  .f-feed-viewport {
    max-height: 360px;
  }

  .f-pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .f-statusbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 2px;
  }

  .hide-mobile,
  .hide-sm {
    display: none !important;
  }

  .f-agent-arrow {
    width: 12px;
    height: 14px;
  }

  .f-agent-tag {
    left: 10px;
    top: 10px;
    padding: 1px 4px;
    font-size: 8.5px;
    opacity: 0.88;
  }
}

@media (max-width: 480px) {
  .f-title { font-size: 13.5px; }
  .f-back-btn { padding: 4px 7px; font-size: 11px; }
  .f-live-pill { padding: 3px 8px; font-size: 10.5px; }
  .ctrl-txt { display: none; }
  .f-kpi-val { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .f-live-dot,
  .f-caret,
  .f-feed-card,
  .f-pipe-chip {
    animation: none !important;
  }
}
