:root {
  color-scheme: dark;
  --bg: #04070c;
  --bg-deep: #070d16;
  --surface: rgba(8, 14, 24, 0.78);
  --surface-solid: #080f1a;
  --surface-soft: rgba(13, 22, 36, 0.62);
  --surface-elevated: rgba(12, 21, 35, 0.92);
  --ink: #edf3f9;
  --ink-2: #a3b8cc;
  --muted: #647c94;
  --dim: #394d63;
  --border: rgba(162, 198, 232, 0.14);
  --border-strong: rgba(116, 224, 244, 0.42);
  --border-glow: rgba(116, 224, 244, 0.72);

  --accent: #67e8f9;
  --accent-soft: rgba(103, 232, 249, 0.11);
  --gold: #e5c07b;
  --gold-soft: rgba(229, 192, 123, 0.13);
  --live: #34d399;
  --live-ink: #a7f3d0;
  --live-soft: rgba(52, 211, 153, 0.12);
  --warn: #e5c07b;
  --warn-soft: rgba(229, 192, 123, 0.13);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);

  --c-direction: #e5c07b;
  --c-research: #5eead4;
  --c-review: #9caef2;
  --c-verification: #67e8f9;
  --c-books: #aeb8ee;
  --c-publication: #7dd3fc;
  --c-outreach: #d8b686;
  --c-studio: #93c5fd;

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

  font: 13px/1.5 var(--font-sans);
  background: var(--bg);
  color: var(--ink);
}

:root[data-look="matrix"],
:root[data-look="blueprint"] {
  color-scheme: dark;
  --bg: #000602;
  --bg-deep: #010a04;
  --surface: rgba(1, 12, 5, 0.84);
  --surface-solid: #021007;
  --surface-soft: rgba(2, 20, 9, 0.74);
  --surface-elevated: rgba(2, 16, 7, 0.95);
  --ink: #dcfce5;
  --ink-2: #6ce896;
  --muted: #349654;
  --dim: #1e5c33;
  --border: rgba(24, 224, 96, 0.24);
  --border-strong: rgba(24, 224, 96, 0.54);
  --border-glow: rgba(108, 232, 150, 0.80);
  --accent: #18e060;
  --accent-soft: rgba(24, 224, 96, 0.14);
  --gold: #a8f570;
  --gold-soft: rgba(168, 245, 112, 0.15);
  --live: #18e060;
  --live-ink: #dcfce5;
  --live-soft: rgba(24, 224, 96, 0.16);
  --warn: #a8f570;
  --warn-soft: rgba(168, 245, 112, 0.15);
  --c-direction: #dcfce5;
  --c-research: #32eb74;
  --c-review: #16d998;
  --c-verification: #18e060;
  --c-books: #76f05c;
  --c-publication: #1ceba6;
  --c-outreach: #a8f570;
  --c-studio: #4cf09e;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #dce2ea;
  --bg-deep: #e6ebf1;
  --surface: rgba(244, 247, 251, 0.84);
  --surface-solid: #eef2f7;
  --surface-soft: rgba(232, 238, 245, 0.88);
  --surface-elevated: rgba(248, 250, 253, 0.95);
  --ink: #122334;
  --ink-2: #2c4358;
  --muted: #526a80;
  --dim: #788ea3;
  --border: rgba(24, 50, 76, 0.15);
  --border-strong: rgba(10, 112, 106, 0.44);
  --border-glow: rgba(10, 112, 106, 0.65);
  --accent: #0a726b;
  --accent-soft: rgba(10, 114, 107, 0.11);
  --gold: #a25b0a;
  --gold-soft: rgba(162, 91, 10, 0.12);
  --live: #05825e;
  --live-ink: #046649;
  --live-soft: rgba(5, 130, 94, 0.12);
  --c-direction: #a25b0a;
  --c-research: #047857;
  --c-review: #4338ca;
  --c-verification: #0369a1;
  --c-books: #7e22ce;
  --c-publication: #15803d;
  --c-outreach: #c2410c;
  --c-studio: #334e68;
}

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

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  transition: background-color 0.46s ease, color 0.36s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.theme-fade-veil {
  position: fixed;
  inset: 0;
  z-index: 245;
  pointer-events: none;
  opacity: 0;
}
.theme-fade-veil.is-fading {
  transition: opacity 0.54s cubic-bezier(0.22, 1, 0.36, 1);
}
.fui-top,
.scifi-log-wall,
.department-panel,
.fui-bottom-rail,
.human-rank-pill,
.human-pulse-btn,
.human-tool-btn,
.human-sound-btn {
  transition: background-color 0.42s ease, border-color 0.36s ease, color 0.32s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #01040a;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ============================================================================
   FULL-BLEED 100vw x 100vh CINEMA STAGE & HOLOGRAPHIC LASER SCAN SWEEP
   ============================================================================ */
.cinema-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.fui-scan-sweep {
  position: fixed;
  left: 0;
  right: 0;
  top: -120px;
  height: 70px;
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--accent) 10%, transparent) 60%, color-mix(in srgb, var(--accent) 42%, transparent) 97%, rgba(230, 248, 255, 0.72) 100%);
}

.fui-scan-sweep.is-sweeping {
  animation: holo-scan-sweep 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes holo-scan-sweep {
  0% { transform: translateY(0); opacity: 0.95; }
  75% { opacity: 0.75; }
  100% { transform: translateY(calc(100vh + 160px)); opacity: 0; }
}

/* ============================================================================
   FLOATING BORDERLESS TOP FUI OVERLAY
   ============================================================================ */
.fui-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 7, 12, 0.88) 0%, rgba(4, 7, 12, 0.30) 68%, transparent 100%);
}

:root[data-look="matrix"] .fui-top,
:root[data-look="blueprint"] .fui-top {
  background: linear-gradient(180deg, rgba(1, 12, 6, 0.90) 0%, rgba(1, 12, 6, 0.30) 68%, transparent 100%);
}
:root[data-look="matrix"] .brand-name,
:root[data-look="matrix"] .log-wall-title,
:root[data-look="matrix"] .human-lv {
  text-shadow: 0 0 8px rgba(34, 255, 122, 0.48);
}

:root[data-theme="light"] .fui-top {
  background: linear-gradient(180deg, rgba(242, 246, 250, 0.88) 0%, rgba(242, 246, 250, 0.28) 68%, transparent 100%);
}

.fui-top-left,
.fui-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.brand-name em {
  font-style: normal;
  color: var(--accent);
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--live) 40%, transparent);
  background: color-mix(in srgb, var(--live) 10%, var(--surface));
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--live-ink);
  white-space: nowrap;
}

.connection i,
.follow-button i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  flex-shrink: 0;
}

