/* ============================================================
   AI 讨论组 · 样式
   ============================================================ */
:root {
  --bg: #08090c;
  --bg-soft: #0a0c11;
  --surface: #0e1015;
  --surface-2: #12151c;
  --surface-3: #171b23;
  --border: rgba(255, 255, 255, 0.065);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #eceef3;
  --text-2: #9ba3b5;
  --muted: #5e6577;
  --brand: #6c8cff;
  --brand-2: #9b8cff;
  --gold: #f5b942;
  --green: #4ade80;
  --red: #f87171;
  --radius: 16px;
  --shadow-lg: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  /* 用 clip 而不是 hidden：hidden 会把 body 变成滚动容器，导致 position:sticky 失效 */
  overflow-x: clip;
  font-size: 15px;
}

button, textarea, input { font-family: inherit; }

::selection { background: rgba(108, 140, 255, 0.3); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------------- 背景 ---------------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -180px, rgba(108, 140, 255, 0.13), transparent 70%),
    radial-gradient(700px 340px at 92% 6%, rgba(155, 140, 255, 0.06), transparent 70%),
    radial-gradient(600px 300px at 4% 30%, rgba(74, 222, 128, 0.035), transparent 70%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(8, 9, 12, 0.78);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; user-select: none; }
/* 高度固定，宽度按图片比例走；横版长图有 max-width 兜底，不会把顶栏撑爆 */
.brand-logo {
  height: 26px;
  width: auto;
  max-width: 168px;
  min-width: 26px;
  display: block;
  flex: none;
  object-fit: contain;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--brand); }
.brand-name[hidden] { display: none; }

.top-right { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 13px;
  white-space: nowrap;
}
.pill i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.pill.warn i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.pill.over i { background: var(--red); box-shadow: 0 0 8px var(--red); }
.pill b { color: var(--text); font-weight: 700; }
/* 顶栏那句公益说明比较长，窄屏只留次数，别把顶栏撑爆 */
.pill-promo { color: var(--muted); }
@media (max-width: 860px) {
  .pill-promo { display: none; }
}
@media (max-width: 520px) {
  .pill-wide { padding: 5px 10px; font-size: 11.5px; }
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: 0.18s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface); }

/* ---------------- 布局 ---------------- */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 140px;
}

/* ---------------- 英雄区 ---------------- */
.hero {
  max-width: 840px;
  margin: 0 auto;
  padding: 68px 0 40px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero.hide {
  display: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 22px;
  padding: 5px 14px 5px 10px;
  border-radius: 99px;
  border: 1px solid rgba(108, 140, 255, 0.25);
  background: rgba(108, 140, 255, 0.08);
  color: #b9c6ff;
  font-size: 12.5px;
  font-weight: 600;
  width: fit-content;
  display: flex;
}
.hero-badge span.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.8px;
  text-align: center;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #7c9cff, #b9a6ff 48%, #7c9cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin: 16px auto 0;
  max-width: 560px;
  text-align: center;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.8;
}

/* composer */
.composer {
  margin-top: 34px;
  background: linear-gradient(180deg, var(--surface), #0b0d12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.composer:focus-within {
  border-color: rgba(108, 140, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.09), var(--shadow-lg);
}
.composer textarea {
  width: 100%;
  min-height: 108px;
  max-height: 300px;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.7;
  padding: 20px 22px 8px;
}
.composer textarea::placeholder { color: #555c6d; }

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  flex-wrap: wrap;
}

.count { font-size: 11.5px; color: var(--muted); }

/* 模型选择 */
.sel-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.6px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
  user-select: none;
}
.chip:hover { background: var(--surface-3); color: var(--text-2); }
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c, #666);
  transition: 0.18s;
}
.chip.on {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: #fff;
}
.chip.on .dot { box-shadow: 0 0 9px var(--c); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }

