/* ═══════════════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════════════ */
:root {
  --bg: #080c14;
  --ink: #eef2ff;
  --muted: #7b8ba8;
  --accent: #93c5fd;
  --accent-dim: rgba(147, 197, 253, 0.14);
  --pink: #f0abfc;
  --green: #4ade80;
  --surface: rgba(12, 18, 32, 0.92);
  --glass: rgba(8, 12, 22, 0.78);
  --border-subtle: rgba(148, 163, 184, 0.1);
  --topbar-h: 48px;
  --card-dock-w: 416px;
  --timeline-w: 312px;
  --history-w: 320px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  width:100vw; height:100vh; overflow:hidden;
  background:var(--bg);
  font-family: var(--font);
  font-feature-settings: "kern" 1, "liga" 1;
  color:var(--ink);
  cursor:default;
  -webkit-font-smoothing: antialiased;
}
.canvas {
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
}
body.dragging .canvas { cursor:grabbing; }

/* ═══════════════════════════════════════════════
   CANVAS
   ═══════════════════════════════════════════════ */
.canvas {
  position:absolute;
  width:4000px; height:3000px;
  transform-origin:0 0;
  transition: none;
  z-index:5;
  backface-visibility:hidden;
}
.canvas.interacting { will-change:transform; }
.canvas.animate { transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }

/* ═══════════════════════════════════════════════
   SVG CONNECTIONS
   ═══════════════════════════════════════════════ */
.connections {
  position:absolute; left:0; top:0;
  width:4000px; height:3000px;
  overflow:visible; pointer-events:none; z-index:1;
}
.conn-group { pointer-events:all; cursor:pointer; }
.conn-hit {
  stroke:transparent;
  stroke-width:20;
  pointer-events:stroke;
}
.conn-line {
  stroke:url(#connGrad);
  stroke-width:2.35;
  stroke-linecap:round;
  fill:none;
  opacity:0.78;
  transition: stroke-width 0.35s var(--ease-out), opacity 0.35s;
  pointer-events:none;
}
body.flowith-ui .conn-line { stroke-width:1.35; opacity:0.48; }
body.flowith-ui .conn-group:hover .conn-line,
body.flowith-ui .conn-group.active .conn-line { stroke-width:2; opacity:0.92; }
body.flowith-ui .conn-label { opacity:0; transition:opacity 0.2s; }
body.flowith-ui .conn-group:hover .conn-label,
body.flowith-ui .conn-group.active .conn-label { opacity:1; }
/* 手机：放大后始终显示连线语义，不依赖 hover */
html.is-mobile body.flowith-ui .conn-line { stroke-width:2.4px; opacity:0.82; }
html.is-mobile body.flowith-ui .conn-group.active .conn-line,
html.is-mobile body.flowith-ui .conn-group.highlight .conn-line { stroke-width:2.8px; opacity:1; }
html.is-mobile body.flowith-ui .conn-label,
html.is-mobile .conn-label.mobile-visible { opacity:1 !important; font-size:12px; font-weight:600; }
html.is-mobile .conn-label { paint-order:stroke fill; stroke:#080c14; stroke-width:4px; }
.conn-hit { fill:none; }
.conn-label {
  fill:#e2e8f0;
  font-size:13px;
  font-weight:600;
  text-anchor:middle;
  dominant-baseline:middle;
  pointer-events:none;
  paint-order:stroke fill;
  stroke:#080c14;
  stroke-width:5px;
  stroke-linejoin:round;
}
.conn-group:hover .conn-line { stroke-width:3; opacity:1; }
.conn-group.active .conn-line {
  stroke:url(#connGradActive);
  stroke-width:3.25;
  opacity:1;
  filter:url(#connSoftGlow);
}
.conn-group.dim .conn-line { stroke:url(#connGradDim); opacity:0.28; }
.conn-group.dim .conn-label { opacity:0.45; }
.conn-line.drawing {
  transition: stroke-dashoffset 0.75s cubic-bezier(0.16,1,0.3,1), stroke 0.3s, stroke-width 0.3s;
}
.conn-label.conn-label-in {
  opacity:0;
  transition: opacity 0.4s ease 0.35s;
}
.conn-label.conn-label-in.visible { opacity:1; }

/* ═══════════════════════════════════════════════
   NODES
   ═══════════════════════════════════════════════ */
.node {
  position:absolute;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  cursor:grab;
  z-index:2;
  transition: filter 0.45s var(--ease-out), opacity 0.45s;
}
.node:hover { z-index:20; }
.node.focus { z-index:100 !important; filter:brightness(1.22) saturate(1.18); }
.node.related { z-index:50 !important; filter:brightness(1.08); }
.node.dragging { cursor:grabbing; z-index:120 !important; }
.node:hover .node-circle-inner { transform:scale(1.1); }
.node.focus .node-circle-inner { transform:scale(1.14); }
.node:hover .glow-ring { opacity:0.5; transform:scale(1.08); }
.node.focus .glow-ring { opacity:0.72; transform:scale(1.12); }
.node.dim { filter:brightness(0.22) grayscale(0.55) saturate(0.6); opacity:0.72; }
.node.highlight { filter:brightness(1.28) saturate(1.15); }
.node.curio-busy .glow-ring {
  opacity:0.85;
  animation:curioRingPulse 1.3s ease-in-out infinite;
}
.node.curio-busy .node-circle-outer {
  box-shadow:0 0 0 2px rgba(147,197,253,0.55), 0 0 24px rgba(96,165,250,0.35);
}
.node.curio-done .glow-ring {
  opacity:0.9;
  filter:drop-shadow(0 0 10px rgba(52,211,153,0.55));
}
.node.curio-done .node-circle-outer {
  box-shadow:0 0 0 2px rgba(52,211,153,0.65);
}
.node.curio-done .node-label::after {
  content:' ✓'; color:#86efac; font-size:11px;
}
.node.curio-error .node-circle-outer {
  box-shadow:0 0 0 2px rgba(252,165,165,0.5);
}
@keyframes curioRingPulse {
  0%, 100% { transform:scale(1); opacity:0.65; }
  50% { transform:scale(1.08); opacity:0.95; }
}
.node.spawning {
  animation: nodePop 0.7s var(--ease-out) forwards;
}

@keyframes nodePop {
  0%   { transform:scale(0); opacity:0; }
  55%  { transform:scale(1.16); opacity:1; }
  100% { transform:scale(1); opacity:1; }
}
@keyframes ringSpin {
  from { transform:rotate(0deg); }
  to   { transform:rotate(360deg); }
}
@keyframes focusPulse {
  0%, 100% { box-shadow:0 0 0 0 rgba(147,197,253,0); }
  50%      { box-shadow:0 0 0 6px rgba(147,197,253,0.12); }
}

.node-circle-wrap {
  position:relative;
  display:flex; align-items:center; justify-content:center;
}
.node-circle-outer {
  width:var(--ns); height:var(--ns);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  position:relative;
  filter:drop-shadow(0 4px 16px rgba(0,0,0,0.35));
}
.node-circle-outer::before {
  content:'';
  position:absolute; inset:0; border-radius:50%;
  background:conic-gradient(from 210deg, var(--gc1,#60a5fa), var(--gc2,#f472b6), var(--gc3,#34d399), var(--gc1,#60a5fa));
  -webkit-mask:radial-gradient(circle, transparent 56%, black 58%, black 64%, transparent 66%);
  mask:radial-gradient(circle, transparent 56%, black 58%, black 64%, transparent 66%);
  opacity:0.88;
  transition:opacity 0.35s;
}
.node-circle-outer::after {
  content:'';
  position:absolute; inset:3px; border-radius:50%;
  border:1px solid rgba(255,255,255,0.06);
  pointer-events:none;
  z-index:2;
}
.node.focus .node-circle-outer::before {
  opacity:1;
  animation:ringSpin 10s linear infinite;
}
.node.focus .node-circle-outer {
  animation:focusPulse 2.4s ease-in-out infinite;
}
.node-circle-inner {
  width:calc(var(--ns) - 10px); height:calc(var(--ns) - 10px);
  border-radius:50%;
  background:linear-gradient(165deg, rgba(18,24,40,0.98), rgba(8,12,22,0.95));
  border:1px solid rgba(255,255,255,0.07);
  display:flex; align-items:center; justify-content:center;
  font-size:calc(var(--ns) * 0.36);
  position:relative;
  z-index:1;
  transition:transform 0.38s var(--ease-out), box-shadow 0.35s;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
}
.node-circle-inner.node-has-thumb {
  background-size:cover; background-position:center;
  font-size:0; color:transparent;
  border-color:rgba(255,255,255,0.12);
  box-shadow:0 6px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.08);
}

.glow-ring {
  position:absolute; inset:-10px; border-radius:50%;
  background:radial-gradient(circle, var(--gc1,#60a5fa) 0%, transparent 70%);
  filter:blur(18px);
  opacity:0;
  transition:opacity 0.45s, transform 0.38s var(--ease-out);
  z-index:-1;
  pointer-events:none;
}
.node.highlight .glow-ring { opacity:0.48; }

.node-label {
  font-size:12px; font-weight:600; color:rgba(203,213,225,0.92);
  text-align:center; max-width:128px; line-height:1.35;
  padding:4px 10px; border-radius:6px;
  background:rgba(6,10,18,0.55);
  border:none;
  transition:color 0.3s, background 0.3s, transform 0.3s var(--ease-out), opacity 0.25s;
  pointer-events:none;
  letter-spacing:0.01em;
  text-shadow:0 1px 3px rgba(0,0,0,0.6);
}
body.flowith-ui .node-label {
  opacity:0; transform:translateY(5px);
  max-width:140px;
}
body.flowith-ui .node:hover .node-label,
body.flowith-ui .node.focus .node-label,
body.flowith-ui .node.related .node-label {
  opacity:1; transform:translateY(0);
}
.node:hover .node-label {
  color:#f1f5f9;
  background:rgba(6,10,18,0.85);
}
.node.focus .node-label {
  color:#fff;
  background:rgba(8,12,22,0.92);
  transform:translateY(-1px);
}

/* ═══════════════════════════════════════════════
   CONNECTION LABEL TOOLTIP
   ═══════════════════════════════════════════════ */
.conn-tooltip {
  position:fixed;
  pointer-events:none;
  z-index:60;
  background:rgba(0,0,0,0.85);
  border:1px solid rgba(96,165,250,0.5);
  border-radius:8px;
  padding:6px 12px;
  font-size:13px;
  color:var(--ink);
  opacity:0;
  transform:translate(-50%, -140%);
  transition:opacity 0.15s;
  white-space:nowrap;
  backdrop-filter:blur(8px);
}
.conn-tooltip.visible { opacity:1; }

/* ═══════════════════════════════════════════════
   DETAIL MASK
   ═══════════════════════════════════════════════ */
.detail-mask {
  position:fixed; inset:0;
  background:transparent;
  opacity:0; pointer-events:none; z-index:50;
  transition:opacity 0.35s;
}
.detail-mask.open {
  opacity:1;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(0,0,0,0.12) 0%, transparent min(55%, calc(100% - var(--card-dock-w))));
}

/* ═══════════════════════════════════════════════
   DETAIL CARD — 右侧抽屉，画布保持可见可拖
   ═══════════════════════════════════════════════ */
.detail-card {
  position:fixed;
  top:var(--topbar-h); right:0; bottom:0;
  width:var(--card-dock-w); max-width:92vw;
  background:rgba(8,12,22,0.96);
  backdrop-filter:blur(40px) saturate(1.15);
  -webkit-backdrop-filter:blur(40px) saturate(1.15);
  border-left:1px solid rgba(255,255,255,0.06);
  border-radius:0;
  box-shadow:-12px 0 48px rgba(0,0,0,0.4);
  transform:translateX(104%);
  opacity:1; pointer-events:none; z-index:52;
  transition: transform 0.38s var(--ease-out);
  overflow:hidden;
  display:flex; flex-direction:column;
}
.detail-card::before {
  content:'';
  position:absolute; top:0; left:0; right:0; height:2px; z-index:4;
  background:linear-gradient(90deg, var(--accent), #c4b5fd 60%, #f0abfc);
  opacity:0.7;
}
.detail-card.open { pointer-events:auto; transform:translateX(0); }
body.card-open .canvas-toast {
  left:calc((100% - var(--card-dock-w)) / 2);
  max-width:min(480px, calc(100vw - var(--card-dock-w) - 40px));
}
.detail-card, .detail-card * {
  user-select:text;
  -webkit-user-select:text;
  cursor:auto;
}
.detail-card .detail-close, .detail-card button, .detail-card a, .detail-card summary {
  cursor:pointer;
}
.detail-card .qa-input { cursor:text; }
.detail-card::-webkit-scrollbar { width:5px; }
.detail-card::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:10px; }

.detail-header {
  position:relative;
  flex-shrink:0;
}
.detail-hero {
  width:100%; height:min(50vh, 440px); min-height:280px;
  object-fit:contain; object-position:center;
  border-radius:16px 0 0 0; display:block;
  background:rgba(0,0,0,0.35);
}
.img-carousel-wrap {
  position:relative; margin:0 0 12px;
}
.img-carousel {
  display:flex; gap:0; overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x;
  cursor:grab;
  padding:0;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,0.22) transparent;
}
.img-carousel.is-dragging {
  cursor:grabbing; scroll-snap-type:none; scroll-behavior:auto;
}
.img-carousel::-webkit-scrollbar { height:5px; }
.img-carousel::-webkit-scrollbar-thumb {
  background:rgba(255,255,255,0.22); border-radius:4px;
}
.img-slide {
  flex:0 0 100%; scroll-snap-align:start; scroll-snap-stop:always;
}
.img-slide img {
  width:100%; height:min(50vh, 440px); min-height:280px;
  object-fit:contain; object-position:center;
  border-radius:0; display:block;
  background:rgba(0,0,0,0.35);
  user-select:none; -webkit-user-drag:none;
  cursor:zoom-in;
}
.detail-hero { cursor:zoom-in; }
.img-carousel-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:50%;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(6,10,18,0.72); color:#f1f5f9;
  font-size:22px; line-height:1; padding:0;
  cursor:pointer; z-index:3;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity 0.2s, background 0.2s;
  backdrop-filter:blur(10px);
  font-family:inherit;
}
.img-carousel-wrap:hover .img-carousel-nav,
.img-carousel-wrap:focus-within .img-carousel-nav {
  opacity:1; pointer-events:auto;
}
.img-carousel-nav:hover { background:rgba(96,165,250,0.35); border-color:var(--accent); }
.img-carousel-nav:disabled { opacity:0.2 !important; cursor:default; pointer-events:none; }
.img-carousel-nav.prev { left:8px; }
.img-carousel-nav.next { right:8px; }
@media (hover:none) {
  .img-carousel-nav { opacity:0.9; pointer-events:auto; }
}
.img-carousel-dots {
  display:flex; justify-content:center; gap:6px; margin-top:10px; padding:0 12px;
}
.img-dot {
  width:7px; height:7px; border-radius:50%;
  background:rgba(255,255,255,0.25); transition:all 0.2s;
  cursor:pointer; border:none; padding:0;
}
.img-dot.active { width:20px; border-radius:4px; background:var(--accent); }
.img-carousel-hint {
  text-align:center; font-size:11px; color:var(--muted); margin-top:6px; padding:0 12px;
}
@media (min-width:900px) {
  .detail-hero, .img-slide img {
    height:min(46vh, 480px); min-height:320px;
  }
  .img-carousel-hint::after { content:' · 滚轮 / 方向键 / 点击放大'; }
}

.img-lightbox {
  position:fixed; inset:0; z-index:80;
  background:rgba(4,8,16,0.94);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity 0.25s;
  backdrop-filter:blur(8px);
}
.img-lightbox.open { opacity:1; pointer-events:auto; }
.img-lightbox .lb-img-wrap {
  display:flex; align-items:center; justify-content:center;
  max-width:94vw; max-height:90vh; overflow:auto;
}
.img-lightbox img {
  max-width:min(94vw, 1400px); max-height:90vh;
  object-fit:contain; border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  user-select:none; transform-origin:center center;
  transition:transform 0.12s ease-out;
}
.lb-zoom-hint {
  position:absolute; bottom:52px; left:50%; transform:translateX(-50%);
  font-size:11px; color:rgba(255,255,255,0.45);
}
.lb-close {
  position:absolute; top:16px; right:16px;
  width:44px; height:44px; border-radius:50%;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(0,0,0,0.5); color:#fff; font-size:20px;
  cursor:pointer; z-index:2; font-family:inherit;
}
.lb-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(0,0,0,0.45); color:#fff; font-size:28px;
  cursor:pointer; z-index:2; font-family:inherit;
  display:flex; align-items:center; justify-content:center;
}
.lb-nav:hover { background:rgba(96,165,250,0.35); }
.lb-nav:disabled { opacity:0.25; cursor:default; }
.lb-nav.prev { left:20px; }
.lb-nav.next { right:20px; }
.lb-counter {
  position:absolute; bottom:20px; left:50%; transform:translateX(-50%);
  font-size:13px; color:rgba(255,255,255,0.65);
  padding:6px 14px; border-radius:20px;
  background:rgba(0,0,0,0.4);
}
.detail-hero-placeholder {
  position:relative; overflow:hidden;
  width:100%; height:min(36vh, 280px); min-height:200px;
  border-radius:16px 0 0 0;
  display:flex; align-items:center; justify-content:center;
  font-size:64px;
}
.detail-hero-placeholder::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 55%),
             radial-gradient(circle at 80% 70%, rgba(96,165,250,0.12), transparent 50%);
  pointer-events:none;
}
.detail-hero-icon span {
  filter:drop-shadow(0 10px 28px rgba(0,0,0,0.45));
  position:relative; z-index:1;
}
.card-title-row {
  display:flex; align-items:flex-start; gap:14px; margin-bottom:12px;
  padding-bottom:14px; border-bottom:1px solid rgba(255,255,255,0.06);
}
.card-icon {
  font-size:38px; line-height:1; flex-shrink:0;
  width:52px; height:52px; display:flex; align-items:center; justify-content:center;
  border-radius:14px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  filter:drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}
.card-title-text { flex:1; min-width:0; }
.card-title-text h2 { margin-bottom:4px; }
.desc-hook {
  font-size:15px; line-height:1.72; color:#cbd5e1; margin-bottom:12px;
  padding:12px 14px; border-radius:12px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.05);
}
.desc-hook.desc-empty {
  color:var(--muted); font-style:italic; font-size:14px;
  border-style:dashed; border-color:rgba(148,163,184,0.14);
}
.desc-fold { margin-bottom:12px; font-size:14px; color:var(--muted); }
.desc-fold summary { cursor:pointer; color:var(--accent); margin-bottom:8px; font-size:14px; }
.desc-fold .desc-full {
  font-size:16px; line-height:1.75; color:#e2e8f0; max-height:280px;
  overflow-y:auto; white-space:pre-wrap; word-break:break-word;
}
.collapse-toggle {
  display:inline-flex; align-items:center; gap:6px;
  margin:0 0 12px; padding:8px 12px; border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04); color:var(--accent);
  font-size:13px; cursor:pointer; font-family:inherit;
}
.collapse-toggle:hover { background:rgba(96,165,250,0.12); }
.detail-close {
  position:absolute; top:10px; right:10px;
  width:32px; height:32px; border-radius:8px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.3);
  color:var(--muted); font-size:15px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:2;
  transition:color 0.2s, background 0.2s;
}
.detail-close:hover { color:var(--ink); background:rgba(255,255,255,0.08); }