.connection.delayed {
  border-color: color-mix(in srgb, var(--warn) 55%, transparent);
  background: var(--warn-soft);
  color: var(--warn);
}
.connection.delayed i { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.institute-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.institute-metrics > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.institute-metrics strong {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.institute-metrics .metric-active strong {
  color: var(--accent);
}

.institute-metrics .metric-end { display: none; }

/* Floating Glass Pills on Top Right */
.layer-switcher,
.style-switcher,
.lang-switcher,
.mode-switch {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.layer-switcher button,
.style-switcher button,
.lang-switcher button,
.mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.16s ease;
}

.lang-switcher button {
  padding: 0 6.5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.layer-switcher button:hover,
.style-switcher button:hover,
.lang-switcher button:hover,
.mode-switch button:hover { color: var(--ink); }

.layer-switcher button[aria-pressed="true"],
.style-switcher button[aria-pressed="true"],
.lang-switcher button[aria-pressed="true"],
.mode-switch button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-solid));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

.layer-switcher {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.layer-switcher button {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 0 11px;
}

.style-switcher i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.swatch-holo { background: linear-gradient(135deg, #67e8f9, #e5c07b); box-shadow: 0 0 6px rgba(103, 232, 249, 0.55); }
.swatch-matrix,
.swatch-blueprint { background: #22ff7a; box-shadow: 0 0 7px rgba(34, 255, 122, 0.72); }
.swatch-maquette { background: #fffefa; border: 1.5px solid #0f1f2e; }

.follow-button,
.hud-icon-btn,
.theme-toggle {
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.follow-button:hover,
.hud-icon-btn:hover,
.theme-toggle:hover,
.hud-icon-btn[aria-pressed="true"] {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--accent-soft);
}

@media (min-width: 1024px) {
  .theme-toggle { display: none; }
}

.follow-button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--live) 50%, transparent);
  background: var(--live-soft);
  color: var(--live-ink);
}
.follow-button[aria-pressed="false"] i { background: var(--dim); box-shadow: none; }

.fullscreen-button svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-button .fs-exit,
.fullscreen-button[aria-pressed="true"] .fs-enter { display: none; }
.fullscreen-button[aria-pressed="true"] .fs-exit { display: block; }
@media (orientation: landscape) and (max-width: 1365px) {
  .fullscreen-button span { display: none; }
}

.connection-note {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--warn);
  background: var(--warn-soft);
  backdrop-filter: blur(10px);
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================================
   FULL-BLEED 3D HOLOGRAPHIC STAGE (#research-room & #hive-board)
   ============================================================================ */
.research-room {
  --readout-width: 284px;
  --scene-right: calc(var(--readout-width) + 28px);
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.research-room.is-department-focused .department-panel,
.research-room.is-department-focused .scifi-log-wall,
.research-room.is-department-focused .hive-cells,
.research-room.is-department-focused .fui-corner-telemetry,
.research-room.is-department-focused .human-console {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.research-room[data-mode="journey"] .hive-cells,
.research-room[data-mode="journey"] .scifi-log-wall,
.research-room[data-mode="journey"] .department-panel,
.research-room[data-mode="journey"] .fui-corner-telemetry,
.research-room[data-mode="journey"] .human-console {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.research-room.is-hud-zen .scifi-log-wall,
.research-room.is-hud-zen .department-panel {
  animation: none !important;
  opacity: 0 !important;
  transform: translateX(14px);
  pointer-events: none !important;
}

.research-room[data-layer="galaxy"] .hive-cells,
.research-room.is-galaxy-main .hive-cells {
  opacity: 0 !important;
  pointer-events: none !important;
}

.growth-emission {
  position: absolute;
  z-index: 11;
  pointer-events: none;
}
.growth-pointer {
  position: absolute;
  z-index: 13;
  height: 1.5px;
  pointer-events: none;
  transform-origin: 0 50%;
  background: var(--accent);
  filter: drop-shadow(0 1px 1px var(--surface-solid));
}
.growth-pointer::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-block: 3.5px solid transparent;
  border-left: 7px solid var(--accent);
}
.growth-inset {
  position: absolute;
  z-index: 14;
  pointer-events: none;
  outline: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  outline-offset: -1px;
  border-radius: 3px;
}

@media (max-width: 550px) and (orientation: portrait) {
  .hive-board { transition: margin-top 440ms cubic-bezier(.22,.61,.36,1); }
  .hive-board:has(#growth-observations:not([hidden])) {
    margin-top: 100px;
    overflow: visible;
    clip-path: inset(-100px 0 0);
  }
}

.galaxy-back-bar {
  position: fixed;
  left: 22px;
  top: 132px;
  z-index: 38;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.galaxy-back-bar[hidden] { display: none; }
.galaxy-back-btn,
.galaxy-home-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 2px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--border));
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}
.galaxy-home-btn {
  border-style: dashed;
  color: var(--ink-2);
}
.galaxy-back-btn:hover,
.galaxy-home-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 20%, var(--surface-solid));
}
.galaxy-back-btn:active,
.galaxy-home-btn:active {
  transform: scale(0.96);
}

.galaxy-node-card {
  position: absolute;
  z-index: 14;
  box-sizing: border-box;
  padding: 12px 30px 12px 14px;
  border: 1px solid rgba(120, 220, 214, 0.38);
  border-radius: 10px;
  background: rgba(6, 14, 22, 0.88);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(94, 237, 236, 0.06);
  color: #dff4f2;
  font: 12px/1.5 "Geist", -apple-system, "PingFang SC", sans-serif;
  backdrop-filter: blur(6px);
  pointer-events: auto;
}
.galaxy-node-card[hidden] { display: none; }
.galaxy-node-card .gnc-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: none;
  color: rgba(200, 230, 230, 0.75);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.galaxy-node-card .gnc-badge {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid rgba(120, 220, 214, 0.45);
  border-radius: 4px;
  color: #8fe8e0;
  font: 700 10px/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
}
.galaxy-node-card .gnc-badge.is-new {
  border-color: rgba(255, 210, 120, 0.65);
  background: rgba(255, 200, 90, 0.1);
  color: #ffd98a;
}
.galaxy-node-card .gnc-title { margin: 8px 0 2px; color: #f2fffd; font-size: 15px; font-weight: 700; line-height: 1.3; }
.galaxy-node-card .gnc-module { margin: 0 0 6px; color: rgba(170, 214, 222, 0.8); font: 10.5px/1.4 "Geist Mono", ui-monospace, monospace; word-break: break-all; }
.galaxy-node-card .gnc-summary { margin: 0 0 6px; color: rgba(222, 240, 238, 0.92); }
.galaxy-node-card .gnc-meta { margin: 0 0 8px; color: rgba(160, 200, 206, 0.85); font: 10.5px/1.4 "Geist Mono", ui-monospace, monospace; }
.galaxy-node-card .gnc-link { color: #7fe3dc; font-weight: 600; text-decoration: none; }
.galaxy-node-card .gnc-link:hover { text-decoration: underline; }
[data-theme="light"] .galaxy-node-card { border-color: rgba(16, 118, 110, 0.35); background: rgba(250, 247, 240, 0.96); color: #1d2a2c; box-shadow: 0 10px 28px rgba(40, 50, 60, 0.18); }
[data-theme="light"] .galaxy-node-card .gnc-title { color: #10302e; }
[data-theme="light"] .galaxy-node-card .gnc-module,
[data-theme="light"] .galaxy-node-card .gnc-meta { color: rgba(40, 70, 74, 0.78); }
[data-theme="light"] .galaxy-node-card .gnc-summary { color: #24383a; }
[data-theme="light"] .galaxy-node-card .gnc-badge { border-color: rgba(16, 118, 110, 0.45); color: #10766e; }
[data-theme="light"] .galaxy-node-card .gnc-badge.is-new { border-color: rgba(160, 104, 16, 0.55); background: rgba(200, 140, 40, 0.1); color: #8a5a0c; }
[data-theme="light"] .galaxy-node-card .gnc-link { color: #10766e; }
[data-theme="light"] .galaxy-node-card .gnc-close { color: rgba(40, 60, 64, 0.7); }

.hive-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.hive-board.is-dragging { cursor: grabbing; }

.holo-gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.holo-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Keep SVG overlay strictly invisible except for live arrival flares (Test #12) */
.hive-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hive-overlay-svg > *:not(.arrival-particle) {
  opacity: 0 !important;
  pointer-events: none !important;
}

.arrival-particle {
  fill: var(--live);
  filter: drop-shadow(0 0 10px var(--live));
}

/* Subtle bottom-right cinema hint inside open 3D stage (zero overlap with #human-console on left!) */
.fui-corner-telemetry {
  position: fixed;
  left: auto;
  right: var(--scene-right);
  bottom: 120px;
  transform: none;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  max-width: max(0px, calc(100vw - 980px));
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, right 0.28s ease;
}
.fui-orbit-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.research-room.is-hud-zen,
.research-room[data-mode="journey"],
.research-room.is-department-focused { --scene-right: 26px; }

.fui-coord {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}

.fui-orbit-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================================
   PLAYFUL HUMAN OBSERVER RESONANCE CONSOLE (#human-console)
   Minimalist KPR tactical dock: Explorer Level + Quantum Pulse + Synth Toggle
   ============================================================================ */
.human-console {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.human-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 2px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.human-rank-pill.is-level-flash {
  border-color: var(--gold);
  box-shadow: 0 0 18px color-mix(in srgb, var(--gold) 52%, transparent);
  transform: translateY(-2px);
}

.human-lv {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.human-rank-pill.is-level-flash .human-lv { color: var(--gold); }

.human-rank-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10.5px;
  color: var(--ink);
}

.human-xp-track {
  display: inline-block;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 85%, transparent);
  overflow: hidden;
}

.human-xp-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.human-xp-meta {
  font-size: 9.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.human-pulse-btn,
.human-sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 2px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-solid));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.human-pulse-btn i { font-style: normal; color: var(--gold); }
.human-pulse-btn kbd {
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 80%, transparent);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-solid) 65%, transparent);
}

.human-pulse-btn:hover,
.human-sound-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-solid));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 32%, transparent);
}

.human-pulse-btn:active,
.human-pulse-btn.is-firing {
  transform: scale(0.95);
  border-color: var(--gold);
  box-shadow: 0 0 18px color-mix(in srgb, var(--gold) 50%, transparent);
}

.human-sound-btn {
  padding: 0 8px;
  min-width: 28px;
  color: var(--accent);
}

.human-sound-btn[aria-pressed="false"] {
  color: var(--dim);
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface-solid) 68%, transparent);
  opacity: 0.72;
}

.human-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 2px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  border: 1px solid color-mix(in srgb, var(--border-strong) 80%, transparent);
  background: color-mix(in srgb, var(--surface-solid) 74%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.human-tool-btn i { font-style: normal; color: var(--accent); font-size: 11px; }
.human-tool-btn:hover,
.human-tool-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 20%, var(--surface-solid));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 28%, transparent);
}
.human-tool-btn[aria-pressed="true"] i { color: var(--gold); }
.human-tool-btn:active { transform: scale(0.95); }

.genesis-scrub-bar {
  position: fixed;
  left: calc((100vw - 290px) * 0.5);
  bottom: 112px;
  transform: translateX(-50%);
  z-index: 38;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border-radius: 2px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--border));
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.genesis-scrub-bar[hidden] { display: none; }
.research-room.is-hud-zen .genesis-scrub-bar { left: 50%; }
.gs-play-btn,
.gs-close-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
}
.gs-close-btn { border-color: transparent; background: transparent; color: var(--muted); font-size: 14px; }
.gs-play-btn:hover, .gs-close-btn:hover { color: var(--ink); border-color: var(--accent); }
.gs-slider {
  width: 190px;
  accent-color: var(--gold);
  cursor: pointer;
}
.gs-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.intro-cinema-pill {
  position: fixed;
  left: calc((100vw - 290px) * 0.5);
  bottom: 112px;
  transform: translateX(-50%);
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border));
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.intro-cinema-pill[hidden] { display: none; }
.intro-skip-btn {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.intro-skip-btn:hover { border-color: var(--gold); color: var(--gold); }

.galaxy-node-card .gnc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.galaxy-node-card .gnc-trace-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(244, 197, 83, 0.52);
  background: rgba(244, 197, 83, 0.14);
  color: #f6dc8d;
  font: 600 11px/1.3 "Geist Mono", -apple-system, "PingFang SC", sans-serif;
  cursor: pointer;
}
.galaxy-node-card .gnc-trace-btn:hover,
.galaxy-node-card .gnc-trace-btn[aria-pressed="true"] {
  background: rgba(244, 197, 83, 0.28);
  border-color: #f6dc8d;
}
[data-theme="light"] .galaxy-node-card .gnc-trace-btn {
  border-color: rgba(160, 104, 16, 0.55);
  background: rgba(200, 140, 40, 0.12);
  color: #8a5a0c;
}
@media (max-width: 1460px) {
  .fui-corner-telemetry { max-width: calc(100vw - 880px); overflow: hidden; }
  .fui-orbit-hint { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

.scifi-log-line { cursor: pointer; }
.scifi-log-line:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ============================================================================
   Projected station labels
   ============================================================================ */
.hive-cells {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.hive-cell {
  --cell-color: var(--accent);
  --depth-scale: 1;
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, 0%) scale(calc(var(--depth-scale) * var(--cell-scale, 1)));
  transform-origin: top center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.16s ease, opacity 0.2s ease;
}

.hive-cell:is(.is-label-notice, .is-label-hover, :focus-visible) {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .hive-cell:hover { opacity: 1; pointer-events: auto; }
}
.hive-cell[hidden] { display: none; }
.research-room:is(.is-department-focused, .is-galaxy-main, [data-mode="journey"], [data-layer="galaxy"]) .hive-cell {
  visibility: hidden;
}

.hive-cell.is-apex-label {
  flex-direction: column-reverse;
  transform: translate(-50%, -100%) scale(calc(var(--depth-scale) * var(--cell-scale, 1)));
  transform-origin: bottom center;
}

.hive-cell[data-department="direction"] { --cell-color: var(--c-direction); --sec-code: "A0"; }
.hive-cell[data-department="verification"] { --cell-color: var(--c-verification); --sec-code: "00"; }
.hive-cell[data-department="research"] { --cell-color: var(--c-research); --sec-code: "01"; }
.hive-cell[data-department="review"] { --cell-color: var(--c-review); --sec-code: "02"; }
.hive-cell[data-department="books"] { --cell-color: var(--c-books); --sec-code: "03"; }
.hive-cell[data-department="publication"] { --cell-color: var(--c-publication); --sec-code: "04"; }
.hive-cell[data-department="outreach"] { --cell-color: var(--c-outreach); --sec-code: "05"; }
.hive-cell[data-department="studio"] { --cell-color: var(--c-studio); --sec-code: "06"; }

/* Augmented-UI / KPR chamfered 45° tactical HUD waypoint plate */
.cell-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5px;
  max-width: 186px;
  padding: 5px 10px 5.5px 9px;
  border-radius: 1px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--border) 115%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--cell-color) 76%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.50);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

