/* ============================================================================
 * 西安邮电大学 · 生涯导航 · v0.14 西邮蓝视觉系统（XUPT Blue）
 * 深蓝主色、环形校名圆章、彩色几何点缀、邮票与虚线母题。
 * 结构样式保留，文末「西邮蓝」覆盖层重新定义视觉。
 * ========================================================================== */

:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --panel: #edf2f9;
  --panel-strong: #e2eaf4;
  --ink: #10233f;
  --muted: #5b6b80;
  --faint: #93a1b3;
  --line: #dbe4f0;
  --line-strong: #c3d2e6;
  --accent: #003366;
  --accent-soft: #e8f1fb;
  --accent-ink: #002347;
  --warn: #a63d2f;
  --pending: #96681c;
  --postal: #1f6b4a;
  --postal-soft: #e7f1ea;
  --route: #1e90ff;
  --route-soft: #e7f2ff;
  --violet: #483d8b;
  --pink: #ff69b4;
  --leaf: #32cd32;
  --radius: 12px;
  --radius-sm: 8px;
  --paper: #ffffff;
  --gold: #d4a017;
  --seal: #003366;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(16, 35, 63, 0.05);
  --shadow-md: 0 18px 40px -24px rgba(16, 35, 63, 0.3);
  --shadow-lift: 0 24px 48px -28px rgba(16, 35, 63, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

::selection {
  color: var(--ink);
  background: #ede9fe;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: #e0e0e4;
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #cfcfd4;
  background-clip: content-box;
}

h1, h2, h3, h4, h5, h6, p, dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

code {
  padding: 1px 5px;
  color: #3d4b45;
  background: #f4f4f1;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
  font-size: 0.7rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  min-height: 520px;
}

/* ---------------------------------------------------------------- 侧栏 */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 16px 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
}

.brand-copy h1 {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.3;
}

.brand-copy p {
  margin-top: 1px;
  color: var(--faint);
  font-size: 0.64rem;
}

.primary-btn {
  margin: 0 12px 12px;
  padding: 7px 10px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #d5e4dc;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: left;
}

.primary-btn:hover {
  background: #e4efe9;
}

.primary-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px 6px;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.count-chip {
  padding: 0 5px;
  color: var(--muted);
  background: #ecece8;
  border-radius: 999px;
  font-size: 0.6rem;
}

.project-list {
  flex: 1;
  min-height: 0;
  padding: 0 8px 10px;
  overflow-y: auto;
}

.project-item {
  margin-bottom: 3px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.project-item.is-active {
  background: var(--panel-strong);
  border-color: #e4e4df;
}

.project-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.project-select {
  flex: 1;
  min-width: 0;
  padding: 2px 3px;
  overflow: hidden;
  color: #333330;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-select:hover {
  color: var(--accent);
}

.rename-project {
  flex: none;
  padding: 1px 3px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 0.58rem;
  opacity: 0;
}

.project-item:hover .rename-project,
.project-item.is-active .rename-project,
.rename-project:focus-visible {
  opacity: 1;
}

.rename-project:hover {
  color: var(--accent);
}

.rename-project-input {
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 0.76rem;
}

.rename-project-input:focus {
  outline: 2px solid #b9cec4;
  outline-offset: 1px;
}

.project-select:focus-visible,
.new-chat-btn:focus-visible,
.chat-item:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 1px;
}

.project-meta {
  padding: 1px 3px 0;
  color: var(--faint);
  font-size: 0.6rem;
}

.chat-list {
  display: grid;
  gap: 1px;
  margin-top: 5px;
  padding-left: 6px;
  border-left: 1px solid #deded8;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  color: #595954;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 0.7rem;
  text-align: left;
}

.chat-item:hover {
  background: #ecece8;
}

.chat-item.is-active {
  color: var(--accent-ink);
  background: #e4eee8;
}

.chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-count {
  flex: none;
  color: var(--faint);
  font-size: 0.58rem;
}

.chat-item.is-active .chat-count {
  color: #6f8d80;
}

.new-chat-btn {
  margin-top: 2px;
  padding: 4px 6px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed #d7d7d0;
  border-radius: 5px;
  font-size: 0.66rem;
  text-align: left;
}

.new-chat-btn:hover {
  color: var(--accent);
  border-color: #b9cec4;
}

.sidebar-footer {
  flex: none;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}

.storage-status {
  color: var(--faint);
  font-size: 0.6rem;
}

.storage-status.is-warn {
  color: var(--warn);
}