/* 模式切换 */
.modes {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.modes button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.18s;
}
.modes button:hover { color: var(--text-2); }
.modes button.on { background: var(--surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset; }

/* 主按钮 */
.go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #7c96ff, #5f7cf7);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 10px 24px -12px rgba(108, 140, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(108, 140, 255, 1); }
.go:active:not(:disabled) { transform: translateY(0); }
.go:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.go svg { width: 15px; height: 15px; }

/* 特性 */
.feats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* 最近讨论：讨论页丢了地址也能一键接回 */
.recent {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.recent-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 700;
  text-transform: uppercase;
}
.recent-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: #b7bfd0;
  font-size: 12px;
  cursor: pointer;
  transition: 0.18s;
  font-family: inherit;
}
.recent-item:hover {
  color: #fff;
  border-color: rgba(108, 140, 255, 0.4);
  background: rgba(108, 140, 255, 0.1);
}
.recent-item:active { transform: scale(0.98); }
.recent-item .ri-q {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-item .ri-t {
  font-size: 10.5px;
  color: #5e6577;
  flex: none;
}
.feat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.feat svg { width: 14px; height: 14px; opacity: 0.8; }

/* 示例问题 */
.examples {
  margin-top: 30px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.ex {
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: 0.18s;
}
.ex:hover { color: var(--text-2); border-color: var(--border-2); background: var(--surface-2); }

/* 流程条 */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.flow-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.flow-item .fi-n {
  font-size: 10px;
  font-weight: 800;
  color: #3d4453;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}
.flow-item b { color: var(--text-2); font-weight: 700; margin-right: 2px; }
.flow-arrow { color: #2c323e; font-size: 12px; }

/* ---------------- 工作区 ---------------- */
.workspace {
  display: none;
  grid-template-columns: 348px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding-top: 28px;
}
.workspace.show { display: grid; animation: fadeUp 0.5s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* 左侧舞台 */
.stage {
  position: sticky;
  top: 74px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.stage::-webkit-scrollbar { width: 0; }
body.has-dock .stage { max-height: calc(100vh - 172px); }

.topic-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), #0b0d12);
  border-radius: 14px;
  padding: 14px 16px;
}
.topic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.topic-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 800;
  text-transform: uppercase;
}
.topic-new {
  font-size: 11px;
  color: #9ba3b5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
  transition: 0.18s;
  white-space: nowrap;
}
.topic-new:hover { color: #fff; border-color: rgba(108, 140, 255, 0.4); background: rgba(108, 140, 255, 0.12); }
.topic-new:active { transform: scale(0.96); }
.topic-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.tag-mini {
  font-size: 10.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
}

/* 圆桌 */
.arena {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 50%, rgba(108, 140, 255, 0.055) 0%, transparent 62%),
    linear-gradient(180deg, #0b0d12, #080a0e);
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.arena::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.055);
}
.arena::after {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  border: 1px solid rgba(108, 140, 255, 0.06);
}
.arena-ring {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(108, 140, 255, 0.35) 60deg, transparent 120deg);
  mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
}
.arena.active .arena-ring {
  opacity: 1;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.center-node {
  position: relative;
  z-index: 5;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 20%, #1a1f2b, #0d1016);
  border: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.center-node .cn-label {
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 1.4px;
  font-weight: 800;
}
.center-node .cn-text {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 0 6px;
  line-height: 1.3;
}
.center-node.active {
  border-color: rgba(108, 140, 255, 0.55);
  box-shadow: 0 0 34px -8px rgba(108, 140, 255, 0.55), inset 0 0 18px rgba(108, 140, 255, 0.18);
}

.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0.34;
  filter: grayscale(1);
  transition: opacity 0.35s, filter 0.35s, transform 0.35s cubic-bezier(0.3, 0.8, 0.4, 1);
  will-change: transform, opacity;
  z-index: 6;
}
.node .av {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.9);
  position: relative;
}
.node .nm {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  text-align: center;
}
.node .nm small { display: block; font-size: 9.5px; color: var(--muted); font-weight: 500; }

.node.speaking {
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 12;
}
.node.speaking .av { box-shadow: 0 0 26px -4px var(--c), 0 6px 18px -8px rgba(0, 0, 0, 0.9); }
.node.speaking .nm { color: #fff; }
/* 被点名的一方：加一圈脉冲，表示"正在被质询" */
.node.targeted { opacity: 1; filter: none; z-index: 11; }
.node.targeted .av { animation: targetPulse 1.6s ease-out infinite; }
.node.targeted .nm { color: #fff; }
@keyframes targetPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--c) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 0%, transparent); }
}
.node.speaking .av::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 1px solid var(--c);
  opacity: 0.45;
  animation: ringPulse 1.8s ease-out infinite;
}
@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0; }
}
.node.done { opacity: 0.72; filter: none; }

