/* ==========================================================================
   知招 · DeepSeek 风格聊天界面
   在 theme.css 之后加载，将工作台收敛为白底、左历史栏、居中对话流。
   ========================================================================== */

:root {
  --brand: #4d6bfe;
  --brand-strong: #3b5bdb;
  --brand-soft: #eef2ff;
  --brand-line: #dfe5ff;
  --ink: #1f2329;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --bg: #ffffff;
  --surface: #ffffff;
  --line: #ececf0;
  --line-strong: #e3e4e8;
  --sidebar: #f8f8fa;
  --green: #4d6bfe;
  --green-dark: #3b5bdb;
  --pale: #eef2ff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .035);
  --shadow: 0 12px 40px rgba(0, 0, 0, .06);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body { background: #fff; color: var(--ink); }
body { -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar-thumb { background: #d8d8de; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #c2c2ca; border: 3px solid transparent; background-clip: content-box; }

/* --------------------------------------------------------------------------
   登录：从深色品牌页改为轻量居中卡片
   -------------------------------------------------------------------------- */

.login-screen {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: #f7f8fa;
}
.login-story { display: none; }
.login-panel { display: grid; place-items: center; width: 100%; padding: 0; background: transparent; }
.login-card {
  width: min(402px, 100%);
  padding: 40px 36px 30px;
  border: 1px solid #ececf0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(20, 24, 40, .06);
}
.login-brand-mini { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; color: #0b4a9e; font-size: 14px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; }
.login-seal { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; object-fit: contain; background: #fff; }
.login-brand-long { line-height: 1; }
.login-card .eyebrow { color: var(--brand); font-size: 10px; letter-spacing: 2.6px; }
.login-card h2 { margin: 12px 0 8px; color: var(--ink); font-size: 27px; letter-spacing: -.6px; }
.login-card > p { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.entry-login-form label { margin-top: 16px; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.entry-login-form input {
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #e5e6ea;
  border-radius: 12px;
  background: #fafafa;
  color: var(--ink);
  font-size: 14px;
}
.entry-login-form input:focus {
  background: #fff;
  border-color: #aab8ff;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(77, 107, 254, .10);
}
.entry-login-form .primary-button { margin-top: 22px; padding: 13px 16px; border-radius: 12px; font-size: 14px; }
.login-status { color: var(--muted); }
.login-meta { border-top-color: var(--line); color: var(--faint); }
.login-retry { color: var(--brand); }

/* --------------------------------------------------------------------------
   左侧历史栏
   -------------------------------------------------------------------------- */

.sidebar {
  width: 260px;
  padding: 18px 14px 14px;
  background: #f8f8fa;
  border-right: 1px solid #ededf0;
  box-shadow: none;
  overflow-y: auto;
}
.sidebar::before { display: none; }

.brand {
  gap: 9px;
  padding: 0 6px;
  margin-bottom: 18px;
  color: #0b4a9e;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap;
}
.brand-seal { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; object-fit: contain; background: #fff; }
.brand-text { line-height: 1; }
.brand-sep { margin: 0 1px; color: #93a3bd; font-weight: 400; }
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6f8bff, #4d6bfe);
  box-shadow: none;
}
.brand-icon svg { width: 20px; height: 20px; }
.brand-text { line-height: 1; }
.brand-en { display: none; }

.new-chat {
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid #e6e6ea;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.new-chat:hover { transform: none; background: #fff; border-color: #dcdce2; box-shadow: 0 2px 5px rgba(0, 0, 0, .04); }
.new-chat svg { width: 16px; height: 16px; color: var(--brand); }
.new-chat .key { display: none; }

nav { gap: 2px; }
.nav-item { padding: 9px 10px; border-radius: 8px; color: #4b5563; font-size: 13px; font-weight: 400; }
.nav-item svg { width: 16px; height: 16px; color: #6b7280; }
.nav-item:hover { background: #efeff2; color: var(--ink); }
.nav-item.active { background: #eceef4; color: var(--ink); font-weight: 500; box-shadow: none; }
.nav-item.active svg { color: #4b5563; }
.tiny-dot { display: none; }
.nav-count { color: #9ca3af; font-size: 11px; font-weight: 400; }

.recent-label { display: none; }
.recent-list { margin-top: 10px; }
.recent-group-label { padding: 12px 10px 5px; color: #9ca3af; font-size: 11px; font-weight: 500; }
.recent-item { gap: 8px; padding: 9px 10px; border-radius: 8px; color: #4b5563; font-size: 13px; }
.recent-item svg { width: 14px; height: 14px; color: #9ca3af; }
.recent-item:hover { background: #efeff2; color: var(--ink); }
.recent-item.active { background: #e9ebf2; color: var(--ink); }
.recent-empty { color: #9ca3af; font-size: 12px; line-height: 1.8; }

.sidebar-bottom { padding-top: 8px; }
.account-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 6px 2px;
  border: 0;
  border-top: 1px solid #e9e9ed;
  color: var(--ink-2);
  font-size: 13px;
}
.account-strip::before {
  content: "知";
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9edff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.account-strip span { flex: 1; }
.account-strip button { color: #9ca3af; font-size: 12px; font-weight: 400; }
.account-strip button:hover { color: var(--ink); }
.small-note, .profile { display: none; }

.main-shell { margin-left: 260px; margin-right: 0; }
body:not(.rail-collapsed) .main-shell { margin-right: 300px; }

/* --------------------------------------------------------------------------
   顶栏：只留标题和图标操作
   -------------------------------------------------------------------------- */

.topbar {
  height: 56px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f2;
  box-shadow: none;
  backdrop-filter: none;
}
.topbar-left { gap: 8px; }
.topbar-titles { gap: 0; }
.topbar-title { color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: 0; cursor: pointer; }
.topbar-title::after { content: "⌄"; margin-left: 6px; color: #9ca3af; font-size: 10px; font-weight: 400; }
.topbar-subtitle { display: none; }
.divider { display: none; }
.topbar-actions { gap: 6px; }
.topbar-chip { display: none; }
.topbar-settings, .preview-badge {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  justify-content: center;
  background: transparent;
  color: #6b7280;
  font-size: 0;
  box-shadow: none;
}
.topbar-settings svg, .preview-badge svg { width: 18px; height: 18px; color: #6b7280; }
.preview-badge > span:first-child { width: 18px; height: 18px; background: transparent; border-radius: 0; display: inline-flex; }
.topbar-settings:hover, .preview-badge:hover { background: #f2f2f5; color: var(--ink); }
body.rail-collapsed .topbar-settings { border: 0; background: transparent; color: #6b7280; }
body:not(.rail-collapsed) .topbar-settings { background: #f2f4ff; color: var(--brand); }
body:not(.rail-collapsed) .topbar-settings svg { color: var(--brand); }

/* 右侧面板继续保留，但改为默认收起 */
.control-rail { width: 300px; border-left: 1px solid #ededf0; box-shadow: -10px 0 30px rgba(20, 24, 40, .035); }
.rail-head { height: 56px; padding: 0 16px; border-bottom-color: #f0f0f2; }
.rail-kicker { display: none; }
.rail-head strong { margin-top: 0; font-size: 14px; }
.rail-body { padding: 14px; }
.control-rail .mode-tab.selected { background: #eef2ff; border-color: #c7d2fe; box-shadow: inset 3px 0 0 var(--brand); }
.control-rail .nl-format-toolbar { border-color: #e6e7eb; background: #fafafa; }
.control-rail .nl-format-toolbar button { border-color: #dfe5ff; color: var(--brand); }

/* --------------------------------------------------------------------------
   主区域 / 出卷出书对话
   -------------------------------------------------------------------------- */

#main-content,
body[data-mode=paper] #main-content,
body[data-mode=book] #main-content,
body[data-mode=knowledge] #main-content { max-width: none; padding: 0; }
.mode-workspace { height: calc(100dvh - 56px); padding: 0; }

.nl-conversation {
  width: 100%;
  max-width: 820px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}
.nl-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}
.nl-chat-head {
  min-height: 40px;
  padding: 14px 0 6px;
  border: 0;
  background: #fff;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
}
.nl-chat-title { gap: 6px; }
.nl-chat-title b { color: #6b7280; font-size: 12px; font-weight: 500; }
.nl-chat-title b::before { color: var(--brand); margin-right: 5px; }
.nl-chat-title small { display: none; }
.nl-chat-head button { padding: 5px 8px; border-radius: 7px; color: #9ca3af; font-size: 12px; }
.nl-chat-head button:hover { background: #f5f5f7; color: var(--ink); }

.nl-conversation .nl-messages {
  flex: 1;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 20px;
  background: #fff;
}
.nl-welcome { max-width: 620px; margin: 46px auto 0; padding: 0; text-align: center; }
.nl-orb { display: none; }
.nl-welcome h2 { margin: 0 0 8px; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.4px; }
.nl-welcome > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.nl-starters, .nl-conversation .nl-starters { grid-template-columns: 1fr; gap: 8px; max-width: 580px; margin: 26px auto 0; }
.nl-starters button { padding: 12px 36px 12px 14px; border: 1px solid #ececf0; border-radius: 12px; background: #fafafa; }
.nl-starters button:hover { transform: none; border-color: #dfdfe5; background: #f4f4f6; }
.nl-starters small { margin-bottom: 4px; color: #9ca3af; font-size: 10px; font-weight: 500; }
.nl-starters span { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.nl-starters b { color: #9ca3af; }

.nl-message { margin-bottom: 24px; color: var(--ink); font-size: 15px; line-height: 1.8; }
.nl-message.typing > div::after { content: "▍"; display: inline-block; margin-left: 2px; color: #9ca3af; animation: nl-caret 1s steps(1) infinite; }
@keyframes nl-caret { 50% { opacity: 0; } }
.nl-thinking { padding: 4px 0 8px; }
.nl-thinking-dots { display: inline-flex; align-items: center; gap: 4px; height: 22px; }
.nl-thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: #9ca3af; animation: nl-think 1.1s ease-in-out infinite; }
.nl-thinking-dots i:nth-child(2) { animation-delay: .16s; }
.nl-thinking-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes nl-think { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.nl-chat.is-typing .nl-choices,
.nl-chat.is-typing .nl-chat-brief,
.nl-chat.is-typing .nl-confirm { visibility: hidden; }
.nl-message > div { max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.nl-message.user { justify-content: flex-end; }
.nl-message.user > div {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 18px;
  background: #f2f4f8;
  color: var(--ink);
  font-size: 15px;
  box-shadow: none;
}
.nl-avatar { display: none; }
.nl-choices { gap: 8px; margin: 0 0 16px; }
.nl-choices button, .nl-ignore {
  padding: 8px 12px;
  border: 1px solid #ececf0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.nl-choices button:hover, .nl-ignore:hover { border-color: #dcdce2; background: #f7f7f9; color: var(--ink); }
.nl-chat-brief { margin-left: 0; border-color: #ececf0; background: #fafafa; }
.nl-chat-brief summary, .nl-chat-verification summary { color: #4b5563; }
.nl-chat-brief dt { color: #9ca3af; }
.nl-chat-tags p { color: #6b7280; }
.nl-confirm { border-top-color: #f0f0f2; }
.nl-confirm > span { color: #9ca3af; }
.nl-file-card { border-color: #ececf0; background: #fafafa; }
.nl-file-icon { background: #eef2ff; color: var(--brand); }
.nl-file-download { border-color: #dfe5ff; color: var(--brand); }
.nl-file-download:hover { background: #f2f5ff; }
.nl-after-file { color: #9ca3af; }
.nl-working { color: #6b7280; }
.nl-working i { border-color: #d7dbe8; border-top-color: var(--brand); }
.nl-error { border: 1px solid #f3d7d2; background: #fff6f4; color: #b44c3b; }
.nl-notice { border-color: #eee3cc; background: #fffaf0; color: #8a743f; }
.nl-notice a { color: var(--brand); }

.nl-composer {
  margin: 0 0 8px;
  padding: 14px 16px 10px;
  border: 1px solid #e6e7eb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(20, 24, 40, .06);
}
.nl-composer:focus-within { border-color: #c7d2fe; box-shadow: 0 4px 26px rgba(20, 24, 40, .09); }
.nl-composer textarea { min-height: 52px; max-height: 200px; color: var(--ink); font-size: 15px; line-height: 1.7; }
.nl-composer textarea::placeholder { color: #9ca3af; }
.nl-composer > div { align-items: center; }
.nl-composer > div > span { color: #b0b3ba; font-size: 11px; }
.nl-composer button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}
.nl-composer button:hover { background: var(--brand-strong); }
.nl-composer button:disabled { background: #d6d9e2; }
.send-arrow { font-size: 17px; line-height: 1; font-weight: 500; }
.nl-footnote { padding: 2px 0 10px; color: #b0b3ba; font-size: 10px; }

/* --------------------------------------------------------------------------
   练习模式 / 首页 / 知识点
   -------------------------------------------------------------------------- */

.home { max-width: 820px; margin: 0 auto; padding: 44px 24px 190px; }
.hero {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  text-align: center;
}
.hero::before { display: none; }
.hero-content { max-width: none; }
.hero-topline { justify-content: center; color: #9ca3af; font-size: 11px; letter-spacing: 1.2px; }
.hero h1 { margin: 12px 0 10px; color: var(--ink); font-size: 28px; font-weight: 600; line-height: 1.45; letter-spacing: -.5px; }
.hero h1 > span { color: var(--ink); }
.hero-description { color: var(--muted); font-size: 13px; line-height: 1.9; }
.hero-description br { display: none; }
.hero-art, .hero-points, .how-it-works { display: none; }
.section-heading { max-width: 620px; margin: 28px auto 10px; }
.section-heading h2 { color: #6b7280; font-size: 13px; font-weight: 500; }
.section-heading > span { display: none; }
.prompt-grid { grid-template-columns: 1fr; gap: 8px; max-width: 620px; margin: 0 auto; }
.prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid #ececf0;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: none;
  text-align: left;
}
.prompt-card:hover { transform: none; border-color: #dfdfe5; background: #f4f4f6; box-shadow: none; }
.card-icon { width: 30px; height: 30px; margin: 0; border: 1px solid #ececf0; border-radius: 8px; background: #fff !important; color: var(--brand) !important; flex-shrink: 0; }
.card-icon svg { width: 15px; height: 15px; }
.card-eyebrow, .prompt-card p { display: none; }
.prompt-card strong { color: var(--ink); font-size: 13px; font-weight: 500; }
.card-arrow { position: static; margin-left: auto; color: #9ca3af; }
.prompt-card:hover .card-arrow { color: var(--brand); }

.composer-area {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 24px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 34%);
}
body:has(#home:not(.hidden)) .composer-area {
  position: sticky;
  bottom: 0;
  z-index: 6;
  max-width: 820px;
  padding: 8px 24px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 34%);
}
.composer { padding: 14px 16px 10px; border: 1px solid #e6e7eb; border-radius: 24px; background: #fff; box-shadow: 0 4px 24px rgba(20, 24, 40, .06); }
.composer:focus-within { border-color: #c7d2fe; box-shadow: 0 4px 26px rgba(20, 24, 40, .09); }
.composer textarea { min-height: 46px; color: var(--ink); font-size: 15px; line-height: 1.7; }
.composer textarea::placeholder { color: #9ca3af; }
.composer-label { color: #6b7280; font-size: 11px; }
.composer-label svg { width: 14px; height: 14px; color: var(--brand); }
.composer-mode { border-left-color: #ececf0; color: #9ca3af; font-size: 10px; }
.send-area > span { color: #b0b3ba; font-size: 11px; }
#send-button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
#send-button svg { width: 17px; height: 17px; }
.footer-note { color: #b0b3ba; font-size: 10px; text-align: center; }

.conversation { max-width: 820px; margin: 0 auto; padding: 28px 24px 150px; }
.assistant-heading { display: none; }
.assistant-copy { color: var(--ink); font-size: 15px; line-height: 1.8; }
.user-message {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 18px;
  background: #f2f4f8;
  color: var(--ink);
  box-shadow: none;
  font-size: 15px;
  line-height: 1.8;
}
.scope-card { padding: 11px 13px; border: 1px solid #ececf0; border-radius: 10px; background: #fafafa; }
.scope-card span { color: #6b7280; border-right-color: #ececf0; font-size: 10px; }
.scope-card .scope-name { color: var(--ink); }
.question-card { margin: 10px 0; padding: 18px; border: 1px solid #ececf0; border-radius: 12px; background: #fff; box-shadow: none; }
.question-card:hover { border-color: #e2e3e8; box-shadow: none; }
.question-number { color: var(--brand); }
.question-type { background: #f4f5f8; color: #6b7280; }
.question-topic { color: #9ca3af; }
.question-stem { color: var(--ink); font-size: 14px; font-weight: 500; }
.options { gap: 8px; }
.option { padding: 11px 13px; border: 1px solid #ececf0; border-radius: 11px; background: #fff; color: var(--ink-2); font-size: 12.5px; }
.option:hover:not(:disabled) { border-color: #c7d2fe; background: #f7f9ff; }
.option.selected { border-color: #aab8ff; background: #eef2ff; color: var(--ink); }
.option.correct { border-color: #a7d9c0; background: #effaf5; color: #167a53; }
.option.wrong { border-color: #f0c0b5; background: #fff5f2; color: #b44c3b; }
.answer-line { color: #9ca3af; }
.answer-toggle { color: var(--brand); }
.analysis { border-left: 2px solid #c7d2fe; background: #fafbff; color: #4b5563; }
.analysis strong { color: var(--ink); }
.practice-result { border-color: #dfe5ff; background: #f7f9ff; }
.practice-result strong { color: var(--brand); }
.score-line { color: #6b7280; }
.secondary-button { border-color: #e5e6ea; background: #fff; color: #4b5563; border-radius: 9px; }
.secondary-button:hover { border-color: #c7d2fe; background: #f7f9ff; color: var(--brand); }
.primary-button { border-radius: 10px; background: var(--brand); }
.batch-meta { color: #9ca3af; }
.suggestions button { border-color: #ececf0; color: #4b5563; background: #fff; }
.suggestions button:hover { border-color: #c7d2fe; color: var(--brand); background: #f7f9ff; }
.library { max-width: 820px; margin: 0 auto; padding: 40px 24px 60px; }
.library h1 { font-size: 24px; font-weight: 600; }
.library-intro { color: #9ca3af; }
.history-card { border-color: #ececf0; box-shadow: none; }
.history-card:hover { border-color: #dfdfe5; transform: none; box-shadow: none; }
.history-card > span:first-child { background: #f2f4f8; color: #6b7280; }

.mode-intro h1 { color: var(--ink); font-weight: 600; }
.mode-intro p { color: var(--muted); }
.knowledge-layout, .studio-layout { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
.knowledge-nav { border-color: #ececf0; background: #fafafa; }
.lesson-reader { border-color: #ececf0; box-shadow: none; }
.lesson-nav.active { border-color: #dfe5ff; }
.lesson-nav.active > span { color: var(--brand); }
.lesson-tags > span { background: #f2f4f8; color: #6b7280; }
.worked-example { border-color: #e6ebff; background: #f7f9ff; }
.worked-example > span { color: var(--brand); }
.learned { background: #eef2ff; color: var(--brand); }
.config-panel { border-color: #ececf0; box-shadow: none; }
.document-sheet { border-color: #ececf0; box-shadow: none; }

/* --------------------------------------------------------------------------
   弹窗 / 提示保持轻量
   -------------------------------------------------------------------------- */

dialog { border-color: #ececf0; box-shadow: 0 24px 80px rgba(20, 24, 40, .16); }
dialog::backdrop { background: rgba(20, 24, 40, .34); backdrop-filter: blur(4px); }
.dialog-mark { background: #eef2ff; color: var(--brand); }
.toast { background: #1f2329; border-radius: 10px; }

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

@media (max-width: 1180px) {
  .main-shell, body:not(.rail-collapsed) .main-shell { margin-right: 0; }
  .control-rail { width: 320px; }
  .sidebar { width: 240px; }
  .main-shell { margin-left: 240px; }
}
@media (max-width: 760px) {
  .sidebar { width: 260px; }
  .main-shell { margin-left: 0; }
  .topbar { height: 56px; padding: 0 16px; }
  .mode-workspace { height: calc(100dvh - 56px); }
  .nl-conversation, .home, .conversation, .composer-area, .library { padding-left: 16px; padding-right: 16px; }
  .nl-welcome { margin-top: 30px; }
  .nl-welcome h2 { font-size: 21px; }
  .home { padding-top: 32px; }
  .hero h1 { font-size: 25px; }
  .login-card { padding: 32px 22px 26px; }
  .control-rail { width: min(320px, 88vw); }
  .topbar-actions .preview-badge { width: 34px; height: 34px; padding: 0; font-size: 0; }
  .topbar-actions .topbar-settings { width: 34px; height: 34px; padding: 0; }
}

/* --------------------------------------------------------------------------
   登录页：品牌叙事 + 轻量登录卡片
   -------------------------------------------------------------------------- */

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  align-items: stretch;
  place-items: stretch;
  min-height: 100dvh;
  padding: 0;
  background: #f8faff;
}

.login-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5.2vw, 74px);
  border-right: 1px solid #e7ecf8;
  isolation: isolate;
  background:
    radial-gradient(760px 560px at 8% 4%, rgba(77, 107, 254, .17), transparent 62%),
    radial-gradient(620px 520px at 96% 92%, rgba(22, 184, 200, .12), transparent 62%),
    linear-gradient(135deg, #f5f8ff 0%, #edf3ff 52%, #f9fcff 100%);
}
.login-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 99, 245, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 99, 245, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(110deg, rgba(0, 0, 0, .8), transparent 76%);
  pointer-events: none;
}
.login-story::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -150px;
  width: 500px;
  height: 500px;
  background: url("./logo-zhisheng.png") center / contain no-repeat;
  opacity: .085;
  mix-blend-mode: multiply;
  transform: rotate(-10deg);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0b2f6f;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap;
}
.login-story-seal {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(11, 74, 158, .12);
}
.login-story-brand { line-height: 1; }

.login-intro {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: clamp(28px, 6vh, 72px) 0;
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #6f88b5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
}
.login-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: #9eb6e4;
}
.login-intro h1 {
  margin: 20px 0 20px;
  color: #0f2557;
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 650;
  line-height: 1.34;
  letter-spacing: -2px;
}
.login-intro h1 em { color: #2f63f5; font-style: normal; }
.login-intro p { margin: 0; color: #617697; font-size: 14px; line-height: 2; }

.login-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 32px;
}
.login-features span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid #dfe8fa;
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
  color: #4c6285;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(24, 47, 94, .045);
  backdrop-filter: blur(8px);
}
.login-features b { color: #8aa5d0; font-size: 9px; font-weight: 600; letter-spacing: 1px; }

.login-story-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.login-story-note { margin: 0; color: #8ca0c4; font-size: 11px; line-height: 1.7; }
.login-version { color: #a5b5d1; font-size: 9px; font-weight: 600; letter-spacing: 1.6px; white-space: nowrap; }

.login-panel {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 42px;
  background:
    radial-gradient(620px 420px at 100% 0, rgba(77, 107, 254, .065), transparent 62%),
    #fbfcff;
}
.login-card {
  position: relative;
  width: min(404px, 100%);
  padding: 40px 38px 30px;
  overflow: hidden;
  border: 1px solid #e7ecf7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 37, 87, .09);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #4d6bfe, #25b6c8);
}
.login-brand-mini { display: none; }
.login-card .eyebrow { color: #2f63f5; font-size: 10px; font-weight: 650; letter-spacing: 2.8px; }
.login-card h2 { margin: 13px 0 9px; color: #16223d; font-size: 28px; font-weight: 650; letter-spacing: -.8px; }
.login-card > p { margin-bottom: 24px; color: #71809b; font-size: 13px; line-height: 1.8; }
.entry-login-form label { margin-top: 16px; color: #33425f; font-size: 12px; font-weight: 600; }
.entry-login-form input {
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #e2e7f1;
  border-radius: 12px;
  background: #f8faff;
  color: #1f2d48;
  font-size: 14px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.entry-login-form input:focus {
  border-color: #a8baff;
  background: #fff;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(47, 99, 245, .10);
}
.entry-login-form .primary-button {
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4d7bff, #2457e8);
  font-size: 14px;
  box-shadow: 0 9px 22px rgba(36, 87, 232, .20);
}
.login-status { min-height: 42px; color: #7a8aa5; font-size: 12px; }
.login-meta { border-top-color: #eef1f7; color: #9aa7bc; font-size: 11px; }
.login-retry { color: #2f63f5; }

@media (max-width: 1180px) {
  .login-screen { grid-template-columns: minmax(0, 1fr) minmax(410px, .9fr); }
  .login-story { padding: 40px; }
  .login-intro h1 { font-size: 42px; }
  .login-features { grid-template-columns: 1fr; max-width: 240px; gap: 7px; }
  .login-features span { flex-direction: row; align-items: center; gap: 9px; padding: 10px 12px; }
}

@media (max-width: 900px) {
  .login-screen {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px;
    background:
      radial-gradient(700px 500px at 10% 0, rgba(77, 107, 254, .12), transparent 60%),
      radial-gradient(600px 500px at 100% 100%, rgba(22, 184, 200, .10), transparent 60%),
      #f7f9ff;
  }
  .login-story { display: none; }
  .login-panel { padding: 0; min-width: 0; width: 100%; background: transparent; }
  .login-card { width: 100%; max-width: 404px; min-width: 0; padding: 34px 26px 26px; }
  .entry-login-form input { min-width: 0; }
  .login-brand-mini {
    display: flex;
    margin-bottom: 26px;
    color: #0b4a9e;
    font-size: 14px;
    white-space: nowrap;
  }
  .login-seal { width: 34px; height: 34px; }
}