:root[data-lang="en"] .cell-card {
  max-width: 248px;
}

:root[data-lang="en"] .cell-meta-row {
  max-width: 226px;
}

.cell-head::before {
  content: var(--sec-code, "00");
  font-family: var(--font-mono);
  font-size: 8.2px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cell-color);
  opacity: 0.85;
  padding-right: 4px;
  border-right: 1px solid color-mix(in srgb, var(--cell-color) 32%, transparent);
  margin-right: 1px;
}

.cell-icon { display: none; }

:root[data-theme="light"] .cell-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(24, 52, 78, 0.15);
  border-left-width: 2.5px;
  box-shadow: 0 8px 22px rgba(20, 46, 72, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
:root[data-look="matrix"] .cell-card {
  background: rgba(0, 10, 4, 0.86);
  border-color: rgba(0, 255, 65, 0.34);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.72), inset 0 0 14px rgba(0, 255, 65, 0.08);
}

.hive-cell:hover,
.hive-cell[aria-pressed="true"] {
  transform: translate(-50%, -2px) scale(calc(var(--depth-scale) * var(--cell-scale, 1) * 1.05));
}

.hive-cell.is-apex-label:hover,
.hive-cell.is-apex-label[aria-pressed="true"] {
  transform: translate(-50%, calc(-100% - 3px)) scale(calc(var(--depth-scale) * var(--cell-scale, 1) * 1.05));
}

.hive-cell.is-wing-label,
.hive-cell.is-wing-label:hover,
.hive-cell.is-wing-label[aria-pressed="true"] {
  width: max-content;
  max-width: min(290px, 31%);
  transform: translate(-50%, -50%);
}
.is-wing-label .cell-pin { display: none; }
.is-wing-label .cell-card,
:root[data-lang="en"] .is-wing-label .cell-card { width: 100%; max-width: 100%; }
.is-wing-label :is(.cell-head, .cell-meta-row) { max-width: 100%; }
.is-wing-label .cell-title { flex-shrink: 0; }
.is-wing-label .cell-role-tag { overflow: hidden; text-overflow: ellipsis; }
.cell-leader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--cell-color);
  stroke-width: 1px;
  opacity: 0.52;
}
.is-wing-label:is(:hover, :focus-visible, [aria-pressed="true"]) .cell-leader { opacity: 0.9; }

.hive-cell:hover .cell-card,
.hive-cell[aria-pressed="true"] .cell-card {
  border-color: color-mix(in srgb, var(--cell-color) 65%, transparent);
  border-left-color: var(--cell-color);
  background: color-mix(in srgb, var(--cell-color) 9%, var(--surface-solid));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
}

.hive-cell.is-running .cell-card {
  border-color: color-mix(in srgb, var(--cell-color) 30%, var(--border));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.46);
}

.cell-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cell-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}

.hive-cell.is-running .cell-live-dot { background: var(--live); box-shadow: 0 0 8px var(--live); }
.hive-cell[data-department="direction"] .cell-live-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.cell-icon { width: 12px; height: 12px; color: var(--cell-color); display: inline-flex; flex-shrink: 0; }
.cell-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cell-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.cell-role-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--cell-color);
  opacity: 0.88;
  padding-left: 4px;
  border-left: 1px solid color-mix(in srgb, var(--cell-color) 32%, transparent);
}

.cell-landmark { display: none; margin-left: 3px; }
.cell-landmark.is-visible { display: inline-flex; }
.cell-landmark-cap { padding: 1px 5px; border-radius: 2px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; background: rgba(162, 198, 232, 0.08); border: 1px solid color-mix(in srgb, var(--cell-color) 36%, transparent); color: var(--cell-color); }
.cell-landmark.is-live .cell-landmark-cap { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 48%, transparent); color: var(--ink); }
.cell-landmark.is-human .cell-landmark-cap { background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: color-mix(in srgb, var(--gold) 42%, transparent); color: var(--gold); }

.cell-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 166px;
  overflow: hidden;
}
.cell-mission-dot {
  color: var(--cell-color);
  font-size: 8px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}
.cell-status {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 154px;
  transition: color 0.18s ease, opacity 0.22s ease;
}
.hive-cell.is-running .cell-status { color: var(--ink); }
.hive-cell.is-mission-shift .cell-status { color: var(--cell-color); }
.cell-mode {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cell-seats { display: none; }

.cell-pin { display: flex; flex-direction: column; align-items: center; }
.hive-cell.is-apex-label .cell-pin { flex-direction: column-reverse; }
.cell-pin-stem { display: block; width: 1.5px; height: 8px; background: linear-gradient(180deg, var(--cell-color), color-mix(in srgb, var(--cell-color) 35%, transparent)); }
.cell-pin-node { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--cell-color); box-shadow: 0 0 8px var(--cell-color); }

/* ============================================================================
   UNIFIED RIGHT-SIDE STACKED CONSOLE — TOP HERO SLOT (#scifi-log-wall · 上格突出战报)
   Elevated to the prime top-right command position with luminous top accent!
   ============================================================================ */
.scifi-log-wall {
  position: fixed;
  top: 62px;
  left: auto;
  right: 14px;
  bottom: auto;
  width: var(--readout-width);
  height: calc((100vh - 134px) * 0.48);
  z-index: 42;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--border));
  border-top: 2px solid color-mix(in srgb, var(--accent) 82%, transparent);
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 color-mix(in srgb, var(--accent) 32%, transparent);
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.log-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  flex-shrink: 0;
}

.log-wall-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--ink);
  white-space: nowrap;
}

.log-live-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: led-blink 1.2s ease-in-out infinite;
}

.log-wall-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-spectrum {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
  opacity: 0.45;
}

.log-spectrum i {
  display: block;
  width: 1.5px;
  height: 100%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: bottom;
  transform: scaleY(0.35);
}

.log-spectrum i:nth-child(2n) { transform: scaleY(0.65); }
.log-spectrum i:nth-child(3n) { transform: scaleY(0.85); }
.log-spectrum i:nth-child(4n) { transform: scaleY(0.50); }
.log-spectrum i:nth-child(5n) { transform: scaleY(0.75); }
.log-spectrum.is-paused i { transform: scaleY(0.25); opacity: 0.35; }

.log-pkt-count {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log-wall-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.log-mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 1px;
  border-radius: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.log-mode-switch button {
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.log-mode-switch button:hover { color: var(--ink); }

.log-mode-switch button[aria-pressed="true"] {
  background: var(--live-soft);
  color: var(--live-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 45%, transparent);
}

.log-ops-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: color-mix(in srgb, var(--border) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  flex-shrink: 0;
}

.log-ops-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--surface-solid) 65%, transparent);
  font-family: var(--font-mono);
}

.log-ops-cell span {
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.log-ops-cell strong {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log-ops-cell strong.is-ok { color: var(--live-ink); }
.log-ops-cell strong.is-warn { color: var(--gold); }

.scifi-log-stream {
  flex: 1;
  min-height: 0;
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.68) 10%, #000 22%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.68) 10%, #000 22%, #000 100%);
}

:root[data-theme="light"] .scifi-log-stream {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.84) 5%, #000 13%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.84) 5%, #000 13%, #000 100%);
}

:root[data-theme="light"] .log-ops-cell {
  background: rgba(255, 253, 249, 0.72);
}

.scifi-log-stream.is-terminal {
  overflow-y: auto;
  overscroll-behavior: contain;
  justify-content: flex-start;
  -webkit-mask-image: none;
  mask-image: none;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 38%, transparent) transparent;
}
.scifi-log-stream.is-terminal > * { flex-shrink: 0; }
.scifi-log-stream.is-terminal > :first-child { margin-top: auto; }
.scifi-log-stream.is-terminal::-webkit-scrollbar { width: 6px; }
.scifi-log-stream.is-terminal::-webkit-scrollbar-thumb { border-radius: 3px; background: color-mix(in srgb, var(--accent) 38%, transparent); }

.log-jump-latest {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--live) 50%, transparent);
  background: var(--surface-solid);
  color: var(--live-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}