/* 进度 */
.progress-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
}
.progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.progress-top .pt-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.progress-top .pt-num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 0 12px rgba(108, 140, 255, 0.6);
}
.steps-list {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.step-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: #474e60;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
  border-radius: 5px;
  padding: 1px 7px;
  transition: 0.3s;
  white-space: nowrap;
}
.step-row .sd {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #343b49;
  flex-shrink: 0;
  transition: 0.3s;
}
.step-row.doing {
  color: #fff;
  border-color: rgba(108, 140, 255, 0.4);
  background: rgba(108, 140, 255, 0.12);
}
.step-row.doing .sd {
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
}
.step-row.done { color: var(--text-2); }
.step-row.done .sd { background: var(--green); }

/* ---------------- 纪要流 ---------------- */
.thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 40px;
  min-width: 0;
}

.phase-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 4px;
}
.phase-head:first-child { margin-top: 0; }
.phase-idx {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--brand);
  background: rgba(108, 140, 255, 0.1);
  border: 1px solid rgba(108, 140, 255, 0.22);
  border-radius: 5px;
  padding: 1px 6px;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.phase-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.phase-note { font-size: 11.5px; color: var(--muted); }
.phase-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* 消息 */
.msg {
  display: flex;
  gap: 14px;
  padding: 16px 0 4px;
  animation: fadeUp 0.4s ease both;
}
.msg .av {
  width: 34px; height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 50%, #000));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.msg-body { flex: 1; min-width: 0; }
.msg-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.msg-name { font-size: 14px; font-weight: 700; color: #fff; }
.msg-role {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 4px;
  padding: 1px 6px;
}
.msg-model { font-size: 10.5px; color: #5b6478; }
/* 交锋标记：让"他在跟谁说话"一眼可见，否则整场看着像各说各话 */
.msg-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--lc, #6C8CFF);
  border: 1px solid color-mix(in srgb, var(--lc, #6C8CFF) 42%, transparent);
  background: color-mix(in srgb, var(--lc, #6C8CFF) 12%, transparent);
  white-space: nowrap;
}
.msg-link i { font-style: normal; opacity: 0.75; font-size: 10px; }
.msg-link b { font-weight: 700; }
.msg-link em { font-style: normal; font-size: 9.5px; opacity: 0.85; margin-left: 1px; }
.msg-link.pass {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(74, 222, 128, 0.12);
}
.msg-link.issue {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(248, 113, 113, 0.12);
}
.msg-time {
  font-size: 10.5px;
  color: #4a5164;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.msg-text {
  font-size: 14.5px;
  color: #c3c9d6;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-text.md { white-space: normal; }
.msg-text strong { color: #fff; font-weight: 700; }
.msg-text em { color: #dfe4ee; font-style: normal; border-bottom: 1px dashed rgba(255, 255, 255, 0.2); }
.msg-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: #d9e0f0;
}
.msg-text pre {
  background: #0a0c11;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0;
}
.msg-text pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.6; }
.msg-text ul, .msg-text ol { margin: 6px 0 6px 18px; }
.msg-text li { margin: 4px 0; }
.msg-text h4 { font-size: 14.5px; color: #fff; margin: 10px 0 4px; }
.msg-text a { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(108, 140, 255, 0.35); }
.msg-text p { margin: 6px 0; }

.msg.host { gap: 0; padding-top: 12px; }
.msg.host .av { display: none; }
.msg.host .msg-body {
  background: linear-gradient(90deg, rgba(108, 140, 255, 0.07), rgba(108, 140, 255, 0.01));
  border-left: 2px solid rgba(108, 140, 255, 0.55);
  border-radius: 0 12px 12px 0;
  padding: 14px 20px;
}
.msg.host .msg-name { font-size: 12.5px; color: #a9b8ff; letter-spacing: 0.6px; }

/* 光标 */
.caret {
  display: inline-block;
  width: 2px;
  height: 15px;
  background: var(--brand);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* 打字指示 */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-2);
  animation: bounce 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* 拆题卡 */
.plan-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), #0b0d12);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 8px 0 4px;
  animation: fadeUp 0.45s ease both;
}
.plan-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.plan-type {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--brand);
  background: rgba(108, 140, 255, 0.12);
  border: 1px solid rgba(108, 140, 255, 0.25);
  padding: 2px 8px;
  border-radius: 5px;
}
.plan-restate { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.6; }
.plan-tension {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(245, 185, 66, 0.4);
  line-height: 1.7;
}
.plan-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: flex-start;
}
.plan-key {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  width: 52px;
  flex-shrink: 0;
  padding-top: 4px;
}
.plan-vals { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-vals span {
  font-size: 11.5px;
  color: #c2c9d8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 6px;
}

/* 立场收敛面板 */
.verdict-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 6px 16px;
  margin: 6px 0;
  animation: fadeUp 0.45s ease both;
}
.verdict-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.verdict-row:last-child { border-bottom: none; }
.verdict-av {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.verdict-name { font-size: 12.5px; font-weight: 700; color: var(--text); width: 92px; flex-shrink: 0; }
.verdict-stance {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}
.stance-keep { color: #9fb3ff; background: rgba(108, 140, 255, 0.12); }
.stance-part { color: var(--gold); background: rgba(245, 185, 66, 0.12); }
.stance-flip { color: var(--green); background: rgba(74, 222, 128, 0.12); }
.verdict-final { font-size: 12.5px; color: var(--text-2); flex: 1; min-width: 0; }
.verdict-conf {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 84px;
  flex-shrink: 0;
}
.conf-bar { flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.conf-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.conf-num { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; width: 22px; text-align: right; }

/* ---------------- 报告 ---------------- */
.report {
  margin: 22px 0 0;
  border: 1px solid rgba(108, 140, 255, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(108, 140, 255, 0.1), transparent 70%),
    linear-gradient(180deg, #0d1017, #090b10);
  overflow: hidden;
  animation: reportIn 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 1);
}
@keyframes reportIn {
  from { opacity: 0; transform: translateY(18px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

.report-head {
  padding: 20px 26px;
  border-bottom: 1px solid rgba(108, 140, 255, 0.14);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.report-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 3px 9px;
  border-radius: 5px;
}
.report-head h2 { font-size: 17px; font-weight: 800; letter-spacing: 0.2px; flex: 1; min-width: 180px; }
.report-conf {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-2);
}
.conf-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  position: relative;
}
.conf-ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0b0e14;
}
.conf-ring span { position: relative; z-index: 1; }

.report-body { padding: 24px 26px 26px; }

.tldr {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.7;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  margin-bottom: 14px;
}
.summary { font-size: 13.8px; color: var(--text-2); line-height: 1.85; margin-bottom: 22px; }

.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 12px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sec-title.t-consensus { color: var(--green); }
.sec-title.t-divergence { color: var(--gold); }
.sec-title.t-risk { color: var(--red); }
.sec-title.t-step { color: var(--brand); }

.r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.r-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.014);
}
.r-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.r-list li {
  font-size: 13.5px;
  color: #bcc3d2;
  line-height: 1.65;
  padding-left: 15px;
  position: relative;
}
.r-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}
.r-list.agree li::before { background: var(--green); }
.r-list.risk li::before { background: var(--red); }
.r-list li b { color: #fff; font-weight: 600; }
.r-list li .who { color: var(--muted); font-size: 11.5px; margin-left: 4px; }

.div-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.014);
}
.div-topic { font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.div-sides { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.div-side { font-size: 12.8px; color: var(--text-2); line-height: 1.6; }
.div-side b { color: #dfe4f0; font-weight: 600; }
.div-verdict {
  font-size: 12.8px;
  color: #d8c9a4;
  background: rgba(245, 185, 66, 0.06);
  border-left: 2px solid rgba(245, 185, 66, 0.45);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.65;
}

.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.insight {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.014);
}
.insight h5 { font-size: 12.5px; color: #fff; font-weight: 700; margin-bottom: 4px; }
.insight p { font-size: 12.3px; color: var(--text-2); line-height: 1.6; }

.risk-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.risk-item:last-child { border-bottom: none; }
.risk-name { font-size: 13px; color: #fff; font-weight: 600; width: 110px; flex-shrink: 0; }
.risk-detail { font-size: 12.8px; color: var(--text-2); line-height: 1.65; flex: 1; }
.risk-action { font-size: 12.3px; color: var(--green); }

.steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 38px;
  font-size: 13.5px;
  color: #bcc3d2;
  line-height: 1.65;
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(108, 140, 255, 0.11);
  color: var(--brand);
  border: 1px solid rgba(108, 140, 255, 0.25);
}
.steps li b { color: #fff; font-weight: 700; }

.assume-row {
  display: flex;
  gap: 10px;
  font-size: 12.8px;
  color: var(--text-2);
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}
.assume-row:last-child { border-bottom: none; }
.assume-row .a-q { color: #d5dbe7; flex: 1; }
.assume-row .a-how { color: var(--muted); width: 46%; flex-shrink: 0; }

.boundary {
  margin-top: 20px;
  font-size: 12.8px;
  color: var(--text-2);
  line-height: 1.75;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.012);
}
.boundary b { color: #fff; }

.report-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.22);
}
.foot-meta { font-size: 11.5px; color: var(--muted); flex: 1; }
.foot-actions { display: flex; gap: 8px; }
.mini-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mini-btn:hover { color: #fff; border-color: var(--border-2); background: var(--surface-3); }

/* 提示条 */
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbb98c;
  background: rgba(245, 185, 66, 0.055);
  border: 1px solid rgba(245, 185, 66, 0.16);
  border-radius: 8px;
  padding: 7px 12px;
  margin: 8px 0;
  line-height: 1.5;
}
.notice.err { color: #f0a9a9; background: rgba(248, 113, 113, 0.06); border-color: rgba(248, 113, 113, 0.2); }

/* 追问消息 */
.msg.user { flex-direction: row-reverse; }
.msg.user .msg-body { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .msg-head { justify-content: flex-end; }
.msg.user .msg-text {
  background: rgba(108, 140, 255, 0.1);
  border: 1px solid rgba(108, 140, 255, 0.22);
  border-radius: 12px 3px 12px 12px;
  padding: 10px 16px;
  color: #dfe4f2;
  font-size: 14px;
  max-width: 88%;
  text-align: left;
}
.msg.user .av { display: none; }

/* ---------------- 底部输入 ---------------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  padding: 12px 24px 16px;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0), rgba(8, 9, 12, 0.92) 34%, #08090c);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.dock.show { transform: none; }
.dock-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: linear-gradient(180deg, var(--surface), #0b0d12);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px 10px 16px;
  box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s;
}
.dock-inner:focus-within { border-color: rgba(108, 140, 255, 0.4); }
.dock textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  max-height: 120px;
  min-height: 24px;
  padding: 4px 0;
}
.dock textarea::placeholder { color: #4f5667; }
.dock .go { padding: 8px 16px; font-size: 13px; }
.dock-hint {
  max-width: 1180px;
  margin: 8px auto 0;
  font-size: 11px;
  color: #454c5e;
  text-align: center;
}
/* 追问次数用完：提示变暖色，配合输入框禁用 */
.dock-hint.is-limit {
  color: #c9a45f;
}

/* 回到最新 */
.jump {
  position: fixed;
  right: 28px;
  bottom: 104px;
  z-index: 54;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.8);
}
.jump.show { opacity: 1; pointer-events: auto; }
.jump:hover { color: #fff; }

/* 遮罩 / 弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, var(--surface), #0a0c11);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 40px 100px -40px #000;
  animation: fadeUp 0.3s ease both;
  max-height: 82vh;
  overflow-y: auto;
}
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.modal .m-sub { font-size: 13px; color: var(--text-2); margin-bottom: 18px; line-height: 1.7; }
.modal .m-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.modal .m-row .m-idx {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  padding-top: 2px;
  min-width: 18px;
}
.modal .m-row b { color: #fff; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 额度用尽 */
.limit-card {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.05), transparent);
  border-radius: 18px;
  padding: 36px 28px;
  animation: fadeUp 0.4s ease both;
}
.limit-card .ic {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: rgba(248, 113, 113, 0.1);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.limit-card h3 { font-size: 17px; margin-bottom: 8px; }
.limit-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.limit-card .reset { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translate(-50%, 20px);
  z-index: 90;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s;
  box-shadow: 0 20px 40px -20px #000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 重连提示 */
.reconnect {
  position: sticky;
  top: 60px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 12px;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.1);
  border: 1px solid rgba(245, 185, 66, 0.2);
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 10px;
}
.reconnect.show { display: flex; }
.spin {
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------------- 响应式 ---------------- */
@media (max-height: 840px) and (min-width: 981px) {
  .arena { aspect-ratio: 1 / 0.9; }
  .node .av { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
  .center-node { width: 72px; height: 72px; }
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; gap: 20px; }
  .stage { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .progress-card { grid-column: 1 / -1; }
  .arena { aspect-ratio: 16/10; }
  .arena::before { inset: 18% 24%; border-radius: 40%; }
  .arena-ring { inset: 18% 24%; border-radius: 40%; }
  .arena::after { display: none; }
  .r-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
}

@media (max-width: 720px) {
  .shell { padding: 0 16px 150px; }
  .topbar-inner { padding: 12px 16px; }
  /* 窄屏给 logo 图留个上限，避免横版长图把右侧胶囊挤没 */
  .brand-logo { height: 24px; max-width: 120px; min-width: 24px; }
  .brand-name { font-size: 14px; }
  .hero h1 { font-size: 27px; }
  .stage { grid-template-columns: 1fr; }
  .arena { aspect-ratio: 1/0.86; }
  .topic-card { display: none; }
  .node .av { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
  .node .nm { font-size: 9.5px; }
  .node .nm small { display: none; }
  .center-node { width: 66px; height: 66px; }
  .center-node .cn-text { font-size: 10px; }
  .msg { gap: 10px; }
  .msg .av { width: 28px; height: 28px; font-size: 11px; border-radius: 9px; }
  .msg-text { font-size: 14px; }
  .report-head { padding: 16px 18px; gap: 9px; }
  .report-head h2 { font-size: 15.5px; min-width: 100px; }
  .report-conf { font-size: 10px; }
  .conf-ring { width: 34px; height: 34px; font-size: 10px; }
  .report-body { padding: 18px 18px 20px; }
  .report-foot { padding: 12px 18px; }
  .tldr { font-size: 15.5px; padding: 14px 16px; }
  .verdict-name { width: 66px; font-size: 11.5px; }
  .verdict-conf { width: 60px; }
  .risk-item { flex-direction: column; gap: 4px; }
  .risk-name { width: auto; }
  .assume-row { flex-direction: column; gap: 2px; }
  .assume-row .a-how { width: auto; }
  .dock { padding: 10px 12px 12px; }
  .jump { right: 16px; bottom: 92px; }
  .feats { gap: 14px; }
  .phase-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------------- 模拟数据横幅 ---------------- */
/* 目的：只要没真正调用模型，就必须让人一眼看出这是模板文本 */
.mockbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: linear-gradient(90deg, rgba(245, 185, 66, 0.16), rgba(245, 185, 66, 0.07));
  border-bottom: 1px solid rgba(245, 185, 66, 0.35);
  color: #f3d69b;
  font-size: 12.5px;
  line-height: 1.5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mockbar[hidden] { display: none !important; }
.mockbar b {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gold, #f5b942);
  color: #1a1405;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.mockbar span { color: #d8c49a; }
.mockbar u { text-decoration: none; border-bottom: 1px dashed rgba(245, 185, 66, 0.55); }
.mockbar a { color: #ffd786; text-decoration: underline; text-underline-offset: 2px; }
.mockbar code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #ffd786;
}

/* 横幅存在时，顶栏与左侧舞台整体下移，避免遮住内容 */
body.is-mock .topbar { top: 38px; }
body.is-mock .stage { top: 112px; max-height: calc(100vh - 130px); }

@media (max-width: 760px) {
  .mockbar { padding: 8px 12px; font-size: 11.5px; align-items: flex-start; }
  body.is-mock .topbar { top: 0; position: static; }
  body.is-mock .stage { top: 0; max-height: none; }
}

/* ---------------- 角色互换提示 ---------------- */
.rotate-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 14px;
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(108, 140, 255, 0.07);
  border: 1px dashed rgba(108, 140, 255, 0.34);
  font-size: 12px;
  color: #9aa8c8;
}
.rotate-note .rn-ic {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(108, 140, 255, 0.18);
  color: #8fa8ff;
  font-size: 12px;
  font-weight: 700;
}
.rotate-note b {
  color: #b8c6ea;
  font-weight: 700;
  margin-right: 8px;
}
.rotate-note .rn-txt { line-height: 1.6; }

/* 换位时节点做一次轻提示 */
#arena .node { transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1), top 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s; }
