/* VuuMake Cloud —— 应用外壳
   ============================================================================
   与营销站（style.css）分开：那边是可滚动的文档页，这里是占满视口、
   自身不滚动的应用布局，两套约束混在一个文件里只会互相掣肘。

   与桌面版同构：左栏项目与切换、中央编辑与展现、右栏 Agent。
   ========================================================================= */

:root {
  --bg: #0a0e1a;
  --bg-deep: #070b14;
  --panel: #141d2e;
  --panel2: #1c283b;
  --panel3: #22304a;
  --text: #e8edf7;
  --muted: #aab5c8;
  --faint: #6b7a94;
  --line: #2a3852;
  --line-soft: #1e2a3f;
  /* 品牌三色，取自 3D 图标上那条 V 形飘带 */
  --teal: #2ad0c8;
  --teal-lite: #5eead4;
  --accent: #3b6ef5;
  --accent-deep: #1d4ed8;
  --accent2: #a855f7;
  --accent2-lite: #c4a3ff;
  --ribbon: linear-gradient(118deg, var(--teal), var(--accent) 48%, var(--accent2));
  /* 图标是玻璃质感：上缘一道白色高光 + 柔和外发光。
     界面上凡是「凸起」的元素都用这两条，才和图标是一套东西 */
  --gloss: inset 0 1px 0 rgba(255,255,255,.22);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.05);
  --glow: 0 4px 16px rgba(59,110,245,.34), 0 0 0 1px rgba(168,85,247,.14);
  --green: #56d7a4;
  --amber: #f4c26b;
  --rose: #ff7a8a;

  --rail-w: 232px;
  --agent-w: 356px;
  --head-h: 46px;
  --foot-h: 26px;
  --r: 10px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;                 /* 应用布局：页面本身不滚动，只有面板内部滚 */
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

/* 细滚动条：默认那条又粗又亮，在暗色密集界面里很跳 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3a55; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a4d70; background-clip: padding-box; }

/* ---------------------------------------------------------------- 布局 */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr var(--agent-w);
  grid-template-rows: var(--head-h) 1fr var(--foot-h);
  grid-template-areas:
    "head head head"
    "rail main agent"
    "foot foot foot";
  height: 100vh;
  height: 100dvh;
}
.app.rail-collapsed { --rail-w: 56px; }
.app.agent-collapsed { --agent-w: 0px; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #101a2c, #0d1524);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: .2px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.wordmark { height: 17px; width: auto; display: block; }
.wordmark + .wordmark-fallback { display: none; }
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
/* 真图标是透明 PNG，别再垫底色和描边——那是没有图时那个字母块的样式 */
img.brand-mark { object-fit: contain; background: none; box-shadow: none; }
span.brand-mark {
  background: var(--ribbon);
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 4px 14px rgba(79,124,255,.35);
}
.brand em { font-style: normal; color: var(--faint); font-weight: 500; }

.path {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: #0c1424;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  min-width: 0;
  max-width: 380px;
}
.path b { color: var(--text); font-weight: 550; }
.path span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-unsaved { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }

.spacer { flex: 1 1 auto; min-width: 0; }

.tbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .13s, color .13s, border-color .13s;
}
.tbtn:hover { background: var(--panel2); color: var(--text); }
.tbtn.primary {
  background: var(--ribbon);
  color: #fff;
  box-shadow: 0 3px 12px rgba(79,124,255,.3);
}
.tbtn.primary:hover { filter: brightness(1.08); }
.tbtn.icon { padding: 5px 7px; }