.scifi-log-line {
  width: 100%;
  display: grid;
  grid-template-columns: 50px 46px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  text-align: left;
  transition: background 0.14s ease;
}

.scifi-log-line:hover {
  background: var(--accent-soft);
}

.xp-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 64;
  pointer-events: none;
}

.scifi-log-line.is-real { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.scifi-log-line.is-real .log-ts { color: var(--live-ink); }
.scifi-log-line[data-xp-tier="3"] { border-left-color: var(--gold); }
.scifi-log-line[data-xp-tier="3"] .log-tag { color: var(--gold); }
.scifi-log-line[data-xp-tier="-1"] { border-left-color: var(--danger); }
.scifi-log-line[data-xp-tier="-1"] .log-tag { color: var(--danger); }
.scifi-log-line.is-xp-launch { animation: xp-launch 0.9s ease-out; }

@keyframes xp-launch {
  0% { background: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
  100% { background: transparent; box-shadow: inset 0 0 0 1px transparent; }
}

.hive-cell.is-xp-hit .cell-card { animation: xp-hit 0.9s ease-out; }
.hive-cell.is-level-up .cell-card { animation: xp-level-up 1.7s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes xp-hit {
  0% { background: color-mix(in srgb, var(--cell-color) 34%, var(--surface-solid)); box-shadow: 0 0 0 0 color-mix(in srgb, var(--cell-color) 80%, transparent), 0 0 22px color-mix(in srgb, var(--cell-color) 70%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent, 0 0 0 transparent; }
}

@keyframes xp-level-up {
  0% { border-color: #f4c553; background: color-mix(in srgb, #f4c553 38%, var(--surface-solid)); box-shadow: 0 0 0 0 rgba(244, 197, 83, 0.95), 0 0 36px rgba(244, 197, 83, 0.9); filter: brightness(1.45); }
  55% { border-color: #f4c553; box-shadow: 0 0 0 18px rgba(244, 197, 83, 0.12), 0 0 26px rgba(244, 197, 83, 0.55); filter: brightness(1.15); }
  100% { box-shadow: 0 0 0 26px rgba(244, 197, 83, 0), 0 0 0 transparent; filter: none; }
}

.scifi-log-line.is-fresh {
  animation: log-line-flash 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.log-ts { color: var(--dim); font-size: 8.8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-tag { font-size: 8.8px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }
.log-msg { color: var(--ink-2); font-family: var(--font-sans); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scifi-log-line.is-cyan { border-left-color: var(--c-verification); }
.scifi-log-line.is-cyan .log-tag { color: var(--c-verification); }
.scifi-log-line.is-live { border-left-color: var(--live); }
.scifi-log-line.is-live .log-tag { color: var(--live-ink); }
.scifi-log-line.is-gold { border-left-color: var(--gold); }
.scifi-log-line.is-gold .log-tag { color: var(--gold); }
.scifi-log-line.is-violet { border-left-color: var(--c-books); }
.scifi-log-line.is-violet .log-tag { color: var(--c-books); }
.scifi-log-line.is-muted { border-left-color: var(--dim); }
.scifi-log-line.is-muted .log-tag { color: var(--muted); }

/* ============================================================================
   UNIFIED RIGHT-SIDE STACKED CONSOLE — LOWER SLOT (#department-panel · 下格可点击条例)
   Clickable live department work items neatly docked right below MATRIX war-room!
   ============================================================================ */
.department-panel {
  position: fixed;
  top: auto;
  right: 14px;
  bottom: 64px;
  width: var(--readout-width);
  height: calc((100vh - 134px) * 0.52);
  z-index: 40;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 66%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.department-panel.is-flash {
  animation: panel-lock-flash 0.24s ease-out;
}

.panel-top-band {
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.department-responsibility {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.execution-label {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
}
.execution-label[data-execution="human"] { background: var(--gold-soft); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.execution-label[data-execution="sessions"] { background: var(--live-soft); color: var(--live-ink); border-color: color-mix(in srgb, var(--live) 36%, transparent); }

.small-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--live-ink);
}

.department-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.department-title-row h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.open-lens-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.open-lens-btn:hover {
  background: var(--accent);
  color: #01040a;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
}

#department-responsibility {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.48;
  color: var(--muted);
}

.panel-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 11px 15px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-heading h4 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel-heading span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--live-ink);
}

.department-work {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: var(--surface-soft);
  text-align: left;
  transition: all 0.15s ease;
}

.work-item:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.work-item.is-active {
  border-left: 2.5px solid var(--live);
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.work-state { color: var(--accent); font-weight: 700; }
.work-item.is-active .work-state { color: var(--live-ink); }

.work-item strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ink);
}

.work-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.work-arrow { color: var(--accent); }

.text-button {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
}

.department-connections {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.department-connections .people-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.connection-chip {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.15s ease;
}
.connection-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ============================================================================
   TRANSLUCENT ZOOMED 3D INTERIOR CHAMBER (#department-lens)
   Spinning 3D Holographic Cathedral & Gyroscope Core shine right through!
   ============================================================================ */
.department-lens {
  --lens-color: var(--accent);
  position: fixed;
  top: 56px;
  left: 18px;
  right: 18px;
  bottom: 68px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  border: 1px solid color-mix(in srgb, var(--lens-color) 36%, var(--border));
  background: radial-gradient(circle at 50% 48%, rgba(4, 8, 16, 0.06) 0%, rgba(4, 7, 14, 0.56) 100%);
  backdrop-filter: blur(1.5px);
  overflow: hidden;
}

:root[data-theme="light"] .department-lens {
  background: radial-gradient(circle at 50% 50%, rgba(246, 243, 236, 0.32) 0%, rgba(236, 232, 222, 0.84) 100%);
}

.department-lens[data-department="direction"] { --lens-color: var(--c-direction); }
.department-lens[data-department="research"] { --lens-color: var(--c-research); }
.department-lens[data-department="review"] { --lens-color: var(--c-review); }
.department-lens[data-department="verification"] { --lens-color: var(--c-verification); }
.department-lens[data-department="books"] { --lens-color: var(--c-books); }
.department-lens[data-department="publication"] { --lens-color: var(--c-publication); }
.department-lens[data-department="outreach"] { --lens-color: var(--c-outreach); }
.department-lens[data-department="studio"] { --lens-color: var(--c-studio); }

.lens-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  flex-shrink: 0;
}

.lens-back {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.lens-back:hover { background: var(--accent); color: #01040a; }

.lens-switcher { display: flex; align-items: center; gap: 5px; overflow-x: auto; }

.lens-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.15s ease;
}
.lens-switch-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.lens-switch-pill[aria-selected="true"] {
  color: var(--ink);
  border-color: var(--lens-color);
  background: color-mix(in srgb, var(--lens-color) 20%, transparent);
}
.lens-switch-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dim); }
.lens-switch-pill.has-running .lens-switch-dot { background: var(--live); box-shadow: 0 0 6px var(--live); }

.lens-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  flex-shrink: 0;
}

.lens-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lens-title-block h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); }
.lens-title-block p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.lens-freshness { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }

.lens-metrics { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lens-metric {
  min-width: 78px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.lens-metric strong { display: block; font-family: var(--font-mono); font-size: 16px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.lens-metric span { display: block; font-size: 10px; color: var(--muted); }
.lens-metric.is-running { border-color: color-mix(in srgb, var(--live) 50%, transparent); background: var(--live-soft); }
.lens-metric.is-running strong { color: var(--live-ink); }
.lens-metric.is-queued { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: var(--gold-soft); }
.lens-metric.is-queued strong { color: var(--gold); }

.dept-zoom-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  overflow: hidden;
}

.dept-zoom-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1260px;
  aspect-ratio: 1200 / 580;
}

#lens-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.zoom-hex-wall-outer { fill: none; stroke: color-mix(in srgb, var(--lens-color) 28%, transparent); stroke-width: 1.5; stroke-dasharray: 10 8; }
.zoom-hex-wall { fill: color-mix(in srgb, var(--lens-color) 4%, transparent); stroke: color-mix(in srgb, var(--lens-color) 55%, transparent); stroke-width: 1.8; }
.zoom-radar-ring { fill: none; stroke: color-mix(in srgb, var(--lens-color) 26%, transparent); stroke-width: 1; transform-origin: 590px 290px; }
.zoom-radar-ring.is-inner { stroke-dasharray: 5 8; animation: radar-spin 42s linear infinite; }
.zoom-radar-ring.is-outer { stroke-dasharray: 3 12; opacity: 0.65; animation: radar-spin-rev 68s linear infinite; }
.zoom-axis { stroke: color-mix(in srgb, var(--lens-color) 16%, transparent); stroke-width: 1; stroke-dasharray: 2 6; }
.zoom-zone-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; fill: var(--muted); text-anchor: middle; }

.zoom-beam { fill: none; stroke: rgba(119, 186, 213, 0.36); stroke-width: 1.6; transition: all 0.18s ease; }
.zoom-beam.is-live { stroke: var(--live); stroke-width: 2.2; filter: drop-shadow(0 0 6px var(--live)); }
.zoom-beam.is-topic { stroke: color-mix(in srgb, var(--lens-color) 58%, transparent); stroke-width: 1.8; }
.zoom-beam.is-portal { stroke: color-mix(in srgb, var(--accent) 34%, transparent); stroke-dasharray: 4 5; }
.zoom-beam.is-highlighted { stroke: var(--lens-color); stroke-width: 3; opacity: 1; filter: drop-shadow(0 0 8px var(--lens-color)); }
.zoom-beam.is-dimmed { opacity: 0.15; }
.zoom-pulse-dot { fill: var(--live); filter: drop-shadow(0 0 6px var(--live)); }

.map-hub-node {
  position: absolute;
  left: 49.17%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 134px;
  height: 134px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  padding: 10px;
  background: radial-gradient(circle, color-mix(in srgb, var(--lens-color) 22%, rgba(2, 10, 20, 0.72)) 0%, rgba(2, 10, 20, 0.82) 78%);
  backdrop-filter: blur(8px);
  border: 2px solid var(--lens-color);
  box-shadow: 0 0 38px color-mix(in srgb, var(--lens-color) 38%, transparent);
  z-index: 4;
}

:root[data-theme="light"] .map-hub-node {
  background: rgba(255, 253, 248, 0.92);
}

.map-hub-code { font-family: var(--font-mono); font-size: 8.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--lens-color); }
.map-hub-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.map-hub-stat { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--live-ink); padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--lens-color) 18%, transparent); }