.detail-body {
  padding:0 20px 12px;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.detail-body h2 {
  font-size:clamp(22px, 4vw, 26px); font-weight:700; margin-bottom:6px;
  letter-spacing:-0.03em; line-height:1.2;
}

/* ── 一屏一概念：焦点区 ── */
.card-focus {
  padding:18px 0 14px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin-bottom:4px;
}
.card-focus-icon {
  font-size:44px; line-height:1; margin-bottom:12px;
  width:56px; height:56px; display:flex; align-items:center; justify-content:center;
  border-radius:16px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  filter:drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}
.card-focus-title {
  font-size:clamp(24px, 5vw, 28px); font-weight:700;
  letter-spacing:-0.035em; line-height:1.15; margin:0 0 10px;
}
.card-hook {
  font-size:16px; line-height:1.65; color:#cbd5e1; margin:0;
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden;
}
.card-hook.card-hook-empty {
  color:var(--muted); font-style:italic; font-size:15px;
}
.card-meta-row {
  display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;
}
.card-edge-chip, .card-time-chip {
  display:inline-flex; align-items:center; gap:5px;
  font-size:11px; font-weight:600; letter-spacing:0.03em;
  padding:5px 10px; border-radius:8px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--muted);
}
.card-time-chip {
  color:var(--accent);
  background:rgba(147,197,253,0.08);
  border-color:rgba(147,197,253,0.2);
  cursor:pointer;
}
.card-time-chip:hover { background:rgba(147,197,253,0.14); }
.card-sub-tag { color:rgba(148,163,184,0.85); }

/* ── 折叠区：配图 / 子节点 / 链接 ── */
.card-more {
  margin:8px 0 0; font-size:13px;
}
.card-more > summary {
  cursor:pointer; list-style:none; padding:10px 0;
  font-size:12px; font-weight:600; color:var(--muted);
  letter-spacing:0.02em;
  display:flex; align-items:center; gap:6px;
}
.card-more > summary::-webkit-details-marker { display:none; }
.card-more > summary::before {
  content:'▸'; font-size:10px; transition:transform 0.2s;
}
.card-more[open] > summary::before { transform:rotate(90deg); }
.card-more[open] > summary { color:var(--accent); }
.card-more-inner { padding:0 0 12px; }
.card-more-inner .card-section:first-child { margin-top:8px; }