.sidebar-footer p + p {
  margin-top: 3px;
  color: #96968f;
  font-size: 0.58rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- 主区 */

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.workspace-header {
  flex: none;
  padding: 14px 24px 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.workspace-inner {
  width: min(800px, 100%);
  margin: 0 auto;
}

.workspace-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.local-badge {
  flex: none;
  padding: 0 6px;
  color: var(--muted);
  background: #f4f4f1;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-title h2 {
  max-width: 55%;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-title-inline {
  min-width: 0;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-title-inline::before {
  content: "/";
  margin-right: 6px;
  color: #c8c8c1;
}

.profile-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.profile-summary-text {
  color: var(--muted);
  font-size: 0.72rem;
}

.text-button {
  flex: none;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-button:hover {
  color: var(--accent-ink);
}

.text-button:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
  border-radius: 3px;
}

.profile-form-panel {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.profile-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-field {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.profile-field span {
  color: var(--faint);
  font-size: 0.62rem;
  white-space: nowrap;
}

.profile-field select {
  max-width: 145px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 0.7rem;
  cursor: pointer;
}

.profile-field select:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
  border-radius: 2px;
}

.boot-error {
  width: min(800px, 100% - 32px);
  margin: 10px auto 0;
  padding: 10px;
  color: var(--warn);
  background: #fbf5f2;
  border: 1px solid #e7d4ca;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- 空状态与对话 */

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.empty-state {
  width: min(800px, 100% - 32px);
  margin: 0 auto;
  padding-top: 15vh;
}

.empty-state h2 {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.suggestions {
  display: grid;
  gap: 7px;
  width: min(440px, 100%);
  margin: 24px auto 0;
}

.suggestion-btn {
  padding: 10px 12px;
  color: #333330;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.8rem;
  text-align: left;
}

.suggestion-btn:hover {
  color: var(--accent);
  border-color: #bfd2c8;
  background: #fcfdfc;
}

.suggestion-btn:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
}

.message-list {
  width: min(800px, 100% - 32px);
  margin: 0 auto;
  padding: 22px 0 28px;
}

.message {
  margin-bottom: 22px;
}

.message-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-bubble {
  max-width: 74%;
  padding: 8px 12px;
  color: #2b2b28;
  background: #f1f1ee;
  border: 1px solid #e8e8e3;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.message-time {
  margin-top: 3px;
  color: #a0a099;
  font-size: 0.58rem;
}

.message-assistant {
  max-width: 100%;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.message-head .message-time {
  margin: 0;
}

.assistant-bubble {
  color: #252522;
  font-size: 0.86rem;
  line-height: 1.75;
  white-space: normal;
}

.message-cards {
  margin-top: 9px;
}

/* ---------------------------------------------------------------- 展开块 */

.response-block {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.quick-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.quick-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
  font-size: 0.76rem;
}

.quick-row + .quick-row {
  border-left: 1px solid var(--line);
}

.quick-row strong {
  flex: none;
  color: var(--ink);
  font-weight: 650;
}

.quick-row span {
  color: var(--muted);
}

.inline-details {
  margin-top: 9px;
}

.inline-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  font-size: 0.72rem;
  cursor: pointer;
  list-style: none;
}

.inline-details > summary::-webkit-details-marker {
  display: none;
}

.inline-details > summary::after {
  content: "⌄";
  color: var(--faint);
  font-size: 0.8rem;
}

.inline-details[open] > summary {
  border-bottom-color: var(--line);
}

.inline-details[open] > summary::after {
  content: "⌃";
}

.inline-details > summary:hover {
  color: var(--accent-ink);
}

.inline-details > summary:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
  border-radius: 3px;
}

.details-body {
  padding-top: 9px;
}

.details-note {
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.55;
}

.path-overview {
  border-top: 1px solid var(--line);
}

.path-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}

.path-name {
  color: var(--ink);
  font-weight: 650;
}

.path-line {
  color: var(--muted);
}

.path-state {
  color: var(--faint);
  font-size: 0.62rem;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 招聘依据 */

.direction-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.direction-block {
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.direction-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.direction-head h4 {
  font-size: 0.84rem;
  font-weight: 650;
}

.sample-count {
  color: var(--faint);
  font-size: 0.62rem;
}

.direction-summary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.direction-grid h6,
.posting-skills .mini-label {
  margin: 0 0 3px;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.direction-grid ul {
  display: grid;
  gap: 2px;
  padding-left: 1rem;
  color: #484843;
  font-size: 0.7rem;
}

.basis {
  padding: 6px 8px;
  color: var(--muted);
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.66rem;
  line-height: 1.55;
}

.posting-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.posting-card {
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.posting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.posting-id {
  display: inline-block;
  color: var(--faint);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.58rem;
}

.posting-head h5 {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
}

.posting-line {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.status {
  flex: none;
  padding: 0;
  color: var(--faint);
  background: transparent;
  border: 0;
  font-size: 0.6rem;
  white-space: nowrap;
}

.status.is-open {
  color: var(--accent);
}

.status.is-closed {
  color: #95513c;
}

.status.is-unknown {
  color: var(--pending);
}

.posting-skills {
  margin-top: 5px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 0;
  list-style: none;
}

.mini-tags li {
  padding: 0 5px;
  color: #55554f;
  background: #f7f7f4;
  border: 1px solid #ecece7;
  border-radius: 3px;
  font-size: 0.62rem;
  line-height: 1.5;
}

.mini-tags.is-bonus li {
  color: #6f5b37;
  background: #fbf8ef;
  border-color: #eee5d2;
}

.posting-basis {
  margin-top: 5px;
  color: var(--faint);
  font-size: 0.62rem;
  line-height: 1.45;
}

.posting-status-note {
  margin-top: 3px;
  color: #55554f;
  font-size: 0.64rem;
}

.posting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 4px;
  padding-top: 4px;
  color: var(--faint);
  border-top: 1px solid #f0f0eb;
  font-size: 0.6rem;
  line-height: 1.45;
}

.posting-publish-note {
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.6rem;
}

.source-link {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 0.66rem;
  text-underline-offset: 2px;
}

.source-link:hover {
  color: var(--accent-ink);
}

.source-link:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
  border-radius: 2px;
}

.empty-inline {
  padding: 7px 8px;
  color: var(--pending);
  background: #fbf8ef;
  border: 1px dashed #e5d9bd;
  border-radius: 5px;
  font-size: 0.68rem;
}

/* ---------------------------------------------------------------- 对比细项 */

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.compare-column {
  padding: 9px;
  background: #fcfcfa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.compare-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.path-badge,
.verified-tag,
.demo-tag {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
}

.path-badge {
  color: #55554f;
  background: #f1f1ed;
}

.verified-tag {
  color: var(--accent);
  background: var(--accent-soft);
}

.demo-tag {
  color: var(--faint);
  background: #f6f6f2;
}

.compare-column h4 {
  margin: 6px 0 3px;
  font-size: 0.9rem;
}

.compare-column > p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.compare-column h5 {
  margin: 7px 0 3px;
  color: var(--faint);
  font-size: 0.62rem;
}

.compare-column ul {
  display: grid;
  gap: 2px;
  padding-left: 1rem;
  font-size: 0.66rem;
}

.compare-next {
  color: #3e3e39 !important;
  font-size: 0.68rem !important;
}

.pending {
  display: inline-block;
  padding: 0 4px;
  color: var(--pending);
  background: #fbf6e9;
  border: 1px dashed #ddcfa8;
  border-radius: 3px;
  font-size: 0.64rem;
  font-weight: 600;
  white-space: nowrap;
}

.card-source {
  margin-top: 8px;
  color: var(--faint);
  font-size: 0.62rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- 计划细项 */

.plan-brief {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.72rem;
}

.plan-brief strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.plan-brief span {
  color: var(--faint);
}

.plan-grid {
  display: grid;
  gap: 0;
  margin-top: 7px;
}

.plan-column {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.plan-column-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-column-head h4 {
  font-size: 0.8rem;
}

.plan-column-head span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.62rem;
}

.plan-tip {
  margin: 3px 0 6px;
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.5;
}

.task-list {
  display: grid;
  gap: 5px;
  padding: 0;
  list-style: none;
}

.task-list li {
  padding: 7px 8px;
  background: #ffffff;
  border: 1px solid #efefea;
  border-radius: 5px;
}

.task-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.task-title {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.45;
}

.task-min {
  flex: none;
  color: var(--muted);
  font-size: 0.6rem;
  white-space: nowrap;
}

.task-detail {
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.63rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- 输入框 */

.composer {
  flex: none;
  padding: 10px 24px 14px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  width: min(800px, 100%);
  margin: 0 auto;
  padding: 5px 6px 5px 9px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.composer-row:focus-within {
  border-color: #b9cec4;
}

#chat-input {
  flex: 1;
  min-height: 32px;
  max-height: 130px;
  padding: 4px 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  font-size: 0.82rem;
  line-height: 1.55;
}

.send-btn {
  flex: none;
  padding: 6px 13px;
  color: #ffffff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}

.send-btn:hover {
  background: var(--accent-ink);
}

.send-btn:focus-visible {
  outline: 2px solid #b9cec4;
  outline-offset: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 30;
  max-width: 80vw;
  padding: 6px 11px;
  color: #ffffff;
  background: rgba(37, 37, 35, 0.88);
  border-radius: 5px;
  font-size: 0.7rem;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
  }

  .sidebar {
    flex: none;
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-list {
    max-height: 20vh;
  }

  .chat-main {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  .sidebar-footer p + p {
    display: none;
  }

  .workspace-header {
    padding: 10px 14px 9px;
  }

  .message-list,
  .empty-state {
    width: min(800px, 100% - 24px);
  }

  .empty-state {
    padding-top: 8vh;
  }

  .composer {
    position: static;
    padding: 8px 12px 10px;
  }

  .compare-grid,
  .direction-grid {
    grid-template-columns: 1fr;
  }

  .quick-compare {
    grid-template-columns: 1fr;
  }

  .quick-row + .quick-row {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .workspace-title {
    flex-wrap: wrap;
    gap: 5px;
  }

  .workspace-title h2 {
    max-width: 100%;
    font-size: 0.94rem;
  }

  .chat-title-inline {
    flex-basis: 100%;
    font-size: 0.68rem;
  }

  .profile-summary-row {
    align-items: flex-start;
  }

  .profile-summary-text {
    line-height: 1.45;
  }

  .profile-field {
    flex: 1 1 calc(50% - 6px);
  }

  .profile-field select {
    max-width: 100%;
  }

  .user-bubble {
    max-width: 88%;
  }

  .path-row {
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 6px;
  }

  .path-state {
    grid-column: 2;
  }

  .empty-state h2 {
    font-size: 1.3rem;
  }

  .posting-head {
    display: block;
  }

  .status {
    display: inline-block;
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
/* ============================================================================
 * v0.5：运行模式徽章、模型等待态、移动端项目抽屉
 * ========================================================================== */

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mode-badge {
  flex: none;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mode-badge.is-model {
  color: #0f5b3f;
  background: #e8f3ec;
  border: 1px solid #cfe4d7;
}

.mode-badge.is-local {
  color: var(--muted);
  background: #f4f4f1;
  border: 1px solid var(--line);
}

.message.is-typing .assistant-bubble {
  color: var(--muted);
}

.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    position: relative;
    height: 100vh;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: min(84vw, 320px);
    max-height: none;
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    box-shadow: none;
  }

  .app-shell.is-sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 12px 32px rgba(20, 20, 18, 0.16);
  }

  .project-list {
    max-height: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(20, 20, 18, 0.28);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 600;
  }

  .sidebar-close {
    display: inline-block;
    margin-left: auto;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 0.72rem;
  }

  .chat-main {
    height: 100vh;
  }

  .message-list,
  .empty-state {
    width: 100%;
  }
}

/* v0.5.1：模型已配置但尚未收到成功回复 */
.mode-badge.is-pending {
  color: #7a5a12;
  background: #fbf3e2;
  border: 1px solid #eadcba;
}

/* ============================================================================
 * v0.6：三个毕业去向入口、考研专项卡片
 * ========================================================================== */

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 8px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.entry-card:hover {
  border-color: #b9c9bf;
}

.entry-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.entry-desc {
  font-size: 0.72rem;
  color: var(--muted);
}

.compare-entry {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exam-lead {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.exam-program {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.exam-program h6,
.national-line h6 {
  margin: 10px 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.exam-subjects,
.score-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-subjects li,
.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.78rem;
  border-bottom: 1px dashed #ecece8;
}

.subject-code {
  font-family: Consolas, monospace;
  color: #0f5b3f;
}

.score-total {
  font-weight: 600;
}

.score-single,
.score-scope {
  color: var(--muted);
  font-size: 0.72rem;
}

.national-line {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f7f7f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exam-task {
  margin: 10px 0;
  padding: 6px 12px;
  border-left: 3px solid #0f5b3f;
  background: #fbfcfb;
}

.exam-unverified {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
 * v0.7 考公职位卡：公告通用条件 / 职位条件 / 三态徽章
 * ========================================================================== */

.civil-lead {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.civil-quick {
  display: block;
}

.civil-quick .quick-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.civil-quick .quick-row + .quick-row {
  border-left: 0;
  border-top: 1px solid var(--line);
}

.civil-quick .quick-row strong {
  flex: 1 1 auto;
}

.civil-quick .quick-row span {
  flex: 1 1 100%;
  font-size: 0.72rem;
}

.civil-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.civil-badge.is-match {
  color: #1a6f4a;
  background: #e8f5ee;
}

.civil-badge.is-pending {
  color: var(--pending);
  background: #fbf4e3;
}

.civil-badge.is-mismatch {
  color: #a5392f;
  background: #fbebe9;
}

.civil-general {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9f9f7;
}

.civil-general h6 {
  margin: 8px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.civil-general h6:first-child {
  margin-top: 0;
}

.civil-general-list,
.civil-notes {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.76rem;
  line-height: 1.7;
}

.civil-general-list li,
.civil-notes li {
  margin-bottom: 4px;
}

.civil-basis {
  color: var(--faint);
  font-size: 0.68rem;
}

.civil-general-source {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.civil-position {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.civil-position-head h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 0.86rem;
}

.civil-position-head code {
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  color: var(--accent-ink);
}

.civil-position-where,
.civil-position-open {
  margin: 0 0 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.civil-position h6 {
  margin: 10px 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.civil-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.civil-item {
  padding: 6px 0;
  border-bottom: 1px dashed #ecece8;
}

.civil-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.civil-item-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.civil-item-from {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--faint);
}

.civil-item-req,
.civil-item-actual,
.civil-item-note {
  margin: 3px 0 0;
  font-size: 0.74rem;
  line-height: 1.65;
}

.civil-item-req {
  color: #3d3d3a;
}

.civil-item-actual {
  color: var(--muted);
}

.civil-item-note {
  color: var(--faint);
}

.civil-original {
  margin: 4px 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f9f9f7;
  font-size: 0.72rem;
  line-height: 1.75;
  color: #44443f;
}

.civil-original.is-extra {
  background: transparent;
  padding: 0;
  color: var(--muted);
}

.civil-phone,
.civil-sources {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.civil-task {
  margin: 10px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: #fbfcfb;
}

.civil-task h6 {
  margin: 0 0 6px;
  font-size: 0.78rem;
}

.civil-task ol {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 0.74rem;
  line-height: 1.7;
}

@media (max-width: 860px) {
  .civil-item-from {
    margin-left: 0;
  }

  .civil-general-list,
  .civil-notes {
    padding-left: 16px;
  }
}

/* ============================================================================
 * v0.8 就业联网检索卡：联网结果 / 待核验线索 / 本地样本分开标注
 * ========================================================================== */

.webjobs-lead {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.webjobs-alert {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--warn);
  background: #fdf6f3;
  font-size: 0.76rem;
  line-height: 1.6;
  color: #6f3a26;
}

.web-jobs {
  display: grid;
  gap: 8px;
}

.web-job {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.web-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.web-job-head h4 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 180px;
}

.web-job-head h4 a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 70, 60, 0.25);
}

.web-job-head h4 a:hover {
  border-bottom-color: var(--accent-ink);
}

.web-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.web-badge.is-open {
  color: #1a6f4a;
  background: #e8f5ee;
}

.web-badge.is-pending {
  color: var(--pending);
  background: #fbf4e3;
}

.web-badge.is-closed {
  color: #6f6f6b;
  background: #efefeb;
}

.web-badge.is-lead {
  color: #7a4b8f;
  background: #f4edf7;
}

.web-job-meta {
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.web-job-reason {
  margin: 4px 0 0;
  font-size: 0.74rem;
  line-height: 1.65;
  color: #3d3d3a;
}

.web-job-date {
  margin-left: 8px;
  font-size: 0.7rem;
  color: var(--faint);
}

.web-job-details {
  margin-top: 6px;
}

.web-job-details > summary {
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
}

.web-verify {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.74rem;
}

.web-verify li {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px dashed #ecece8;
}

.web-verify li span {
  flex: 0 0 108px;
  color: var(--faint);
}

.web-verify li strong {
  font-weight: 600;
  color: #3d3d3a;
}

.web-evidence,
.web-snippet {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
}

.web-snippet {
  color: var(--faint);
}

.web-leads {
  margin-top: 10px;
}

.web-leads h6,
.web-local h6 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.web-local {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f9f9f7;
}

.web-local-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.74rem;
  line-height: 1.7;
}

.web-local-list code {
  font-size: 0.7rem;
  color: var(--faint);
}

.web-local-note {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--faint);
}

.webjobs-foot {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: var(--faint);
}

@media (max-width: 860px) {
  .web-verify li {
    flex-direction: column;
    gap: 2px;
  }

  .web-verify li span {
    flex: none;
  }
}

/* ============================================================ v0.9 工作区 */
.workspace-toggle {
  margin-left: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.workspace-toggle:hover { border-color: var(--accent); color: var(--accent); }

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 8px;
}
.entry-link {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.entry-link:hover { border-color: var(--accent); color: var(--accent-ink); }

.workspace {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100vh;
  z-index: 40;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 12px;
  overflow: hidden;
}
.workspace[hidden] { display: none; }
.workspace-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 20, 18, 0.28);
}
.workspace-backdrop[hidden] { display: none; }
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.workspace-head h2 { margin: 0; font-size: 16px; }
.workspace-close {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
.workspace-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.workspace-tab {
  border: 0;
  background: none;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.workspace-tab.is-active {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.workspace-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}
.workspace-foot {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.6;
}
.workspace-section h3 { font-size: 14px; margin: 14px 0 8px; }
.ws-facts { list-style: none; margin: 0; padding: 0; }
.ws-facts li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  align-items: baseline;
}
.ws-facts span { color: var(--faint); }
.ws-facts em { font-style: normal; font-size: 11px; color: var(--accent); }
.ws-note { font-size: 12px; color: var(--muted); line-height: 1.7; }
.ws-opp, .ws-review {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--panel);
}
.ws-opp h4, .ws-review h4 { margin: 0 0 4px; font-size: 13px; }

/* 决策卡 */
.career-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.career-lead { margin: 0 0 10px; font-size: 12px; color: var(--accent-ink); letter-spacing: 0.02em; }
.career-opp { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.career-opp-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.career-opp-head h4 { margin: 0 0 2px; font-size: 14px; }
.career-opp-org { margin: 0; font-size: 12px; color: var(--muted); }
.career-state {
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.career-state[data-state="open"] { color: #245c39; border-color: #b6d6c1; background: #eef7f0; }
.career-state[data-state="pending"] { color: var(--pending); border-color: #ded0a6; background: #fbf6e7; }
.career-state[data-state="closed"] { color: var(--warn); border-color: #e2c3b6; background: #fbf0eb; }
.career-state[data-state="lead"] { color: var(--muted); background: var(--panel); }
.career-opp-basis { margin: 6px 0; font-size: 12px; color: var(--accent-ink); }
.career-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.career-split h5 { margin: 0 0 4px; font-size: 11px; color: var(--faint); font-weight: 600; }
.career-rows { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 1.6; }
.career-rows li { margin-bottom: 3px; }
.career-rows.is-met li { color: #2c5c40; }
.career-rows.is-gap li { color: var(--warn); }
.career-rows.is-pending li { color: var(--pending); }
.career-empty { margin: 0; font-size: 12px; color: var(--faint); }
.career-meta { margin: 4px 0; font-size: 11px; color: var(--faint); line-height: 1.6; }
.career-note { margin: 4px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.career-note.is-gap { color: var(--warn); }
.career-note.is-pending { color: var(--pending); }
.career-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.career-link { font-size: 12px; color: var(--accent); text-decoration: underline; }
.career-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.career-compare-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.career-compare-col h4 { margin: 0 0 2px; font-size: 13px; }
.career-tasks { margin: 0; padding-left: 18px; }
.career-task { margin-bottom: 10px; }
.career-task > div { display: flex; flex-direction: column; gap: 2px; }
.career-task strong { font-size: 13px; }
.career-task.is-done strong { text-decoration: line-through; color: var(--faint); }
.career-task.is-deferred { opacity: 0.72; }
.career-task .text-button { align-self: flex-start; margin-top: 4px; }
.career-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.career-table th, .career-table td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; }
.career-table th { color: var(--faint); font-weight: 500; }
.career-steps { margin: 6px 0; padding-left: 18px; font-size: 12px; line-height: 1.7; }
.career-foot { margin: 8px 0 0; font-size: 11px; color: var(--faint); line-height: 1.6; }

@media (max-width: 760px) {
  .workspace { width: 100vw; }
  .workspace-toggle { padding: 5px 10px; font-size: 12px; }
  .entry-links { justify-content: flex-start; }
  .career-split { grid-template-columns: 1fr; }
}

/* ==================================================== v0.10 探索界面 */
.stop-btn { background: #8a4b32; margin-left: 6px; }
.explore-notes { list-style: none; margin: 6px 0; padding: 0; }
.explore-notes li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.explore-notes .note-kind { flex: none; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.explore-notes em { font-style: normal; font-size: 11px; color: var(--faint); margin-left: auto; }
.explore-notes em.hypothesis { color: var(--pending); }
.note-del { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 14px; line-height: 1; }
.explore-direction { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.explore-direction h4 { margin: 0 0 4px; font-size: 13px; }
.career-card.is-failed { border-color: #e2c3b6; background: #fbf0eb; }
/* ==================================================== v0.12 视觉升级 */

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid #ececef;
}

.brand {
  gap: 10px;
  padding: 20px 18px 16px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.22);
  font-size: 15px;
  font-weight: 650;
}

.brand-copy h1 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-copy p {
  margin-top: 2px;
  font-size: 11px;
}

.primary-btn {
  margin: 0 12px 14px;
  padding: 9px 12px;
  color: var(--accent-ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn:hover {
  background: var(--accent-soft);
  border-color: #ddd6fe;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.primary-btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
  outline-offset: 2px;
}

.sidebar-label {
  padding: 2px 18px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.count-chip {
  padding: 1px 7px;
  background: #f4f4f5;
  border-radius: 999px;
  font-size: 10.5px;
}

.project-list {
  padding: 0 8px 12px;
}

.project-item {
  margin-bottom: 2px;
  padding: 7px 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.project-item:hover {
  background: #f2f2f4;
}

.project-item.is-active {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.project-select {
  padding: 3px 4px;
  font-size: 13px;
  font-weight: 600;
}

.project-select:hover {
  color: var(--accent);
}

.project-meta {
  padding: 2px 4px 0;
  font-size: 11px;
}

.chat-list {
  gap: 2px;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 1px solid #ececef;
}

.chat-item {
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chat-item:hover {
  background: #f2f2f4;
  color: var(--ink);
}

.chat-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.chat-item.is-active .chat-count {
  color: var(--accent);
}

.chat-item:focus-visible,
.project-select:focus-visible,
.new-chat-btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
  outline-offset: 1px;
}

.new-chat-btn {
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-size: 11.5px;
}

.new-chat-btn:hover {
  color: var(--accent);
  border-color: #ddd6fe;
}

.sidebar-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #f0f0f2;
}

.storage-status {
  font-size: 11px;
}

.sidebar-footer p + p {
  color: var(--faint);
  font-size: 10.5px;
}

.chat-main {
  background: var(--surface);
}

.workspace-header {
  padding: 16px 28px 14px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #f0f0f2;
}

.workspace-inner {
  width: min(860px, 100%);
}

.workspace-title {
  gap: 10px;
}

.workspace-title h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.chat-title-inline {
  font-size: 12px;
}

.mode-badge {
  padding: 2px 9px;
  background: #f4f4f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #52525b;
  font-size: 11px;
  font-weight: 600;
}

.mode-badge.is-model {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: #ddd6fe;
}

.mode-badge.is-local {
  color: #52525b;
  background: #f4f4f5;
  border-color: var(--line);
}

.mode-badge.is-pending {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.profile-summary-row {
  margin-top: 4px;
}

.profile-summary-text {
  font-size: 12px;
}

.text-button {
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.text-button:hover {
  color: var(--accent-ink);
  border-bottom-color: currentColor;
}

.profile-form-panel {
  border-top-color: #f0f0f2;
}

.profile-field {
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 8px;
}

.profile-field select:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
}

.boot-error {
  width: min(860px, 100% - 40px);
  padding: 12px 14px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: 13px;
}

.chat-scroll {
  scroll-behavior: smooth;
}

.empty-state {
  width: min(820px, 100% - 40px);
  padding-top: 11vh;
}

.empty-state h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.empty-sub {
  max-width: 580px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  text-align: center;
}

.entry-grid {
  gap: 12px;
  margin: 28px 0 14px;
}

.entry-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.entry-card:hover {
  border-color: #c4b5fd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.entry-card:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
  outline-offset: 2px;
}

.entry-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--accent);
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.entry-icon svg {
  width: 18px;
  height: 18px;
}

.entry-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.entry-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.entry-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.entry-link {
  padding: 6px 13px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.entry-link:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: #ddd6fe;
}

.entry-link:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
  outline-offset: 2px;
}

.compare-entry {
  display: block;
  margin: 12px auto 0;
  padding: 0;
  color: var(--accent);
  font-size: 12.5px;
  text-decoration: none;
}

.compare-entry:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: min(620px, 100%);
  gap: 8px;
  margin-top: 24px;
}

.suggestion-btn {
  padding: 8px 14px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.suggestion-btn:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: #ddd6fe;
}

.suggestion-btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.45);
  outline-offset: 2px;
}

.message-list {
  width: min(860px, 100% - 40px);
  padding: 28px 0 36px;
}

.message {
  margin-bottom: 26px;
}

.user-bubble {
  max-width: 76%;
  padding: 10px 14px;
  color: var(--ink);
  background: #f4f4f5;
  border: 1px solid #ececef;
  border-radius: 16px 16px 5px 16px;
  font-size: 14px;
  line-height: 1.65;
}

.message-time {
  margin-top: 5px;
  font-size: 11px;
}

.message-head {
  gap: 8px;
  margin-bottom: 8px;
}

.local-badge {
  flex: none;
  padding: 2px 8px;
  color: var(--muted);
  background: #f4f4f5;
  border: 1px solid #ececef;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.assistant-bubble {
  color: #27272a;
  font-size: 14.5px;
  line-height: 1.8;
}

.message-cards {
  margin-top: 12px;
}

.response-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f2;
}

.quick-compare,
.path-overview,
.inline-details {
  border-color: var(--line);
  border-radius: 14px;
}

.posting-card,
.career-card,
.career-opp,
.exam-card,
.career-compare-col,
.explore-direction {
  border-color: var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.career-opp {
  padding: 14px;
}

.career-card:hover,
.posting-card:hover,
.exam-card:hover {
  border-color: #ddd6fe;
}

.composer {
  padding: 12px 28px 22px;
  background: var(--surface);
  border-top: 0;
}

.composer-row {
  width: min(860px, 100%);
  padding: 6px 6px 6px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(24, 24, 27, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.composer-row:focus-within {
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1), 0 4px 16px rgba(24, 24, 27, 0.06);
}

#chat-input {
  min-height: 42px;
  padding: 10px 4px;
  font-size: 14px;
  line-height: 1.6;
}

.send-btn {
  padding: 9px 18px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.24);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.send-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.28);
}

.send-btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.5);
  outline-offset: 2px;
}

.stop-btn {
  margin-left: 4px;
  color: #52525b;
  background: #f4f4f5;
  box-shadow: none;
}

.stop-btn:hover {
  color: var(--ink);
  background: #e4e4e7;
}

.toast {
  bottom: 96px;
  padding: 9px 15px;
  background: rgba(24, 24, 27, 0.92);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
}

.workspace {
  width: 380px;
  background: #ffffff;
  border-left: 1px solid #ececef;
  box-shadow: -12px 0 32px rgba(24, 24, 27, 0.08);
}

.workspace-head {
  padding: 18px 20px 12px;
}

.workspace-tabs {
  gap: 6px;
  padding: 0 16px 12px;
  border-bottom: 1px solid #f0f0f2;
}

.workspace-tab {
  padding: 6px 10px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
}

.workspace-tab.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: #ddd6fe;
}

.workspace-body {
  padding: 16px 20px;
}

.workspace-foot {
  font-size: 11.5px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-list {
    max-height: 20vh;
  }

  .workspace-header {
    padding: 10px 14px 9px;
  }

  .message-list,
  .empty-state {
    width: min(860px, 100% - 24px);
  }

  .empty-state {
    padding-top: 6vh;
  }

  .empty-state h2 {
    font-size: 22px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .composer {
    padding: 8px 12px 12px;
  }
}

@media (max-width: 560px) {
  .workspace-title h2 {
    font-size: 15px;
  }

  .chat-title-inline {
    font-size: 11.5px;
  }

  .user-bubble {
    max-width: 88%;
  }

  .profile-field {
    flex: 1 1 calc(50% - 6px);
  }

  .profile-field select {
    max-width: 100%;
  }
}

/* v0.13 实验室与四维复盘 */
.review-dimensions { margin: 8px 0; }
.career-lab code { word-break: break-all; }
.career-rows.review-dimensions li { padding: 3px 0; }

/* v0.14 选项引导与学业实践档案 */
.guide-card { border-color: var(--line-strong); }
.guide-question { margin: 6px 0 4px; font-size: 15px; }
.guide-hint { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.guide-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 8px; margin: 8px 0; }
.guide-option {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); cursor: pointer;
  font: inherit; min-height: 44px;
}
.guide-option:hover { border-color: var(--line-strong); background: var(--surface); }
.guide-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-option.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.guide-option-label { font-weight: 600; font-size: 13px; }
.guide-option-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.guide-submit {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.guide-submit:hover { filter: brightness(1.05); }
.guide-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-submit:disabled { opacity: 0.6; cursor: progress; }

.archive-card { display: flex; flex-direction: column; gap: 4px; }
.archive-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.archive-head h3 { margin: 0; font-size: 15px; }
.archive-badge {
  font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel);
}
.archive-badge.is-confirmed { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.archive-badge.is-draft, .archive-badge.is-unknown { color: var(--pending); border-color: #fcd34d; background: #fffbeb; }
.archive-facts strong { font-weight: 600; }
.archive-raw {
  margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--line-strong);
  background: var(--panel); color: var(--muted); font-size: 12px; line-height: 1.6;
}
.archive-items { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.archive-item-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.archive-item-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.archive-item-main strong { font-size: 13px; }
.archive-gaps { margin: 4px 0 6px; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.archive-advice h4, .archive-card h4 { margin: 8px 0 2px; font-size: 13px; }
.archive-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.archive-compare-col { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--panel); }
.archive-compare-col h3 { margin: 0 0 4px; font-size: 14px; }
.archive-edit { margin-top: 8px; }
.archive-edit summary { cursor: pointer; color: var(--accent-ink); font-size: 12px; }
.archive-edit form, .archive-ws-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.archive-edit label, .archive-ws-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.archive-edit input, .archive-ws-form input, .archive-ws-form select {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); min-height: 36px;
}
.archive-edit input:focus-visible, .archive-ws-form input:focus-visible, .archive-ws-form select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.archive-edit button, .archive-ws-form button { align-self: flex-start; }

@media (max-width: 640px) {
  .guide-options { grid-template-columns: 1fr 1fr; }
  .archive-compare { grid-template-columns: 1fr; }
  .guide-option { min-height: 48px; }
}
/* ============================================================================
 * v0.14 视觉修订 · 方向：个人档案编辑风（Personal Archive Editorial）
 * 暖纸底 + 墨色正文 + 靛紫点睛 + 衬线标题 + 细线纸片 + 悬浮输入条
 * 仅覆盖视觉属性；不改 HTML 结构、ID、类名与交互逻辑。
 * ========================================================================== */

body {
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(76, 59, 120, 0.18);
}

/* ---------------------------------------------------------------- 框架与侧栏 */
.app-shell {
  grid-template-columns: 304px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.chat-main {
  background: var(--bg);
}

.brand {
  align-items: center;
  gap: 12px;
  padding: 26px 22px 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  box-shadow: none;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-copy h1 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.brand-copy p {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-close {
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.primary-btn {
  margin: 0 16px 18px;
  padding: 11px 14px;
  color: #fbf9f5;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.primary-btn:hover {
  color: #ffffff;
  background: #35312a;
  border-color: #35312a;
  box-shadow: none;
}

.primary-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-label {
  padding: 4px 22px 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.count-chip {
  padding: 1px 6px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 9.5px;
}

.project-list {
  padding: 0 10px;
}

.project-item {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.project-item.is-active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.project-select {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.project-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.rename-project {
  color: var(--faint);
}

.chat-list {
  padding-left: 2px;
}

.chat-item {
  padding: 7px 10px 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  background: transparent;
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

.chat-item.is-active {
  background: var(--surface);
  border-left-color: var(--accent);
  border-radius: 0 6px 6px 0;
}

.chat-title {
  font-size: 12.5px;
  line-height: 1.5;
}

.chat-count {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
}

.new-chat-btn {
  margin: 6px 0 0;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  font-size: 11.5px;
}

.new-chat-btn:hover {
  color: var(--accent);
  border-color: rgba(76, 59, 120, 0.42);
  background: rgba(255, 255, 255, 0.55);
}

.sidebar-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.storage-status {
  padding: 9px 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.5;
}

.storage-status.is-warn {
  color: var(--warn);
  border-color: #e4c9c0;
  background: #fbf2ee;
}

.sidebar-footer p + p {
  margin-top: 10px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- 顶部与档案条 */
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 14px 40px 12px;
  background: rgba(250, 248, 244, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.15);
}

.workspace-inner {
  max-width: 860px;
}

.workspace-title {
  gap: 10px;
}

.workspace-title h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.chat-title-inline {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.chat-title-inline::before {
  color: var(--line-strong);
}

.mode-badge {
  padding: 3px 10px 3px 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.mode-badge::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--faint);
  vertical-align: 1px;
}

.mode-badge.is-model {
  color: #2f5d46;
  background: #f4f8f4;
  border-color: #cfe0d4;
}

.mode-badge.is-model::before {
  background: #3f7d5c;
}

.mode-badge.is-local {
  color: var(--muted);
}

.mode-badge.is-local::before {
  background: var(--faint);
}

.mode-badge.is-pending {
  color: #8a641c;
  background: #fbf5e8;
  border-color: #e8d6ae;
}

.mode-badge.is-pending::before {
  background: #b8892f;
}

.workspace-toggle,
.sidebar-toggle {
  flex: none;
  padding: 5px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.workspace-toggle:hover,
.sidebar-toggle:hover {
  color: var(--ink);
  background: var(--surface);
}

.profile-summary-row {
  gap: 12px;
  margin-top: 6px;
}

.profile-summary-text {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.text-button {
  padding: 2px 0;
  color: var(--accent-ink);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 11.5px;
  text-decoration: none;
}

.text-button:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-form-panel {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 12px;
}

.profile-bar {
  gap: 12px;
}

.profile-field span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-field select {
  padding: 7px 9px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.profile-field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------------------------------------------------------------- 空状态：编辑封面 */
.empty-state {
  width: min(860px, 100% - 64px);
  padding-top: 12vh;
}

.empty-state::before {
  content: "PERSONAL PATH · 个人路径";
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.28;
}

.empty-sub {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.entry-grid {
  gap: 14px;
  margin: 34px 0 18px;
  counter-reset: entry;
}

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 150px;
  padding: 20px 18px 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(27, 26, 23, 0.02);
  counter-increment: entry;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.28s ease, border-color 0.2s ease;
}

.entry-card::before {
  content: "0" counter(entry);
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.entry-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.entry-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.entry-card:hover::after {
  opacity: 1;
}

.entry-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  background: transparent;
  border-radius: 0;
}

.entry-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.4;
}

.entry-text {
  gap: 6px;
}

.entry-name {
  padding-right: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}

.entry-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.entry-links {
  gap: 0;
  margin-top: 22px;
}

.entry-link {
  padding: 4px 12px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 11.5px;
}

.entry-link + .entry-link {
  border-left: 1px solid var(--line);
}

.entry-link:hover {
  color: var(--accent);
  background: none;
  border-color: var(--line);
}

.entry-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.compare-entry {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.compare-entry:hover {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.suggestions {
  width: min(640px, 100%);
  gap: 6px;
  margin-top: 26px;
}

.suggestion-btn {
  padding: 7px 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
}

.suggestion-btn:hover {
  color: var(--accent);
  background: rgba(239, 234, 247, 0.55);
  border-color: rgba(76, 59, 120, 0.35);
}

.suggestion-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- 消息：文档流 */
.message-list {
  width: min(800px, 100% - 64px);
  padding: 36px 0 44px;
}

.message {
  margin-bottom: 30px;
}

.message-user {
  margin-bottom: 34px;
}

.user-bubble {
  max-width: 72%;
  padding: 11px 15px;
  color: #fbf9f5;
  background: var(--ink);
  border: 0;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 10px 24px -18px rgba(27, 26, 23, 0.5);
  font-size: 13.5px;
  line-height: 1.7;
}

.message-time {
  margin-top: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.message-head {
  gap: 10px;
  margin-bottom: 8px;
}

.message-head .message-time {
  margin-top: 0;
}

.local-badge {
  padding: 0;
  color: var(--faint);
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.local-badge::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: 1px;
}

/* 多 Agent：消息头显示本轮处理的子 Agent */
.agent-badge {
  padding: 1px 7px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid rgba(76, 59, 120, 0.18);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.assistant-bubble {
  color: #24211c;
  font-size: 15px;
  line-height: 1.85;
}

.message-cards {
  margin-top: 14px;
}

.response-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 卡片：档案纸片 */
.career-card,
.posting-card,
.exam-card,
.career-opp,
.career-compare-col,
.quick-compare,
.path-overview,
.inline-details,
.explore-direction,
.archive-card,
.guide-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(27, 26, 23, 0.02);
}

.career-card {
  padding: 18px;
}

.career-card h3,
.career-card h4,
.posting-head h5,
.direction-head h4,
.archive-head h3,
.guide-question {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
}

.career-card h3 {
  font-size: 16px;
}

.career-card h4 {
  font-size: 14px;
}

.career-meta {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.career-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.72;
}

.career-actions {
  gap: 12px;
  margin-top: 12px;
}

.career-actions .text-button {
  font-size: 11.5px;
}

.posting-id,
.subject-code,
.career-table th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.inline-details > summary {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.details-body,
.direction-summary,
.career-table {
  color: var(--muted);
}

.status,
.path-badge,
.verified-tag,
.demo-tag {
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* 引导与档案细节 */
.guide-question {
  font-size: 17px;
}

.guide-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.guide-option {
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.guide-option:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.guide-option.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.guide-option-label {
  font-size: 13px;
}

.guide-submit {
  min-height: 38px;
  padding: 8px 16px;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.guide-submit:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.guide-submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.archive-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.archive-badge.is-confirmed {
  color: #2f5d46;
  background: #f2f7f3;
  border-color: #cfe0d4;
}

.archive-badge.is-draft,
.archive-badge.is-unknown {
  color: #8a641c;
  background: #fbf5e8;
  border-color: #e8d6ae;
}

.archive-raw {
  padding: 10px 12px;
  background: var(--paper);
  border-left: 2px solid var(--gold);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.75;
}

.archive-item-row {
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-item-main strong {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
}

.archive-advice h4,
.archive-card h4 {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.archive-gaps {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.archive-edit summary {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.archive-edit input,
.archive-ws-form input,
.archive-ws-form select {
  border-radius: 6px;
  border-color: var(--line-strong);
  background: var(--surface);
}

.archive-edit button,
.archive-ws-form button {
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- 输入：悬浮便签 */
.composer {
  position: relative;
  flex: none;
  padding: 0 40px 22px;
  background: transparent;
  border-top: 0;
}

.composer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -44px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(250, 248, 244, 0), rgba(250, 248, 244, 0.94));
  pointer-events: none;
}

.composer-row {
  width: min(800px, 100%);
  margin: 0 auto;
  padding: 10px 10px 10px 16px;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-row:focus-within {
  border-color: rgba(76, 59, 120, 0.5);
  box-shadow: 0 22px 46px -26px rgba(76, 59, 120, 0.38);
}

#chat-input {
  min-height: 40px;
  padding: 6px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
}

#chat-input::placeholder {
  color: var(--faint);
}

.send-btn {
  min-height: 40px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.2s ease;
}

.send-btn:hover {
  background: var(--accent-ink);
}

.send-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.send-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stop-btn {
  background: #6b665c;
}

.stop-btn:hover {
  background: #514d44;
}

.toast {
  bottom: 104px;
  padding: 9px 14px;
  color: #fbf9f5;
  background: var(--ink);
  border-radius: 8px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------- 工作区：档案抽屉 */
.workspace {
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

.workspace-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.workspace-head h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.workspace-close {
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.workspace-tabs {
  gap: 2px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
}

.workspace-tab {
  padding: 8px 10px;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 11.5px;
  white-space: nowrap;
}

.workspace-tab:hover {
  color: var(--ink);
}

.workspace-tab.is-active {
  color: var(--ink);
  background: none;
  border-bottom-color: var(--accent);
}

.workspace-body {
  padding: 18px 20px;
}

.workspace-section h3 {
  margin: 18px 0 8px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.workspace-section h3:first-child {
  margin-top: 0;
}

.ws-note {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.ws-facts li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.ws-facts span {
  color: var(--faint);
  font-size: 11px;
}

.ws-facts strong {
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
}

.ws-facts em {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.workspace-foot {
  padding: 12px 20px 16px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  line-height: 1.6;
}

.workspace-body .text-button,
.workspace-foot + .text-button {
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .workspace-header {
    padding: 12px 28px 10px;
  }

  .message-list {
    width: min(800px, 100% - 48px);
  }

  .composer {
    padding: 0 28px 20px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .workspace-header {
    padding: 12px 18px 10px;
  }

  .empty-state {
    width: min(860px, 100% - 32px);
    padding-top: 7vh;
  }

  .empty-state::before {
    margin-bottom: 14px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .entry-card {
    min-height: 0;
    padding: 16px;
  }

  .entry-card::before {
    top: 14px;
    right: 16px;
  }

  .message-list {
    width: min(800px, 100% - 32px);
  }

  .composer {
    padding: 0 14px 14px;
  }

  .composer::before {
    display: none;
  }

  .sidebar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .empty-state h2 {
    font-size: 27px;
  }

  .workspace-toggle,
  .sidebar-toggle {
    padding: 5px 8px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .workspace-title h2 {
    max-width: 62%;
    font-size: 17px;
  }

  .entry-name {
    font-size: 15px;
  }

  .user-bubble {
    max-width: 84%;
    font-size: 13px;
  }

  .assistant-bubble {
    font-size: 14.5px;
  }

  .career-card {
    padding: 15px;
  }

  .composer-row {
    padding: 8px 8px 8px 12px;
    border-radius: 12px;
  }

  .send-btn {
    min-height: 38px;
    padding: 0 14px;
  }

  .toast {
    bottom: 92px;
    max-width: 86vw;
  }
}
/* ============================================================================
 * v0.14 邮路视觉系统（Postal Route）
 * 概念：每个人的毕业路径是一封待寄出的信——分拣、盖戳、上路、投递。
 * 母题：邮戳圆章 / 邮票齿孔 / 航空信封斜纹 / 经纬网格 / 红绿蓝三色邮路。
 * 仅覆盖视觉；不改 ID、类名与交互逻辑。
 * ========================================================================== */

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(32, 28, 22, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 28, 22, 0.026) 1px, transparent 1px);
  background-size: 32px 32px;
}

::selection {
  background: rgba(0, 51, 102, 0.16);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- 侧栏：邮局柜台 */
.sidebar {
  background: var(--panel);
  border-right: 1px dashed var(--line-strong);
}

.brand {
  align-items: center;
  gap: 12px;
  padding: 24px 20px 18px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  transform: rotate(-6deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 51, 102, 0.28);
  border-radius: 50%;
}

.brand-copy h1 {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.brand-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.sidebar-close {
  color: var(--muted);
  font-size: 10.5px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.primary-btn {
  margin: 0 16px 18px;
  padding: 11px 14px;
  color: #fff8f0;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(0, 51, 102, 0.16);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.primary-btn:hover {
  color: #ffffff;
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  box-shadow: 2px 2px 0 rgba(0, 51, 102, 0.2);
}

.sidebar-label {
  padding: 4px 20px 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.count-chip {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.project-list {
  padding: 0 10px;
}

.project-item {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.project-item.is-active {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 2px 2px 0 rgba(32, 28, 22, 0.05);
}

.project-select {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.project-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.chat-item {
  padding: 7px 10px 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.chat-item:hover {
  background: rgba(255, 253, 248, 0.6);
}

.chat-item.is-active {
  background: var(--surface);
  border-left-color: var(--accent);
  border-radius: 0 3px 3px 0;
}

.chat-title {
  font-size: 12px;
}

.new-chat-btn {
  margin: 6px 0 0;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  font-size: 11px;
}

.new-chat-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 253, 248, 0.7);
}

.sidebar-footer {
  padding: 14px 18px 18px;
  border-top: 1px dashed var(--line-strong);
}

.storage-status {
  padding: 9px 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- 顶部：航空信封斜纹 */
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 17px 40px 12px;
  background: rgba(246, 241, 232, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.05);
}

.workspace-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: repeating-linear-gradient(135deg,
    var(--accent) 0 8px, transparent 8px 16px,
    var(--route) 16px 24px, transparent 24px 32px);
  opacity: 0.3;
  pointer-events: none;
}

.workspace-title h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chat-title-inline {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.mode-badge {
  padding: 3px 9px 3px 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.mode-badge.is-model {
  color: var(--postal);
  background: var(--postal-soft);
  border-color: #c3d9cb;
}

.mode-badge.is-model::before {
  background: var(--postal);
}

.mode-badge.is-local {
  color: var(--muted);
}

.mode-badge.is-pending {
  color: var(--pending);
  background: #f8f0df;
  border-color: #e6d3ae;
}

.mode-badge.is-pending::before {
  background: var(--pending);
}

.workspace-toggle,
.sidebar-toggle {
  padding: 5px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.workspace-toggle:hover,
.sidebar-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}

.profile-summary-text {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.text-button {
  padding: 2px 0;
  color: var(--accent-ink);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 11px;
  text-decoration: none;
}

.text-button:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-form-panel {
  border-top: 1px dashed var(--line-strong);
}

.profile-field span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.profile-field select {
  border-radius: 3px;
  border-color: var(--line-strong);
  background: var(--surface);
}

/* ---------------------------------------------------------------- 空状态：一封待寄出的信 */
.empty-state {
  width: min(880px, 100% - 64px);
  padding-top: 8vh;
  padding-bottom: 30px;
}

.empty-state::before {
  content: "西安邮电大学\A XUPT · 2026";
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 auto 26px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: pre;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 51, 102, 0.2);
  transform: rotate(-7deg);
  opacity: 0.92;
}

.empty-state h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.empty-sub {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

/* 分拣口：邮票式卡片 */
.entry-grid {
  gap: 16px;
  margin: 30px 0 16px;
  counter-reset: entry;
}

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 150px;
  padding: 20px 18px 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(32, 28, 22, 0.05);
  counter-increment: entry;
  overflow: visible;
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease;
}

.entry-card::before {
  content: "0" counter(entry);
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* 底边齿孔：用页面底色打出圆点缺口，模拟邮票 */
.entry-card::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -4px;
  height: 8px;
  background-image: radial-gradient(circle at 4px 4px, var(--bg) 3.2px, transparent 3.6px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  pointer-events: none;
}

.entry-card:hover {
  border-color: var(--accent);
  box-shadow: 5px 5px 0 rgba(0, 51, 102, 0.12);
  transform: translateY(-2px);
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  background: transparent;
  border-radius: 0;
}

.entry-name {
  padding-right: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}

.entry-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.entry-links {
  gap: 0;
  margin-top: 22px;
}

.entry-link {
  padding: 4px 12px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 11px;
}

.entry-link + .entry-link {
  border-left: 1px solid var(--line);
}

.entry-link:hover {
  color: var(--accent);
  background: none;
}

.compare-entry {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
}

.compare-entry:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.suggestions {
  width: min(600px, 100%);
  gap: 6px;
  margin-top: 24px;
}

.suggestion-btn {
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  font-size: 11px;
}

.suggestion-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(249, 232, 230, 0.45);
}

/* ---------------------------------------------------------------- 对话：明信片与回信 */
.message-list {
  width: min(800px, 100% - 64px);
  padding: 34px 0 42px;
}

.message {
  margin-bottom: 28px;
}

.message-user {
  margin-bottom: 32px;
}

.user-bubble {
  position: relative;
  max-width: 70%;
  padding: 12px 46px 12px 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(32, 28, 22, 0.06);
  font-size: 14px;
  line-height: 1.7;
}

/* 右上角邮票 */
.user-bubble::after {
  content: "XUPT";
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 30px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.02em;
  transform: rotate(4deg);
  pointer-events: none;
}

.message-time {
  margin-top: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.message-head {
  gap: 8px;
  margin-bottom: 7px;
}

.local-badge {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.local-badge::before {
  width: 4px;
  height: 4px;
  background: var(--line-strong);
}

.agent-badge {
  padding: 1px 7px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 51, 102, 0.22);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.agent-badge.is-plan {
  color: var(--route);
  background: var(--route-soft);
  border-color: rgba(36, 64, 110, 0.24);
}

.agent-badge.is-job {
  color: var(--postal);
  background: var(--postal-soft);
  border-color: rgba(31, 107, 74, 0.24);
}

.agent-badge.is-resume {
  color: var(--gold);
  background: #f7efe1;
  border-color: rgba(176, 138, 79, 0.36);
}

.assistant-bubble {
  color: #26221c;
  font-size: 15px;
  line-height: 1.85;
}

.response-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

/* ---------------------------------------------------------------- 卡片：档案纸与邮票边 */
.career-card,
.posting-card,
.exam-card,
.career-opp,
.career-compare-col,
.quick-compare,
.path-overview,
.inline-details,
.explore-direction,
.archive-card,
.guide-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(32, 28, 22, 0.04);
}

.career-card {
  position: relative;
  padding: 18px 18px 18px 20px;
}

/* 档案夹红边 */
.career-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 0 2px 2px 0;
}

.guide-card {
  position: relative;
  padding: 18px 18px 18px 20px;
}

.guide-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--route);
  opacity: 0.45;
  border-radius: 0 2px 2px 0;
}

.career-card h3,
.career-card h4,
.posting-head h5,
.direction-head h4,
.archive-head h3,
.guide-question {
  font-family: var(--serif);
  font-weight: 600;
}

.career-meta {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.career-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.72;
}

.career-actions {
  gap: 10px;
}

.posting-id,
.subject-code,
.career-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.inline-details > summary {
  color: var(--route);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.status,
.path-badge,
.verified-tag,
.demo-tag {
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
}

.guide-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.guide-option {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.guide-option:hover {
  background: #fff9ef;
  border-color: var(--accent);
}

.guide-option.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.guide-submit {
  min-height: 38px;
  padding: 8px 16px;
  color: #fff8f0;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.guide-submit:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.archive-badge {
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
}

.archive-badge.is-confirmed {
  color: var(--postal);
  background: var(--postal-soft);
  border-color: #c3d9cb;
}

.archive-badge.is-draft,
.archive-badge.is-unknown {
  color: var(--pending);
  background: #f8f0df;
  border-color: #e6d3ae;
}

.archive-raw {
  background: #fff9ef;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 12.5px;
}

.archive-item-row {
  background: #fffbf3;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.archive-item-main strong {
  font-family: var(--serif);
}

/* ---------------------------------------------------------------- 输入：信封 */
.composer {
  position: relative;
  flex: none;
  padding: 0 40px 22px;
  background: transparent;
  border-top: 0;
}

.composer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(246, 241, 232, 0), rgba(246, 241, 232, 0.95));
  pointer-events: none;
}

.composer-row {
  position: relative;
  width: min(800px, 100%);
  margin: 0 auto;
  padding: 12px 12px 12px 56px;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 16px 32px -24px rgba(32, 28, 22, 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 输入框左侧邮票 */
.composer-row::before {
  content: "XUPT";
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.02em;
  transform: translateY(-50%) rotate(-4deg);
  pointer-events: none;
}

.composer-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 18px 36px -24px rgba(0, 51, 102, 0.4);
}

#chat-input {
  min-height: 40px;
  padding: 6px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

#chat-input::placeholder {
  color: var(--faint);
}

.send-btn {
  min-height: 40px;
  padding: 0 18px;
  color: #fff8f0;
  background: var(--accent);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.send-btn:hover {
  background: var(--accent-ink);
}

.stop-btn {
  background: #7a7164;
}

.stop-btn:hover {
  background: #5f574c;
}

.toast {
  bottom: 104px;
  padding: 9px 14px;
  color: #fff8f0;
  background: var(--ink);
  border-radius: 3px;
  font-size: 11px;
  box-shadow: 0 12px 24px -14px rgba(32, 28, 22, 0.6);
}

/* ---------------------------------------------------------------- 工作区：分拣台 */
.workspace {
  background: var(--surface);
  border-left: 1px dashed var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.workspace-head {
  padding: 18px 20px 14px;
  border-bottom: 1px dashed var(--line-strong);
}

.workspace-head h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.workspace-tabs {
  gap: 1px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
}

.workspace-tab {
  padding: 8px 9px;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 11px;
}

.workspace-tab.is-active {
  color: var(--accent-ink);
  background: none;
  border-bottom-color: var(--accent);
}

.ws-facts li {
  border-bottom: 1px dashed var(--line);
}

.ws-facts strong {
  font-family: var(--serif);
}

.workspace-foot {
  border-top: 1px dashed var(--line-strong);
  color: var(--faint);
  font-size: 10px;
}

/* ---------------------------------------------------------------- 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #decdb3;
  border: 3px solid var(--bg);
  border-radius: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .workspace-header {
    padding: 15px 28px 10px;
  }

  .message-list {
    width: min(800px, 100% - 48px);
  }

  .composer {
    padding: 0 28px 20px;
  }
}

@media (max-width: 860px) {
  .empty-state {
    width: min(880px, 100% - 32px);
    padding-top: 3vh;
    padding-bottom: 24px;
  }

  .empty-state::before {
    width: 84px;
    height: 84px;
    margin-bottom: 18px;
    font-size: 8px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .entry-card {
    min-height: 0;
    padding: 16px;
  }

  .entry-card::after {
    display: none;
  }

  .message-list {
    width: min(800px, 100% - 32px);
  }

  .composer {
    padding: 0 14px 14px;
  }

  .composer::before {
    display: none;
  }

  .sidebar {
    border-bottom: 1px dashed var(--line-strong);
  }
}

@media (max-width: 640px) {
  .empty-state {
    padding-top: 2vh;
  }

  .empty-state h2 {
    font-size: 23px;
  }

  .empty-sub {
    font-size: 12px;
    line-height: 1.75;
  }

  .entry-grid {
    gap: 10px;
    margin: 22px 0 12px;
  }

  .entry-card {
    gap: 8px;
    padding: 14px 16px;
  }

  .entry-name {
    font-size: 15px;
  }

  .entry-desc {
    font-size: 11.5px;
  }

  .user-bubble {
    max-width: 86%;
    padding-right: 42px;
  }

  .composer-row {
    padding: 10px 10px 10px 48px;
  }

  .composer-row::before {
    left: 10px;
    width: 26px;
    height: 32px;
  }

  .send-btn {
    min-height: 38px;
    padding: 0 14px;
  }
}
/* ============================================================================
 * 西邮蓝（XUPT Blue）：深蓝主色、环形校名圆章、彩色几何点缀
 * 参考西邮校徽构图（圆环 + 环形中英文校名 + 中心符号）与活泼几何元素，
 * 不复制官方校徽位图；拿到官方矢量后再替换中心标识。
 * ========================================================================== */

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 51, 102, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 102, 0.024) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* 品牌：蓝紫渐变圆环 + 白底「邮」 */
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--accent);
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #1e90ff, #483d8b) border-box;
  border: 2px solid transparent;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  transform: rotate(-4deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(0, 51, 102, 0.2);
  border-radius: 50%;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #003366 0%, #1e90ff 100%);
  border: 1px solid #003366;
  border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(0, 51, 102, 0.14);
}

.primary-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #002347 0%, #1a7fd6 100%);
  border-color: #002347;
  box-shadow: 2px 2px 0 rgba(0, 51, 102, 0.18);
}

/* 空状态：环形校名圆章（参考构图，不是官方校徽） */
.empty-state {
  position: relative;
}

.empty-state::before {
  content: none;
  display: none;
}

/* 散落的彩色几何点：蓝 / 粉 / 黄 / 绿 / 紫 */
.empty-state::after {
  content: "";
  position: absolute;
  inset: -6px 0 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 9% 14%, rgba(30, 144, 255, 0.32) 0 5px, transparent 6px),
    radial-gradient(circle at 88% 20%, rgba(255, 105, 180, 0.26) 0 4px, transparent 5px),
    radial-gradient(circle at 4% 58%, rgba(212, 160, 23, 0.3) 0 3px, transparent 4px),
    radial-gradient(circle at 95% 54%, rgba(50, 205, 50, 0.24) 0 4px, transparent 5px),
    radial-gradient(circle at 20% 88%, rgba(72, 61, 139, 0.2) 0 5px, transparent 6px),
    radial-gradient(circle at 79% 86%, rgba(30, 144, 255, 0.18) 0 3px, transparent 4px);
  opacity: 0.9;
}

.empty-state > * {
  position: relative;
  z-index: 1;
}

.xupt-seal {
  width: 156px;
  height: 156px;
  margin: 0 auto 24px;
}

.xupt-seal svg {
  display: block;
  width: 100%;
  height: 100%;
}

.xupt-seal .seal-en {
  fill: var(--accent);
  font-family: var(--mono);
}

.xupt-seal .seal-mark {
  fill: var(--accent);
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
}

.empty-state h2 {
  color: var(--accent);
}

/* 入口卡：白纸 + 蓝描边 + 彩色编号 */
.entry-card {
  border-radius: 10px;
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.04);
}

.entry-card::before {
  color: var(--route);
}

.entry-card:hover {
  border-color: var(--route);
  box-shadow: 0 10px 26px -18px rgba(0, 51, 102, 0.5);
}

.entry-icon {
  color: var(--route);
}

/* 用户消息：浅蓝信纸 + 白色邮票 */
.user-bubble {
  background: #e9f2fd;
  border-color: #cfe0f5;
}

.user-bubble::after {
  color: var(--accent);
  background: #ffffff;
  border-color: var(--route);
}

/* 输入区：蓝色 focus + 蓝渐变寄出 */
.composer-row:focus-within {
  border-color: var(--route);
  box-shadow: 0 18px 36px -24px rgba(30, 144, 255, 0.45);
}

.composer-row::before {
  color: var(--accent);
  background: #f2f8ff;
  border-color: var(--route);
}

.send-btn {
  background: linear-gradient(135deg, #003366, #1e90ff);
}

.send-btn:hover {
  background: linear-gradient(135deg, #002347, #1a7fd6);
}

/* 卡片：统一 10px 圆角，蓝边 */
.career-card,
.guide-card,
.archive-card,
.posting-card,
.exam-card {
  border-radius: 10px;
}

/* Agent 四色：方向深蓝 / 规划紫 / 岗位绿 / 简历金 */
.agent-badge {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: rgba(0, 51, 102, 0.2);
}

.agent-badge.is-plan {
  color: var(--violet);
  background: #efedfa;
  border-color: rgba(72, 61, 139, 0.24);
}

.agent-badge.is-job {
  color: var(--postal);
  background: var(--postal-soft);
  border-color: rgba(31, 107, 74, 0.22);
}

.agent-badge.is-resume {
  color: #8a6a12;
  background: #fdf6e3;
  border-color: rgba(212, 160, 23, 0.35);
}

/* 工作区与标签 */
.workspace-head h2 {
  color: var(--accent);
}

.workspace-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--route);
}

/* 滚动条 */
::-webkit-scrollbar-thumb {
  background: #c9d8ea;
  border: 3px solid var(--bg);
  border-radius: 8px;
}

@media (max-width: 860px) {
  .xupt-seal {
    width: 112px;
    height: 112px;
    margin-bottom: 18px;
  }

  .empty-state::after {
    display: none;
  }
}

/* Agent 交接卡：保留档案，由用户确认后切换 */
.handoff-card {
  border-style: dashed;
  border-color: var(--route);
  background: #f7fbff;
}

.handoff-card h3 {
  color: var(--accent);
}

.handoff-card .guide-submit {
  min-height: 36px;
}

/* ============================================================================
 * 登录 / 注册层（本地账号）
 * ========================================================================== */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 18%, rgba(30, 144, 255, 0.1), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(72, 61, 139, 0.08), transparent 46%),
    var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 48px;
  align-items: center;
  width: min(1080px, 100%);
}

.auth-brand h1 {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-seal {
  width: 140px;
  height: 140px;
  margin-bottom: 20px;
}

.auth-seal svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-seal .seal-en {
  fill: var(--accent);
  font-family: var(--mono);
}

.auth-seal .seal-mark {
  fill: var(--accent);
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
}

.auth-slogan {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.auth-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-points li::before {
  content: "· ";
  color: var(--route);
}

.auth-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  padding: 9px 14px;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.auth-form[hidden] {
  display: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form input,
.auth-form select {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 13.5px;
}

.auth-form input:focus-visible,
.auth-form select:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 1px;
}

.auth-code-row {
  display: flex;
  gap: 8px;
}

.auth-code-row input {
  flex: 1;
  min-width: 0;
}

.auth-code-btn {
  flex: none;
  padding: 0 12px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.auth-code-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.auth-demo-code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

.auth-submit {
  min-height: 44px;
  margin-top: 4px;
  color: #ffffff;
  background: linear-gradient(135deg, #003366, #1e90ff);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.auth-error {
  margin: 0;
  padding: 8px 10px;
  color: var(--warn);
  background: #fbf2ee;
  border-left: 2px solid var(--warn);
  font-size: 12px;
}

.auth-note {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.auth-guest {
  align-self: center;
  margin-top: 2px;
}

.auth-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.auth-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .auth-brand {
    text-align: center;
  }

  .auth-seal {
    width: 108px;
    height: 108px;
    margin: 0 auto 14px;
  }

  .auth-brand h1 {
    font-size: 22px;
  }

  .auth-points {
    display: none;
  }

  .auth-card {
    padding: 20px;
  }
}
/* ============================================================================
 * v2 设计层 · 西邮蓝 + 主流 Agent 版式（2026-11-11）
 * ----------------------------------------------------------------------------
 * 覆盖旧层的配色、间距与装饰：去掉邮票齿孔 / 信纸纹理等重装饰，改为
 * 「白底 + 极浅灰分区 + 西邮蓝点缀 + 大圆角卡片」的当代对话式界面。
 * 仅视觉层，不改任何 DOM 契约与交互逻辑。
 * ========================================================================== */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --panel: #f1f4f8;
  --panel-strong: #e7ecf3;
  --ink: #101828;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #0b4f9e;
  --accent-ink: #0a3f7d;
  --accent-soft: #eaf2fd;
  --route: #2f7cf6;
  --route-soft: #eef5ff;
  --postal: #0b4f9e;
  --postal-soft: #eaf2fd;
  --violet: #6b5bd2;
  --gold: #b7791f;
  --seal: #0b4f9e;
  --warn: #b42318;
  --pending: #b54708;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 12px 28px -18px rgba(16, 24, 40, 0.28);
  --shadow-lift: 0 24px 56px -32px rgba(16, 24, 40, 0.4);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.002em;
}

::selection {
  color: var(--ink);
  background: #d8e8fd;
}

*::-webkit-scrollbar-thumb {
  background: #d7dce4;
  background-clip: content-box;
  border: 3px solid transparent;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  letter-spacing: -0.01em;
}

.app-shell {
  grid-template-columns: 284px minmax(0, 1fr);
  background: var(--bg);
}

/* ---------------------------------------------------------------- 侧栏 */

.sidebar {
  padding: 18px 14px 16px;
  background: #fbfcfd;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.sidebar::before,
.sidebar::after,
.brand::before,
.brand::after {
  content: none;
  display: none;
}

.brand {
  gap: 11px;
  padding: 4px 6px 16px;
  border-bottom: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  border-radius: 12px;
  font-size: 0;
  box-shadow: none;
}

.brand-mark::before,
.brand-mark::after {
  content: none;
  display: none;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-copy h1 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-copy p {
  margin-top: 1px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.sidebar-close {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  padding: 3px 8px;
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 14px 0 6px;
  padding: 10px 12px;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.new-chat-btn:hover {
  background: var(--accent-soft);
  border-color: #b9d4f5;
  box-shadow: var(--shadow-sm);
}

.new-chat-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}

.sidebar-label {
  padding: 14px 8px 6px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  border: 0;
}

.project-list {
  gap: 2px;
  padding: 0;
}

.chat-item {
  padding: 9px 10px;
  color: #344054;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  transition: background 0.14s ease, color 0.14s ease;
}

.chat-item::before {
  content: none;
}

.chat-item:hover {
  background: #f0f3f7;
  color: var(--ink);
}

.chat-item.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}

.chat-count {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.chat-item.is-active .chat-count {
  color: var(--accent);
}

.sidebar-footer {
  padding: 12px 8px 2px;
  margin-top: auto;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}

.storage-status {
  color: var(--muted);
  font-size: 10.5px;
}

.sidebar-toggle,
.workspace-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.sidebar-toggle:hover,
.workspace-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #bfd8f6;
}

.hamburger {
  width: 12px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  position: relative;
}

.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 1.5px;
  background: currentColor;
}

/* ---------------------------------------------------------------- 顶栏 */

.chat-main {
  position: relative;
  background: var(--bg);
}

.workspace-header {
  padding: 0;
  background: rgba(246, 247, 249, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: none;
}

.workspace-header::before,
.workspace-header::after {
  content: none;
}

.workspace-inner {
  max-width: 960px;
  padding: 12px 28px;
  margin: 0 auto;
}

.workspace-title-row {
  gap: 10px;
}

.workspace-title {
  gap: 7px;
  flex-wrap: wrap;
}

.workspace-title h2 {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.chat-title-inline {
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 400;
}

.chat-title-inline::before {
  content: "/";
  margin-right: 6px;
  color: #d0d5dd;
}

.mode-badge {
  padding: 2px 8px;
  color: var(--muted);
  background: #eef1f5;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.mode-badge.is-model {
  color: #05603a;
  background: #e7f6ee;
  border-color: #c3ebd5;
}

.mode-badge.is-local {
  color: var(--pending);
  background: #fdf4e7;
  border-color: #f2ddb9;
}

.local-badge {
  padding: 1px 7px;
  color: var(--faint);
  background: #f2f4f7;
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.agent-badge {
  padding: 2px 9px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #cfe3fb;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.agent-badge.is-plan {
  color: #075985;
  background: #e8f5fd;
  border-color: #c6e7f8;
}

.agent-badge.is-job {
  color: #9a3412;
  background: #fdf0e8;
  border-color: #f6d7c4;
}

.agent-badge.is-direction {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: #cfe3fb;
}

.agent-badge.is-resume {
  color: #5b21b6;
  background: #f3effe;
  border-color: #e0d6fb;
}

.profile-summary-row {
  margin-top: 7px;
  gap: 8px;
}

.profile-summary-text {
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

.text-button {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  padding: 2px 5px;
}

.text-button:hover {
  background: var(--accent-soft);
}

.profile-form-panel {
  margin-top: 10px;
}

.profile-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.profile-field span {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
}

.profile-field select {
  margin-top: 4px;
  min-height: 34px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
}

.profile-field select:focus-visible,
.text-button:focus-visible,
.new-chat-btn:focus-visible,
.quick-prompt:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- 空状态 */

.chat-scroll {
  padding: 0 28px;
}

.empty-state {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 0 28px;
  text-align: center;
}

.empty-state::before,
.empty-state::after {
  content: none;
  display: none;
}

.empty-state .xupt-seal {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.empty-state .xupt-seal svg {
  width: 84px;
  height: 84px;
  display: block;
}

.seal-en {
  fill: #7fa8da;
  font-family: var(--mono);
  font-size: 9.5px;
}

.seal-mark {
  fill: var(--accent);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 600;
}

.empty-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.empty-state h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.empty-sub {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 12px;
  max-width: 940px;
  margin: 0 auto;
}

.entry-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-card::before,
.entry-card::after {
  content: none;
  display: none;
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: #bcd6f7;
  box-shadow: var(--shadow-md);
}

.entry-card:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 3px;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 11px;
}

.entry-icon svg {
  width: 20px;
  height: 20px;
}

.entry-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.entry-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.entry-go {
  margin-top: auto;
  color: #b8c0cc;
  font-size: 14px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.entry-card:hover .entry-go {
  color: var(--accent);
  transform: translateX(2px);
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 760px;
  margin: 26px auto 0;
}

.quick-prompt {
  padding: 7px 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.quick-prompt:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #cfe3fb;
}

/* ---------------------------------------------------------------- 消息 */

.message-list {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 0 40px;
  gap: 26px;
}

.message {
  margin: 0;
}

.message-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-bubble {
  max-width: min(620px, 82%);
  padding: 11px 15px;
  color: #ffffff;
  background: linear-gradient(150deg, #1160b8, #0b4f9e);
  border: 0;
  border-radius: 16px 16px 5px 16px;
  font-size: 14.5px;
  line-height: 1.65;
  box-shadow: 0 8px 20px -14px rgba(11, 79, 158, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
}

.message-time {
  margin-top: 5px;
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.message-assistant {
  position: relative;
  padding: 2px 0 0 44px;
}

.message-assistant::before {
  content: "邮";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #d5e6fb;
  border-radius: 10px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 15px;
  font-weight: 600;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.message-head .message-time {
  margin-top: 0;
}

.message-cards {
  margin-top: 14px;
  gap: 12px;
}

.assistant-bubble {
  padding: 0;
  color: #1d2939;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14.5px;
  line-height: 1.78;
  box-shadow: none;
  word-break: break-word;
}

.message.is-typing .assistant-bubble {
  color: var(--faint);
}

/* Markdown 排版 */

.assistant-bubble p {
  margin: 0 0 10px;
}

.assistant-bubble p:last-child {
  margin-bottom: 0;
}

.assistant-bubble h3,
.assistant-bubble h4,
.assistant-bubble h5 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.assistant-bubble h3:first-child,
.assistant-bubble h4:first-child,
.assistant-bubble h5:first-child {
  margin-top: 0;
}

.assistant-bubble strong {
  color: var(--accent-ink);
  font-weight: 650;
}

.assistant-bubble em {
  color: #344054;
}

.assistant-bubble ul,
.assistant-bubble ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.assistant-bubble li {
  margin: 4px 0;
  padding-left: 2px;
}

.assistant-bubble li::marker {
  color: var(--route);
}

.assistant-bubble blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  color: var(--muted);
  background: #f5f7fa;
  border-left: 3px solid #c9dcf5;
  border-radius: 0 8px 8px 0;
}

.assistant-bubble code {
  padding: 1px 5px;
  color: #0a3f7d;
  background: #eff5fd;
  border: 1px solid #dbe8f8;
  border-radius: 5px;
  font-size: 0.84em;
}

.assistant-bubble pre {
  margin: 12px 0;
  padding: 12px 14px;
  overflow: auto;
  background: #0f172a;
  border-radius: 10px;
}

.assistant-bubble pre code {
  padding: 0;
  color: #e6edf7;
  background: none;
  border: 0;
  font-size: 12.5px;
}

.assistant-bubble a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.assistant-bubble hr {
  margin: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.assistant-bubble .pending {
  padding: 0 4px;
  color: var(--pending);
  background: #fdf4e7;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ---------------------------------------------------------------- 输入区 */

.composer {
  max-width: 860px;
  width: calc(100% - 56px);
  margin: 0 auto 20px;
  padding: 10px 10px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 34px -24px rgba(16, 24, 40, 0.45);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.composer::before {
  content: none;
  display: none;
}

.composer:focus-within {
  border-color: #a9c9f2;
  box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.1), 0 14px 34px -24px rgba(16, 24, 40, 0.45);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.composer-row::before,
.composer-row::after {
  content: none;
  display: none;
}

.composer-row:focus-within {
  border: 0;
  box-shadow: none;
}

#chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 168px;
  padding: 9px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14.5px;
  line-height: 1.65;
  resize: none;
  outline: none;
}

#chat-input::placeholder {
  color: var(--faint);
}

.attach-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
  color: var(--muted);
  background: #f4f6f9;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.16s ease, background 0.16s ease;
}

.attach-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.attach-btn:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 2px;
}

.file-input {
  display: none;
}

.send-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 38px;
  height: 36px;
  padding: 0 13px;
  margin-bottom: 2px;
  color: #ffffff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease, transform 0.12s ease, opacity 0.16s ease;
}

.send-btn:hover {
  background: var(--accent-ink);
}

.send-btn:active {
  transform: scale(0.97);
}

.send-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.send-btn svg {
  width: 16px;
  height: 16px;
}

.send-btn .send-label {
  display: none;
}

.send-btn.is-busy .send-label {
  display: inline;
}

.send-btn.is-busy svg {
  display: none;
}

.composer.is-dragging {
  border-color: var(--route);
  background: #f7fbff;
  box-shadow: 0 0 0 4px rgba(47, 124, 246, 0.12);
}

.stop-btn {
  min-width: 56px;
  color: #344054;
  background: #eef1f5;
}

.stop-btn:hover {
  color: var(--ink);
  background: #e4e8ee;
}

.composer-hint {
  margin: 4px 2px 0;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  letter-spacing: 0.01em;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 2px 9px;
}

.attachment-tray[hidden] {
  display: none;
}

.attachment-scope {
  margin: 0 2px 6px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  background: #f7f9fc;
  border: 1px solid #eef1f6;
  border-radius: 8px;
}

.attachment-scope[hidden] {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 5px 6px 5px 8px;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.attachment-thumb {
  width: 26px;
  height: 26px;
  flex: none;
  object-fit: cover;
  border-radius: 6px;
  background: #e9eef5;
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.attachment-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.attachment-name {
  overflow: hidden;
  color: #344054;
  font-size: 11.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  color: var(--faint);
  font-size: 10px;
}

.attachment-remove {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
}

.attachment-remove:hover {
  color: var(--warn);
  background: #fdecea;
}

/* 用户消息里的附件回显 */

.user-attachments {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 7px;
}

.user-attachment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 240px;
  padding: 5px 8px;
  color: #344054;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11.5px;
}

.user-attachment img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
}

.user-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 工作区 */

.workspace {
  width: min(420px, 92vw);
  padding: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-radius: 20px 0 0 20px;
  box-shadow: -24px 0 60px -40px rgba(16, 24, 40, 0.5);
}

.workspace-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-head h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.workspace-close {
  color: var(--muted);
  background: #f4f6f9;
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.workspace-tab {
  flex: none;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.workspace-tab:hover {
  background: #f4f6f9;
}

.workspace-tab.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 600;
}

.workspace-body {
  padding: 18px 20px 26px;
}

.workspace-foot {
  padding: 12px 20px 16px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}

/* 卡片基座统一：让 20+ 种业务卡片共享同一套外观 */

.message-cards > *,
.workspace-body > * {
  border-radius: 14px;
}

.posting-card,
.career-card,
.exam-card,
.civil-card,
.webjobs-card,
.plan-card,
.comparison-card,
.response-block,
.path-overview,
.quick-compare,
.inline-details,
.jobs-card,
.careers-card,
.career-lab-card,
.guide-card,
.archive-card,
.handoff-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.guide-card {
  padding: 16px;
  border-color: #d9e6f8;
  background: linear-gradient(180deg, #fbfdff, #ffffff 46%);
}

.guide-question {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.guide-options {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.guide-option {
  padding: 9px 11px;
  color: #344054;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12.5px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.guide-option:hover {
  border-color: #b9d4f5;
  background: #f8fbff;
}

.guide-option.is-selected,
.guide-option[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--route);
  font-weight: 600;
}

.guide-option:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 2px;
}

/* entry-links 保留为隐藏兼容层（旧版本入口链接样式，避免旧页面残留撑开布局） */
.entry-links {
  display: none;
}

/* ---------------------------------------------------------------- 提示条 */

.toast {
  padding: 9px 16px;
  color: #f2f4f7;
  background: rgba(16, 24, 40, 0.92);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------- 认证页 */

.auth-gate {
  background:
    radial-gradient(circle at 14% 16%, rgba(47, 124, 246, 0.1), transparent 44%),
    radial-gradient(circle at 86% 84%, rgba(11, 79, 158, 0.08), transparent 46%),
    var(--bg);
}

.auth-card {
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
}

.auth-brand h1 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.auth-slogan {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.auth-submit {
  background: var(--accent);
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.auth-submit:hover {
  background: var(--accent-ink);
}

.auth-form input,
.auth-form select {
  border-color: var(--line-strong);
  border-radius: 9px;
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 254px minmax(0, 1fr);
  }

  .entry-desc {
    font-size: 12px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 40px -24px rgba(16, 24, 40, 0.4);
  }

  .workspace-inner {
    padding: 10px 16px;
  }

  .chat-scroll {
    padding: 0 16px;
  }

  .empty-state {
    padding: 34px 0 20px;
  }

  .empty-state .xupt-seal,
  .empty-state .xupt-seal svg {
    width: 66px;
    height: 66px;
  }

  .entry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .entry-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px;
  }

  .entry-text {
    flex: 1;
  }

  .entry-go {
    margin-top: 0;
  }

  .quick-prompts {
    margin-top: 18px;
  }

  .message-list {
    padding: 20px 0 28px;
  }

  .message-assistant {
    padding-left: 0;
  }

  .message-assistant::before {
    display: none;
  }

  .user-bubble {
    max-width: 88%;
  }

  .composer {
    width: calc(100% - 32px);
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .profile-summary-row {
    flex-wrap: wrap;
  }

  .profile-bar {
    grid-template-columns: 1fr 1fr;
  }

  .workspace {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }
}

@media (max-width: 560px) {
  .workspace-title h2 {
    font-size: 12.5px;
  }

  .chat-title-inline {
    display: none;
  }

  .empty-state h2 {
    font-size: 24px;
  }

  .empty-sub {
    font-size: 13px;
    margin-bottom: 24px;
  }

  .composer-hint {
    display: none;
  }

  .profile-bar {
    grid-template-columns: 1fr;
  }

  .quick-prompt {
    font-size: 12px;
  }
}
/* ---------------------------------------------------------------- v2.1 顶栏清空：只留两个悬浮图标 */

.workspace-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.workspace-inner {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
}

.workspace-title {
  display: none !important;
}

.workspace-toggle,
.sidebar-toggle {
  position: absolute;
  top: 14px;
  z-index: 31;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0;
  cursor: pointer;
  pointer-events: auto;
}

.workspace-toggle {
  right: 18px;
}

.sidebar-toggle {
  left: 18px;
  display: none;
}

.workspace-toggle svg {
  width: 16px;
  height: 16px;
}

.workspace-toggle:hover,
.sidebar-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 860px) {
  .sidebar-toggle {
    display: inline-flex;
  }
}

#profile-form-panel {
  position: absolute;
  top: 56px;
  right: 18px;
  left: 18px;
  z-index: 32;
  margin: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
  pointer-events: auto;
}

#profile-form-panel .profile-bar {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.chat-scroll {
  padding-top: 20px;
}
[hidden] {
  display: none !important;
}
.message-list {
  padding-top: 56px;
}
/* ============================================================================
 * 公用终端 v2：侧栏助手导航、会话卡、顶部回退键
 * ========================================================================== */
.agent-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 14px 14px;
}

.agent-nav-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.agent-nav-item:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(16, 35, 63, 0.06);
}

.agent-nav-item.is-active {
  background: var(--accent-soft);
  border-color: #b7d3f0;
  box-shadow: inset 3px 0 0 var(--accent);
}

.agent-nav-name {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.agent-nav-desc {
  font-size: 11.5px;
  color: var(--muted);
}

.session-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.session-line {
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-logout {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.session-logout:hover {
  color: #b42318;
  background: #fff6f6;
  border-color: #f0c2c2;
}

.agent-back {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #c9def5;
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.16s ease;
}

.agent-back:hover {
  background: #dcebfa;
}

.auth-card .auth-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
}

/* ============================================================================
 * v1.3 对话：主流 Agent 观感（用户右侧浅色块 / 助手文档流 / 思考过程折叠）
 * ========================================================================== */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: min(760px, 100% - 56px);
  padding: 32px 0 40px;
}

.message {
  margin: 0;
}

.message-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.user-bubble {
  max-width: 78%;
  padding: 11px 16px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink);
  background: #f0f3f8;
  border: 1px solid #e4e9f1;
  border-radius: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-user .message-time {
  margin: 0 2px;
  color: var(--faint);
  font-size: 10.5px;
}

.message-assistant {
  position: relative;
  padding: 0 0 0 40px;
}

.message-assistant::before {
  content: "邮";
  position: absolute;
  left: 0;
  top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  border-radius: 9px;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.assistant-bubble {
  padding: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.thinking-block {
  margin: 0 0 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.thinking-block > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.thinking-block > summary::-webkit-details-marker {
  display: none;
}

.thinking-block > summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.16s ease;
}

.thinking-block[open] > summary::after {
  transform: rotate(180deg);
}

.thinking-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.65;
}

.thinking-block.is-live .thinking-dot {
  animation: thinkingPulse 1.2s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

.thinking-body {
  max-height: 320px;
  padding: 10px 12px 11px 26px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-wrap;
  border-top: 1px dashed var(--line);
}

.thinking-body.is-omitted {
  font-style: normal;
  color: var(--muted);
  opacity: 0.85;
}

.message.is-streaming .assistant-bubble:not(:empty)::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: caretBlink 1s steps(2, start) infinite;
}

@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.assistant-bubble h1,
.assistant-bubble h2,
.assistant-bubble h3,
.assistant-bubble h4 {
  margin: 18px 0 8px;
  font-size: 15.5px;
  line-height: 1.5;
}

.assistant-bubble p {
  margin: 0 0 10px;
}

.assistant-bubble ul,
.assistant-bubble ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.assistant-bubble li {
  margin: 3px 0;
}

.assistant-bubble code {
  padding: 1px 5px;
  font-size: 13px;
  background: #f1f3f7;
  border-radius: 5px;
}

.assistant-bubble pre {
  padding: 12px 14px;
  overflow: auto;
  color: #e6e9ef;
  background: #1f2430;
  border-radius: 10px;
}

.assistant-bubble pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.assistant-bubble blockquote {
  margin: 0 0 10px;
  padding: 2px 0 2px 12px;
  color: var(--muted);
  border-left: 3px solid var(--line-strong);
}

.assistant-bubble table {
  width: 100%;
  margin: 0 0 10px;
  font-size: 13.5px;
  border-collapse: collapse;
}

.assistant-bubble th,
.assistant-bubble td {
  padding: 6px 10px;
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .message-list {
    width: 100%;
    padding: 20px 16px 28px;
  }

  .user-bubble {
    max-width: 88%;
  }

  .message-assistant {
    padding-left: 0;
  }

  .message-assistant::before {
    display: none;
  }
}
/* ---------------------------------------------------------------- v1.3.3 窄屏修复 */
@media (max-width: 860px) {
  .sidebar {
    max-height: none;
  }

  .agent-back {
    left: 62px;
  }

  #chat-input,
  #login-form input,
  #login-form select {
    font-size: 16px;
  }
}
/* ---------------------------------------------------------------- v1.4 正式版登录补充 */
.auth-demo {
  margin: 10px 0 0;
  padding: 8px 10px;
  color: var(--muted);
  background: #f7f9fc;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.auth-demo code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}
/* ---------------------------------------------------------------- v1.4 会话为中心 */
.sidebar-actions {
  padding: 14px 14px 2px;
}

.sidebar-actions .new-chat-btn {
  justify-content: center;
  margin: 0;
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 650;
}

.sidebar-actions .new-chat-btn:hover {
  color: #ffffff;
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.agent-nav[hidden] {
  display: none;
}

.agent-nav {
  padding: 6px 14px 10px;
  gap: 6px;
}

.chat-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 14px 12px;
}

.history-group {
  margin-top: 10px;
}

.history-group-title {
  margin: 0 0 5px;
  padding-left: 6px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.history-item:hover {
  background: #f0f3f7;
}

.history-item.is-active {
  background: var(--accent-soft);
  border-color: #cfe3fb;
}

.history-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.history-dot.is-plan {
  background: #1e90ff;
}

.history-dot.is-job {
  background: #1f6b4a;
}

.history-dot.is-resume {
  background: #483d8b;
}

.history-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.history-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.history-empty {
  margin: 18px 8px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}
.history-empty {
  color: var(--muted);
}

#chat-input::placeholder {
  color: #6b7a8d;
}