/* ---------------------------------------------------------------- 左栏 */
.rail {
  grid-area: rail;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.rail-sec { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.rail-sec:last-of-type { border-bottom: none; }
.rail-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 7px;
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.rail-collapsed .rail-title,
.rail-collapsed .rail-label,
.rail-collapsed .tree,
.rail-collapsed .rail-foot-text { display: none; }
.rail-collapsed .rail-item { justify-content: center; padding: 9px 0; }

.rail-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  border: 1px solid transparent;
  transition: background .13s, color .13s;
}
.rail-item:hover { background: var(--panel2); color: var(--text); }
.rail-item.active {
  background: linear-gradient(90deg, rgba(79,124,255,.19), rgba(155,108,255,.09));
  color: #fff;
  border-color: rgba(79,124,255,.34);
}
.rail-item .ico { width: 18px; height: 18px; flex: none; display: grid; place-items: center; opacity: .95; }
.rail-item .ico svg { width: 16px; height: 16px; }
/* 有真图标时用它，onerror 会把 img 移除并露出内置 svg——
   两者只会存在一个，不会重叠，也不会出现裂图 */
.rail-item .ico img { width: 18px; height: 18px; object-fit: contain; }
.rail-item .ico img + svg { display: none; }
.rail-item .count { margin-left: auto; font-size: 11px; color: var(--faint); }
.rail-collapsed .rail-item .count { display: none; }

/* 项目文件树 */
.tree { padding: 2px 2px 4px; overflow-y: auto; }
.tree-row {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
}
.tree-row:hover { background: var(--panel2); color: var(--text); }
.tree-row.sel { background: var(--panel2); color: #fff; }
.tree-row .ft {
  font-size: 9.5px; opacity: .7; flex: none;
  min-width: 26px; text-align: center;
  letter-spacing: .02em;
}
.tree-row.depth1 { padding-left: 22px; }

.rail-foot {
  margin-top: auto;
  padding: 9px 8px;
  border-top: 1px solid var(--line-soft);
}
.store-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(79,124,255,.14), rgba(155,108,255,.09));
  border: 1px solid rgba(79,124,255,.24);
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
}
.store-badge:hover { border-color: rgba(79,124,255,.5); }
.rail-foot-text small { color: var(--faint); font-size: 11px; }

/* ---------------------------------------------------------------- 中央 */
.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
  overflow: hidden;
}
.main-head {
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #0c1322;
  flex: none;
}
.seg {
  display: inline-flex;
  padding: 2px;
  background: #111c2f;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}
.seg button {
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--muted);
  transition: background .13s, color .13s;
}
.seg button.on { background: var(--panel3); color: #fff; }

.task-name { font-size: 13px; color: var(--text); font-weight: 550; }
.task-hint { font-size: 11.5px; color: var(--faint); }

.stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}
.pane { display: none; }
.stage > .pane.on { height: calc(100% - 44px); }
.pane.on { display: block; }
/* 影音与游戏是「上面看内容、下面看时间线」的结构，用 flex 撑满高度，
   否则内容少时下方一大片空白，像是没做完 */
.pane.on[data-pane="media"] { display: flex; flex-direction: column; gap: 0; }
.pane[data-pane="media"] .canvas-grid { flex: 0 0 auto; align-content: start; }
.pane[data-pane="media"] .timeline { margin-top: auto; }