.node-video-block.compact { margin:0 0 12px; }
.node-video-block.compact .node-video-badge { font-size:11px; padding:4px 8px; }
.detail-body .node-video-block.compact .node-video,
.detail-body .node-video-block.compact .node-video-embed {
  max-height:140px;
}
.card-video-zone {
  flex-shrink:0; background:#000;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.card-video-zone[hidden] { display:none !important; }
.card-video-zone .node-video-block.compact { margin:0; border-radius:0; border:none; }
.card-video-zone .graph-video,
.card-video-zone .graph-video-embed {
  width:100%; display:block; background:#000;
  max-height:min(42vh, 320px);
}
html.is-mobile .detail-card.has-video-node .card-video-zone .graph-video,
html.is-mobile .detail-card.has-video-node .card-video-zone .graph-video-embed {
  max-height:min(36dvh, 280px);
  min-height:168px;
}
/* 有视频+历史对话 → 双 Tab 布局 */
.card-mobile-tabs {
  display:none; flex-shrink:0; gap:6px; padding:6px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
html.is-mobile .detail-card.has-mobile-tabs .card-mobile-tabs { display:flex; }
html.is-mobile .detail-card.has-mobile-tabs {
  max-height:min(84dvh, 760px);
}
.card-tab {
  flex:1; padding:9px 10px; border-radius:10px; border:1px solid transparent;
  background:transparent; color:#8a8f98; font-size:13px; font-weight:600;
  cursor:pointer; font-family:inherit; display:flex; align-items:center;
  justify-content:center; gap:6px; transition:background 0.15s, color 0.15s, border-color 0.15s;
}
.card-tab.active {
  color:#eef2ff; background:rgba(147,197,253,0.1);
  border-color:rgba(147,197,253,0.22);
}
.card-tab-badge {
  font-size:11px; font-weight:700; padding:1px 7px; border-radius:999px;
  background:rgba(147,197,253,0.18); color:#c7d2fe;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .card-video-zone .graph-video,
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .card-video-zone .graph-video-embed {
  max-height:min(30dvh, 240px); min-height:140px;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .detail-body {
  flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .qa-chat-pane,
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .qa-history-fold {
  display:none !important;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .card-video-zone,
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .detail-body {
  display:none !important;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-section {
  flex:1 1 auto; min-height:0; max-height:none !important;
  display:flex; flex-direction:column; overflow:hidden;
  padding-top:8px; padding-bottom:0;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-mobile-body {
  flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;
  display:flex; flex-direction:column;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-chat-pane {
  flex:0 1 auto; min-height:0; display:flex; flex-direction:column; overflow:visible;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-chat-label {
  flex-shrink:0; font-size:12px; font-weight:600; color:#8a8f98;
  padding:0 4px 8px;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-chat {
  flex:0 1 auto; min-height:0; max-height:none !important;
  overflow:visible; margin-bottom:8px;
}
html.is-mobile .detail-card.has-mobile-tabs .qa-input-row {
  flex-shrink:0; margin-top:auto;
  position:sticky; bottom:0; z-index:5;
  background:rgba(6,10,18,0.98);
  border-top:1px solid rgba(255,255,255,0.06);
  padding-top:10px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  margin-left:-12px; margin-right:-12px; padding-left:12px; padding-right:12px;
}
html.is-mobile .detail-card.has-mobile-tabs.card-tab-content .qa-section {
  flex-shrink:0; max-height:none !important;
}
.qa-chat-pane { display:none; }
html.is-mobile .detail-card.has-mobile-tabs .qa-chat-pane { display:none; }
html.is-mobile .detail-card.has-mobile-tabs.card-tab-chat .qa-chat-pane { display:flex; }
.card-fold-hero .detail-hero-placeholder {
  height:min(28vh, 200px); min-height:120px; border-radius:12px;
}
.card-hero-top {
  flex-shrink:0;
  padding:0 0 4px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin-bottom:4px;
}
.card-hero-top .img-carousel-wrap { margin:0; }
.card-hero-top .img-slide img,
.card-hero-top .detail-hero {
  border-radius:0;
  height:min(42vh, 360px);
  min-height:220px;
}
.card-fold-hero .img-slide img {
  height:min(28vh, 200px); min-height:120px; border-radius:12px;
}
.card-breadcrumb.compact {
  font-size:11px; margin-bottom:10px; padding-bottom:0; border:none;
}
.detail-body .time-chip {
  display:inline-block; font-size:12px; padding:4px 10px; border-radius:6px;
  background:rgba(96,165,250,0.12); color:var(--accent); margin-bottom:12px;
}
.detail-body .video-open-link {
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; padding:14px; margin-bottom:12px; border-radius:12px;
  background:rgba(96,165,250,0.1); border:1px solid rgba(96,165,250,0.35);
  color:var(--accent); text-decoration:none; font-size:14px; font-weight:600;
}
.detail-body .video-open-link:hover { background:rgba(96,165,250,0.18); }
.detail-body .source-fold {
  margin-top:12px; font-size:13px; color:var(--muted);
}
.detail-body .source-fold summary {
  cursor:pointer; color:var(--accent); margin-bottom:8px;
}
.detail-body .source-fold .seg-list {
  max-height:160px; overflow-y:auto; font-size:12px; line-height:1.5; color:#94a3b8;
}
.detail-body .source-fold .seg-item { padding:4px 0; border-bottom:1px solid rgba(255,255,255,0.04); cursor:pointer; }
.detail-body .source-fold .seg-item:hover { color:var(--ink); }
.detail-body .time-chip.clickable { cursor:pointer; }
.detail-body .time-chip.clickable:hover { background:rgba(96,165,250,0.22); }
.detail-header-bar {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid rgba(255,255,255,0.05);
  background:transparent;
}
.detail-header-left {
  display:flex; align-items:center; gap:10px;
  min-width:0; flex:1;
}
.detail-header-icon {
  font-size:20px; flex-shrink:0;
}
.detail-header-bar .detail-header-title {
  font-size:15px; font-weight:600; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  letter-spacing:-0.02em;
}
.node-video-block {
  position:relative; margin:0 0 16px;
  border-radius:12px; overflow:hidden; background:#000;
  border:1px solid rgba(255,255,255,0.08);
}
.detail-body .node-video {
  width:100%; max-height:min(42vh, 320px); display:block; background:#000;
}
.detail-body .node-video-embed {
  width:100%; aspect-ratio:16/9; border:none; display:block; background:#000;
}
.node-video-badge {
  position:absolute; top:10px; left:10px; z-index:2;
  background:rgba(0,0,0,0.78); color:#fff;
  padding:6px 12px; border-radius:8px; font-size:13px; font-weight:600;
  border:1px solid rgba(255,255,255,0.12);
  pointer-events:none;
}
.node-frame-preview { margin-top:4px; }
.node-frame-img {
  width:100%; max-height:180px; object-fit:contain;
  border-radius:10px; background:rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.08);
  cursor:zoom-in;
}
.detail-body .find-img-btn {
  margin-top:10px; padding:7px 14px; border-radius:8px; font-size:12px;
  border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.04);
  color:var(--muted); cursor:pointer;
}
.detail-body .find-img-btn:hover { border-color:rgba(96,165,250,0.4); color:var(--accent); }
.detail-body .stat-row { display:flex; gap:12px; margin:16px 0; flex-wrap:wrap; }
.detail-body .stat {
  background:rgba(255,255,255,0.04); border-radius:10px;
  padding:12px 16px; text-align:center; flex:1; min-width:80px;
  border:1px solid var(--border-subtle);
}
.detail-body .stat-val { font-size:20px; font-weight:700; }
.detail-body .stat-label { font-size:11px; color:var(--muted); margin-top:3px; }
.card-breadcrumb {
  font-size:12px; color:var(--muted); margin-bottom:10px;
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
}
.card-breadcrumb button {
  background:none; border:none; color:var(--accent); cursor:pointer;
  font-size:12px; padding:0; font-family:inherit;
}
.card-breadcrumb button:hover { text-decoration:underline; }
.card-section { margin-top:20px; }
.card-section-title {
  font-size:10px; font-weight:700; letter-spacing:0.1em;
  text-transform:uppercase; color:rgba(147,197,253,0.75);
  margin-bottom:10px; padding-bottom:0;
  display:flex; align-items:center; gap:8px;
}
.card-section-title::after {
  content:''; flex:1; height:1px;
  background:linear-gradient(90deg, rgba(148,163,184,0.15), transparent);
}
.child-nodes-grid {
  display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px;
}
.child-node-chip {
  display:flex; align-items:center; gap:10px;
  padding:11px 12px; border-radius:12px; text-align:left;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.07);
  color:var(--ink); font-size:13px; cursor:pointer;
  transition:background 0.22s, border-color 0.22s, transform 0.22s var(--ease-out);
  font-family:inherit; width:100%;
}
.child-node-chip:hover {
  background:rgba(147,197,253,0.1);
  border-color:rgba(147,197,253,0.32);
  transform:translateY(-1px);
}
.child-node-chip .cnc-icon { font-size:18px; flex-shrink:0; }
.child-node-chip .cnc-text { flex:1; min-width:0; }
.child-node-chip .cnc-title {
  display:block; font-weight:600; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
.child-node-chip .cnc-sub { display:block; font-size:11px; color:var(--muted); margin-top:2px; }
.links-stack { display:flex; flex-direction:column; gap:6px; }
.detail-body .link-btn {
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border-radius:10px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--ink); text-decoration:none; font-size:13px;
  transition:all 0.2s; width:100%;
}
.detail-body .link-btn:hover { background:rgba(96,165,250,0.12); border-color:rgba(96,165,250,0.35); }
.img-thumb-strip {
  display:flex; gap:6px; overflow-x:auto; padding:2px 0 8px;
  scrollbar-width:thin;
}
.img-thumb-strip img {
  width:72px; height:54px; object-fit:cover; border-radius:8px;
  border:1px solid rgba(255,255,255,0.1); cursor:zoom-in; flex-shrink:0;
  background:rgba(0,0,0,0.25);
}
.img-thumb-strip img.active { border-color:var(--accent); box-shadow:0 0 0 1px rgba(96,165,250,0.4); }

/* ═══════════════════════════════════════════════
   Q&A SECTION
   ═══════════════════════════════════════════════ */
.qa-section {
  position:relative; bottom:auto; z-index:3;
  border-top:1px solid rgba(255,255,255,0.06);
  padding:12px 16px 14px;
  flex-shrink:0;
  background:rgba(6,10,18,0.98);
}
.qa-prompt-label {
  font-size:11px; font-weight:700; letter-spacing:0.08em;
  text-transform:uppercase; color:rgba(147,197,253,0.75);
  margin-bottom:10px;
}
.qa-curio-trace {
  max-height:min(220px, 32vh); overflow-y:auto;
  margin-bottom:8px; flex-shrink:0;
}
.qa-curio-trace.empty { display:none; }
.qa-msg-trace {
  margin-bottom:8px; font-size:12px;
  opacity:0.92;
}
.qa-msg-trace .curio-trace { max-height:none; }
.qa-status {
  font-size:12px; color:var(--green); min-height:0; margin-bottom:6px;
  opacity:0; transition:opacity 0.25s;
}
.qa-status.visible { opacity:1; }
.qa-status.err { color:#fca5a5; }
.qa-status.curio-live-wrap { color:var(--muted); min-height:20px; }

.curio-live {
  display:inline-flex; align-items:center; gap:7px;
  font-size:12px; font-weight:600; letter-spacing:0.03em;
}
.curio-live-shimmer {
  background:linear-gradient(90deg, #64748b 0%, #93c5fd 42%, #f1f5f9 50%, #93c5fd 58%, #64748b 100%);
  background-size:220% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  animation:curioShimmer 2s ease-in-out infinite;
}
@keyframes curioShimmer {
  0% { background-position:120% 0; }
  100% { background-position:-120% 0; }
}
.curio-live-dots {
  display:inline-flex; align-items:center; gap:3px; height:14px;
}
.curio-live-dots i {
  display:block; width:4px; height:4px; border-radius:50%;
  background:var(--accent);
  animation:curioDot 1.15s ease-in-out infinite;
}
.curio-live-dots i:nth-child(2) { animation-delay:0.14s; }
.curio-live-dots i:nth-child(3) { animation-delay:0.28s; }
@keyframes curioDot {
  0%, 55%, 100% { transform:translateY(0); opacity:0.28; }
  28% { transform:translateY(-5px); opacity:1; }
}
.curio-trace .ht-step { margin-bottom:8px; }
.curio-trace .ht-step .curio-live { font-size:13px; }
.qa-label {
  font-size:13px; color:var(--muted); margin-bottom:10px;
}
.qa-input-row {
  display:flex; gap:6px; margin-bottom:0; align-items:flex-end;
}
.qa-input {
  flex:1;
  padding:12px 14px;
  min-height:72px;
  max-height:160px;
  resize:vertical;
  line-height:1.55;
  border-radius:12px;
  border:1px solid rgba(148,163,184,0.16);
  background:rgba(0,0,0,0.28);
  color:var(--ink); font-size:14px;
  outline:none;
  transition:border-color 0.2s, box-shadow 0.2s;
  font-family:inherit;
}
textarea.qa-input { field-sizing: content; }
.qa-input:focus {
  border-color:rgba(147,197,253,0.45);
  box-shadow:0 0 0 3px rgba(147,197,253,0.08);
}
.qa-input::placeholder { color:rgba(255,255,255,0.2); }

.qa-send {
  padding:10px 16px;
  border-radius:10px;
  border:none;
  background:var(--accent);
  color:#070b12;
  font-size:13px; font-weight:700;
  cursor:pointer;
  transition:opacity 0.2s, transform 0.15s;
  white-space:nowrap;
  font-family:inherit;
}
.qa-send:hover { opacity:0.9; transform:translateY(-1px); }
.qa-send:active { transform:scale(0.97); }
.qa-send:disabled { opacity:0.4; cursor:not-allowed; }

.qa-suggestions {
  display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;
}
.qa-suggest {
  font-size:12px; padding:5px 10px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.03);
  color:var(--muted);
  cursor:pointer;
  transition:all 0.2s;
  font-family:inherit;
}
.qa-suggest:hover { border-color:rgba(255,255,255,0.25); color:#cbd5e1; }

/* Answer */
.qa-answer {
  margin-top:12px;
  padding:14px 16px;
  border-radius:12px;
  background:rgba(96,165,250,0.06);
  border:1px solid rgba(96,165,250,0.12);
  font-size:14px; line-height:1.7; color:#cbd5e1;
  animation: fadeInUp 0.35s ease;
}
.qa-answer b { color:var(--ink); }

/* Entity preview chips */
.entity-previews {
  margin-top:12px;
  display:flex; flex-wrap:wrap; gap:8px;
}
.entity-chip {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 13px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.15);
  background:rgba(255,255,255,0.04);
  font-size:13px;
  color:var(--ink);
  cursor:pointer;
  transition:all 0.2s;
}
.entity-chip:hover {
  background:rgba(96,165,250,0.2);
  border-color:rgba(96,165,250,0.5);
  animation:none;
  transform:scale(1.03);
}
.entity-chip .chip-dot {
  width:6px; height:6px; border-radius:50%;
  background:var(--accent);
}
.entity-chip .chip-hint {
  font-size:11px; color:var(--muted);
}

@keyframes chipPulse {
  0%,100% { box-shadow:0 0 0 0 rgba(96,165,250,0); }
  50%     { box-shadow:0 0 0 4px rgba(96,165,250,0.15); }
}
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ═══════════════════════════════════════════════
   HINT BAR
   ═══════════════════════════════════════════════ */
.hint-bar {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
  font-size:12px; color:var(--muted); z-index:40;
  pointer-events:none; transition:opacity 0.5s;
  display:flex; gap:4px; align-items:center;
}
.hint-bar kbd {
  display:inline-block;
  background:rgba(255,255,255,0.06);
  padding:3px 8px; border-radius:5px;
  border:1px solid rgba(255,255,255,0.08);
  font-family:inherit; font-size:11px;
}

/* ═══════════════════════════════════════════════
   RESET BUTTON
   ═══════════════════════════════════════════════ */
.reset-btn {
  position:fixed; top:16px; right:16px;
  width:36px; height:36px; border-radius:8px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(0,0,0,0.4);
  color:var(--muted); font-size:16px;
  cursor:pointer; z-index:30;
  display:flex; align-items:center; justify-content:center;
  transition:all 0.2s;
  backdrop-filter:blur(8px);
}
.reset-btn:hover { color:var(--ink); border-color:rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════
   SETTINGS BUTTON & PANEL
   ═══════════════════════════════════════════════ */
.settings-btn {
  display:none;
}
.reset-btn {
  display:none;
}

.settings-panel {
  position:fixed; top:60px; right:16px;
  width:360px; max-width:90vw;
  background:var(--glass);
  backdrop-filter:blur(28px) saturate(1.2);
  -webkit-backdrop-filter:blur(28px) saturate(1.2);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  padding:20px;
  z-index:55;
  opacity:0; pointer-events:none;
  transform:translateY(-8px);
  transition:all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.settings-panel.open { opacity:1; pointer-events:auto; transform:translateY(0); }
.settings-panel h3 { font-size:16px; margin-bottom:16px; color:var(--ink); display:flex; align-items:center; gap:8px; }
.settings-field { margin-bottom:14px; }
.settings-field label {
  display:block; font-size:12px; color:var(--muted); margin-bottom:5px;
}
.settings-field input {
  width:100%; padding:9px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:var(--ink); font-size:13px;
  outline:none; font-family:inherit;
  transition:border-color 0.2s;
}
.settings-field input:focus { border-color:rgba(96,165,250,0.5); }
.settings-field input::placeholder { color:rgba(255,255,255,0.15); }
.settings-field .hint { font-size:11px; color:var(--muted); margin-top:4px; }
.settings-actions { display:flex; gap:8px; margin-top:18px; }
.settings-save, .settings-close-panel {
  flex:1; padding:9px; border-radius:8px; border:none;
  font-size:13px; font-weight:600; cursor:pointer;
  transition:all 0.2s; font-family:inherit;
}
.settings-save {
  background:rgba(96,165,250,0.2); color:var(--accent);
  border:1px solid rgba(96,165,250,0.3);
}
.settings-save:hover { background:rgba(96,165,250,0.3); }
.settings-close-panel {
  background:rgba(255,255,255,0.05); color:var(--muted);
  border:1px solid rgba(255,255,255,0.08);
}
.settings-close-panel:hover { background:rgba(255,255,255,0.1); color:var(--ink); }

/* ═══════════════════════════════════════════════
   CHAT HISTORY
   ═══════════════════════════════════════════════ */
.qa-chat {
  max-height:220px; overflow-y:auto;
  display:flex; flex-direction:column; gap:8px;
  margin-bottom:10px;
  padding-right:4px;
}
.qa-msg .qa-q { color:#e2e8f0; line-height:1.55; }
.qa-msg .qa-summary p { margin:0 0 8px; line-height:1.6; }
.qa-msg .qa-summary p:last-child { margin-bottom:0; }
.qa-chat.empty { display:none; }
.qa-history-fold {
  margin-bottom:10px; font-size:12px; color:var(--muted);
}
.qa-history-fold summary {
  cursor:pointer; padding:6px 0; list-style:none;
}
.qa-history-fold summary::-webkit-details-marker { display:none; }
.qa-msg.qa-compact {
  padding:8px 12px; font-size:13px; line-height:1.5;
}
.qa-msg .qa-summary { color:#cbd5e1; }
.qa-trace-fold {
  margin-top:8px; font-size:11px; color:var(--muted);
}
.qa-trace-fold summary { cursor:pointer; color:var(--accent); }
.qa-chat::-webkit-scrollbar { width:4px; }
.qa-chat::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:10px; }

.qa-msg {
  padding:10px 14px; border-radius:12px;
  font-size:14px; line-height:1.7;
  animation: fadeInUp 0.3s ease;
}
.qa-msg.user {
  align-self:flex-end;
  background:rgba(96,165,250,0.12);
  border:1px solid rgba(96,165,250,0.2);
  color:var(--ink);
  max-width:88%;
  border-bottom-right-radius:4px;
}
.qa-msg.assistant {
  align-self:flex-start;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.08);
  color:#cbd5e1;
  max-width:92%;
  border-bottom-left-radius:4px;
}
.qa-msg.assistant p { margin:0 0 6px; }
.qa-msg.assistant p:last-child { margin-bottom:0; }
.qa-msg.assistant a { color:var(--accent); text-decoration:underline; }
.qa-msg.assistant a:hover { color:#93c5fd; }
.qa-msg.assistant code {
  background:rgba(255,255,255,0.06); padding:2px 6px; border-radius:4px;
  font-size:13px; font-family:'SF Mono','Fira Code',monospace;
}
.qa-msg.assistant strong { color:var(--ink); }
.qa-msg.assistant em { color:#e2e8f0; }
.qa-msg.assistant ul, .qa-msg.assistant ol { margin:4px 0; padding-left:20px; }
.qa-msg.assistant li { margin-bottom:3px; }

.qa-msg .msg-entities {
  margin-top:8px; padding-top:8px;
  border-top:1px solid rgba(255,255,255,0.06);
}

/* ═══════════════════════════════════════════════
   LOADING DOTS
   ═══════════════════════════════════════════════ */
.qa-loading {
  display:flex; align-items:center; gap:4px;
  padding:10px 14px;
}
.qa-loading .dot {
  width:7px; height:7px; border-radius:50%;
  background:var(--accent);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.qa-loading .dot:nth-child(2) { animation-delay:0.2s; }
.qa-loading .dot:nth-child(3) { animation-delay:0.4s; }
@keyframes dotBounce {
  0%,80%,100% { transform:translateY(0); opacity:0.3; }
  40% { transform:translateY(-7px); opacity:1; }
}

/* Error message */
.qa-error {
  padding:10px 14px; border-radius:10px;
  background:rgba(248,113,113,0.08);
  border:1px solid rgba(248,113,113,0.2);
  color:#fca5a5; font-size:13px; line-height:1.6;
  animation: fadeInUp 0.3s ease;
}

/* ═══════════════════════════════════════════════
   TOP BAR + LANDING
   ═══════════════════════════════════════════════ */
.top-bar {
  position:fixed; top:0; left:0; right:0; height:var(--topbar-h);
  display:flex; align-items:center; gap:10px; padding:0 16px;
  background:rgba(5, 8, 16, 0.88);
  border-bottom:1px solid rgba(255,255,255,0.04);
  z-index:60;
  backdrop-filter:blur(24px) saturate(1.2);
  -webkit-backdrop-filter:blur(24px) saturate(1.2);
}
.tb-brand {
  display:flex; align-items:center; gap:10px; flex-shrink:0;
  border:none; background:transparent; padding:6px 8px; margin:0 -8px;
  border-radius:10px; cursor:pointer; font-family:inherit;
  transition: background 0.2s;
}
.tb-brand:hover { background:rgba(255,255,255,0.05); }
.tb-brand:focus-visible { outline:2px solid rgba(147,197,253,0.45); outline-offset:2px; }
.tb-mark {
  width:22px; height:22px; border-radius:0; flex-shrink:0;
  object-fit:contain; display:block;
}
.tb-name {
  font-size:15px; font-weight:700; letter-spacing:-0.02em;
  color:var(--ink);
}
.tb-sub {
  font-size:11px; font-weight:500; color:var(--muted);
  padding-left:2px; letter-spacing:0.04em;
}
.graph-title-btn {
  flex:1; min-width:0; text-align:left;
  background:none; border:none; padding:0 8px;
  font-size:13px; font-weight:500; color:var(--muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  cursor:default; font-family:inherit;
  transition: color 0.2s;
}
.graph-title-btn.has-session { color:rgba(238,242,255,0.88); cursor:pointer; }
.graph-title-btn.has-session:hover { color:var(--accent); }
.tb-nav {
  display:flex; align-items:center; gap:10px; flex-shrink:0;
}
.tb-group {
  display:flex; align-items:center; gap:4px;
}
.tb-group + .tb-group {
  padding-left:10px;
  border-left:1px solid rgba(255,255,255,0.08);
}
.layout-picker {
  position:relative;
}
.layout-picker-trigger {
  min-width:52px;
}
.layout-picker-trigger::after {
  content:'▾';
  margin-left:4px;
  font-size:9px;
  opacity:0.55;
}
.layout-picker-menu {
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  min-width:148px;
  padding:4px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(8,12,22,0.96);
  box-shadow:0 12px 40px rgba(0,0,0,0.45);
  backdrop-filter:blur(16px);
  z-index:80;
}
.layout-picker-menu[hidden] { display:none; }
.layout-picker-menu button {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  width:100%; text-align:left;
  padding:8px 10px !important;
  border-radius:7px !important;
  border:none !important;
}
.layout-picker-menu .layout-opt {
  display:flex; flex-direction:column; gap:2px; min-width:0;
}
.layout-picker-menu .layout-name { font-size:13px; font-weight:600; }
.layout-picker-menu .layout-desc {
  font-size:11px; font-weight:400; color:rgba(148,163,184,0.92); line-height:1.35;
}
.layout-picker-menu button:hover {
  background:rgba(255,255,255,0.06) !important;
  color:rgba(238,242,255,0.92) !important;
}
.layout-picker-menu button.active {
  background:rgba(94,106,210,0.22) !important;
  color:#c7d2fe !important;
}
.layout-picker-menu button .layout-check {
  font-size:11px; opacity:0.9;
}
.layout-picker-menu button:not(.active) .layout-check { visibility:hidden; }
.tb-nav button {
  padding:6px 11px; border-radius:8px;
  border:1px solid transparent;
  background:transparent;
  color:rgba(238,242,255,0.55);
  font-size:12px; font-weight:500;
  cursor:pointer; font-family:inherit;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
body.flowith-ui .tb-nav button .tb-txt { display:none; }
body.flowith-ui .tb-nav button {
  min-width:34px; padding:6px 8px; font-size:15px; line-height:1;
}
body.flowith-ui .layout-picker-trigger .tb-txt { display:inline; font-size:12px; }
body.flowith-ui .layout-picker-trigger::after { display:inline; }

/* ═══════════════════════════════════════════════
   MOBILE — landing + canvas + panels
   ═══════════════════════════════════════════════ */
@media (max-width:768px), ((max-width:1280px) and (pointer:coarse)) {
  :root {
    --card-dock-w: 100vw;
    --timeline-w: 100vw;
    --history-w: 100vw;
    --topbar-h: 48px;
  }
  html, body {
    width:100%; height:100%;
    height:100dvh;
    overflow:hidden;
    overscroll-behavior:none;
  }

  /* ── Topbar ── */
  .tb-nav button .tb-txt { display:none; }
  .tb-nav button { min-width:36px; padding:8px; font-size:16px; line-height:1; }
  .tb-brand { gap:6px; min-width:0; flex:1; }
  .tb-name { font-size:13px; }
  .tb-sub { display:none; }
  .graph-title-btn {
    font-size:12px; padding:0 4px; max-width:42vw;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .tb-group + .tb-group { padding-left:4px; margin-left:4px; }
  .tb-nav { gap:2px; flex-shrink:0; }
  .tb-stats { display:none; }

  /* ── Canvas detail card = 手机底栏抽屉，画布仍可见 ── */
  .detail-mask.open {
    background:rgba(0,0,0,0.38);
    pointer-events:auto;
  }
  .detail-card {
    top:auto; left:0; right:0; bottom:0;
    width:100vw; max-width:100vw;
    height:auto;
    max-height:min(72dvh, 640px);
    border-left:none;
    border-top:1px solid rgba(148,163,184,0.14);
    border-radius:18px 18px 0 0;
    transform:translateY(105%);
    box-shadow:0 -16px 48px rgba(0,0,0,0.45);
    padding-bottom:env(safe-area-inset-bottom, 0px);
  }
  .detail-card.open { transform:translateY(0); }
  .detail-card::after {
    content:''; display:block; flex-shrink:0;
    width:36px; height:4px; border-radius:99px;
    background:rgba(255,255,255,0.18);
    margin:8px auto 0;
    position:absolute; top:6px; left:50%; transform:translateX(-50%);
  }
  .detail-header { padding-top:14px; }
  .detail-close {
    top:max(10px, env(safe-area-inset-top, 0px));
    right:12px;
    width:48px; height:48px;
    font-size:22px;
    background:rgba(0,0,0,0.55);
    border-color:rgba(255,255,255,0.15);
  }
  .detail-hero, .img-slide img {
    height:min(32vh, 220px); min-height:140px;
    border-radius:0;
  }
  .detail-body { padding:14px 16px 8px; font-size:16px; line-height:1.7; }
  .card-hook { font-size:16px; }
  .detail-header-bar .detail-header-title { font-size:17px; }
  .card-section-title { font-size:14px; }
  .detail-body .link-btn { font-size:15px; padding:12px 14px; }
  .card-edge-chip, .card-time-chip { font-size:13px; }
  .card-nav-hint {
    display:flex; justify-content:center; gap:16px;
    padding:4px 0 2px; font-size:11px; color:var(--muted);
  }
  .qa-section {
    padding:8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top:1px solid var(--border-subtle);
  }
  .qa-input { font-size:16px !important; min-height:48px; }
  body.card-open .canvas-toast { display:none; }

  /* ── Side panels ── */
  .sidebar { width:86vw; max-width:320px; }
  .timeline-panel, .history-panel {
    width:100vw; border-left:none;
    padding-bottom:env(safe-area-inset-bottom, 0px);
  }
  body.card-open .timeline-panel.open,
  body.card-open .history-panel.open { right:0; }

  /* ── Landing ── */
  .landing-page {
    padding:64px 16px 48px;
    width:100%; max-width:100%;
  }
  .lp-nav { top:12px; left:16px; right:16px; }
  .lp-logo-tag { display:none; }
  .lp-account-label { display:none; }
  .lp-account-trigger { padding:6px 8px; }
  .lp-hero { margin-top:8px; display:flex; flex-direction:column; }
  .lp-hero-slogan-slot { min-height:9.5em; margin-bottom:4px; }
  .lp-hero h1 {
    font-size:clamp(28px, 8.5vw, 36px); line-height:1.15; padding:0 2px;
    min-height:2.3em;
  }
  .lp-hero-sub {
    font-size:15px; line-height:1.7; padding:0 2px;
    max-width:100%; overflow-wrap:anywhere; word-break:break-word;
    min-height:3.2em; margin-bottom:16px;
  }
  .lp-hero-cta { display:none !important; }
  .lp-hero-secondary {
    margin-top:24px; padding-top:20px; gap:20px;
  }
  .lp-inspire { text-align:left; }
  .landing-chips { justify-content:flex-start; max-width:none; }
  .landing-chips button {
    font-size:12px; padding:8px 12px; max-width:100%;
    white-space:normal; text-align:center; line-height:1.35;
  }
  .landing-examples-label { font-size:11px; margin:0 0 10px; text-align:left; }
  .lp-hero-demo-link { margin-top:10px; text-align:left; }
  .lp-platforms-row { text-align:left; }
  .lp-platforms-marquee { overflow-x:auto; mask-image:none; -webkit-mask-image:none; }
  .lp-platforms-track { animation:none; flex-wrap:wrap; justify-content:flex-start; width:100%; gap:10px; }
  .lp-platform-chip { min-width:76px; padding:12px 14px 10px; }
  .lp-platform-chip img { width:36px; height:36px; }
  .lp-platform-chip span { display:block; font-size:11px; }
  .lp-hero-action { margin-top:0; max-width:none; width:100%; }
  .landing-omni {
    flex-wrap:wrap; padding:4px; border-radius:12px;
  }
  .landing-omni input {
    flex:1 1 100%; order:1;
    font-size:16px; padding:12px 10px;
  }
  .landing-omni-attach { order:2; width:44px; height:44px; }
  .landing-omni-go {
    order:3; flex:1; margin:2px; padding:11px 14px;
    font-size:15px; min-height:44px;
  }
  .iq-card { padding:12px 14px; border-radius:12px; }
  .iq-title { font-size:13px; word-break:break-all; }
  .lp-how { margin-top:28px; gap:12px; }
  .lp-cases { margin-top:28px; padding:0 4px; }
  .lp-cases-head h2 { font-size:18px; }
  .lp-foot { margin-top:28px; padding-top:16px; }
  .lp-foot-links { flex-wrap:wrap; justify-content:center; gap:8px; }
  .lp-foot-dot { display:none; }

  /* ── Modals ── */
  .auth-modal .auth-card {
    width:calc(100vw - 32px); max-width:400px;
    margin:16px; padding:22px 18px;
  }
  .site-modal {
    align-items:flex-end; justify-content:center; padding:0;
  }
  .site-modal .profile-card.site-card {
    width:100%; max-width:100%; margin:0;
    border-radius:18px 18px 0 0;
    max-height:min(88dvh, 720px);
    padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .profile-panel { padding:16px 16px 12px; }
  .profile-identity h3 { font-size:17px; }
  .growth-closure .gc-card {
    width:calc(100vw - 28px); max-width:420px;
    padding:22px 18px; margin:14px;
  }
  .settings-panel {
    left:8px; right:8px; width:auto; max-height:80dvh; overflow-y:auto;
  }
  .img-lightbox .lb-nav { width:48px; height:48px; }

  /* 顶栏：全景 + 功能菜单（中文列表，不左右滑） */
  .top-bar { padding:0 8px; gap:4px; height:52px; --topbar-h:52px; overflow:visible; }
  .tb-brand { min-height:44px; padding:6px; gap:6px; flex-shrink:0; }
  .tb-name { font-size:14px; }
  .graph-title-btn {
    display:block;
    flex:1; min-width:0; max-width:38vw;
    font-size:12px; padding:0 6px; min-height:44px;
  }
  .tb-nav { flex-shrink:0; gap:4px; overflow:visible; }
  .tb-nav .tb-group { display:none !important; }
  #fitGraphBtn { display:flex !important; }
  .tb-menu-btn { display:flex !important; }
  .layout-picker-trigger::after { display:none; }
  .hint-bar { display:none; }
  .minimap { display:none; }
  .settings-btn, .reset-btn { display:none; }
}

/* 手机 class：不依赖 layout viewport 宽度（解决「中间窄条 + 两侧黑边」） */
html.is-mobile {
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
html.is-mobile body {
  width:100%; max-width:100%;
  height:100%; height:100dvh;
  overflow:hidden;
  position:fixed; inset:0;
}
html.is-mobile .landing {
  width:100%; max-width:100%;
}
html.is-mobile .landing-page {
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:56px 16px 40px !important;
  box-sizing:border-box;
}
html.is-mobile .lp-nav { left:16px; right:16px; top:12px; }
html.is-mobile .lp-hero { margin-top:4px; text-align:left; }
html.is-mobile .lp-hero h1 {
  font-size:clamp(26px, 7.2vw, 38px) !important;
  line-height:1.12 !important;
  max-width:none !important;
  margin-left:0 !important; margin-right:0 !important;
}
html.is-mobile .lp-hero-sub {
  font-size:15px !important;
  line-height:1.65 !important;
  max-width:none !important;
  margin-left:0 !important; margin-right:0 !important;
}
html.is-mobile .lp-hero-cta { display:none !important; }
html.is-mobile .lp-hero-secondary {
  margin-top:20px; padding-top:18px; gap:18px;
}
html.is-mobile .lp-hero-showcase { display:none !important; }
html.is-mobile .lp-hero-action {
  max-width:none !important; width:100% !important;
  margin:0 !important;
}
html.is-mobile .landing-resume {
  flex-direction:row; align-items:center; justify-content:space-between;
  margin-top:14px; padding:12px 14px; text-align:left;
}
html.is-mobile .landing-resume-text { text-align:left; flex:1; min-width:0; }
html.is-mobile .landing-resume-btn { min-height:40px; padding:8px 14px; }
html.is-mobile .lp-inspire { text-align:left; }
html.is-mobile .landing-chips { justify-content:flex-start; max-width:none; }
html.is-mobile .lp-platforms-strip { justify-content:flex-start; }
html.is-mobile .lp-platforms-marquee { overflow-x:auto; }
html.is-mobile .lp-platforms-track { flex-wrap:wrap; width:100%; justify-content:flex-start; }
html.is-mobile .lp-platform-chip { min-width:30%; flex:1 1 calc(33% - 10px); }
html.is-mobile .lp-platform-chip span { display:block; font-size:11px; }
html.is-mobile .lp-how,
html.is-mobile .lp-cases { display:none; }
html.is-mobile .landing-omni {
  flex-wrap:wrap; padding:4px; border-radius:12px;
}
html.is-mobile .landing-omni input {
  flex:1 1 100%; order:1;
  font-size:16px !important; padding:12px 10px;
}
html.is-mobile .landing-omni-attach { order:2; width:44px; height:44px; }
html.is-mobile .landing-omni-go {
  order:3; flex:1; margin:2px;
  min-height:44px; font-size:15px;
}
html.is-mobile .landing-chips button {
  font-size:13px; padding:10px 14px; min-height:40px;
}
html.is-mobile .lp-foot { margin-top:32px; }
html.is-mobile .top-bar {
  padding:0 8px; gap:4px; height:52px; --topbar-h:52px; overflow:visible;
  backdrop-filter:none; -webkit-backdrop-filter:none;
  background:rgba(5,8,16,0.96);
}
html.is-mobile .tb-brand { min-height:44px; padding:6px; gap:6px; flex-shrink:0; }
html.is-mobile .tb-name { font-size:14px; }
html.is-mobile .tb-nav { flex-shrink:0; gap:4px; overflow:visible; }
html.is-mobile .tb-nav .tb-group { display:none !important; }
html.is-mobile .tb-nav .tb-menu-btn { display:flex !important; flex-shrink:0; margin-left:4px; }
html.is-mobile #fitGraphBtn { display:none !important; }
html.is-mobile .tb-nav button .tb-txt { display:none; }
html.is-mobile .tb-nav button {
  min-width:44px; min-height:44px; padding:8px; font-size:18px;
}
html.is-mobile .detail-card {
  backdrop-filter:none; -webkit-backdrop-filter:none;
  background:rgba(8,12,22,0.98);
}
html.is-mobile .hist-item-wrap .hist-rename,
html.is-mobile .hist-item-wrap .hist-del {
  opacity:1; pointer-events:auto;
  width:44px; min-height:44px; font-size:16px;
}
html.is-mobile body.sidebar-open::before {
  content:''; position:fixed; inset:0; top:var(--topbar-h);
  background:rgba(0,0,0,0.45); z-index:53; pointer-events:auto;
}
html.is-mobile .tb-sub, html.is-mobile .tb-stats,
html.is-mobile .hint-bar, html.is-mobile .minimap,
html.is-mobile .settings-btn, html.is-mobile .reset-btn { display:none; }
html.is-mobile .graph-title-btn {
  display:block !important;
  flex:1; min-width:0; max-width:42vw;
  font-size:12px; padding:0 4px 0 2px; min-height:44px;
}
html.is-mobile .detail-card {
  top:auto; left:0; right:0; bottom:0;
  width:100%; max-width:100%;
  height:auto;
  max-height:min(78dvh, 680px);
  border-left:none; border-top:1px solid rgba(148,163,184,0.14);
  border-radius:18px 18px 0 0;
  transform:translateY(105%);
  box-shadow:0 -16px 48px rgba(0,0,0,0.45);
}
html.is-mobile .detail-card.open { transform:translateY(0); }
html.is-mobile .detail-card.open.card-peek {
  max-height:min(40dvh, 300px);
  transition:transform 0.35s ease, max-height 0.35s ease;
}
html.is-mobile .detail-mask.open {
  background:rgba(0,0,0,0.38);
  pointer-events:auto;
}
html.is-mobile .detail-close {
  width:48px; height:48px; font-size:22px;
  top:max(10px, env(safe-area-inset-top, 0px)); right:12px;
}
html.is-mobile .canvas-toast {
  bottom:calc(20px + env(safe-area-inset-bottom, 0px));
  max-width:calc(100vw - 24px);
  padding:14px 44px 14px 16px;
  font-size:14px;
  pointer-events:auto;
}
html.is-mobile .canvas-toast .ct-dismiss {
  position:absolute; top:8px; right:8px;
  width:40px; height:40px; border:none; border-radius:8px;
  background:rgba(255,255,255,0.08); color:#eef2ff;
  font-size:22px; line-height:1; cursor:pointer;
}
html.is-mobile .timeline-panel {
  top:auto; left:0; right:0; bottom:0; width:100%;
  max-height:min(62dvh, 560px);
  border-left:none; border-top:1px solid rgba(148,163,184,0.14);
  border-radius:16px 16px 0 0;
  transform:translateY(110%);
  box-shadow:0 -12px 40px rgba(0,0,0,0.45);
  z-index:54;
}
html.is-mobile .timeline-panel.open { transform:translateY(0); }
html.is-mobile body.timeline-open::before {
  content:''; position:fixed; inset:0; top:var(--topbar-h);
  background:rgba(0,0,0,0.42); z-index:53; pointer-events:auto;
}
html.is-mobile body.timeline-open .top-bar { z-index:55; }
html.is-mobile .tl-close { width:44px; height:44px; font-size:24px; }
html.is-mobile .node .label { font-size:13px; max-width:96px; }
html.is-mobile body.card-open .canvas { pointer-events:auto; }
html.is-mobile body.card-open .top-bar { z-index:56; }
html.is-mobile #videoDockTimeline .graph-video,
html.is-mobile #videoDockTimeline .graph-video-embed {
  max-height:min(28dvh, 220px);
}

/* Touch: bigger tap targets */
@media (hover:none) and (pointer:coarse) {
  .node { min-width:56px; min-height:56px; }
  .node .label { font-size:12px; max-width:88px; }
  .tb-nav button { padding:8px 10px; min-height:40px; }
  .detail-close { width:44px; height:44px; }
  .landing-recent-item { padding:10px 8px; min-height:44px; }
  .landing-resume-btn { min-height:44px; padding:10px 14px; }
  .hist-item-wrap .hist-rename,
  .hist-item-wrap .hist-del { opacity:1; pointer-events:auto; width:44px; min-height:44px; }
}

.tb-nav button:hover {
  color:var(--ink);
  background:rgba(255,255,255,0.05);
}
.tb-nav button.primary {
  background:rgba(147, 197, 253, 0.1);
  border-color:rgba(147, 197, 253, 0.15);
  color:var(--accent);
}

.tb-menu-btn {
  display:none; align-items:center; justify-content:center;
  min-width:44px; min-height:44px; padding:0 10px;
  border-radius:8px; border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04); color:var(--ink);
  font-size:20px; font-weight:700; cursor:pointer; font-family:inherit;
}
.tb-menu-btn.active { background:rgba(147,197,253,0.12); border-color:rgba(147,197,253,0.22); color:var(--accent); }

.tb-sheet {
  position:fixed; inset:0; z-index:85;
  display:flex; align-items:flex-end; justify-content:center;
  pointer-events:none; opacity:0; visibility:hidden;
  transition:opacity 0.22s ease, visibility 0.22s;
}
.tb-sheet.open { pointer-events:auto; opacity:1; visibility:visible; }
.tb-sheet-backdrop {
  position:absolute; inset:0; background:rgba(0,0,0,0.52);
}
.tb-sheet-panel {
  position:relative; width:100%; max-width:480px;
  max-height:min(78dvh, 520px); overflow-y:auto;
  padding:8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius:16px 16px 0 0;
  background:rgba(12,16,26,0.98);
  border:1px solid rgba(255,255,255,0.1);
  border-bottom:none;
  box-shadow:0 -12px 40px rgba(0,0,0,0.45);
  transform:translateY(12px);
  transition:transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.tb-sheet.open .tb-sheet-panel { transform:translateY(0); }
.tb-sheet-head {
  padding:12px 14px 8px; font-size:13px; font-weight:600; color:var(--muted);
}
.tb-sheet-item {
  display:flex; align-items:center; gap:12px; width:100%;
  min-height:48px; padding:12px 14px; margin:2px 0;
  border:none; border-radius:10px; background:transparent;
  color:var(--ink); font-size:15px; font-weight:500;
  text-align:left; cursor:pointer; font-family:inherit;
}
.tb-sheet-item:active { background:rgba(255,255,255,0.06); }
.tb-sheet-item.active { background:rgba(147,197,253,0.1); color:var(--accent); }
.tb-sheet-item .tb-sheet-ico { width:24px; text-align:center; font-size:18px; flex-shrink:0; }
.tb-sheet-divider {
  height:1px; margin:6px 10px; background:rgba(255,255,255,0.08);
}
.tb-sheet-subhead {
  padding:8px 14px 4px; font-size:11px; font-weight:600;
  color:var(--muted); letter-spacing:0.06em;
}
.tb-nav button.primary:hover {
  background:rgba(147, 197, 253, 0.18);
}

.sidebar {
  position:fixed; top:var(--topbar-h); left:0; bottom:0; width:260px;
  background:rgba(10,14,22,0.96); border-right:1px solid var(--border-subtle);
  z-index:55; display:flex; flex-direction:column;
  transform:translateX(-100%); transition:transform 0.3s ease;
}
.sidebar.open { transform:translateX(0); }
.sidebar-head { padding:12px 14px; border-bottom:1px solid var(--border-subtle); }
.sidebar-head input {
  width:100%; padding:8px 10px; border-radius:8px;
  border:1px solid var(--border-subtle); background:rgba(255,255,255,0.04);
  color:var(--ink); font-size:13px; outline:none;
}
.sidebar-head input:focus { border-color:rgba(96,165,250,0.45); }
.sidebar-list { flex:1; overflow-y:auto; padding:8px; }
.sidebar-item {
  padding:8px 10px; border-radius:8px; cursor:pointer; font-size:13px;
  display:flex; align-items:center; gap:8px; margin-bottom:4px;
  border:1px solid transparent;
}
.sidebar-item:hover { background:rgba(255,255,255,0.04); }
.sidebar-item.active { background:rgba(96,165,250,0.1); border-color:rgba(96,165,250,0.25); }
.sidebar-item .si-icon { font-size:18px; flex-shrink:0; }
.sidebar-item .si-label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-item .si-depth { width:10px; flex-shrink:0; opacity:0.35; font-size:10px; }
.sidebar-item.depth-0 { font-weight:600; }
.sidebar-item.depth-1 .si-label { font-size:12.5px; }
.sidebar-item.depth-2 .si-label, .sidebar-item.depth-3 .si-label { font-size:12px; color:rgba(226,232,240,0.85); }

.landing {
  position:fixed; inset:0; z-index:70;
  overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  opacity:1; visibility:visible; pointer-events:auto;
  transition:opacity 0.3s ease, visibility 0.3s;
}
.landing.hidden,
.landing.is-exiting {
  opacity:0 !important; visibility:hidden !important; pointer-events:none !important;
  z-index:-1 !important;
}
body.landing-open:has(.landing:not(.hidden)) .hint-bar,
body.landing-open:has(.landing:not(.hidden)) .settings-btn,
body.landing-open:has(.landing:not(.hidden)) .reset-btn,
body.landing-open:has(.landing:not(.hidden)) .minimap { visibility:hidden; pointer-events:none; }

.landing-bg {
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:#08090a;
}
.landing-bg::before {
  content:''; position:fixed; left:50%; top:0;
  width:min(900px, 100vw); height:420px;
  transform:translate(-50%, -35%);
  background:radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0) 72%);
  pointer-events:none;
}
.landing-orb { display:none; }
@media (prefers-reduced-motion: reduce) {
  .node.focus .node-circle-outer::before { animation:none !important; }
  .node.focus .node-circle-outer { animation:none !important; }
}
.landing-grid {
  display:none;
}

.landing-page {
  position:relative; z-index:1;
  width:min(1160px, 100%); margin:0 auto;
  padding:112px 40px 120px;
  min-height:100vh;
  display:flex; flex-direction:column;
  justify-content:flex-start;
  font-family:'Inter', 'Noto Sans SC', system-ui, sans-serif;
  color:#f7f8f8;
}
.lp-nav {
  display:flex; align-items:center; justify-content:space-between;
  position:absolute; top:20px; left:28px; right:28px;
  z-index:10;
}
.lp-logo { display:flex; align-items:center; gap:10px; }
.lp-logo-mark {
  width:28px; height:28px; border-radius:0; flex-shrink:0;
  object-fit:contain; display:block;
}
.lp-logo-mark::after { display:none; }
.lp-logo-lockup {
  height:32px; width:auto; display:block;
  object-fit:contain;
}
.lp-logo-text { display:flex; flex-direction:column; gap:1px; }
.lp-logo-name { font-size:15px; font-weight:600; letter-spacing:-0.02em; color:#f7f8f8; }
.lp-logo-tag { font-size:11px; color:#62666d; letter-spacing:0.02em; font-weight:500; }
.lp-nav-actions { display:flex; gap:6px; align-items:center; }
.lp-account { position:relative; }
.lp-account-unread {
  position:absolute; top:2px; right:2px; min-width:16px; height:16px; padding:0 4px;
  border-radius:999px; background:#f87171; color:#fff; font-size:10px; font-weight:700;
  line-height:16px; text-align:center; pointer-events:none; box-shadow:0 0 0 2px rgba(7,10,16,0.9);
}
.lp-account-unread[hidden] { display:none; }
.lp-account-menu button.has-unread { position:relative; }
.lp-account-menu button.has-unread::after {
  content:''; position:absolute; right:12px; top:50%; transform:translateY(-50%);
  width:7px; height:7px; border-radius:50%; background:#f87171;
}
.inbox-card {
  width:min(440px, 100%); max-height:min(72vh, 560px); display:flex; flex-direction:column;
  padding:0; overflow:hidden;
}
.inbox-head {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:18px 20px 12px; border-bottom:1px solid rgba(148,163,184,0.12);
}
.inbox-head h2 { margin:0; font-size:18px; }
.inbox-head button { font-size:12px; color:var(--muted); background:none; border:none; cursor:pointer; padding:4px 0; }
.inbox-list { overflow:auto; flex:1; padding:8px 10px 14px; }
.inbox-item {
  padding:12px 12px; border-radius:12px; border:1px solid transparent; cursor:pointer;
  margin-bottom:6px; transition: background 0.15s, border-color 0.15s;
}
.inbox-item:hover { background:rgba(255,255,255,0.04); }
.inbox-item.unread { border-color:rgba(147,197,253,0.18); background:rgba(147,197,253,0.06); }
.inbox-item-title { font-size:14px; font-weight:600; color:#f7f8f8; margin-bottom:4px; }
.inbox-item-body { font-size:12px; color:var(--muted); line-height:1.55; white-space:pre-wrap; }
.inbox-item-meta { font-size:11px; color:#6b7280; margin-top:6px; }
.inbox-empty { padding:32px 16px; text-align:center; color:var(--muted); font-size:13px; }
.inbox-detail { padding:16px 20px 20px; border-top:1px solid rgba(148,163,184,0.12); }
.inbox-detail[hidden] { display:none; }
.inbox-detail h3 { margin:0 0 8px; font-size:16px; }
.inbox-detail p { margin:0; font-size:13px; color:#cbd5e1; line-height:1.65; white-space:pre-wrap; }
.inbox-detail .inbox-back { margin-bottom:10px; font-size:12px; color:var(--muted); background:none; border:none; cursor:pointer; padding:0; }
.lp-account-trigger {
  position:relative;
  display:flex; align-items:center; gap:7px;
  padding:6px 10px 6px 8px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03);
  color:#d0d6e0; cursor:pointer; font-family:inherit; font-size:12px; font-weight:500;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.lp-account-trigger:hover { background:rgba(255,255,255,0.06); border-color:rgba(255,255,255,0.12); color:#f7f8f8; }
.lp-account-avatar {
  width:22px; height:22px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; letter-spacing:0;
  background:rgba(94,106,210,0.22); color:#c7d2fe;
}
.lp-account-trigger.guest .lp-account-avatar { background:rgba(255,255,255,0.06); color:#8a8f98; font-size:13px; }
.lp-account-label { max-width:96px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lp-account-menu {
  position:absolute; top:calc(100% + 8px); right:0; min-width:180px;
  padding:6px; border-radius:12px;
  background:rgba(14,16,18,0.98); border:1px solid rgba(255,255,255,0.1);
  box-shadow:0 16px 48px rgba(0,0,0,0.45);
  z-index:20;
}
.lp-account-menu[hidden] { display:none; }
.lp-account-head {
  padding:8px 10px 6px; border-bottom:1px solid rgba(255,255,255,0.06); margin-bottom:4px;
}
.lp-account-head strong { display:block; font-size:13px; color:#f7f8f8; font-weight:600; }
.lp-account-head span { display:block; font-size:11px; color:#8a8f98; margin-top:2px; }
.lp-account-entitlement {
  margin:4px 4px 6px; padding:8px 10px; border-radius:10px;
  background:rgba(167,139,250,0.08); border:1px solid rgba(167,139,250,0.16);
  color:#d8d3ff; font-size:12px; line-height:1.45;
}
.lp-account-entitlement[hidden] { display:none; }
.lp-account-menu button {
  width:100%; text-align:left; padding:9px 10px; border:none; border-radius:8px;
  background:transparent; color:#d0d6e0; font-size:13px; font-weight:500;
  cursor:pointer; font-family:inherit;
}
.lp-account-menu button:hover { background:rgba(255,255,255,0.06); color:#f7f8f8; }
.lp-account-menu button.danger { color:#fca5a5; }
.lp-account-menu button.danger:hover { background:rgba(248,113,113,0.08); }
.profile-card {
  width:min(400px, 100%); padding:0; overflow:hidden;
}
.profile-panel { padding:20px 20px 16px; }
.profile-panel[hidden] { display:none !important; }
.profile-top {
  display:flex; align-items:center; gap:14px; margin-bottom:16px;
}
.profile-avatar-lg {
  width:52px; height:52px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:700; background:rgba(94,106,210,0.22); color:#c7d2fe;
}
.profile-identity h3 { margin:0 0 4px; font-size:18px; font-weight:700; color:#f7f8f8; }
.profile-identity p { margin:0; font-size:12px; color:#8a8f98; line-height:1.5; }
.profile-quota {
  display:block; width:100%; margin-bottom:14px; padding:14px 16px; border-radius:14px;
  border:1px solid rgba(167,139,250,0.18); background:rgba(167,139,250,0.08);
  text-align:left; cursor:pointer; font-family:inherit; color:inherit;
  transition: border-color 0.15s, background 0.15s;
}
.profile-quota:hover { border-color:rgba(167,139,250,0.32); background:rgba(167,139,250,0.12); }
.profile-quota-title { font-size:15px; font-weight:600; color:#e9e5ff; margin-bottom:4px; }
.profile-quota-sub { font-size:12px; color:#9ca3af; line-height:1.45; }
.profile-quota-chev { float:right; margin-top:-26px; color:#7b8494; font-size:14px; }
.profile-quota.trial { background:rgba(52,211,153,0.08); border-color:rgba(52,211,153,0.18); }
.profile-quota.trial .profile-quota-title { color:#bbf7d0; }
.quota-detail-balance {
  font-size:28px; font-weight:700; letter-spacing:-0.02em; color:#f7f8f8; margin:8px 0 4px;
}
.quota-detail-sub { font-size:13px; color:#8a8f98; margin-bottom:16px; line-height:1.55; }
.quota-stat-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px;
}
.quota-stat {
  padding:12px; border-radius:12px; background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
}
.quota-stat strong { display:block; font-size:18px; color:#e8eaed; margin-bottom:2px; }
.quota-stat span { font-size:11px; color:#7b8494; }
.quota-packs { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.quota-pack {
  padding:12px 14px; border-radius:12px; text-align:left;
  border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.02);
}
.quota-pack strong { display:block; font-size:14px; color:#e8eaed; margin-bottom:4px; }
.quota-pack span { font-size:12px; color:#8a8f98; line-height:1.45; }
.quota-detail-note { font-size:12px; color:#62666d; line-height:1.55; margin:12px 0 0; }
.quota-wechat-block { margin-top:18px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.06); }
.quota-wechat-title { margin:0 0 12px; font-size:13px; font-weight:600; color:#c7d2fe; }
.quota-wechat-wrap { margin:0 0 12px; }
.quota-wechat-wrap img { width:min(220px, 62vw); max-height:min(52dvh, 320px); }
.profile-nav { display:flex; flex-direction:column; gap:4px; }
.profile-nav-item {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; padding:12px 12px; border-radius:12px; border:none;
  background:transparent; color:#e5e7eb; font-family:inherit; font-size:14px;
  text-align:left; cursor:pointer; transition:background 0.15s;
}
.profile-nav-item:hover { background:rgba(255,255,255,0.06); }
.profile-nav-item .chev { color:#6b7280; font-size:12px; }
.profile-nav-item .badge {
  min-width:18px; height:18px; padding:0 5px; border-radius:999px;
  background:#f87171; color:#fff; font-size:10px; font-weight:700; line-height:18px; text-align:center;
}
.profile-nav-item .badge[hidden] { display:none; }
.profile-foot { padding:0 20px 18px; display:flex; flex-direction:column; gap:8px; }
.profile-guest-actions { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.profile-guest-actions[hidden], .profile-nav[hidden], .profile-foot[hidden], .profile-quota[hidden] { display:none !important; }
.profile-back {
  display:inline-flex; align-items:center; gap:6px; margin-bottom:12px;
  padding:0; border:none; background:none; color:#9ca3af; font-size:12px; cursor:pointer;
}
.profile-back:hover { color:#e5e7eb; }
.profile-security-note { font-size:12px; color:#8a8f98; margin:0 0 10px; line-height:1.5; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.lp-nav-btn-ghost {
  border-color:transparent; background:transparent; color:#8a8f98;
  padding:6px 10px; font-size:12px;
}
.lp-nav-btn-ghost:hover { background:rgba(255,255,255,0.04); border-color:transparent; color:#e8eaed; }
.lp-nav-btn {
  padding:7px 12px; border-radius:8px; font-size:13px; font-weight:500;
  border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.02);
  color:#d0d6e0; cursor:pointer; font-family:inherit;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.lp-nav-btn:hover { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.12); color:#f7f8f8; }
.lp-nav-btn.primary {
  background:#5e6ad2; border-color:transparent; color:#fff;
}
.lp-nav-btn.primary:hover { background:#7170ff; filter:brightness(1.05); }

.lp-hero { text-align:center; margin:56px 0 0; position:relative; z-index:1; }
.lp-hero-kicker { display:none; }
.lp-hero-slogan-slot {
  min-height:11.5em; margin-bottom:8px;
  display:flex; flex-direction:column; justify-content:flex-end;
}
.lp-hero h1, .lp-hero-sub { pointer-events:none; }
.lp-hero h1 {
  font-size:clamp(42px, 6.2vw, 64px); font-weight:600;
  line-height:1.12; letter-spacing:-0.04em; margin-bottom:20px;
  max-width:15em; margin-left:auto; margin-right:auto;
  min-height:2.35em;
  color:#8a8f98;
}
.lp-hero h1 .slogan-dim { color:#7b8494; font-weight:500; }
.lp-hero h1 em {
  font-style:normal; color:#f7f8f8;
  background:linear-gradient(120deg, #f7f8f8 0%, #c7d2fe 55%, #f0abfc 100%);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
.lp-hero h1.is-typing::after {
  content:'▍'; display:inline-block; margin-left:3px;
  color:#a5b4fc; font-weight:400;
  animation:lp-cursor-blink 0.85s step-end infinite;
  -webkit-text-fill-color:#a5b4fc;
}
@keyframes lp-cursor-blink { 50% { opacity:0; } }
.lp-hero-sub {
  font-size:clamp(16px, 2vw, 18px); line-height:1.7; font-weight:400;
  color:#9aa3b2; max-width:32em; margin:0 auto 32px;
  min-height:3.4em;
}
.lp-hero-cta { display:none; }
.lp-input-zone { margin-bottom:0; }
.lp-hero-secondary {
  margin-top:32px; padding-top:28px;
  border-top:1px solid rgba(255,255,255,0.06);
  display:flex; flex-direction:column; gap:24px;
}
.lp-inspire { text-align:center; }
.lp-hero-demo-link {
  display:inline-block; margin-top:14px; padding:0; border:none; background:none;
  font-family:inherit; font-size:12px; font-weight:500; color:#7b8494;
  cursor:pointer; transition:color 0.15s;
}
.lp-hero-demo-link:hover { color:#c7d2fe; text-decoration:underline; }
.lp-hero-showcase {
  position:relative; max-width:960px; margin:28px auto 0;
  border-radius:12px; overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
  background:#0f1011;
  box-shadow:0 4px 32px rgba(8,9,10,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
  cursor:pointer; text-align:left;
  -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
  mask-image:linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lp-hero-showcase:hover {
  border-color:rgba(255,255,255,0.14);
  box-shadow:0 8px 48px rgba(8,9,10,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
}
.lp-hero-showcase-inner { aspect-ratio:16/9; position:relative; }
.lp-hero-showcase-inner svg { width:100%; height:100%; display:block; }
.lp-hero-shot {
  width:100%; height:100%; object-fit:cover; display:block;
  border-radius:0;
}
.lp-hero-shot.lp-hero-svg { object-fit:contain; background:#070b12; }
.lp-hero-shot.lp-hero-svg svg { width:100%; height:100%; display:block; }
.lp-hero-showcase-cap {
  position:absolute; left:16px; top:14px; z-index:2;
  display:flex; align-items:center; gap:8px;
}
.lp-hero-showcase-cap span {
  font-size:10px; font-weight:600; letter-spacing:0.04em;
  padding:4px 8px; border-radius:4px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03); color:#8a8f98;
}
.lp-hero-action {
  text-align:left; max-width:640px; margin:0 auto; width:100%;
  padding:0; border:none; background:transparent; box-shadow:none;
}
.lp-hero-action.path-open {
  padding:22px 24px; border-radius:14px;
  background:#0f1011;
  border:1px solid rgba(255,255,255,0.1);
  box-shadow:0 8px 40px rgba(0,0,0,0.35);
}
.lp-platforms-row {
  margin:0; text-align:center;
}
.lp-platforms-kicker {
  font-size:10px; font-weight:500; letter-spacing:0.08em; text-transform:uppercase;
  color:rgba(138,143,152,0.65); margin:0 0 14px;
}
.lp-platforms-marquee {
  overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:2px 0 6px;
}
.lp-platforms-marquee::-webkit-scrollbar { display:none; }
.lp-platforms-track {
  display:flex; align-items:stretch; gap:12px;
  width:max-content; min-width:100%;
  justify-content:center;
  animation:none;
}
@media (max-width:720px) {
  .lp-platforms-track { justify-content:flex-start; min-width:min-content; }
}
.lp-platform-chip {
  flex-shrink:0; display:inline-flex; flex-direction:column; align-items:center; gap:8px;
  padding:14px 16px 12px; min-width:88px; border-radius:16px;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
}
.lp-platform-chip img {
  width:40px; height:40px; display:block; object-fit:contain; flex-shrink:0;
  border-radius:10px;
}
.lp-platform-chip span {
  font-size:12px; font-weight:500; color:#b8c0cc; white-space:nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .lp-hero h1.is-typing::after { display:none; }
}
.lp-how {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:20px;
  max-width:960px; margin:96px auto 64px; text-align:left;
}
@media (max-width:760px) { .lp-how { grid-template-columns:1fr; max-width:420px; } }
.lp-how-step {
  padding:18px 16px; border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.015);
}
.lp-how-num {
  font-size:11px; font-weight:600; letter-spacing:0.06em; color:#62666d;
  margin-bottom:12px; font-variant-numeric:tabular-nums;
}
.lp-how-step h3 {
  font-size:14px; font-weight:600; margin-bottom:6px; letter-spacing:-0.02em; color:#f7f8f8;
}
.lp-how-step p { font-size:13px; line-height:1.6; color:#8a8f98; margin:0; }

.landing-examples-label {
  font-size:11px; color:#62666d; margin:0 0 12px; text-align:center;
  letter-spacing:0.02em; transition: opacity 0.35s;
}
.landing-chips {
  display:flex; flex-wrap:wrap; gap:8px; margin:0; justify-content:center;
  min-height:0; max-width:520px; margin-left:auto; margin-right:auto;
  transition: opacity 0.4s ease;
}
.landing-chips.is-fading { opacity:0; }
.landing-chip {
  padding:7px 12px; border-radius:8px; font-size:13px;
  border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.02);
  color:#d0d6e0; cursor:pointer; font-family:inherit;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.landing-chip:hover {
  border-color:rgba(255,255,255,0.14); background:rgba(255,255,255,0.05); color:#f7f8f8;
}

.lp-cases {
  max-width:960px; margin:0 auto;
}
.lp-cases-head {
  text-align:center; margin-bottom:20px;
}
.lp-cases-head h2 {
  font-size:clamp(20px, 3vw, 24px); font-weight:600; letter-spacing:-0.03em; margin-bottom:6px; color:#f7f8f8;
}
.lp-cases-head p { font-size:13px; color:#8a8f98; }
.lp-cases-grid {
  display:grid; grid-template-columns:repeat(2, 1fr); gap:16px;
}
@media (min-width:900px) { .lp-cases-grid { grid-template-columns:repeat(3, 1fr); gap:18px; } }
@media (max-width:820px) { .lp-cases-grid { grid-template-columns:1fr; max-width:440px; margin:0 auto; } }
.lp-case-card {
  text-align:left; padding:0; border-radius:16px; overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
  background:#0a0c10; cursor:pointer; font-family:inherit; color:inherit;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  display:flex; flex-direction:column;
}
.lp-case-card:hover {
  border-color:rgba(147,197,253,0.28);
  transform:translateY(-3px);
  box-shadow:0 20px 48px rgba(0,0,0,0.42);
}
.lp-case-preview {
  position:relative; aspect-ratio:16/10; background:#060910;
  border-bottom:1px solid rgba(148,163,184,0.08);
  overflow:hidden;
}
.lp-case-preview-title {
  position:absolute; left:12px; right:12px; bottom:10px; z-index:3;
  font-size:13px; font-weight:600; line-height:1.35; color:#f1f5f9;
  text-shadow:0 1px 10px rgba(0,0,0,0.85);
  pointer-events:none;
}
.lp-case-preview-bg {
  position:absolute; inset:0;
  background:var(--case-bg, linear-gradient(145deg,#0c1018 0%,#141c2a 100%));
}
.lp-case-preview-graph {
  position:absolute; inset:0; padding:8px 6px 6px;
  opacity:0.92;
}
.lp-case-preview-graph svg { width:100%; height:100%; display:block; }
.lp-case-preview-emoji {
  position:absolute; right:10px; bottom:8px; font-size:26px; line-height:1;
  opacity:0.28; pointer-events:none;
}
.lp-case-preview svg { width:100%; height:100%; display:block; }
.lp-case-preview img { width:100%; height:100%; object-fit:cover; display:block; }
.lp-case-meta { padding:14px 16px 16px; flex:1; display:flex; flex-direction:column; gap:6px; }
.lp-case-badge {
  display:inline-block; align-self:flex-start; font-size:10px; font-weight:600; letter-spacing:0.04em;
  padding:4px 8px; border-radius:999px;
  background:rgba(255,255,255,0.06); color:#9aa3b2;
  border:1px solid rgba(255,255,255,0.06);
}
.lp-case-meta h3 {
  font-size:15px; font-weight:600; line-height:1.4; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.lp-case-meta p { font-size:12px; line-height:1.5; color:#7b8494; margin:0; }
.landing-daily {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-bottom:16px;
}
.landing-daily-label {
  font-size:11px; font-weight:700; letter-spacing:0.06em;
  color:var(--accent); white-space:nowrap;
}
.landing-daily-date { font-size:11px; color:var(--muted); }
.landing-resume {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:18px 0 0; padding:14px 16px; flex-wrap:nowrap;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  text-align:left;
}
.landing-resume-kicker {
  display:block; font-size:11px; color:#62666d; letter-spacing:0.04em; margin-bottom:4px;
}
.landing-resume-text {
  flex:1; min-width:0; font-size:13px; color:#9aa3b2; text-align:left;
}
.landing-resume-text strong {
  color:#f7f8f8; font-weight:600;
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.landing-resume-hint {
  display:block; font-size:11px; color:#62666d; margin-top:2px;
}
.landing-resume-btn {
  flex-shrink:0; padding:9px 16px; border-radius:999px;
  border:1px solid rgba(199,210,254,0.22);
  font-size:13px; font-weight:600; cursor:pointer; font-family:inherit;
  color:#e0e7ff; background:rgba(94,106,210,0.18);
  white-space:nowrap;
}
.landing-resume-more { margin-top:6px; }
.landing-resume-details summary { cursor:pointer; list-style:none; }
.landing-resume-details summary::-webkit-details-marker { display:none; }
.landing-resume-details[open] .landing-recent-list { margin-top:4px; }

.lp-section { margin-bottom:64px; }
.lp-section-head {
  text-align:center; margin-bottom:28px;
}
.lp-section-head h2 {
  font-size:clamp(22px, 3vw, 28px); font-weight:700;
  letter-spacing:-0.03em; margin-bottom:8px;
}
.lp-section-head p { font-size:14px; color:var(--muted); }

.lp-how-grid {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:16px;
}
@media (max-width:760px) { .lp-how-grid { grid-template-columns:1fr; } }
.lp-how-card {
  text-align:left; padding:22px 20px 18px; border-radius:18px;
  border:1px solid var(--border-subtle);
  background:rgba(255,255,255,0.02);
  cursor:pointer; font-family:inherit; color:inherit;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.lp-how-card:hover {
  border-color:rgba(147,197,253,0.35);
  background:rgba(147,197,253,0.06);
  transform:translateY(-3px);
  box-shadow:0 16px 40px rgba(0,0,0,0.25);
}
.lp-how-num {
  font-size:11px; font-weight:700; color:var(--accent);
  letter-spacing:0.08em; margin-bottom:12px;
}
.lp-how-card h3 { font-size:16px; font-weight:600; margin-bottom:8px; }
.lp-how-card p { font-size:13px; line-height:1.55; color:var(--muted); margin-bottom:14px; }
.lp-how-go {
  font-size:13px; font-weight:600; color:var(--accent);
  display:inline-flex; align-items:center; gap:4px;
}

.lp-start {
  scroll-margin-top:32px;
  padding:32px; border-radius:24px;
  background:rgba(10,14,26,0.75);
  border:1px solid rgba(148,163,184,0.14);
  box-shadow:0 24px 80px rgba(0,0,0,0.35);
  backdrop-filter:blur(20px);
}
.lp-start-head { margin-bottom:22px; }
.lp-start-head h2 { font-size:22px; font-weight:700; margin-bottom:6px; }
.lp-start-head p { font-size:14px; color:var(--muted); }

.landing-omni {
  display:flex; align-items:stretch; gap:0;
  padding:5px; border-radius:10px;
  background:#0f1011; border:1px solid rgba(255,255,255,0.08);
  margin-bottom:0;
  box-shadow:0 2px 8px rgba(0,0,0,0.24);
  transition: border-color 0.16s;
}
.landing-omni:focus-within {
  border-color:rgba(255,255,255,0.16);
}
.landing-omni.drag-over {
  border-color:rgba(94,106,210,0.45);
  background:rgba(94,106,210,0.06);
}
.landing-omni-icon { display:none; }
.landing-omni-attach {
  flex-shrink:0; width:38px; border:none; background:transparent;
  color:#8a8f98; cursor:pointer; font-size:17px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  border-radius:6px; margin-left:2px;
  transition: color 0.16s, background 0.16s;
}
.landing-omni-attach:hover { color:#e8eaed; background:rgba(255,255,255,0.04); }
.landing-omni-attach.has-file { color:#a5b4fc; }
.landing-omni-file { display:none; }
.landing-omni input {
  flex:1; min-width:0; border:none; background:transparent;
  padding:11px 12px; font-size:14px; color:#f7f8f8;
  outline:none; font-family:inherit;
}
.landing-omni input::placeholder { color:#62666d; }
.landing-omni-go {
  flex-shrink:0; padding:8px 16px; margin:2px; border:none; border-radius:7px;
  font-size:13px; font-weight:500; cursor:pointer; font-family:inherit;
  color:#fff; background:#5e6ad2;
  transition: filter 0.16s, transform 0.12s;
}
.landing-omni-go:hover { background:#7170ff; filter:brightness(1.05); }
.landing-omni-go:active { transform:scale(0.98); }
.landing-omni-hint { font-size:12px; color:#62666d; min-height:16px; margin-bottom:6px; text-align:center; }
.landing-omni-hint:empty { display:none; margin:0; min-height:0; }
.landing-omni-hint.ready { color:#8a8f98; }

.lp-start-modes {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin-bottom:16px;
}
@media (max-width:600px) { .lp-start-modes { grid-template-columns:repeat(2, 1fr); } }
.lp-mode-btn {
  padding:10px 8px; border-radius:12px; font-size:12px; font-weight:600;
  border:1px solid var(--border-subtle); background:transparent;
  color:var(--muted); cursor:pointer; font-family:inherit;
}
.lp-mode-btn.active {
  color:var(--ink); background:rgba(147,197,253,0.1);
  border-color:rgba(147,197,253,0.35);
}

.landing-path-expand { overflow:hidden; max-height:0; opacity:0; pointer-events:none; transition: max-height 0.4s ease, opacity 0.3s; }
.landing-path-expand.open { max-height:420px; opacity:1; pointer-events:auto; margin-bottom:12px; }
.landing-path-expand-inner {
  padding:16px; border-radius:14px;
  border:1px solid rgba(147,197,253,0.2); background:rgba(0,0,0,0.3);
}
.landing-path-expand-label { font-size:13px; font-weight:600; color:var(--accent); margin-bottom:10px; }
.landing-path-go {
  margin-top:12px; width:100%; padding:12px; border-radius:12px; border:none;
  font-size:14px; font-weight:600; cursor:pointer; font-family:inherit;
  color:#070b12; background:linear-gradient(135deg, #e0f2fe, #c4b5fd);
}
.landing-panel { display:none; }
.landing-panel.active { display:block; }
.landing-input {
  width:100%; padding:14px 16px; border-radius:12px;
  border:1px solid var(--border-subtle); background:rgba(0,0,0,0.28);
  color:var(--ink); font-size:14px; outline:none; font-family:inherit;
}
.landing-input:focus { border-color:rgba(147,197,253,0.35); }
.landing-textarea { min-height:100px; resize:vertical; }
.landing-file-btn {
  width:100%; padding:14px; border-radius:12px;
  border:1px dashed rgba(148,163,184,0.22); background:transparent;
  color:var(--muted); font-size:13px; cursor:pointer; font-family:inherit;
}
.landing-file { display:none; }
.landing-file-name { font-size:12px; color:var(--muted); margin-top:8px; }
.landing-platform-hint { font-size:12px; color:var(--accent); margin-top:8px; }

.landing-recents { margin-top:12px; }
.landing-recents[hidden] { display:none !important; }
.landing-recents-label {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  font-size:11px; font-weight:500; color:rgba(148,163,184,0.65); margin-bottom:6px;
}
.landing-recents-more {
  border:none; background:transparent; padding:0;
  font-size:11px; color:var(--accent); cursor:pointer; font-family:inherit;
}
.landing-recents-more:hover { text-decoration:underline; }
.landing-recent-list { display:flex; flex-direction:column; gap:2px; }
.landing-recent-item {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; padding:7px 8px; border-radius:8px;
  border:none; background:transparent;
  color:rgba(238,242,255,0.65); font-size:12px; cursor:pointer; font-family:inherit; text-align:left;
  transition:background 0.15s;
}
.landing-recent-item:hover { background:rgba(255,255,255,0.04); }
.landing-recent-item .lr-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.landing-recent-item .lr-meta { font-size:11px; color:var(--muted); flex-shrink:0; }
.landing-secondary-hidden { display:none !important; }

/* ── Ingest 队列（搜索框下方） ── */
.ingest-queue {
  margin-top:14px;
  display:flex; flex-direction:column; gap:10px;
  max-width:100%;
}
.ingest-queue:empty { display:none; margin:0; }
.iq-card {
  padding:14px 16px 12px;
  border-radius:14px;
  background:rgba(8,12,22,0.72);
  border:1px solid rgba(147,197,253,0.14);
  box-shadow:0 8px 32px rgba(0,0,0,0.25);
}
.iq-card.iq-new {
  animation: iqIn 0.4s cubic-bezier(0.16,1,0.3,1);
}
@keyframes iqIn {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}
.iq-card.done { border-color:rgba(52,211,153,0.35); background:rgba(8,18,14,0.75); }
.iq-card.error { border-color:rgba(252,165,165,0.35); }
.iq-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  margin-bottom:10px;
}
.iq-label {
  font-size:13px; font-weight:600; color:#e2e8f0; line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.iq-badge {
  flex-shrink:0; font-size:10px; font-weight:700; letter-spacing:0.04em;
  padding:3px 8px; border-radius:999px; text-transform:uppercase;
}
.iq-badge.running { color:#93c5fd; background:rgba(147,197,253,0.12); }
.iq-badge.queued { color:var(--muted); background:rgba(255,255,255,0.06); }
.iq-badge.done { color:#86efac; background:rgba(52,211,153,0.12); }
.iq-badge.error { color:#fca5a5; background:rgba(252,165,165,0.1); }
.iq-detail { font-size:12px; color:var(--muted); margin-bottom:10px; min-height:16px; }
.iq-pipe {
  display:flex; align-items:center; gap:0; margin-bottom:8px;
}
.iq-step {
  flex:1; text-align:center; position:relative;
  font-size:10px; font-weight:600; color:rgba(123,139,168,0.55);
  padding-top:14px;
}
.iq-step::before {
  content:''; position:absolute; top:4px; left:50%; transform:translateX(-50%);
  width:8px; height:8px; border-radius:50%;
  background:rgba(123,139,168,0.25); transition:all 0.35s ease;
}
.iq-step::after {
  content:''; position:absolute; top:7px; left:calc(50% + 6px);
  width:calc(100% - 12px); height:2px; background:rgba(123,139,168,0.15);
}
.iq-step:last-child::after { display:none; }
.iq-step.done { color:rgba(147,197,253,0.85); }
.iq-step.done::before { background:#60a5fa; box-shadow:0 0 10px rgba(96,165,250,0.5); }
.iq-step.active { color:#e2e8f0; }
.iq-step.active::before {
  background:#93c5fd; box-shadow:0 0 14px rgba(147,197,253,0.75);
  animation: iqPulse 1.2s ease-in-out infinite;
}
@keyframes iqPulse {
  0%, 100% { transform:translateX(-50%) scale(1); }
  50% { transform:translateX(-50%) scale(1.35); }
}
.iq-bar {
  height:3px; border-radius:99px; background:rgba(255,255,255,0.06); overflow:hidden;
}
.iq-bar-fill {
  height:100%; border-radius:99px;
  background:linear-gradient(90deg, #6366f1, #38bdf8);
  transition:width 0.5s cubic-bezier(0.16,1,0.3,1);
  width:0%;
}
.iq-actions { display:flex; gap:8px; margin-top:10px; }
.iq-btn {
  flex:1; padding:8px 12px; border-radius:8px; font-size:12px; font-weight:600;
  cursor:pointer; font-family:inherit; border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.05); color:var(--ink);
}
.iq-btn.primary { background:var(--accent); color:#070b12; border-color:transparent; }
.iq-btn.ghost { flex:0; padding:8px 10px; color:var(--muted); }
.iq-btn:hover { opacity:0.9; }

.landing-status { margin-top:8px; font-size:12px; color:var(--muted); min-height:0; }
.landing-status.error { color:#fca5a5; }
.landing-status:empty { display:none; }

.lp-foot {
  text-align:center; margin-top:56px; padding-top:32px;
  border-top:1px solid rgba(255,255,255,0.05);
}
.lp-foot-brand { font-size:14px; font-weight:700; color:#c8ccd2; letter-spacing:0.02em; }
.lp-foot-tagline { font-size:12px; color:#62666d; margin:8px 0 16px; }
.lp-foot-links {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 10px;
  margin-bottom:14px;
}
.lp-foot-links button {
  background:none; border:none; padding:0; font:inherit; font-size:12px; color:#8a8f98;
  cursor:pointer; text-decoration:none;
}
.lp-foot-links button:hover { color:#c4b5fd; }
.lp-foot-dot { color:#3f4349; font-size:12px; user-select:none; }
.lp-foot-copy { font-size:11px; color:#4a4f57; }
.auth-alt-link {
  display:inline-block; margin-top:4px; padding:0; border:none; background:none;
  font-size:12px; color:#8a8f98; cursor:pointer; font-family:inherit;
}
.auth-alt-link:hover { color:#c4b5fd; text-decoration:underline; }
.auth-tabs { display:flex; gap:8px; margin-bottom:14px; }
.auth-tab {
  flex:1; padding:8px 12px; border-radius:10px; border:1px solid var(--border-subtle);
  background:transparent; color:var(--muted); font-size:13px; cursor:pointer;
}
.auth-tab.active {
  color:#e8eaed; border-color:rgba(147,197,253,0.35); background:rgba(147,197,253,0.08);
}
.auth-panel[hidden] { display:none !important; }
.site-modal {
  position:fixed; inset:0; z-index:190;
  display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,16,0.75); backdrop-filter:blur(8px);
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity 0.25s, visibility 0.25s; padding:20px;
}
.site-modal.open { opacity:1; visibility:visible; pointer-events:auto; }
.site-card {
  width:min(440px, 100%); max-height:min(80vh, 560px); overflow:auto;
  padding:28px; border-radius:20px;
  background:rgba(12,18,32,0.98); border:1px solid rgba(148,163,184,0.18);
  box-shadow:0 40px 100px rgba(0,0,0,0.5);
}
.site-card h2 { font-size:20px; font-weight:700; margin-bottom:12px; }
.site-card p, .site-card li { font-size:14px; line-height:1.65; color:#a8adb5; margin-bottom:10px; }
.site-card ul { padding-left:18px; margin:0 0 12px; }
.site-card a { color:#a5b4fc; text-decoration:none; }
.site-card a:hover { text-decoration:underline; }
.site-qr-wrap {
  display:flex; flex-direction:column; align-items:center; gap:12px; margin:8px 0 4px;
}
.site-qr-wrap img {
  display:block;
  width:min(320px, 86vw);
  height:auto;
  max-height:min(68dvh, 520px);
  object-fit:contain;
  border-radius:14px; background:#fff; padding:10px;
  box-shadow:0 8px 32px rgba(0,0,0,0.35);
}
.site-qr-note { font-size:12px; color:var(--muted); text-align:center; line-height:1.5; }
.video-fallback {
  padding:14px 16px; text-align:center; font-size:13px; color:var(--muted);
  background:rgba(255,255,255,0.04); border-top:1px solid rgba(255,255,255,0.06);
}
.video-fallback a { color:var(--accent); text-decoration:none; }
.video-fallback a:hover { text-decoration:underline; }
.site-close {
  position:absolute; top:14px; right:14px; width:32px; height:32px; border-radius:10px;
  border:1px solid var(--border-subtle); background:transparent; color:var(--muted);
  cursor:pointer; font-size:18px; line-height:1;
}
.lp-user-badge {
  font-size:12px; font-weight:600; color:var(--accent);
  padding:6px 12px; border-radius:999px;
  background:rgba(147,197,253,0.1); border:1px solid rgba(147,197,253,0.2);
}
.lp-quota-hint {
  font-size:11px; color:var(--muted); margin-top:8px; text-align:center;
}

.auth-modal {
  position:fixed; inset:0; z-index:200;
  display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,16,0.75); backdrop-filter:blur(8px);
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity 0.25s, visibility 0.25s;
  padding:20px;
}
.auth-modal.open { opacity:1; visibility:visible; pointer-events:auto; }
.auth-card {
  width:min(400px, 100%); padding:28px; border-radius:20px;
  background:rgba(12,18,32,0.98); border:1px solid rgba(148,163,184,0.18);
  box-shadow:0 40px 100px rgba(0,0,0,0.5);
}
.auth-card h2 { font-size:20px; font-weight:700; margin-bottom:6px; }
.auth-card .auth-sub { font-size:13px; color:var(--muted); margin-bottom:20px; }
.auth-field { margin-bottom:12px; }
.auth-field label { display:block; font-size:11px; color:var(--muted); margin-bottom:6px; }
.auth-field input {
  width:100%; padding:12px 14px; border-radius:12px;
  border:1px solid var(--border-subtle); background:rgba(0,0,0,0.3);
  color:var(--ink); font-size:14px; font-family:inherit; outline:none;
}
.auth-field input:focus { border-color:rgba(147,197,253,0.35); }
.auth-actions { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.auth-btn {
  width:100%; padding:12px; border-radius:12px; border:none;
  font-size:14px; font-weight:600; cursor:pointer; font-family:inherit;
}
.auth-btn-main { color:#070b12; background:linear-gradient(135deg, #e0f2fe, #c4b5fd); }
.auth-btn-ghost { background:transparent; color:var(--muted); border:1px solid var(--border-subtle); }
.auth-msg { font-size:12px; margin-top:10px; min-height:18px; }
.auth-msg.ok { color:var(--green); }
.auth-msg.err { color:#fca5a5; }
.auth-close {
  position:absolute; top:16px; right:16px; background:none; border:none;
  color:var(--muted); font-size:22px; cursor:pointer; line-height:1;
}
.img-broken { opacity:0.45; object-fit:contain !important; }
.minimap-svg { cursor:crosshair; }

body.has-topbar .hint-bar { bottom:24px; }
body.has-topbar .settings-btn { top:calc(var(--topbar-h) + 8px); }
body.has-topbar .reset-btn { top:calc(var(--topbar-h) + 8px); }
body.has-topbar .settings-panel { top:calc(var(--topbar-h) + 52px); }

/* Timeline panel (video sources) */
.timeline-panel {
  position:fixed; top:var(--topbar-h); right:0; bottom:0; width:var(--timeline-w);
  background:linear-gradient(180deg, rgba(10,14,24,0.98), rgba(6,9,16,0.99));
  border-left:1px solid rgba(148,163,184,0.12);
  box-shadow:-8px 0 32px rgba(0,0,0,0.25);
  z-index:51; display:flex; flex-direction:column;
  transform:translateX(100%);
  transition: transform 0.4s var(--ease-out), right 0.4s var(--ease-out);
}
.timeline-panel.open { transform:translateX(0); }
body.card-open .timeline-panel.open { right:var(--card-dock-w); }
body.card-open .history-panel.open { right:var(--card-dock-w); }
.tl-head {
  padding:14px 14px 12px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  background:rgba(0,0,0,0.22);
  flex-shrink:0;
  display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px;
}
.tl-head-main { flex:1; min-width:0; }
.tl-close {
  flex-shrink:0; width:40px; height:40px; border-radius:10px;
  border:1px solid rgba(255,255,255,0.1); background:rgba(255,255,255,0.04);
  color:var(--ink); font-size:22px; line-height:1; cursor:pointer;
}
.tl-close:hover { background:rgba(255,255,255,0.08); }
.tl-head-label {
  display:block; font-size:10px; font-weight:700; letter-spacing:0.12em;
  text-transform:uppercase; color:rgba(147,197,253,0.7); margin-bottom:4px;
}
.tl-head-title {
  font-size:13px; font-weight:600; color:var(--ink); line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.tl-head-meta {
  display:block; font-size:11px; color:var(--muted); margin-top:5px;
}
.tl-video {
  width:100%; max-height:168px; background:#000; flex-shrink:0;
}
.video-dock {
  width:100%; background:#000; flex-shrink:0;
  border-radius:0; overflow:hidden;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.video-dock .graph-video {
  width:100%; display:block; background:#000;
  max-height:min(42vh, 320px);
}
#videoDockTimeline .graph-video,
#videoDockTimeline .graph-video-embed {
  max-height:176px;
}
.video-dock .graph-video-embed {
  width:100%; aspect-ratio:16/9; border:none; display:block; background:#000;
}
.tl-list {
  flex:1; overflow-y:auto; padding:10px 10px 16px;
  position:relative;
}
.tl-list::before {
  content:''; position:absolute; left:22px; top:12px; bottom:12px; width:2px;
  background:linear-gradient(180deg, rgba(147,197,253,0.35), rgba(148,163,184,0.08));
  border-radius:2px; pointer-events:none;
}
.tl-seg {
  display:flex; gap:10px; align-items:flex-start;
  padding:0; margin-bottom:8px; border-radius:0;
  font-size:12px; line-height:1.5; color:var(--muted); cursor:pointer;
  border:none; background:transparent;
  transition:transform 0.2s var(--ease-out);
}
.tl-seg:hover { transform:translateX(2px); }
.tl-seg:hover .tl-seg-body {
  background:rgba(255,255,255,0.05);
  border-color:rgba(148,163,184,0.14);
  color:var(--ink);
}
.tl-seg.on .tl-seg-dot {
  background:var(--accent);
  box-shadow:0 0 0 4px rgba(147,197,253,0.2);
  transform:scale(1.15);
}
.tl-seg.on .tl-seg-body {
  background:rgba(147,197,253,0.1);
  border-color:rgba(147,197,253,0.28);
  color:var(--ink);
}
.tl-seg-rail {
  width:24px; flex-shrink:0; display:flex; justify-content:center; padding-top:12px;
  position:relative; z-index:1;
}
.tl-seg-dot {
  width:8px; height:8px; border-radius:50%;
  background:rgba(148,163,184,0.45);
  border:2px solid rgba(8,12,22,0.9);
  transition:background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.tl-seg-body {
  flex:1; min-width:0; padding:10px 12px; border-radius:12px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.02);
  transition:background 0.25s, border-color 0.25s, color 0.25s;
}
.tl-seg-ts {
  display:inline-block; font-size:10px; font-weight:700; letter-spacing:0.04em;
  color:var(--accent); margin-bottom:4px;
  padding:2px 7px; border-radius:6px;
  background:rgba(147,197,253,0.1);
}
.tl-seg-text {
  display:block; font-size:12px; line-height:1.5; color:inherit;
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
}

.history-panel {
  position:fixed; top:var(--topbar-h); right:0; bottom:0; width:320px;
  background:rgba(10,14,22,0.97); border-left:1px solid var(--border-subtle);
  z-index:85; display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform 0.3s ease;
}
.history-panel.open { transform:translateX(0); }
.hist-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px 8px; font-size:13px; font-weight:600; color:var(--accent);
}
.hist-search-wrap {
  padding:0 8px 8px; border-bottom:1px solid var(--border-subtle);
}
.hist-search-wrap input {
  width:100%; padding:8px 10px; border-radius:8px;
  border:1px solid var(--border-subtle); background:rgba(255,255,255,0.04);
  color:var(--ink); font-size:13px; outline:none;
}
.hist-search-wrap input:focus { border-color:rgba(96,165,250,0.45); }
.hist-item.current {
  border-color:rgba(52,211,153,0.4);
  background:rgba(52,211,153,0.07);
}
.hist-badge-current {
  display:inline-block; font-size:10px; font-weight:600;
  color:var(--green); margin-left:6px; vertical-align:middle;
}
.hist-rename {
  flex-shrink:0; width:28px; border-radius:6px;
  border:none; background:transparent;
  color:var(--muted); cursor:pointer; font-size:12px;
}
.hist-rename:hover { color:var(--accent); }
.hist-close {
  background:none; border:none; color:var(--muted); font-size:20px; line-height:1;
  cursor:pointer; padding:4px 8px; border-radius:6px;
}
.hist-close:hover { color:var(--ink); background:rgba(255,255,255,0.06); }
.hist-list { flex:1; overflow-y:auto; padding:8px; }
.hist-item-wrap {
  display:flex; gap:4px; align-items:stretch; margin-bottom:4px;
  position:relative;
}
.hist-item-wrap .hist-rename,
.hist-item-wrap .hist-del {
  opacity:0; pointer-events:none;
  transition:opacity 0.15s;
}
.hist-item-wrap:hover .hist-rename,
.hist-item-wrap:hover .hist-del {
  opacity:1; pointer-events:auto;
}
.hist-item {
  display:block; flex:1; text-align:left;
  padding:10px 12px; border-radius:8px;
  background:transparent; border:1px solid transparent;
  cursor:pointer; transition:background 0.2s, border-color 0.2s;
}
.hist-item:hover { background:rgba(255,255,255,0.04); border-color:rgba(255,255,255,0.06); }
.hist-item:disabled { opacity:0.5; cursor:wait; }
.hist-del {
  flex-shrink:0; width:28px; border-radius:6px;
  border:none; background:transparent;
  color:var(--muted); cursor:pointer; font-size:13px;
  transition:color 0.15s;
}
.hist-del:hover { color:#fca5a5; }
.hist-title { font-size:13px; font-weight:600; color:var(--ink); line-height:1.4; margin-bottom:4px; }
.hist-meta { font-size:11px; color:var(--muted); }
.hist-empty, .hist-loading { padding:24px 16px; text-align:center; color:var(--muted); font-size:13px; line-height:1.6; }
.hist-foot {
  display:flex; gap:8px; padding:10px 8px; border-top:1px solid var(--border-subtle);
}
.hist-foot-btn, .hist-foot button {
  flex:1; padding:8px 10px; border-radius:8px; font-size:12px; cursor:pointer;
  border:1px solid var(--border-subtle); background:rgba(255,255,255,0.04); color:var(--ink);
}
.hist-foot-btn:hover, .hist-foot button:hover:not(:disabled) {
  border-color:rgba(96,165,250,0.4); color:var(--accent);
}
.hist-foot button:disabled { opacity:0.35; cursor:not-allowed; }

.minimap {
  position:fixed; left:12px; bottom:14px; z-index:44;
  width:168px; height:116px;
  background:rgba(8,12,20,0.88);
  border:1px solid var(--border-subtle);
  border-radius:10px; overflow:hidden;
  opacity:0; pointer-events:none;
  transition:opacity 0.3s;
  box-shadow:0 8px 24px rgba(0,0,0,0.35);
}
.minimap.visible { opacity:1; pointer-events:auto; }
.minimap svg { width:100%; height:100%; display:block; }
.minimap-label {
  position:absolute; top:4px; left:8px; font-size:10px; color:var(--muted);
  pointer-events:none;
}

.curio-attach { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.curio-img {
  width:100%; max-height:180px; object-fit:cover; border-radius:10px;
  border:1px solid rgba(255,255,255,0.1);
}
.curio-badge {
  font-size:11px; color:var(--accent); letter-spacing:0.02em;
}
.curio-spawn {
  padding:8px 10px; border-radius:8px; font-size:12px;
  border:1px solid rgba(96,165,250,0.2); background:rgba(96,165,250,0.06);
  color:var(--muted); line-height:1.4;
}
.curio-spawn strong { color:var(--ink); }

.canvas-toast {
  position:fixed; left:50%; bottom:24px; z-index:45;
  transform:translateX(-50%) translateY(8px);
  max-width:min(420px, 88vw);
  padding:10px 16px; border-radius:10px;
  background:rgba(8,12,20,0.92);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 8px 32px rgba(0,0,0,0.4);
  font-size:12px; line-height:1.5; color:var(--ink);
  opacity:0; pointer-events:none;
  transition:opacity 0.3s, transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.canvas-toast.visible {
  opacity:1; transform:translateX(-50%) translateY(0);
}
.canvas-toast .ct-step { color:var(--accent); font-size:12px; margin-bottom:4px; }
.canvas-toast .ct-body { color:#cbd5e1; }
.canvas-toast .ct-nodes { color:#86efac; font-size:12px; margin-top:6px; }
.canvas-watermark {
  position:fixed; right:18px; bottom:16px; z-index:32;
  display:flex; align-items:center; gap:7px;
  padding:7px 10px; border-radius:999px;
  background:rgba(8,12,20,0.58); border:1px solid rgba(255,255,255,0.08);
  color:rgba(226,232,240,0.78); font-size:12px; pointer-events:none;
  backdrop-filter:blur(8px);
}
.canvas-watermark img { width:16px; height:16px; object-fit:contain; }
body.landing-open .canvas-watermark { display:none; }
.share-modal {
  position:fixed; inset:0; z-index:210; display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,16,0.76); backdrop-filter:blur(10px);
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity 0.22s, visibility 0.22s;
  padding:20px;
}
.share-modal.open { opacity:1; visibility:visible; pointer-events:auto; }
.share-card {
  position:relative;
  width:min(420px,100%); padding:24px 24px 22px; border-radius:20px;
  background:rgba(12,18,32,0.98); border:1px solid rgba(148,163,184,0.18);
  box-shadow:0 40px 100px rgba(0,0,0,0.5);
}
.share-card .site-close { top:12px; right:12px; }
.share-card h2 { margin:0 0 8px; font-size:20px; letter-spacing:-0.02em; }
.share-card p { margin:0 0 16px; color:var(--muted); font-size:13px; line-height:1.6; }
.share-url {
  width:100%; padding:10px 12px; border-radius:12px; margin-bottom:12px;
  background:rgba(0,0,0,0.28); border:1px solid var(--border-subtle);
  color:#cbd5e1; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.share-actions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.share-actions button {
  padding:11px 10px; border-radius:12px; border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.05); color:var(--ink); font:inherit; font-weight:700; font-size:12px; cursor:pointer;
}
.share-actions button.primary { background:var(--accent); color:#070b12; border-color:transparent; }
.share-readonly-banner {
  position:fixed; left:50%; top:calc(var(--topbar-h, 0px) + 8px); z-index:68;
  transform:translateX(-50%);
  display:flex; align-items:center; gap:10px; max-width:min(640px,94vw);
  padding:8px 12px 8px 14px; border-radius:14px;
  background:rgba(15,23,42,0.94); border:1px solid rgba(148,163,184,0.22);
  box-shadow:0 12px 40px rgba(0,0,0,0.35);
  font-size:12px; color:#cbd5e1;
}
.share-readonly-banner[hidden] { display:none !important; }
.share-readonly-banner button {
  padding:6px 12px; border-radius:10px; border:none;
  background:var(--accent); color:#070b12; font:inherit; font-weight:700; font-size:12px; cursor:pointer;
}
body.share-readonly .share-readonly-banner { display:flex; }
body.share-readonly #newGraphBtn,
body.share-readonly #shareGraphBtn,
body.share-readonly #relayoutBtn,
body.share-readonly #histDuplicateBtn { opacity:0.35; pointer-events:none; }
.share-hook {
  position:fixed; left:50%; top:calc(var(--topbar-h, 0px) + 14px); z-index:70;
  transform:translate(-50%, -10px); opacity:0; pointer-events:none;
  display:flex; align-items:center; gap:12px; max-width:min(720px,92vw);
  padding:10px 12px 10px 14px; border-radius:16px;
  background:rgba(12,18,32,0.92); border:1px solid rgba(167,139,250,0.22);
  box-shadow:0 18px 60px rgba(0,0,0,0.35); transition:opacity 0.24s, transform 0.24s;
}
.share-hook.visible { opacity:1; transform:translate(-50%,0); pointer-events:auto; }
.share-hook span { color:#dbe4ff; font-size:13px; line-height:1.45; }
.share-hook button {
  border:none; border-radius:999px; padding:8px 12px; background:var(--accent);
  color:#070b12; font:inherit; font-size:12px; font-weight:800; cursor:pointer; white-space:nowrap;
}
.rename-card { width:min(400px, 92vw); }
.rename-sub { font-size:13px; color:var(--muted); margin:0 0 14px; line-height:1.55; }
.rename-input {
  width:100%; box-sizing:border-box; padding:12px 14px; border-radius:12px;
  border:1px solid var(--border-subtle); background:rgba(0,0,0,0.28);
  color:var(--ink); font-size:16px; font-family:inherit; margin-bottom:14px;
}
.rename-actions { display:flex; gap:10px; justify-content:flex-end; }
.rename-btn {
  padding:10px 18px; border-radius:10px; border:1px solid var(--border-subtle);
  background:rgba(255,255,255,0.05); color:var(--ink); font:inherit; font-weight:600; cursor:pointer;
}
.rename-btn.primary { background:var(--accent); color:#070b12; border-color:transparent; }
.rename-input.err { border-color:#f87171; }

.curio-trace {
  margin-bottom:0; padding:10px 12px; border-radius:10px;
  background:rgba(0,0,0,0.25); border-left:3px solid var(--accent);
  font-size:13px; line-height:1.6; color:var(--muted);
}
.curio-trace .ht-step { color:#94a3b8; margin-bottom:6px; font-size:12px; }
.curio-trace .ht-tool { display:flex; gap:6px; align-items:flex-start; margin:4px 0; }
.curio-trace .ht-tool .ico { flex-shrink:0; }
.curio-trace .ht-tool.running { color:var(--accent); }
.curio-trace .ht-tool.done { color:#86efac; }
.curio-trace .ht-thumbs {
  display:flex; gap:6px; margin:6px 0 2px 20px; overflow-x:auto;
  scroll-snap-type:x mandatory; scrollbar-width:none;
}
.curio-trace .ht-thumbs::-webkit-scrollbar { display:none; }
.curio-trace .ht-thumb {
  flex:0 0 72px; width:72px; height:72px; object-fit:cover;
  border-radius:8px; scroll-snap-align:start;
}
.curio-trace .ht-answer {
  margin-top:8px; padding-top:8px; border-top:1px solid rgba(255,255,255,0.06);
  color:#e2e8f0; font-size:14px; line-height:1.65;
}
.curio-trace .ht-answer img.md-img,
.qa-summary img.md-img {
  max-width:100%; border-radius:10px; margin:8px 0; display:block;
}

/* ── Phase 2: 长新可见 ── */
.node.spawn-flash .node-circle-outer {
  animation: spawnFlash 2s ease-out;
}
@keyframes spawnFlash {
  0%, 100% { filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35)); transform: scale(1); }
  18% { filter: drop-shadow(0 0 32px rgba(147,197,253,0.95)) brightness(1.3); transform: scale(1.14); }
  42% { filter: drop-shadow(0 0 22px rgba(134,239,172,0.75)) brightness(1.18); transform: scale(1.06); }
  68% { filter: drop-shadow(0 0 16px rgba(147,197,253,0.5)) brightness(1.08); transform: scale(1.02); }
}
.node.spawn-flash .glow-ring {
  animation: spawnRingPulse 2s ease-out;
}
@keyframes spawnRingPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  20% { opacity: 1; transform: scale(1.35); }
  55% { opacity: 0.6; transform: scale(1.12); }
}

/* ── Phase 4: Ingest 收束 ── */
.growth-closure {
  position:fixed; inset:0; z-index:68;
  display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,16,0.72); backdrop-filter:blur(8px);
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity 0.35s, visibility 0.35s;
}
.growth-closure.open { opacity:1; visibility:visible; pointer-events:auto; }
.growth-closure.open .gc-card {
  animation: gc-in 0.42s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes gc-in {
  from { opacity:0; transform:translateY(16px) scale(0.96); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.gc-card {
  width:min(440px, 92vw); padding:28px 26px 22px;
  background:rgba(10,14,26,0.96); border:1px solid rgba(147,197,253,0.2);
  border-radius:18px; box-shadow:0 24px 80px rgba(0,0,0,0.5);
}
.gc-title { font-size:20px; font-weight:700; margin-bottom:6px; letter-spacing:-0.02em; }
.gc-sub { font-size:13px; color:var(--muted); margin-bottom:16px; }
.gc-concepts { list-style:none; margin:0 0 16px; padding:0; }
.gc-concepts li {
  display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,0.04);
  font-size:14px; color:#e2e8f0;
}
.gc-concepts li:last-child { border:none; }
.gc-concepts li.gc-pick {
  cursor:pointer; border-radius:8px; padding:8px 10px; margin:0 -6px;
  border-bottom-color:transparent;
  transition:background 0.2s, color 0.2s;
}
.gc-concepts li.gc-pick:hover { background:rgba(255,255,255,0.05); }
.gc-concepts li.gc-pick.selected {
  background:rgba(94,106,210,0.2);
  color:#f8fafc;
}
.gc-concepts .gc-icon { font-size:18px; width:28px; text-align:center; }
.gc-save { font-size:12px; color:var(--green); margin-bottom:14px; }
.gc-actions { display:flex; gap:10px; flex-wrap:wrap; }
.gc-btn {
  flex:1; min-width:120px; padding:11px 16px; border-radius:10px;
  font-size:13px; font-weight:600; cursor:pointer; font-family:inherit;
  border:1px solid rgba(255,255,255,0.1); background:rgba(255,255,255,0.04);
  color:var(--ink);
}
.gc-btn.primary {
  background:var(--accent); color:#070b12; border-color:transparent;
}
.gc-btn:hover { opacity:0.92; }

/* ── Phase 3: 书架历史 ── */
.hist-item-inner { display:flex; gap:12px; align-items:center; width:100%; text-align:left; }
.hist-preview {
  flex-shrink:0; width:52px; height:36px; border-radius:6px;
  background:rgba(0,0,0,0.35); border:1px solid rgba(255,255,255,0.06);
  overflow:hidden;
}
.hist-preview svg { width:100%; height:100%; display:block; }
.hist-info { flex:1; min-width:0; }
.hist-count { color:var(--accent); }

.landing-ptr {
  position:fixed; top:calc(var(--topbar-h, 0px) + 8px); left:50%; z-index:60;
  transform:translate(-50%, -120%); opacity:0; pointer-events:none;
  padding:6px 14px; border-radius:999px; font-size:12px; font-weight:500;
  color:#c7d2fe; background:rgba(14,16,18,0.92);
  border:1px solid rgba(147,197,253,0.2);
  transition:transform 0.2s ease, opacity 0.2s ease;
}
.landing-ptr.visible { transform:translate(-50%, 0); opacity:1; }
.landing-ptr.ready span::before { content:'↓ '; }
.landing-ptr.ready span::after { content:''; }
.landing-ptr:not(.ready) span::before { content:''; }

