/* =========================================================
   研途启航 · 工作台
   ========================================================= */
.app-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 500px at 90% -10%, rgba(47, 111, 237, .1), transparent 62%),
    radial-gradient(900px 500px at -5% 100%, rgba(15, 158, 138, .08), transparent 60%),
    var(--bg);
}
.app-body::before { display: none; }

/* ---------- 顶部 ---------- */
.app-header {
  flex: none;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(14px, 2.4vw, 28px);
  background: rgba(244, 241, 232, .7);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border-bottom: 1px solid rgba(211, 203, 184, .5);
  position: relative;
  z-index: 20;
}
.ah-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.app-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.app-brand .brand-mark svg { width: 20px; height: 20px; }
.app-brand .brand-text strong { font-size: 17px; }
.app-brand .brand-text span { font-size: 9px; }
.ah-divider { width: 1px; height: 22px; background: var(--line); }
.ah-title { font-size: 13px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.ah-right { display: flex; align-items: center; gap: 8px; }
.model-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10.5px; color: var(--ink-2);
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 253, 247, .6);
  white-space: nowrap;
}
.mc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(15, 158, 138, .12); }
.ah-right .icon-btn { width: 36px; height: 36px; }

/* ---------- 主体布局 ---------- */
.app-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px clamp(14px, 2.4vw, 28px) 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(370px, .74fr);
  gap: 16px;
}
.chat-pane, .panel-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 253, 247, .86);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 70px -50px rgba(20, 36, 61, .5), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.chat-pane { backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1); }