/* --- 代码视图 --- */
.code-wrap {
  height: 100%;
  display: flex;
  background: #0b1220;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.75;
}
.gutter {
  padding: 12px 10px;
  color: #3d4d6b;
  text-align: right;
  user-select: none;
  background: #0a101c;
  border-right: 1px solid var(--line-soft);
  flex: none;
}
.code { padding: 12px 14px; overflow: auto; flex: 1; white-space: pre; }
.k { color: #c792ea; } .s { color: #a5e075; } .f { color: #82aaff; }
.c { color: #4a5a78; font-style: italic; } .n { color: #f78c6c; }

/* --- 画布 / 图像视图 --- */
.canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.shot {
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
  display: grid; place-items: end start;
  padding: 9px;
  font-size: 11.5px;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(4,8,16,.82));
}
.shot span { position: relative; z-index: 1; }
.sh1 { background: linear-gradient(150deg, #f9a13a, #c2410c 45%, #1b1636); }
.sh2 { background: linear-gradient(150deg, #cbd5e1, #94a3b8 40%, #334155); }
.sh3 { background: linear-gradient(150deg, #fde3c8, #e5a06b 45%, #3b2a24); }
.sh4 { background: linear-gradient(150deg, #ff4d94, #7c3aed 45%, #0b1030); }
.sh5 { background: linear-gradient(150deg, #d6d3d1, #78716c 45%, #292524); }
.shot.empty {
  background: #0e1728;
  border-style: dashed;
  border-color: var(--line);
  display: grid; place-items: center;
  color: var(--faint);
}
.shot.empty::after { display: none; }

/* --- 时间线 --- */
.timeline {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: #0b1220;
  padding: 10px;
}
.tl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tl-row:last-child { margin-bottom: 0; }
.tl-tag {
  width: 34px; flex: none; text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 0; border-radius: 5px;
  background: var(--panel3); color: var(--muted);
}
.tl-tag.v { background: rgba(155,108,255,.2); color: #c4a8ff; }
.tl-tag.a { background: rgba(86,215,164,.16); color: var(--green); }
.tl-track { flex: 1; display: flex; gap: 4px; height: 26px; }
.tl-clip {
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(155,108,255,.42), rgba(124,58,237,.28));
  border: 1px solid rgba(155,108,255,.44);
  font-size: 10.5px;
  color: #e6dcff;
  padding: 4px 7px;
  overflow: hidden;
  white-space: nowrap;
}
.tl-clip.audio {
  background: linear-gradient(180deg, rgba(86,215,164,.28), rgba(16,185,129,.18));
  border-color: rgba(86,215,164,.4);
  color: #bff3de;
}

/* --- 幻灯 --- */
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.slide {
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, #16233c, #101a2c);
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.slide.active { border-color: rgba(79,124,255,.55); box-shadow: 0 0 0 1px rgba(79,124,255,.25); }
.slide h4 { margin: 0; font-size: 13px; }
.slide p { margin: 0; font-size: 11px; color: var(--faint); }
.slide .bar { height: 4px; border-radius: 3px; background: var(--panel3); }
.slide .bar.w60 { width: 60%; } .slide .bar.w40 { width: 40%; }
.slide .num { margin-top: auto; font-size: 10px; color: var(--faint); }

/* --- 游戏运行时 --- */
.game-stage {
  height: 100%;
  min-height: 260px;
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(79,124,255,.13), transparent 70%),
    repeating-linear-gradient(0deg, #0b1220 0 24px, #0c1424 24px 48px);
  display: grid; place-items: center;
  position: relative;
}
.game-hud {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px;
}
.chip {
  padding: 3px 9px; border-radius: 999px;
  background: rgba(10,16,28,.8);
  border: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.play-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(79,124,255,.4);
  color: #fff; font-size: 20px;
}

/* --- 空态 --- */
.empty-state {
  height: 100%;
  display: grid; place-items: center;
  text-align: center;
  color: var(--faint);
}
.empty-state h3 { color: var(--text); margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty-state p { margin: 0 0 14px; font-size: 12.5px; max-width: 380px; }

/* ---------------------------------------------------------------- 右栏 */
.agent {
  grid-area: agent;
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.agent-collapsed .agent { display: none; }

.agent-head {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.agent-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(86,215,164,.7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(86,215,164,.55); }
  70% { box-shadow: 0 0 0 7px rgba(86,215,164,0); }
  100% { box-shadow: 0 0 0 0 rgba(86,215,164,0); }
}
.pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f1929;
  font-size: 11.5px;
  color: var(--muted);
}
.pill.on { border-color: rgba(244,194,107,.45); color: var(--amber); background: rgba(244,194,107,.09); }

.thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 11px; display: flex; flex-direction: column; gap: 11px; }

.msg { display: flex; flex-direction: column; gap: 5px; }
.msg .who { font-size: 10.5px; color: var(--faint); letter-spacing: .04em; }
.bubble {
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 12.8px;
  line-height: 1.62;
  border: 1px solid var(--line-soft);
  background: var(--panel2);
}
.msg.me .bubble {
  background: linear-gradient(135deg, rgba(79,124,255,.2), rgba(155,108,255,.12));
  border-color: rgba(79,124,255,.32);
}
.bubble p { margin: 0 0 7px; }
.bubble p:last-child { margin: 0; }

/* 工具调用卡片：Agent 到底做了什么，得看得见 */
.toolcall {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #0d1626;
  overflow: hidden;
  font-size: 12px;
}
.toolcall summary {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--muted);
  list-style: none;
}
.toolcall summary::-webkit-details-marker { display: none; }
.toolcall summary code { color: #82aaff; font-size: 11.5px; }
.toolcall .ok { color: var(--green); font-size: 11px; margin-left: auto; }
.toolcall pre {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
  background: #0a1120;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  overflow-x: auto;
}
.steps { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); }
.steps i { width: 6px; height: 6px; border-radius: 50%; background: var(--panel3); display: inline-block; }
.steps i.done { background: var(--green); }
.steps i.now { background: var(--amber); animation: pulse 1.6s infinite; }

.composer { flex: none; padding: 10px; border-top: 1px solid var(--line-soft); }
.composer-box {
  border: 1px solid var(--line);
  background: #0d1626;
  border-radius: 11px;
  padding: 8px 9px;
  transition: border-color .15s, box-shadow .15s;
}
.composer-box:focus-within {
  border-color: rgba(79,124,255,.55);
  box-shadow: 0 0 0 3px rgba(79,124,255,.11);
}
.composer textarea {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  resize: none;
  font-size: 12.8px;
  line-height: 1.6;
  max-height: 120px;
}
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.send {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6b63ff);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(79,124,255,.32);
}
.send:hover { filter: brightness(1.1); }
/* 生成中：按钮变成停止。用方块盖住纸飞机而不是换 SVG——
   图标一换，按钮宽度会跳一下，正在读的人会被晃到。 */
.send.busy { background: linear-gradient(135deg, #b4404a, #8f3340); }
.send.busy svg { visibility: hidden; }
.send.busy::after {
  content: ""; position: absolute;
  width: 9px; height: 9px; border-radius: 2px; background: #fff;
}
.send { position: relative; }
.mini {
  padding: 3px 8px; border-radius: 7px;
  font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line-soft);
}
.mini:hover { color: var(--text); border-color: var(--line); }

/* ---------------------------------------------------------------- 底栏 */
.statusbar {
  grid-area: foot;
  display: flex; align-items: center; gap: 14px;
  padding: 0 12px;
  background: #0c1322;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
}
.statusbar b { color: var(--muted); font-weight: 500; }
.statusbar .ok { color: var(--green); }
.sb-right { margin-left: auto; display: flex; gap: 14px; }

/* ---------------------------------------------------------------- 提示条 */
/* 内联而非浮层：浮层无论放哪个角都会压住内容，而这条信息不值得挡住工作区 */
.preview-note {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(244,194,107,.11), rgba(244,194,107,.04));
  border: 1px solid rgba(244,194,107,.26);
  font-size: 12px;
  color: var(--muted);
}
.preview-note b { color: var(--amber); font-weight: 600; }
.preview-note a { color: #9fbaff; }
.preview-note button { color: var(--faint); padding: 0 2px; margin-left: auto; }
.preview-note button:hover { color: var(--text); }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 1100px) {
  .app { grid-template-columns: var(--rail-w) 1fr; grid-template-areas: "head head" "rail main" "foot foot"; }
  .agent { position: fixed; right: 0; top: var(--head-h); bottom: var(--foot-h); width: min(360px, 88vw); z-index: 40; box-shadow: -18px 0 44px rgba(0,0,0,.5); }
  .app.agent-collapsed .agent { display: none; }
}
@media (max-width: 720px) {
  .app { --rail-w: 56px; }
  .rail .rail-title, .rail .rail-label, .rail .tree, .rail .rail-foot-text { display: none; }
  .rail-item { justify-content: center; }
  .path { display: none; }
}


/* ============================================================================
   品牌质感对齐
   ----------------------------------------------------------------------------
   3D 图标的语言是：teal→blue→violet 渐变、玻璃高光、柔和外发光。
   下面把这套语言落到按钮、边框、激活态上，让界面和图标看起来是同一批人做的。
   放在文件末尾是有意的——这些是覆盖层，改动集中在一处便于回看。
   ========================================================================= */

::selection { background: rgba(59,110,245,.36); }

/* --- 凸起元素：渐变 + 上缘高光 + 外发光 --- */
.tbtn.primary,
.send,
.play-btn,
span.brand-mark {
  background: var(--ribbon);
  box-shadow: var(--gloss), var(--glow);
  border: none;
}
.tbtn.primary:hover, .send:hover { filter: brightness(1.09) saturate(1.05); }
.play-btn { box-shadow: var(--gloss), 0 10px 34px rgba(59,110,245,.42); }

/* --- 面板：玻璃边缘 --- */
.rail, .agent, .main-head, .statusbar { box-shadow: var(--glass-edge); }
.code-wrap, .timeline, .game-stage, .composer-box, .toolcall, .bubble, .slide, .shot {
  box-shadow: var(--glass-edge);
}

/* --- 左栏激活项：飘带做左边缘，而不是整块涂色 --- */
.rail-item.active {
  position: relative;
  background: linear-gradient(90deg, rgba(59,110,245,.22), rgba(168,85,247,.07) 70%, transparent);
  border-color: rgba(59,110,245,.32);
  box-shadow: var(--glass-edge);
}
.rail-item.active::before {
  content: "";
  position: absolute; left: -1px; top: 6px; bottom: 6px;
  width: 2.5px; border-radius: 3px;
  background: var(--ribbon);
  box-shadow: 0 0 8px rgba(59,110,245,.6);
}
.rail-item.active .ico { filter: drop-shadow(0 0 6px rgba(94,234,212,.35)); }

/* --- 分段控件选中态 --- */
.seg button.on {
  background: linear-gradient(180deg, rgba(59,110,245,.34), rgba(29,78,216,.22));
  box-shadow: var(--gloss);
  color: #fff;
}

/* --- 输入聚焦：用 teal 起手，和图标高光同色 --- */
.composer-box:focus-within {
  border-color: rgba(42,208,200,.5);
  box-shadow: var(--glass-edge), 0 0 0 3px rgba(42,208,200,.13);
}

/* --- 工具调用：工具名用 teal，和「这是机器在动」的语义对上 --- */
.toolcall summary code { color: var(--teal-lite); }
.toolcall { border-color: rgba(42,208,200,.2); }
.toolcall .ok { color: var(--teal-lite); }

/* --- 徽章与胶囊：玻璃感 --- */
.store-badge {
  background: linear-gradient(120deg, rgba(42,208,200,.15), rgba(59,110,245,.15) 50%, rgba(168,85,247,.13));
  border-color: rgba(59,110,245,.3);
  box-shadow: var(--glass-edge);
}
.store-badge:hover { border-color: rgba(42,208,200,.55); }
.pill.on {
  background: linear-gradient(120deg, rgba(42,208,200,.16), rgba(168,85,247,.13));
  border-color: rgba(42,208,200,.42);
  color: var(--teal-lite);
  box-shadow: var(--glass-edge);
}
.chip { box-shadow: var(--glass-edge); }

/* --- 时间线片段：视频走 violet、音频走 teal，与图标分色一致 --- */
.tl-clip {
  background: linear-gradient(180deg, rgba(168,85,247,.4), rgba(124,58,237,.24));
  border-color: rgba(168,85,247,.44);
  box-shadow: var(--gloss);
}
.tl-clip.audio {
  background: linear-gradient(180deg, rgba(42,208,200,.34), rgba(13,148,136,.2));
  border-color: rgba(42,208,200,.44);
  color: #b8f5ee;
}
.tl-tag.v { background: rgba(168,85,247,.2); color: var(--accent2-lite); }
.tl-tag.a { background: rgba(42,208,200,.18); color: var(--teal-lite); }

/* --- 我的消息气泡 --- */
.msg.me .bubble {
  background: linear-gradient(135deg, rgba(59,110,245,.24), rgba(168,85,247,.13));
  border-color: rgba(59,110,245,.34);
  box-shadow: var(--glass-edge);
}

/* --- 幻灯选中 --- */
.slide.active {
  border-color: rgba(59,110,245,.5);
  box-shadow: var(--glass-edge), 0 0 0 1px rgba(168,85,247,.22), 0 6px 22px rgba(59,110,245,.16);
}
.slide .bar { background: linear-gradient(90deg, rgba(59,110,245,.6), rgba(168,85,247,.3)); }

/* --- 状态指示 --- */
.pulse { background: var(--teal-lite); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(42,208,200,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(42,208,200,0); }
  100% { box-shadow: 0 0 0 0 rgba(42,208,200,0); }
}
.statusbar .ok { color: var(--teal-lite); }
.steps i.done { background: var(--teal-lite); }

/* --- 滚动条也带一点品牌色 --- */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #33507e, #3b3f7a);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3f63a0, #4d4f96);
  background-clip: padding-box;
}

/* --- 顶栏底部一条极淡的飘带，呼应图标而不喧宾夺主 --- */
.topbar { position: relative; }
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(42,208,200,.5), rgba(59,110,245,.35) 40%, rgba(168,85,247,.3) 70%, transparent);
}


/* ---------------------------------------------------------------- 账号态
   顶栏右侧，紧邻折叠按钮。样式与营销站（style.css）同形但更紧凑——
   这里的行高只有 46px，营销站那套内边距会把顶栏顶开。 */
.acct { position: relative; display: flex; align-items: center; margin: 0 2px; }
.acct-login {
  border: 1px solid var(--line); border-radius: 7px;
  padding: 4px 11px; font-size: 12.5px; color: #cfe0ff;
  text-decoration: none; white-space: nowrap;
}
.acct-login:hover { border-color: rgba(42,208,200,.55); color: #fff; }
.acct-chip {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 2px 10px 2px 2px; background: transparent; cursor: pointer;
  color: var(--text); font-size: 12.5px; max-width: 160px;
}
.acct-chip:hover { border-color: rgba(59,110,245,.5); }
.acct-avatar {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ribbon); color: #fff;
  font-size: 11px; font-weight: 600; box-shadow: var(--gloss);
}
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 214px; padding: 6px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
.acct-menu[hidden] { display: none; }
.acct-menu .who { padding: 7px 9px 9px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-menu .who b { display: block; font-size: 12.5px; }
.acct-menu .who span { display: block; font-size: 11px; color: var(--faint); word-break: break-all; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left;
  padding: 6px 9px; border-radius: 7px; border: none; background: none;
  color: #dbe5f6; font-size: 12.5px; text-decoration: none; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--panel3); color: #fff; }