.map-seat-layer, .map-topic-layer, .map-portal-col { position: absolute; inset: 0; pointer-events: none; }

.lens-agent {
  pointer-events: auto;
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  transform: translate(-50%, -50%);
  width: 210px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  border-top: 2px solid color-mix(in srgb, var(--lens-color) 70%, transparent);
  background: var(--surface-elevated);
  backdrop-filter: blur(12px);
  cursor: pointer;
  z-index: 5;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.lens-agent:hover, .lens-agent.is-selected { transform: translate(-50%, -50%) scale(1.04); border-color: var(--lens-color); box-shadow: 0 0 22px color-mix(in srgb, var(--lens-color) 38%, transparent); z-index: 9; }
.lens-agent.is-busy { border-top-color: var(--live); }
.lens-agent-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.lens-channel-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--lens-color); }
.lens-agent-status { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.lens-agent-status i { width: 5.5px; height: 5.5px; border-radius: 50%; background: var(--dim); }
.lens-agent-status.is-running { color: var(--live-ink); font-weight: 700; }
.lens-agent-status.is-running i { background: var(--live); box-shadow: 0 0 7px var(--live); }
.lens-task-lane { display: flex; flex-direction: column; gap: 3px; }
.lens-task { width: 100%; display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; background: color-mix(in srgb, var(--bg-deep) 70%, transparent); text-align: left; }
.lens-task:hover { background: var(--accent-soft); }
.lens-task-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.lens-task-dot.is-running { background: var(--live); box-shadow: 0 0 6px var(--live); }
.lens-task strong { font-size: 11px; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lens-empty-seat { margin: 0; font-size: 10.5px; color: var(--dim); }
.lens-empty-map { pointer-events: auto; position: absolute; left: 26%; top: 50%; transform: translate(-50%, -50%); max-width: 240px; padding: 12px 14px; border-radius: 8px; border: 1px dashed var(--border-strong); background: var(--surface); font-size: 12px; color: var(--muted); text-align: center; }

.map-topic-node {
  pointer-events: auto;
  position: absolute;
  left: var(--tx);
  top: var(--ty);
  transform: translate(-50%, -50%);
  width: 206px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--lens-color);
  background: var(--surface-elevated);
  backdrop-filter: blur(12px);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.map-topic-node:hover { transform: translate(-50%, -50%) scale(1.04); border-color: var(--lens-color); z-index: 9; }
.map-topic-top, .map-topic-foot { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.map-topic-top span:first-child { color: var(--lens-color); font-weight: 700; }
.map-topic-node strong { font-size: 12px; font-weight: 600; line-height: 1.32; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-topic-foot span:last-child { color: var(--accent); }

.map-portal-node {
  pointer-events: auto;
  position: absolute;
  left: var(--px);
  top: var(--py);
  transform: translate(-50%, -50%);
  width: 108px;
  padding: 8px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  backdrop-filter: blur(10px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 5;
  transition: all 0.16s ease;
}
.map-portal-node:hover { transform: translate(-50%, -50%) scale(1.06); border-color: var(--accent); background: var(--accent-soft); }
.map-portal-dir { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; color: var(--accent); }
.map-portal-node strong { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.map-portal-count { font-family: var(--font-mono); font-size: 10px; color: var(--gold); }

.lens-extra-seats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.lens-extra-seats .lens-agent { position: static; transform: none; width: 184px; }

.lens-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  flex-shrink: 0;
}
.lens-method { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.lens-method-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); }
.lens-method i { font-style: normal; color: var(--accent); }
.lens-spotlight { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.spotlight-chip { padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-soft); font-size: 11px; color: var(--ink-2); }
.spotlight-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================================
   FLOATING JOURNEY TRAJECTORY OVERLAY (#journey-panel)
   ============================================================================ */
.journey-panel {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 36px));
  max-height: calc(100vh - 144px);
  overflow-y: auto;
  z-index: 46;
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  backdrop-filter: blur(18px);
}

.eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 4px; }
.journey-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.journey-heading h3 { margin: 0 0 4px; font-size: 20px; color: var(--ink); }
.journey-heading p { margin: 0; font-size: 12.5px; color: var(--muted); }
.journey-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.journey-stage { padding: 11px 13px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-soft); text-align: left; }
.journey-stage:hover { border-color: var(--accent); background: var(--accent-soft); }
.journey-stage.is-active { border-color: var(--live); background: var(--live-soft); }
.journey-stage span { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.journey-stage strong { display: block; margin: 2px 0 3px; font-size: 13.5px; color: var(--ink); }
.journey-stage p { margin: 0; font-size: 11.5px; color: var(--muted); }
.journey-detail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.journey-detail h4 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--accent); }
.journey-links, .journey-events { display: flex; flex-direction: column; gap: 8px; }
.journey-event { padding: 10px 13px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-soft); }
.journey-event time { font-family: var(--font-mono); font-size: 10px; color: var(--dim); }
.journey-event strong { display: block; margin: 2px 0; font-size: 13px; color: var(--ink); }
.journey-event p { margin: 2px 0; font-size: 12px; color: var(--muted); }
.journey-byline { display: none; }
.journey-event a { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: var(--accent); }

/* ============================================================================
   FLOATING BOTTOM FUI COMMAND RAIL + SLIDE-UP TELEMETRY DRAWER
   ============================================================================ */
.fui-bottom-shell {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 55;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.fui-bottom-rail {
  pointer-events: auto;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

.method-strip {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.method-steps {
  display: flex;
  align-items: center;
  gap: 4px;
}

.step-arrow { font-style: normal; font-size: 10px; color: var(--dim); }

.method-steps button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.method-steps button:hover,
.method-steps button[aria-pressed="true"] {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.step-num { font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; color: var(--accent); }
.method-steps strong { font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.step-badge { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; color: var(--muted); padding: 1px 5px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); white-space: nowrap; }
.step-badge.is-hot { color: var(--live-ink); background: var(--live-soft); }

.branch-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  margin: 0 3px;
  background: color-mix(in srgb, var(--border-strong) 72%, transparent);
}

.method-steps .branch-pill {
  height: 26px;
  padding: 0 8px;
  border-style: dashed;
  border-width: 1px;
  gap: 4px;
}

.method-steps .branch-pill strong { font-size: 11px; }
.branch-glyph { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; opacity: 0.88; }

.method-steps .branch-pill.is-review {
  border-color: color-mix(in srgb, var(--c-review) 42%, transparent);
  background: color-mix(in srgb, var(--c-review) 8%, transparent);
}
.method-steps .branch-pill.is-review .branch-glyph { color: var(--c-review); }
.method-steps .branch-pill.is-review:hover,
.method-steps .branch-pill.is-review[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--c-review);
  background: color-mix(in srgb, var(--c-review) 20%, transparent);
}

.method-steps .branch-pill.is-studio {
  border-color: color-mix(in srgb, var(--c-studio) 42%, transparent);
  background: color-mix(in srgb, var(--c-studio) 8%, transparent);
}
.method-steps .branch-pill.is-studio .branch-glyph { color: var(--c-studio); }
.method-steps .branch-pill.is-studio:hover,
.method-steps .branch-pill.is-studio[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--c-studio);
  background: color-mix(in srgb, var(--c-studio) 20%, transparent);
}

@media (max-width: 1520px) {
  .method-steps .step-badge { display: none; }
  .method-steps button { padding: 0 6px; gap: 4px; }
  .method-steps .branch-pill { padding: 0 6px; }
  .ticker-pill { min-width: 110px; padding: 0 8px; }
}

.ticker-pill {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--surface-solid) 60%, transparent);
}

.ticker-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #01040a;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ticker-message {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-message:hover { color: var(--accent); }
.ticker-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

.dock-triggers {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.dock-triggers button {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.dock-triggers button:hover { border-color: var(--border-strong); color: var(--ink); }
.dock-triggers button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #01040a;
}

/* Slide-Up Glass Telemetry Drawer (Completely Hidden at Rest!) */
.telemetry-dock {
  pointer-events: none;
  max-height: 0;
  opacity: 0;
  transform: translateY(14px);
  overflow: hidden;
  border-radius: 10px;
  border: 0 solid transparent;
  background: var(--surface-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  transition: max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, transform 0.24s ease;
}

.telemetry-dock.is-open {
  pointer-events: auto;
  max-height: 56vh;
  opacity: 1;
  transform: translateY(0);
  border: 1px solid var(--border-strong);
  overflow-y: auto;
}

.dock-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  z-index: 3;
}

.dock-drawer-title { font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); }
.dock-scope { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-left: auto; }
.dock-close-btn { padding: 3px 9px; border-radius: 4px; border: 1px solid var(--border); font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); }
.dock-close-btn:hover { border-color: var(--accent); color: var(--accent); }

.dock-panel { display: none; padding: 12px 14px; }
.dock-panel.is-active { display: block; }

.drawer-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.signal-chip-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.signal-chip-tag small { color: var(--muted); font-weight: 500; }
.activity-strip { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.activity-card { padding: 6px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-soft); text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-card:hover { border-color: var(--accent); }
.activity-card.has-arrival { border-color: var(--live); box-shadow: 0 0 14px color-mix(in srgb, var(--live) 30%, transparent); }
.activity-card-top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.activity-role { color: var(--accent); font-weight: 700; }
.activity-card strong { font-size: 11.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ops Grid inside Drawer */
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr) minmax(0, 1.25fr); gap: 12px; }
.ops-panel { border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); padding: 11px; display: flex; flex-direction: column; min-width: 0; }
.ops-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ops-card-head h3 { margin: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink); }
.mono-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }

.checker-lights { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin-bottom: 9px; padding: 7px; border-radius: 5px; background: color-mix(in srgb, var(--bg) 78%, transparent); border: 1px solid var(--border); }
.checker-light { aspect-ratio: 1; border-radius: 2.5px; background: rgba(148, 163, 184, 0.2); }
.checker-light.is-working { background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.checker-light.is-waiting { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.checker-light.is-succeeded { background: var(--live); opacity: 0.85; }
.checker-light.is-failed { background: var(--danger); opacity: 0.85; }

.checker-runs { display: flex; flex-direction: column; gap: 5px; }
.checker-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 5px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-solid) 65%, transparent); }
.checker-badge { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; text-align: center; padding: 2px 4px; border-radius: 3px; background: rgba(148, 163, 184, 0.14); color: var(--muted); }
.checker-badge.is-working { background: var(--accent-soft); color: var(--accent); }
.checker-badge.is-waiting { background: var(--gold-soft); color: var(--gold); }
.checker-badge.is-succeeded { background: var(--live-soft); color: var(--live-ink); }
.checker-badge.is-failed { background: var(--danger-soft); color: var(--danger); }
.checker-main { min-width: 0; display: flex; flex-direction: column; }
.checker-main strong { font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checker-main small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checker-actor { display: none; }
.checker-time { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }

.relay-bridges { display: flex; flex-direction: column; gap: 8px; }
.bridge-row { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border-radius: 5px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-solid) 65%, transparent); text-align: left; }
.bridge-row:hover { border-color: var(--accent); }
.bridge-top { display: flex; justify-content: space-between; font-size: 11.5px; }
.bridge-label { font-weight: 600; color: var(--ink); }
.bridge-label em { font-style: normal; color: var(--accent); margin: 0 5px; }
.bridge-count { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--live-ink); }
.bridge-bar-track { height: 4px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); overflow: hidden; }
.bridge-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--live)); }

.feed-filters, .topic-filters { display: inline-flex; gap: 3px; }
.feed-filters button, .topic-filters button { padding: 2px 7px; border-radius: 4px; border: 1px solid var(--border); font-size: 10.5px; font-weight: 600; color: var(--muted); }
.feed-filters button[aria-pressed="true"], .topic-filters button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.live-feed { display: flex; flex-direction: column; gap: 5px; max-height: 230px; overflow-y: auto; }
.feed-entry { padding: 6px 8px; border-radius: 5px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-solid) 65%, transparent); }
.feed-entry-head { display: flex; justify-content: space-between; margin-bottom: 2px; }
.feed-who { display: flex; align-items: center; gap: 5px; }
.feed-dept-dot { width: 6px; height: 6px; border-radius: 50%; }
.feed-dept-tag { font-size: 10px; font-weight: 600; color: var(--ink-2); }
.feed-time { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }
.feed-title { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.feed-excerpt { margin: 2px 0 3px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-footer { display: flex; justify-content: flex-end; }
.feed-actions { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 10px; color: var(--accent); }

.dock-subbar { display: flex; justify-content: space-between; margin-bottom: 10px; }
.question-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.question-card { padding: 10px 11px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-soft); display: flex; flex-direction: column; gap: 5px; }
.question-card:hover { border-color: var(--accent); }
.question-card-top, .question-card-bottom { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.question-card-top span:first-child { color: var(--accent); font-weight: 700; }
.question-title { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.question-card p { margin: 0; font-size: 11.5px; color: var(--muted); }
.more-button { padding: 3px 9px; border-radius: 4px; border: 1px solid var(--border); font-size: 11px; color: var(--ink-2); }

.pub-compact-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
.pub-books-panel, .pub-papers-panel { border: 1px solid var(--border); border-radius: 7px; padding: 10px; background: var(--surface-soft); }
.book-updates { display: flex; flex-direction: column; gap: 7px; }
.book-update { padding: 7px 9px; border-radius: 5px; border: 1px solid var(--border); }
.book-update > span { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--c-books); font-weight: 700; }
.paper-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.paper-card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--surface-solid) 72%, transparent); }
.paper-card img { width: 100%; height: 74px; object-fit: cover; }
.paper-content { padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.paper-type { font-family: var(--font-mono); font-size: 9.5px; color: var(--live-ink); font-weight: 700; }
.paper-title { font-size: 12px; font-weight: 600; color: var(--ink); }
.paper-summary { margin: 0; font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper-authors { font-family: var(--font-mono); font-size: 10px; color: var(--dim); }

.ecosystem-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr); gap: 12px; }
.repo-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 6px; }
.repo-tile { padding: 7px 9px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-soft); display: flex; flex-direction: column; gap: 2px; }
.repo-tile:hover { border-color: var(--accent); }
.repo-tile-head { display: flex; justify-content: space-between; gap: 5px; }
.repo-tile strong { font-size: 11.5px; color: var(--ink); }
.repo-short { font-family: var(--font-mono); font-size: 9px; color: var(--accent); }
.repo-name-mono { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.template-card { padding: 14px; border-radius: 7px; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--accent) 10%, var(--surface-solid)); display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.template-card h3 { margin: 0; font-size: 15px; color: var(--ink); }
.template-card p { margin: 0; font-size: 12px; color: var(--muted); }
.template-actions { display: flex; align-items: center; gap: 10px; }
.solid-link { padding: 6px 12px; border-radius: 5px; background: var(--accent); color: #01040a; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; }
.text-link { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); }
.loading { margin: 0; font-size: 11.5px; color: var(--dim); }

@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes radar-spin-rev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

@keyframes panel-lock-flash {
  0% { border-left-color: #ffffff; box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { border-left-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42); }
}

@keyframes log-line-flash {
  0% { opacity: 0; transform: translateX(-8px); background: color-mix(in srgb, var(--accent) 32%, transparent); }
  28% { opacity: 1; transform: translateX(0); background: color-mix(in srgb, var(--accent) 22%, transparent); }
  100% { opacity: 1; transform: translateX(0); background: transparent; }
}

@keyframes spec-bar {
  0% { transform: scaleY(0.22); }
  100% { transform: scaleY(1); }
}

@keyframes led-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

body.quiet *, body.quiet *::before, body.quiet *::after {
  animation: none !important;
  transition: none !important;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
/* ============================================================================
   CONJECTURE RESOLUTION & REFUTATION VAULT (#conjectures · 猜想解决与反驳档案)
   ============================================================================ */
.dock-tab-conjectures {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: color-mix(in srgb, var(--gold) 42%, var(--border)) !important;
}

.dock-tab-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
}
.dock-tab-count:empty { display: none; }
.dock-triggers button[aria-selected="true"] .dock-tab-count {
  background: rgba(4, 12, 20, 0.28);
  color: inherit;
}

.conjecture-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.conjecture-summary {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.conjecture-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.conjecture-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 3px;
  border: 1px solid var(--border);
  border-left: 2.5px solid var(--live);
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.16s ease, transform 0.14s ease, background 0.16s ease;
}

.conjecture-card.is-refuted {
  border-left-color: #f59e0b;
}

.conjecture-card:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-solid));
  transform: translateY(-1px);
}

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

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.verdict-badge.is-proved {
  background: color-mix(in srgb, var(--live) 16%, transparent);
  color: var(--live-ink);
  border: 1px solid color-mix(in srgb, var(--live) 40%, transparent);
}

.verdict-badge.is-refuted {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.42);
}

:root[data-theme="light"] .verdict-badge.is-refuted {
  color: #b45309;
  background: rgba(217, 119, 6, 0.12);
}

.conjecture-card-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink);
}

.conjecture-card-sub {
  margin: 0;
  font-size: 11px;
  line-height: 1.42;
  color: var(--muted);
}

.conjecture-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.conjecture-card-foot .work-arrow { color: var(--accent); font-weight: 700; }

@media (max-width: 1460px) {
  .fui-top { padding: 7px 12px; gap: 6px; }
  .fui-top-left, .fui-top-right { gap: 5px; }
  .institute-metrics span:nth-child(n+3) { display: none; }
  .layer-switcher button,
  .style-switcher button,
  .mode-switch button { padding: 0 7.5px; font-size: 11px; }
  .lang-switcher button { padding: 0 5.5px; font-size: 10px; }
  .follow-button,
  .hud-icon-btn,
  .theme-toggle { padding: 0 7.5px; font-size: 10.5px; }
}

@media (max-width: 1320px) {
  .ticker-pill { display: none; }
  .research-room { --readout-width: 260px; }
  .fui-corner-telemetry { left: calc((100vw - 274px) * 0.5); }
}

@media (max-width: 1120px) {
  .scifi-log-wall { display: none; }
  .department-panel { top: 62px; bottom: 64px; height: calc(100vh - 130px); }
  .human-pulse-btn kbd { display: none; }
}

@media (max-width: 980px) {
  html, body { overflow-y: auto; }
  .cinema-stage { height: auto; min-height: 100vh; }
  .fui-top { position: sticky; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-solid); }
  .research-room { position: relative; height: 64vh; min-height: 440px; }
  .department-panel { position: static; width: auto; height: auto; margin: 10px 12px; max-height: 360px; }
  .fui-bottom-shell { position: sticky; bottom: 0; left: 0; right: 0; padding: 8px 10px; background: var(--surface-solid); }
  .fui-bottom-rail { height: auto; flex-wrap: wrap; border-radius: 10px; padding: 8px; }
  .method-strip { width: 100%; overflow-x: auto; }
  .fui-corner-telemetry { display: none; }
  .ops-grid, .question-cards, .pub-compact-grid, .paper-cards, .ecosystem-layout, .activity-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .institute-metrics { display: none; }
  .cell-mode, .cell-seats { display: none; }
  .cell-card { padding: 3px 6px; }
  .cell-title { font-size: 10.5px; }
  .cell-status { font-size: 8.5px; }
}