/* ---------- 对话 ---------- */
.chat-head {
  flex: none;
  height: 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(255, 253, 247, .96), rgba(255, 253, 247, .8));
}
.agent-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.agent-avatar {
  position: relative;
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #1b3f7a, #2f6fed 60%, #0f9e8a);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(27, 63, 122, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.agent-avatar svg { width: 21px; height: 21px; }
.agent-avatar i {
  position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px;
  border-radius: 50%; background: #31c9a2; border: 2px solid var(--paper);
}
.agent-text { min-width: 0; }
.agent-text strong { display: flex; align-items: center; gap: 7px; font-size: 14.5px; letter-spacing: .02em; }
.agent-text span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.stage-pill {
  font-size: 11.5px; font-weight: 600; color: var(--blue-deep);
  background: var(--blue-soft); border: 1px solid #d5e2ff;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 22px 8px; scroll-behavior: smooth; }
.chat-messages { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 10px; }

.msg { display: flex; gap: 10px; align-items: flex-start; animation: msgIn .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #1b3f7a, #2f6fed 60%, #0f9e8a);
  color: #fff; box-shadow: 0 6px 14px -8px rgba(27, 63, 122, .8);
}
.msg-avatar svg { width: 16px; height: 16px; }
.msg-body { min-width: 0; max-width: 720px; }
.msg-name { font-size: 10.5px; color: var(--muted); margin-bottom: 5px; letter-spacing: .04em; }
.bubble {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink);
  box-shadow: 0 6px 18px -16px rgba(20, 36, 61, .5);
  overflow-wrap: break-word;
}
.bubble .md { font-size: 14px; }
.msg.user { flex-direction: row-reverse; }
.msg.user .msg-body { max-width: 620px; }
.msg.user .bubble {
  background: linear-gradient(135deg, #2f6fed, #2458c0);
  border-color: #2458c0;
  color: #fff;
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 12px 26px -16px rgba(47, 111, 237, .6);
}
.msg.user .msg-name { text-align: right; }
.msg.user .msg-avatar { display: none; }
.msg.error .bubble { border-color: #f0c9c4; background: #fdf1ef; color: #8f3a31; }
.msg.error .msg-avatar { background: #b34a3f; }
.bubble .typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.bubble .typing i { width: 5px; height: 5px; border-radius: 50%; background: #8fa3c4; animation: pulseDot 1.2s ease-in-out infinite; }
.bubble .typing i:nth-child(2) { animation-delay: .15s; }
.bubble .typing i:nth-child(3) { animation-delay: .3s; }
.bubble .typing span { font-size: 11px; color: var(--muted); margin-left: 4px; }
.msg-divider { display: flex; align-items: center; gap: 12px; color: #a8a190; font-size: 10.5px; letter-spacing: .1em; margin: 2px 0; }
.msg-divider::before, .msg-divider::after { content: ""; height: 1px; flex: 1; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 9px); }
.msg-hint { text-align: center; font-size: 10.5px; color: var(--muted); padding: 2px 0 6px; }
.msg-tools { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.msg-tools .mini-btn { font-size: 11px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fffef9; color: var(--ink-2); }
.msg-tools .mini-btn:hover { border-color: var(--blue); color: var(--blue-deep); }

.chat-bottom {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 10px 22px 11px;
  background: linear-gradient(to top, rgba(255, 253, 247, .98), rgba(255, 253, 247, .86));
}
.quick-chips { display: flex; gap: 7px; overflow-x: auto; padding: 1px 1px 10px; scrollbar-width: none; }
.quick-chips::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: .16s ease;
}
.quick-chip:hover { border-color: #b9cdfa; background: var(--blue-soft); color: var(--blue-deep); }
.composer {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fffef9;
  padding: 9px 11px 8px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 237, .1); }
.composer textarea {
  width: 100%; border: 0; background: transparent; resize: none;
  font-size: 14px; line-height: 1.65; max-height: 132px; min-height: 24px;
  padding: 2px 2px 4px; outline: none;
}
.composer textarea::placeholder { color: #a4acb9; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-hint { font-size: 10px; color: #a4acb9; }
.send-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2f6fed, #1b4fbf);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(47, 111, 237, .8);
  transition: transform .16s ease, opacity .16s ease;
}
.send-btn:hover { transform: translateY(-1px); }
.send-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.send-btn svg { width: 16px; height: 16px; }
.send-btn .ico-stop { display: none; }
.chat-pane.streaming .send-btn { background: #263a5c; }
.chat-pane.streaming .send-btn .ico-send { display: none; }
.chat-pane.streaming .send-btn .ico-stop { display: block; }
.chat-disclaimer { margin: 8px 0 0; text-align: center; font-size: 9.5px; color: #a4acb9; letter-spacing: .02em; }

/* ---------- 档案面板 ---------- */
.panel-pane { background: rgba(255, 253, 247, .7); backdrop-filter: blur(20px) saturate(1.12); -webkit-backdrop-filter: blur(20px) saturate(1.12); }
.panel-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 20px 12px;
}
.panel-kicker { font-size: 9.5px; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.panel-head h1 { font-family: var(--serif); font-size: 22px; letter-spacing: .03em; margin-top: 3px; }
.panel-progress { display: flex; align-items: center; gap: 9px; }
.pp-ring {
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--p, 20) * 1%), #eae4d6 0);
  display: grid; place-items: center; position: relative; flex: none;
}
.pp-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--paper); }
.pp-ring span { position: relative; z-index: 1; font-family: var(--serif); font-size: 16px; font-weight: 600; color: #0a7666; }
.pp-ring small { position: relative; z-index: 1; font-size: 8px; color: var(--muted); align-self: flex-end; margin-bottom: 13px; }
.pp-label { font-size: 10.5px; color: var(--muted); max-width: 44px; line-height: 1.3; }
.panel-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 2px 16px 18px; }

.stage-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; position: relative; padding: 2px 0 14px; }
.stage-track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 15px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.stage-node {
  position: relative; z-index: 1; border: 0; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted); transition: color .18s ease;
}
.sn-dot {
  width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--line-strong);
  font-size: 10px; font-weight: 700; color: #98a2b3;
  transition: .2s ease;
}
.sn-dot svg { width: 12px; height: 12px; }
.stage-node.done .sn-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.stage-node.done { color: #0a7666; }
.stage-node.current .sn-dot {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, .14);
  animation: currentPulse 2.4s ease-in-out infinite;
}
@keyframes currentPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(47, 111, 237, .13); } 50% { box-shadow: 0 0 0 7px rgba(47, 111, 237, .05); } }
.stage-node.current { color: var(--blue-deep); font-weight: 600; }
.sn-label { font-size: 9.5px; line-height: 1.2; text-align: center; white-space: nowrap; }
.stage-node.done:hover .sn-dot { transform: scale(1.08); }
.stage-node.locked { cursor: default; }
.stage-track-hint { text-align: center; font-size: 9.5px; color: #a8a190; margin: -6px 0 14px; }

.panel-cards { display: flex; flex-direction: column; gap: 13px; }
.pcard {
  background: rgba(255, 253, 247, .9);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px 15px 14px;
  box-shadow: 0 12px 30px -28px rgba(20, 36, 61, .5);
  animation: cardIn .32s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.pc-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pc-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pc-ico svg { width: 15px; height: 15px; }
.pc-ico.blue { background: var(--blue-soft); color: var(--blue-deep); }
.pc-ico.teal { background: var(--teal-soft); color: #0a6f61; }
.pc-ico.amber { background: var(--amber-soft); color: #9a5a14; }
.pc-ico.violet { background: var(--violet-soft); color: #4f3fc4; }
.pc-ico.rose { background: var(--rose-soft); color: #a83f63; }
.pc-title h3 { font-size: 14px; letter-spacing: .02em; line-height: 1.3; }
.pc-title p { margin: 2px 0 0; font-size: 9.5px; color: var(--muted); line-height: 1.4; }
.pc-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.btn-xs { padding: 5px 9px; font-size: 10.5px; border-radius: 8px; }
.btn-xs svg { width: 12px; height: 12px; }
.pc-badge { font-size: 9.5px; padding: 2px 7px; border-radius: 999px; background: #f2eee3; color: var(--muted); white-space: nowrap; }
.pc-badge.blue { background: var(--blue-soft); color: var(--blue-deep); }
.pc-badge.teal { background: var(--teal-soft); color: #0a6f61; }
.pc-badge.amber { background: var(--amber-soft); color: #9a5a14; }

.profile-rows { display: flex; flex-direction: column; gap: 7px; }
.prow { display: grid; grid-template-columns: 58px 1fr; gap: 8px; font-size: 11.5px; line-height: 1.6; }
.prow dt { color: var(--muted); }
.prow dd { margin: 0; color: var(--ink-2); word-break: break-word; }
.prow dd .tag { margin: 0 4px 3px 0; }
.prow.empty dd { color: #b3ab9a; }
.profile-completion { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pc-bar { flex: 1; height: 4px; border-radius: 999px; background: #eee9dc; overflow: hidden; }
.pc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .5s ease; }
.profile-completion span { font-size: 9.5px; color: var(--muted); }
.empty-state { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px 14px; text-align: center; background: rgba(255, 255, 255, .35); }
.empty-state p { margin: 0 0 10px; font-size: 11.5px; color: var(--muted); }
.empty-state .btn { font-size: 11.5px; padding: 7px 14px; }

/* 方向 */
.dir-list { display: flex; flex-direction: column; gap: 9px; }
.dir-card { border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; background: #fffef9; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.dir-card:hover { border-color: #cfc6b3; box-shadow: 0 10px 22px -20px rgba(20, 36, 61, .5); }
.dir-card.selected { border-color: #b9cdfa; background: linear-gradient(160deg, #f7faff, #fffdf7); box-shadow: 0 0 0 1px rgba(47, 111, 237, .08); }
.dir-head { display: flex; align-items: flex-start; gap: 9px; }
.dir-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-deep); flex: none; }
.dir-ico svg { width: 14px; height: 14px; }
.dir-head h4 { font-size: 12.5px; line-height: 1.35; }
.dir-head p { margin: 2px 0 0; font-size: 9.5px; color: var(--muted); }
.dir-fit { margin: 8px 0 0; font-size: 11px; color: var(--ink-2); line-height: 1.65; }
.dir-badge { margin-left: auto; flex: none; font-size: 9px; padding: 2px 6px; border-radius: 999px; background: var(--teal-soft); color: #0a6f61; }
.dir-badge.pick { background: var(--blue-soft); color: var(--blue-deep); }
.dir-details { margin-top: 8px; }
.dir-details summary { cursor: pointer; font-size: 10px; color: var(--blue); list-style: none; display: inline-flex; align-items: center; gap: 3px; }
.dir-details summary::-webkit-details-marker { display: none; }
.dir-details summary::after { content: "＋"; font-size: 9px; }
.dir-details[open] summary::after { content: "－"; }
.dir-details .dd-body { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.dd-row { display: grid; grid-template-columns: 44px 1fr; gap: 7px; font-size: 10.5px; line-height: 1.6; }
.dd-row span:first-child { color: var(--muted); }
.dd-row span:last-child { color: var(--ink-2); }
.dd-q { margin: 0; padding-left: 14px; font-size: 10.5px; color: var(--ink-2); line-height: 1.65; }
.dd-q li { margin: 2px 0; }
.dd-verify { font-size: 9.5px; color: var(--muted); background: #f6f2e7; border-radius: 6px; padding: 5px 7px; line-height: 1.55; }
.dir-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.dir-actions .btn { padding: 6px 10px; font-size: 10.5px; border-radius: 8px; }
.pc-foot-note { margin: 10px 0 0; font-size: 9.5px; color: #a4a08f; line-height: 1.55; }
.refresh-link { border: 0; background: none; color: var(--blue); font-size: 10.5px; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.refresh-link svg { width: 12px; height: 12px; }
.refresh-link:hover { text-decoration: underline; }

/* 能力匹配 */
.gap-cols { display: flex; flex-direction: column; gap: 9px; }
.gap-col { border-radius: 12px; padding: 10px 11px; border: 1px solid var(--line); background: #fffef9; }
.gap-col.adv { background: linear-gradient(150deg, #f6fcf9, #fffef9); border-color: #d6ece5; }
.gap-col.need { background: linear-gradient(150deg, #fffaf1, #fffef9); border-color: #f0e1c7; }
.gap-col h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .03em; margin: 0 0 7px; color: var(--ink-2); }
.gap-col h4 svg { width: 13px; height: 13px; }
.gap-col.adv h4 svg { color: #0a7666; }
.gap-col.need h4 svg { color: var(--amber); }
.gap-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.gap-col li { font-size: 10.5px; line-height: 1.6; }
.gap-col li strong { display: block; font-size: 11px; color: var(--ink); }
.gap-col li p { margin: 1px 0 0; color: var(--muted); }
.pri { display: inline-block; font-size: 8.5px; padding: 1px 5px; border-radius: 4px; background: var(--amber-soft); color: #9a5a14; margin-left: 5px; vertical-align: 1px; }
.knowledge-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.knowledge-chips span { font-size: 9.5px; background: #f3efe4; color: var(--ink-2); border-radius: 5px; padding: 3px 7px; }
.res-list { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.res-item { display: flex; gap: 7px; align-items: flex-start; font-size: 10.5px; color: var(--ink-2); line-height: 1.55; }
.res-item .tag { flex: none; font-size: 8.5px; padding: 1px 5px; }
.res-item em { font-style: normal; color: var(--muted); display: block; }
.suggest-box { margin-top: 10px; padding: 8px 10px; border-left: 2px solid var(--teal); background: var(--teal-soft); border-radius: 0 8px 8px 0; font-size: 10.5px; color: #0a5f54; line-height: 1.65; }
.pc-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.pc-actions .btn { font-size: 11px; padding: 7px 12px; border-radius: 9px; }
.pc-actions .btn svg { width: 13px; height: 13px; }

/* 计划 */
.plan-goal { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin: 0 0 8px; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.plan-meta span { font-size: 9.5px; color: var(--muted); background: #f4f0e6; border-radius: 5px; padding: 3px 7px; }
.plan-progress { display: flex; align-items: center; gap: 9px; margin: 2px 0 10px; }
.plan-progress .bar { flex: 1; height: 5px; border-radius: 999px; background: #eee9dc; overflow: hidden; }
.plan-progress .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .4s ease; }
.plan-progress span { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.task-item { display: flex; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; background: #fffef9; transition: .18s ease; }
.task-item:hover { border-color: #cfc6b3; }
.task-check { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #d5cdbd; background: #fff; display: grid; place-items: center; margin-top: 1px; transition: .16s ease; padding: 0; }
.task-check svg { width: 11px; height: 11px; color: #fff; opacity: 0; transform: scale(.6); transition: .16s ease; }
.task-item.done .task-check { background: var(--teal); border-color: var(--teal); }
.task-item.done .task-check svg { opacity: 1; transform: none; }
.task-item.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(113, 128, 154, .4); }
.task-body { min-width: 0; flex: 1; }
.task-title { font-size: 11.5px; font-weight: 600; line-height: 1.45; }
.task-detail { margin: 3px 0 0; font-size: 10px; color: var(--muted); line-height: 1.6; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 5px; font-size: 9px; color: #8b95a7; }
.task-meta span { display: inline-flex; align-items: center; gap: 3px; }
.task-meta svg { width: 10px; height: 10px; }
.task-out { margin-top: 4px; font-size: 9px; color: #0a7666; background: var(--teal-soft); display: inline-block; padding: 2px 6px; border-radius: 4px; }
.plan-advice { margin: 9px 0 0; font-size: 10px; color: var(--muted); line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 8px; }
.replan { margin-top: 8px; }

/* 复盘 */
.review-summary { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin: 0 0 8px; }
.review-decision { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; border-radius: 999px; padding: 3px 8px; font-weight: 600; }
.rd-advance { background: var(--teal-soft); color: #0a6f61; }
.rd-adjust { background: var(--amber-soft); color: #9a5a14; }
.rd-reexplore { background: var(--rose-soft); color: #a83f63; }
.review-lists { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.review-list h5 { margin: 0 0 3px; font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.review-list ul { margin: 0; padding-left: 14px; font-size: 10px; color: var(--ink-2); line-height: 1.6; }
.review-list li { margin: 1px 0; }
.review-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.review-actions .btn { font-size: 10.5px; padding: 6px 10px; border-radius: 8px; }
.review-history { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
.review-history summary { cursor: pointer; font-size: 9.5px; color: var(--muted); }
.review-history .rh-item { margin-top: 7px; font-size: 9.5px; color: var(--ink-2); line-height: 1.55; }
.review-history .rh-item time { color: #a4a08f; margin-right: 6px; }

/* 加载骨架 */
.skeleton { display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #f0ecdf 25%, #f8f5ec 50%, #f0ecdf 75%); background-size: 200% 100%; animation: shimmerSk 1.2s linear infinite; }
.sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; } .sk-line.w40 { width: 40%; }
@keyframes shimmerSk { to { background-position: -200% 0; } }
.pcard.loading { min-height: 110px; }

/* 面板脚注 */
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 2px 2px; font-size: 9.5px; color: #a4a08f; }
.panel-foot span { display: inline-flex; align-items: center; gap: 4px; }
.panel-foot svg { width: 11px; height: 11px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); font-size: 9.5px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- 移动端标签栏 ---------- */
.mobile-tabs { display: none; }
.tab-dot { display: none; }

/* ---------- 弹窗内容 ---------- */
.modal-form { display: flex; flex-direction: column; }
.form-tip { font-size: 11px; color: var(--muted); background: #f6f2e7; border-radius: 8px; padding: 8px 10px; margin: 0 0 16px; line-height: 1.6; }
.interest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.interest-chip { border: 1px solid var(--line-strong); background: #fffef9; color: var(--ink-2); border-radius: 999px; padding: 5px 10px; font-size: 11.5px; transition: .16s ease; }
.interest-chip.on { background: var(--blue-soft); border-color: #b9cdfa; color: var(--blue-deep); font-weight: 600; }
.hours-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hours-chip { border: 1px solid var(--line-strong); background: #fffef9; color: var(--ink-2); border-radius: 9px; padding: 6px 10px; font-size: 11.5px; }
.hours-chip.on { background: var(--teal-soft); border-color: #c8ece6; color: #0a6f61; font-weight: 600; }
.review-task-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; padding-right: 4px; }
.review-task { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fffef9; cursor: pointer; }
.review-task input { margin: 2px 0 0; accent-color: var(--teal); }
.review-task small { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.letter-output { white-space: pre-wrap; font-size: 12.5px; line-height: 1.85; color: var(--ink); background: #fbf8ef; border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-height: 48vh; overflow: auto; font-family: var(--sans); }
.modal-result { display: flex; flex-direction: column; gap: 12px; }
.result-banner { border-radius: 12px; padding: 12px 14px; background: var(--teal-soft); border: 1px solid #c8ece6; color: #0a5f54; font-size: 12px; line-height: 1.7; }
.result-banner.amber { background: var(--amber-soft); border-color: #f0e1c7; color: #7a5a2e; }
.result-banner.rose { background: var(--rose-soft); border-color: #f4d3df; color: #8f3a55; }
.result-list { display: flex; flex-direction: column; gap: 6px; }
.result-list h5 { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.result-list ul { margin: 0; padding-left: 15px; font-size: 11.5px; color: var(--ink-2); line-height: 1.65; }
.help-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.help-steps li { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); line-height: 1.65; }
.help-steps b { width: 22px; height: 22px; border-radius: 7px; background: var(--blue-soft); color: var(--blue-deep); display: grid; place-items: center; font-size: 10px; flex: none; }
.help-note { font-size: 11px; color: var(--muted); line-height: 1.7; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .app-main { grid-template-columns: minmax(0, 1.18fr) minmax(350px, .82fr); gap: 12px; }
  .chat-scroll { padding-inline: 18px; }
  .chat-bottom { padding-inline: 18px; }
  .msg-body { max-width: 100%; }
  .pp-label { display: none; }
}
@media (max-width: 920px) {
  .app-main { grid-template-columns: 1fr; padding: 10px 10px 76px; }
  .panel-pane { display: none; }
  .app-body[data-tab="panel"] .chat-pane { display: none; }
  .app-body[data-tab="panel"] .panel-pane { display: flex; }
  .app-body[data-tab="chat"] .chat-pane { display: flex; }
  .app-main { padding-bottom: 10px; height: calc(100dvh - 66px - 64px); }
  .mobile-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: 64px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 247, .92);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .mobile-tabs button {
    flex: 1; border: 0; background: none; color: var(--muted);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 12px; border-radius: 12px; position: relative;
  }
  .mobile-tabs button.active { color: var(--blue-deep); background: var(--blue-soft); font-weight: 600; }
  .mobile-tabs svg { width: 17px; height: 17px; }
  .tab-dot { display: block; position: absolute; top: 8px; right: calc(50% - 26px); width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
  .stage-pill { font-size: 10.5px; padding: 4px 9px; }
}
@media (max-width: 640px) {
  .app-header { height: 58px; padding-inline: 12px; gap: 8px; }
  .app-brand .brand-mark { width: 32px; height: 32px; }
  .app-brand .brand-text strong { font-size: 15.5px; }
  .app-brand .brand-text span { display: none; }
  .ah-title, .ah-divider, .model-chip { display: none; }
  .ah-right { gap: 5px; }
  .ah-right .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
  .ah-right .icon-btn svg { width: 16px; height: 16px; }
  .app-main { height: calc(100dvh - 58px - 64px); padding: 8px 8px 8px; gap: 8px; }
  .chat-pane { border-radius: 18px; }
  .chat-head { height: 58px; padding-inline: 14px; }
  .agent-avatar { width: 35px; height: 35px; border-radius: 11px; }
  .agent-text strong { font-size: 13.5px; }
  .agent-text span { font-size: 9.5px; }
  .chat-scroll { padding: 14px 12px 4px; }
  .chat-messages { gap: 14px; }
  .msg { gap: 7px; }
  .msg-avatar { width: 27px; height: 27px; border-radius: 8px; }
  .msg-avatar svg { width: 14px; height: 14px; }
  .bubble { padding: 10px 12px; font-size: 13px; border-radius: 4px 13px 13px 13px; }
  .bubble .md { font-size: 13px; }
  .msg.user .bubble { border-radius: 13px 4px 13px 13px; }
  .chat-bottom { padding: 8px 12px 9px; }
  .quick-chips { padding-bottom: 8px; }
  .composer { border-radius: 13px; padding: 7px 9px; }
  .composer textarea { font-size: 13px; }
  .composer-hint { display: none; }
  .chat-disclaimer { display: none; }
  .panel-head { padding: 16px 14px 8px; }
  .panel-head h1 { font-size: 20px; }
  .panel-scroll { padding: 0 12px 16px; }
  .pcard { padding: 13px 12px; border-radius: 15px; }
  .sn-label { font-size: 8.5px; }
  .sn-dot { width: 25px; height: 25px; }
  .stage-track::before { top: 14px; }
  .toast-wrap { bottom: 78px; }
}

.pc-badge.violet { background: var(--violet-soft); color: #4f3fc4; }
.pcard.just-updated { animation: cardIn .32s ease both, flashCard 1.2s ease; }
@keyframes flashCard { 0% { box-shadow: 0 0 0 3px rgba(15, 158, 138, .25); } 100% { box-shadow: 0 12px 30px -28px rgba(20, 36, 61, .5); } }
.help-steps { padding-left: 0; }

/* 浮动提示放在顶部，避免遮挡输入框 */
.app-body .toast-wrap { top: 80px; bottom: auto; }
@media (max-width: 640px) {
  .app-body .toast-wrap { top: 70px; }
}

/* 阶段导航吸顶，滚动档案时也能看到当前步骤 */
.stage-track {
  position: sticky;
  top: -2px;
  z-index: 8;
  margin-top: -2px;
  padding-top: 8px;
  padding-bottom: 12px;
  background: linear-gradient(to bottom, rgba(255, 253, 247, .99) 0%, rgba(255, 253, 247, .96) 72%, rgba(255, 253, 247, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stage-track::before { top: 21px; }

/* 导出方案弹窗 */
.export-options { display: flex; flex-direction: column; gap: 9px; }
.export-option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px;
  background: #fffef9; color: var(--ink); transition: .18s ease;
}
.export-option:hover { border-color: #b9cdfa; background: #f7faff; transform: translateY(-1px); }
.eo-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.eo-icon svg { width: 17px; height: 17px; }
.eo-icon.blue { background: var(--blue-soft); color: var(--blue-deep); }
.eo-icon.amber { background: var(--amber-soft); color: #9a5a14; }
.eo-icon.gray { background: #f2eee3; color: var(--ink-2); }
.eo-text { display: flex; flex-direction: column; min-width: 0; }
.eo-text strong { font-size: 13px; }
.eo-text em { font-style: normal; font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.eo-arrow { margin-left: auto; width: 15px; height: 15px; color: #a8b0bd; flex: none; }

/* 移动端高度约束：避免聊天输入区被底部标签栏裁切 */
.chat-scroll { min-height: 0; }
.chat-messages { min-height: 0; }
@media (max-width: 920px) {
  .chat-pane, .panel-pane { height: 100%; max-height: 100%; }
  .chat-bottom { flex: none; }
}

@media (max-width: 920px) {
  /* 给固定底部标签栏预留真实空间，避免输入区被遮挡 */
  .app-body { padding-bottom: 64px; }
  .app-main { height: auto; }
}
.eo-icon.rose { background: var(--rose-soft); color: #a83f63; }
@media (max-width: 640px) {
  .composer-bar { justify-content: flex-end; }
}
.export-btn { width: auto; padding: 0 12px; gap: 6px; }
.export-label { font-size: 12px; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) {
  .export-btn { width: 32px; padding: 0; }
  .export-label { display: none; }
}