/* ============================================================================
   PORTRAIT COMMAND SCREEN (竖屏)
   Header, 3D campus, department readouts and relay rail stack top to bottom.
   Phones scroll; tablets and rotated monitors fill exactly one screen.
   ============================================================================ */
@media (orientation: portrait) {
  /* Only the viewport scrolls, so the relay rail can stay sticky. */
  html { height: auto; overflow-x: hidden; overflow-y: auto; }
  body { height: auto; overflow: visible; overflow-x: clip; }

  .cinema-stage {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .fui-top,
  :root[data-look="blueprint"] .fui-top,
  :root[data-theme="light"] .fui-top {
    position: relative;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 14px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
  }
  .fui-top-left,
  .fui-top-right { flex-wrap: wrap; row-gap: 8px; min-width: 0; }
  .fui-top-right { flex: 1 1 100%; }

  .connection-note {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    align-self: center;
    margin: 8px 12px 0;
  }

  .research-room {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 10px;
  }

  .hive-board {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    height: min(clamp(340px, 108vw, 72svh),
      calc(100svh - var(--scene-chrome-height, 0px)));
    touch-action: pan-y;
  }

  .fui-corner-telemetry { position: absolute; left: 50%; bottom: 10px; }

  .scifi-log-wall { display: none; }

  .department-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0 12px;
  }

  .fui-bottom-shell {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 0;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    background: var(--surface-solid);
    border-top: 1px solid var(--border);
  }
  .fui-bottom-rail {
    height: auto;
    min-height: 44px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 6px 8px;
    border-radius: 12px;
  }
  .method-strip { flex: 1 1 auto; width: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .method-strip::-webkit-scrollbar { display: none; }
  .ticker-pill { display: none; }

  /* The drawer opens over the stage so the rail keeps its height. */
  .telemetry-dock { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); }
  .telemetry-dock.is-open { max-height: min(56vh, 720px); }

  .department-lens { top: 8px; left: 8px; right: 8px; bottom: 8px; z-index: 80; overflow-y: auto; }
  .journey-panel { top: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100svh - 16px); z-index: 80; }
}

/* Phones: the page scrolls under a sticky relay rail. */
@media (orientation: portrait) and (max-width: 699px) {
  .hive-cell { --cell-scale: 0.9; }
  .is-wing-label .cell-icon,
  .is-wing-label .cell-head::before { display: none; }
  .is-wing-label .cell-title { flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; white-space: normal; text-align: left; line-height: 1.2; }
  .cell-role-tag,
  .cell-meta-row { display: none; }
  .fui-orbit-hint { display: none; }
  .department-panel { min-height: 280px; }
  .department-lens { top: 0; left: 0; right: 0; bottom: 0; border-radius: 0; }
}

/* Tablets and rotated monitors: one fixed screen, readouts scroll inside. */
@media (orientation: portrait) and (min-width: 700px) {
  html, body { height: 100%; overflow: hidden; }
  .cinema-stage { height: 100vh; height: 100svh; min-height: 0; }
  .hive-board { height: min(104vw, 58svh); }
  .department-work { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
}

/* Rotated desktop monitors (1080 × 1920 CSS px and wider): live log beside the department readout. */
@media (orientation: portrait) and (min-width: 1000px) {
  .research-room { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .scifi-log-wall {
    display: flex;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    min-height: 0;
    margin-left: 12px;
  }
  .department-panel { margin-left: 0; }
}

/* Built-in browser: outside links open here instead of a new tab. */
.inline-browser {
  position: fixed;
  inset: 0;
  z-index: 400;
}
.inline-browser[hidden] { display: none; }
.inline-browser .ib-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 10, 0.58);
  backdrop-filter: blur(3px);
}
.inline-browser .ib-window {
  position: absolute;
  top: 52px;
  left: max(16px, 3vw);
  right: max(16px, 3vw);
  bottom: 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(120, 220, 214, 0.36);
  border-radius: 12px;
  background: #0a141d;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.inline-browser .ib-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 220, 214, 0.22);
  background: rgba(10, 26, 36, 0.96);
}
.inline-browser .ib-btn {
  flex: none;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(120, 220, 214, 0.3);
  border-radius: 7px;
  background: rgba(120, 220, 214, 0.06);
  color: #bfeee9;
  font: 600 14px/26px -apple-system, "PingFang SC", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.inline-browser .ib-btn:disabled { opacity: 0.35; cursor: default; }
.inline-browser .ib-btn:not(:disabled):hover { background: rgba(120, 220, 214, 0.16); }
.inline-browser .ib-out { font-size: 12.5px; }
.inline-browser .ib-close { font-size: 18px; }
.inline-browser .ib-address {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.3);
  color: #9fc7cc;
  font: 12px/28px "Geist Mono", ui-monospace, monospace;
}
.inline-browser .ib-kind {
  flex: none;
  color: #7fe3dc;
  font-weight: 700;
}
.inline-browser .ib-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-browser .ib-body {
  position: relative;
  flex: 1;
  min-height: 0;
}
.inline-browser .ib-frame,
.inline-browser .ib-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a141d;
}
.inline-browser .ib-frame { background: #fff; }
.inline-browser .ib-frame[hidden],
.inline-browser .ib-native[hidden] { display: none; }
.inline-browser .ib-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: #cfe9e7;
  font: 14px/1.6 -apple-system, "PingFang SC", sans-serif;
  text-align: center;
}
.inline-browser .ib-status[hidden] { display: none; }
.inline-browser .ib-status p { max-width: 560px; margin: 0; }
.inline-browser .ib-status-out {
  padding: 8px 16px;
  border: 1px solid rgba(120, 220, 214, 0.5);
  border-radius: 8px;
  color: #7fe3dc;
  font-weight: 700;
  text-decoration: none;
}
[data-theme="light"] .inline-browser .ib-window { background: #faf7f0; border-color: rgba(16, 118, 110, 0.35); }
[data-theme="light"] .inline-browser .ib-bar { background: #f1ece1; border-color: rgba(16, 118, 110, 0.22); }
[data-theme="light"] .inline-browser .ib-btn { color: #10504a; border-color: rgba(16, 118, 110, 0.35); background: rgba(16, 118, 110, 0.05); }
[data-theme="light"] .inline-browser .ib-address { background: rgba(0, 0, 0, 0.05); color: #3a5a5e; }
[data-theme="light"] .inline-browser .ib-kind { color: #10766e; }
[data-theme="light"] .inline-browser .ib-native { background: #faf7f0; }
[data-theme="light"] .inline-browser .ib-status { color: #24383a; }
[data-theme="light"] .inline-browser .ib-status-out { color: #10766e; border-color: rgba(16, 118, 110, 0.5); }
@media (max-width: 700px) {
  .inline-browser .ib-window { top: 8px; left: 8px; right: 8px; bottom: 8px; }
  .inline-browser .ib-out { font-size: 0; }
  .inline-browser .ib-out::after { content: "↗"; font-size: 14px; }
}

/* The canvas controls share one row between the scene edge and the readouts. */
.scene-controls {
  position: absolute;
  inset: 58px var(--scene-right) 68px 18px;
  z-index: 48;
  container-type: size;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
/* Floating draggable Nyx Assistant — starts top-left below the optical HUD readout and drags anywhere. */
nyx-assistant {
  position: fixed;
  left: 22px;
  top: 86px;
  right: auto;
  bottom: auto;
  z-index: 64;
  width: max-content;
  pointer-events: auto;
  user-select: text;
  cursor: default;
  --nyx-panel-max-width: min(28rem, calc(100vw - 32px));
  --nyx-panel-max-height: min(30rem, calc(100dvh - 140px));
  --nyx-surface: var(--surface-solid);
  --nyx-mark: url("/assets/mark.svg");
  --nyx-connected: var(--live);
  --nyx-panel-surface: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  --nyx-text: var(--ink);
  --nyx-accent: var(--accent);
  --nyx-muted: var(--ink-2);
  --nyx-control-font: var(--font-mono);
  --nyx-border: var(--border-strong);
  --nyx-control-surface: color-mix(in srgb, var(--accent) 6%, var(--surface-solid));
  --nyx-control-text: var(--ink);
  --nyx-action-surface: var(--accent);
  --nyx-accent-text: var(--surface-solid);
  --nyx-radius: 3px;
}
nyx-assistant[data-nyx-v="below"]::part(panel) {
  top: calc(100% + 6px);
  bottom: auto;
}
nyx-assistant[data-nyx-v="above"]::part(panel) {
  bottom: calc(100% + 6px);
  top: auto;
}
nyx-assistant[data-nyx-h="left"]::part(panel) {
  left: 0;
  right: auto;
}
nyx-assistant[data-nyx-h="right"]::part(panel) {
  right: 0;
  left: auto;
}
nyx-assistant::part(launcher),
nyx-assistant::part(header) {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
nyx-assistant[data-nyx-dragging]::part(launcher),
nyx-assistant[data-nyx-dragging]::part(header) {
  cursor: grabbing;
}
nyx-assistant[data-nyx-dragging]::part(panel) {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48), inset 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}
nyx-assistant button[slot="prompt"] {
  margin-top: 9px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--ink-2);
  background: var(--surface-soft);
  font: 600 .88em/1.45 var(--font-mono);
}
nyx-assistant button[slot="prompt"]::after {
  content: "↗";
  margin-inline-start: .45em;
  color: var(--accent);
}
nyx-assistant button[slot="prompt"]:hover,
nyx-assistant button[slot="prompt"]:focus-visible {
  color: var(--ink);
  border-color: var(--border-strong);
}
@media (orientation: portrait), (max-width: 980px) {
  .scene-controls {
    inset: 10px 12px;
    gap: 8px;
  }
  nyx-assistant {
    left: 10px;
    top: 92px;
    --nyx-panel-max-width: calc(100vw - 20px);
    --nyx-panel-max-height: min(26rem, calc(100dvh - 124px));
  }
  .galaxy-back-bar { position: absolute; inset: 48px auto auto 10px; }
  .human-console { overflow-x: auto; scrollbar-width: none; }
  .human-console::-webkit-scrollbar { display: none; }
  .human-console > * { flex: none; }
  .dock-triggers { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .dock-triggers::-webkit-scrollbar { display: none; }
  .research-room { height: auto; }
}
@media (max-width: 700px) {
  /* Sleek 2-row non-wrapping mobile command header (~82px total instead of 4 wrapped rows!) */
  .fui-top,
  :root[data-look="blueprint"] .fui-top,
  :root[data-look="matrix"] .fui-top,
  :root[data-theme="light"] .fui-top {
    padding: 8px 10px 7px;
    row-gap: 6px;
    gap: 6px;
  }
  .fui-top-left {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .brand { gap: 7px; min-width: 0; }
  .brand img { width: 20px; height: 20px; }
  .brand-name { font-size: 11.5px; letter-spacing: 0.08em; }
  .connection { height: 24px; padding: 0 8px; font-size: 10px; }
  .fui-top-right {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 1px;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  }
  .fui-top-right::-webkit-scrollbar { display: none; }
  .fui-top-right > * { flex: none; }
  .layer-switcher,
  .style-switcher,
  .lang-switcher,
  .mode-switch { padding: 2px; }
  .layer-switcher button,
  .style-switcher button,
  .mode-switch button,
  .follow-button {
    height: 26px;
    padding: 0 8px;
    font-size: 10.5px;
  }
  .lang-switcher button {
    height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }
  /* Hide desktop-only auxiliary buttons & redundant sun icon on mobile phones */
  #hud-zen-toggle,
  #motion-toggle,
  #expand-room,
  #theme-toggle {
    display: none;
  }

  /* Balanced 3D stage height so both the 3D scene and department card read cleanly on first screen */
  .hive-board {
    height: clamp(345px, 50svh, 435px);
  }
  .scene-controls {
    inset: 8px 10px;
    gap: 6px;
  }
  .human-console {
    gap: 5px;
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  }
  .human-rank-pill,
  .human-pulse-btn,
  .human-tool-btn,
  .human-sound-btn {
    height: 28px;
    font-size: 10px;
  }
  .human-rank-pill { padding: 0 8px; gap: 5px; }
  .human-pulse-btn,
  .human-tool-btn { padding: 0 8px; gap: 4px; }
  .human-sound-btn { width: 28px; min-width: 28px; padding: 0; }
  .human-xp-track,
  .human-xp-meta,
  #replay-intro-btn {
    display: none;
  }

  /* Compact Nyx pill on narrow mobile */
  nyx-assistant {
    font-size: 12px;
    --nyx-panel-max-width: calc(100vw - 20px);
    --nyx-panel-max-height: min(24rem, calc(100dvh - 120px));
  }

  /* Crisp micro-pill 3D department callouts so all 8 waypoints stay readable without overlapping */
  .hive-cell { --cell-scale: 0.80; }
  .cell-card,
  :root[data-lang="en"] .cell-card {
    max-width: 112px;
    padding: 2.5px 6.5px;
    gap: 0;
    clip-path: none;
    border-radius: 3px;
    border-left-width: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.44);
  }
  .cell-head { gap: 3.5px; }
  .cell-head::before { display: none; }
  .cell-title { font-size: 9.5px; letter-spacing: 0; }
  .hive-cell:not([aria-pressed="true"]) .cell-landmark { display: none; }
  .cell-landmark-cap { font-size: 7.5px; padding: 0.5px 4px; }
  .cell-pin-stem { height: 5px; }
  .cell-pin-node { width: 4px; height: 4px; }

  /* Compact department panel & sticky bottom navigation dock */
  .department-panel {
    margin: 0 10px;
    padding: 12px 13px;
    border-radius: 10px;
  }
  .fui-bottom-shell {
    padding: 5px 8px max(6px, env(safe-area-inset-bottom));
  }
  .fui-bottom-rail {
    min-height: 0;
    padding: 4px 6px;
    row-gap: 4px;
    border-radius: 10px;
  }
  .method-strip,
  .dock-triggers {
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
  }
  .method-steps { gap: 3px; }
  .method-steps button,
  .dock-triggers button {
    height: 26px;
    padding: 0 8px;
    font-size: 10.5px;
  }
  .method-steps strong { font-size: 10.5px; }
  .method-steps .step-badge { display: none; }

  /* Keep telemetry drawer header & close button crisp on narrow mobile screens */
  .dock-drawer-head {
    gap: 8px;
    padding: 8px 10px;
  }
  .dock-drawer-title {
    min-width: 0;
    font-size: 11px;
    line-height: 1.3;
  }
  .dock-scope { display: none; }
  .dock-close-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* Mobile & narrow-tablet full-screen overlays: Cabin ("飞入舱内"), Journey ("接力轨迹"), Genesis Scrub */
@media (max-width: 980px) {
  .genesis-scrub-bar,
  .intro-cinema-pill {
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom) + 96px);
    max-width: calc(100vw - 20px);
    z-index: 72;
  }
  .genesis-scrub-bar {
    width: min(420px, calc(100vw - 20px));
    gap: 7px;
    padding: 0 8px;
  }
  .gs-play-btn,
  .gs-close-btn { flex: none; }
  .gs-slider { flex: 1 1 84px; width: auto; min-width: 64px; }
  .gs-meta { font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 768px) {
  /* Fullscreen scrollable Department Cabin ("飞入舱内") — zero overlap, zero clipped channels, zero vertical-letter squishing */
  .department-lens {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    border: 0;
    border-radius: 0;
    clip-path: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--bg-deep) 93%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  :root[data-theme="light"] .department-lens {
    background: color-mix(in srgb, var(--surface-solid) 95%, transparent);
  }
  .research-room.is-department-focused nyx-assistant {
    display: none;
  }

  .lens-topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top)) 12px 9px;
    background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .lens-back {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 11.5px;
  }
  .lens-switcher {
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  }
  .lens-switcher::-webkit-scrollbar { display: none; }
  .lens-switch-pill { flex: none; padding: 5px 10px; font-size: 11.5px; }

  .lens-header-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 12px 10px;
  }
  .lens-title-block { min-width: 0; width: 100%; }
  .lens-title-line { gap: 8px; align-items: center; }
  .lens-title-line .execution-label { white-space: nowrap; flex-shrink: 0; }
  .lens-title-block h2 { font-size: 19px; line-height: 1.25; }
  .lens-title-block p { margin-top: 5px; font-size: 12px; line-height: 1.5; }
  .lens-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .lens-metric { min-width: 0; padding: 7px 6px; }
  .lens-metric strong { font-size: 16px; }
  .lens-metric span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Let the cabin workspace flow & scroll naturally instead of center-clipping inside overflow:hidden! */
  .dept-zoom-stage {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    justify-content: flex-start;
    align-items: stretch;
    padding: 4px 12px 14px;
    gap: 12px;
  }
  .dept-zoom-canvas {
    position: static;
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
  }
  #lens-map-svg,
  .map-hub-node {
    display: none;
  }

  .map-seat-layer,
  .map-topic-layer,
  .map-portal-col {
    position: static;
    inset: auto;
    pointer-events: auto;
    width: 100%;
  }
  .map-seat-layer { order: 1; display: flex; flex-direction: column; gap: 8px; }
  .map-topic-layer { order: 2; display: flex; flex-direction: column; gap: 8px; }
  .map-portal-left { order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .map-portal-right { order: 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

  .map-seat-layer:empty,
  .map-topic-layer:empty,
  .map-portal-col:empty {
    display: none;
  }

  .map-seat-layer::before,
  .map-topic-layer::before,
  .map-portal-col::before {
    content: attr(aria-label);
    grid-column: 1 / -1;
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--lens-color);
    padding: 2px 0 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--lens-color) 24%, var(--border));
  }
  :root[data-lang="en"] .map-seat-layer::before { content: "PARALLEL CHANNELS"; }
  :root[data-lang="en"] .map-topic-layer::before { content: "ACTIVE RESEARCH THREADS"; }
  :root[data-lang="en"] .map-portal-left::before { content: "UPSTREAM HANDOFFS"; }
  :root[data-lang="en"] .map-portal-right::before { content: "DOWNSTREAM HANDOFFS"; }

  .lens-agent,
  .map-topic-node,
  .map-portal-node {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: none;
  }
  .lens-agent:hover,
  .lens-agent.is-selected,
  .map-topic-node:hover,
  .map-portal-node:hover {
    transform: none;
  }
  .lens-agent { padding: 10px 11px; }
  .map-topic-node { padding: 10px 11px; gap: 5px; }
  .map-portal-node {
    padding: 9px 10px;
    align-items: flex-start;
    text-align: left;
    gap: 3px;
  }
  .lens-empty-map {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    max-width: none;
    width: 100%;
  }
  .lens-extra-seats {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
    width: 100%;
  }
  .lens-extra-seats .lens-agent { width: 100%; }

  .lens-bottom-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px max(16px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  }
  .lens-method {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    white-space: normal;
    gap: 5px 7px;
    font-size: 11.5px;
    line-height: 1.4;
  }
  .lens-spotlight {
    justify-content: flex-start;
    text-align: left;
    gap: 6px;
    font-size: 11px;
    line-height: 1.45;
  }
  .spotlight-chip {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
  }

  /* Fullscreen mobile Journey Trajectory ("接力轨迹") — stack detail columns cleanly */
  .journey-panel {
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: max(14px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
    z-index: 95;
  }
  .journey-heading {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  .journey-heading .lens-back { align-self: flex-start; }
  .journey-heading h3 { font-size: 18px; line-height: 1.3; }
  .journey-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .journey-detail { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 980px) and (orientation: landscape) {
  .hive-board { position: relative; height: 64vh; min-height: 320px; }
}
