/* insightmarketplac 个人版 — 暗色主题 */
:root {
  --bg: #0a0e15;
  --bg-soft: #0d1322;
  --panel: #121a2c;
  --panel-2: #16203a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e6ebf5;
  --muted: #8b95ab;
  --accent: #6d8dff;
  --accent-2: #8b6dff;
  --accent-grad: linear-gradient(135deg, #5b7cfa, #8b6dff);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 12px;
  --font: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
#app { height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: var(--text); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
::-webkit-scrollbar-track { background: transparent; }

/* ── 通用按钮 ── */
.btn {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  transition: all 0.15s; white-space: nowrap;
}
.btn-primary { background: var(--accent-grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--border-strong); }
.linklike { color: var(--accent); font-size: 12px; text-decoration: underline; padding: 0 4px; }
.linklike:hover { filter: brightness(1.2); }

/* ═══════════ 首页 Hero ═══════════ */
.hero-view {
  position: relative; flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.hero-bg-glow {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(91, 124, 250, 0.14), transparent 70%),
    radial-gradient(700px 500px at 85% 85%, rgba(139, 109, 255, 0.1), transparent 70%);
}
.hero-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}
.hero-brand { display: flex; align-items: center; gap: 10px; }
.hero-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; box-shadow: 0 4px 16px rgba(109, 141, 255, 0.35);
}
.hero-brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.4px; }
.hero-top-right { display: flex; align-items: center; gap: 10px; }
.hero-status { font-size: 12px; color: var(--muted); margin-right: 6px; }
.hero-status.ok { color: var(--ok); }
.hero-status.warn { color: var(--warn); }
.hero-status.busy { color: var(--accent); }

.hero-center {
  max-width: 940px; width: 100%; margin: 0 auto; padding: 48px 24px 60px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.hero-title { font-size: 40px; font-weight: 800; letter-spacing: 1px; text-align: center; }
.hero-sub { font-size: 15px; color: var(--muted); margin-top: -10px; }

.hero-model-row { display: flex; align-items: center; gap: 10px; }
.hero-model-label { font-size: 12px; color: var(--muted); }
.hero-model-select {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; min-width: 200px; outline: none;
}
.hero-model-select:focus { border-color: var(--accent); }

.hero-input-box {
  width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-input-box:focus-within {
  border-color: rgba(109, 141, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(109, 141, 255, 0.12);
}
.hero-input-box textarea {
  width: 100%; background: transparent; border: none; outline: none; resize: none;
  font-size: 15px; line-height: 1.6; min-height: 66px;
}
.hero-input-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.hero-input-hint { font-size: 11px; color: var(--muted); }
.hero-send {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent-grad);
  color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: filter 0.15s, transform 0.1s;
}
.hero-send:hover { filter: brightness(1.15); }
.hero-send:active { transform: scale(0.94); }

/* 任务分类 + 网格 */
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cat-chip {
  padding: 6px 16px; border-radius: 999px; font-size: 13px; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; transition: all 0.15s;
}
.cat-chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.cat-chip.active {
  color: #fff; background: var(--accent-grad); font-weight: 500;
  box-shadow: 0 2px 12px rgba(109, 141, 255, 0.3);
}
.hero-tool-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-tool {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--border); font-size: 13px; transition: all 0.15s;
}
.hero-tool:hover {
  border-color: rgba(109, 141, 255, 0.5); transform: translateY(-2px);
  background: var(--panel-2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.hero-tool-icon { font-size: 16px; }
.hero-tool.l2 { border-style: dashed; }
.l2-dot {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 2px;
  background: rgba(251, 191, 36, 0.15); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.3);
}

.hero-foot-links { display: flex; gap: 20px; }
.hero-link { color: var(--muted); font-size: 13px; }
.hero-link:hover { color: var(--accent); }
.hero-contact { margin-top: 14px; color: var(--muted); font-size: 12px; letter-spacing: 0.3px; }

/* ═══════════ 会话视图 ═══════════ */
.chat-view { flex: 1; display: flex; min-height: 0; }
.chat-sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; gap: 10px;
}
.sidebar-new { width: 100%; }
.sidebar-back { width: 100%; }
.session-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.session-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 0; }
.session-item {
  position: relative; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.12s;
}
.session-item:hover { background: rgba(255, 255, 255, 0.05); }
.session-item.active { background: rgba(109, 141, 255, 0.14); }
.session-title {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 18px;
}
.session-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.session-del {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 6px;
  color: var(--muted); font-size: 13px; line-height: 1; display: none;
}
.session-item:hover .session-del { display: block; }
.session-del:hover { background: rgba(248, 113, 113, 0.15); color: var(--err); }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
}
.chat-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-skill-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(109, 141, 255, 0.14); color: var(--accent); border: 1px solid rgba(109, 141, 255, 0.3);
}
.chat-head-right { display: flex; align-items: center; gap: 10px; }
.chat-model-chip {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--border);
}

.chat-messages { flex: 1; overflow-y: auto; padding: 24px 22px; }
.chat-empty { text-align: center; color: var(--muted); padding: 80px 0; font-size: 14px; }
.msg { max-width: 820px; margin: 0 auto 16px; }
.msg-body { line-height: 1.7; font-size: 14px; word-break: break-word; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .msg-body {
  background: var(--accent-grad); color: #fff; padding: 10px 16px;
  border-radius: 14px 14px 4px 14px; max-width: 78%;
}
.msg-assistant .msg-body {
  background: var(--panel); border: 1px solid var(--border);
  padding: 14px 18px; border-radius: 4px 14px 14px 14px;
}
.msg-error .msg-body {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.06);
}
.msg-error .msg-body strong { color: var(--err); }
.msg-error-hint { color: var(--muted); font-size: 12.5px; }

/* 工具卡片 */
.tool-card {
  max-width: 820px; margin: 0 auto 10px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.tool-card.running { border-color: rgba(109, 141, 255, 0.35); }
.tool-card.ok { border-color: rgba(52, 211, 153, 0.3); }
.tool-card.err { border-color: rgba(248, 113, 113, 0.4); }
.tool-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  cursor: pointer; font-size: 12.5px;
}
.tool-head:hover { background: rgba(255, 255, 255, 0.03); }
.tool-icon { font-size: 14px; }
.tool-label { font-weight: 600; white-space: nowrap; }
.tool-args {
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.tool-status { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tool-card.ok .tool-status { color: var(--ok); }
.tool-card.err .tool-status { color: var(--err); }
.tool-sum { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.spinner {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid rgba(109, 141, 255, 0.25); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 生成中占位动效（一次出全文模式：文本不落逐字，仅三点律动） */
.gen-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.gen-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: gen-bounce 1.2s infinite ease-in-out;
}
.gen-dots i:nth-child(2) { animation-delay: 0.15s; }
.gen-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes gen-bounce {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.tool-detail {
  max-height: 260px; overflow-y: auto; padding: 10px 14px; font-size: 11.5px;
  color: var(--muted); border-top: 1px solid var(--border); white-space: pre-wrap;
  word-break: break-all; font-family: Consolas, monospace;
}

.chat-input-box {
  display: flex; align-items: flex-end; gap: 10px; padding: 14px 22px 18px;
  border-top: 1px solid var(--border); background: var(--bg-soft);
}
.chat-input-box textarea {
  flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; line-height: 1.5; resize: none; outline: none;
}
.chat-input-box textarea:focus { border-color: rgba(109, 141, 255, 0.55); }

/* ═══════════ Markdown 渲染 ═══════════ */
.md h2 { font-size: 19px; margin: 18px 0 10px; }
.md h3 { font-size: 16.5px; margin: 16px 0 8px; }
.md h4 { font-size: 14.5px; margin: 14px 0 6px; }
.md h5 { font-size: 13.5px; margin: 12px 0 6px; color: var(--muted); }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0 8px 22px; }
.md li { margin: 4px 0; }
.md code {
  background: rgba(255, 255, 255, 0.08); padding: 1.5px 6px; border-radius: 5px;
  font-family: Consolas, monospace; font-size: 12.5px;
}
.md pre {
  background: #0a0f1c; border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; overflow-x: auto; margin: 10px 0;
}
.md pre code { background: none; padding: 0; font-size: 12px; line-height: 1.6; }
.md table { border-collapse: collapse; margin: 12px 0; width: 100%; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--border-strong); padding: 7px 10px; text-align: left; }
.md th { background: rgba(255, 255, 255, 0.05); font-weight: 600; }
.md blockquote {
  border-left: 3px solid var(--accent); padding: 6px 14px; margin: 10px 0;
  background: rgba(109, 141, 255, 0.06); border-radius: 0 8px 8px 0; color: var(--muted);
}
.md hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.md a { color: var(--accent); }
.md strong { color: #fff; }

/* ═══════════ 报告中心 ═══════════ */
.reports-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.btn-back {
  width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border); font-size: 15px;
}
.btn-back:hover { background: rgba(255, 255, 255, 0.1); }
.logo { font-size: 22px; }
.title { font-size: 15px; font-weight: 700; }
.subtitle { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.report-layout { flex: 1; display: flex; min-height: 0; }
.report-list {
  width: 320px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid var(--border);
  padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.report-item {
  padding: 10px 12px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  color: var(--muted); word-break: break-all; transition: background 0.12s;
}
.report-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.report-item.active { background: rgba(109, 141, 255, 0.14); color: var(--text); }
.report-view { flex: 1; overflow-y: auto; padding: 28px 34px; }
.report-view .empty { text-align: center; color: var(--muted); padding: 100px 0; }
.report-md { max-width: 860px; margin: 0 auto; }

/* ═══════════ 弹窗 ═══════════ */
.modal {
  position: fixed; inset: 0; background: rgba(4, 7, 13, 0.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-box {
  width: min(560px, 92vw); max-height: 86vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 16px;
  padding: 26px 28px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form-full { grid-column: 1 / -1; }
.input {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; outline: none; color: var(--text);
}
.input:focus { border-color: var(--accent); }

.feedback-textarea { width: 100%; resize: vertical; min-height: 110px; box-sizing: border-box; line-height: 1.6; }

.auth-section { margin-bottom: 20px; }
.auth-title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.auth-status { font-size: 12px; color: var(--muted); margin: 10px 0; min-height: 16px; }
.auth-status.ok { color: var(--ok); }
.auth-status.err { color: var(--err); }
.auth-actions { display: flex; gap: 10px; }

/* 向导 */
.wizard-box { width: min(620px, 92vw); }
.wizard-step-note { font-size: 12px; color: var(--muted); margin: -12px 0 16px; }
.wizard-hint { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.wizard-hint b { color: var(--text); }
.wizard-mode-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.wizard-mode {
  flex: 1; min-width: 140px; padding: 12px 14px; border-radius: 10px; font-size: 13px;
  background: var(--bg-soft); border: 1px solid var(--border); transition: all 0.15s;
}
.wizard-mode:hover { border-color: var(--border-strong); }
.wizard-mode.active {
  border-color: var(--accent); background: rgba(109, 141, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(109, 141, 255, 0.1);
}
.wizard-gateway-note {
  font-size: 13px; color: var(--ok); background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 14px; line-height: 1.6;
}
.wizard-skip-note {
  font-size: 12.5px; color: var(--warn); background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25); border-radius: 10px; padding: 12px 14px;
  line-height: 1.6;
}

/* 全部任务弹窗 */
.skills-box { width: min(760px, 94vw); }
.skills-grid { display: flex; flex-direction: column; gap: 4px; }
.skills-cat {
  font-size: 12px; color: var(--muted); font-weight: 600; margin: 14px 0 8px;
  letter-spacing: 1px;
}
.skills-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill-card {
  text-align: left; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px; transition: all 0.15s;
}
.skill-card:hover { border-color: rgba(109, 141, 255, 0.5); background: var(--panel-2); transform: translateY(-1px); }
.skill-card.l2 { border-style: dashed; }
.skill-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.skill-icon { font-size: 16px; }
.skill-name { font-size: 13.5px; font-weight: 600; }
.skill-desc {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-sessions-list { display: flex; flex-direction: column; gap: 4px; }
.recent-session-item {
  padding: 11px 14px; border-radius: 10px; cursor: pointer; transition: background 0.12s;
}
.recent-session-item:hover { background: rgba(255, 255, 255, 0.05); }

/* ═══════════ L2 审批卡片 ═══════════ */
.approval-card {
  position: fixed; right: 24px; bottom: 24px; width: min(480px, 90vw); z-index: 200;
  background: var(--panel); border: 1px solid rgba(251, 191, 36, 0.45); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.approval-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.approval-title span { color: var(--warn); }
.approval-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.approval-meta { font-size: 12.5px; color: var(--text); margin-bottom: 8px; }
.approval-body {
  max-height: 260px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-size: 11.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; font-family: Consolas, monospace; color: var(--muted);
}
.approval-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ═══════════ Toast ═══════════ */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 20px; font-size: 13px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s, transform 0.2s; max-width: 80vw;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }
.toast.show { opacity: 1; }
.toast.ok { border-color: rgba(52, 211, 153, 0.4); color: var(--ok); }
.toast.err { border-color: rgba(248, 113, 113, 0.4); color: var(--err); }
.toast.warn { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); }

/* ═══════════ 学习视图 ═══════════ */
.learn-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.learn-progress { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.learn-layout { flex: 1; display: flex; min-height: 0; }
.learn-day-list {
  width: 300px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid var(--border);
  padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.learn-day {
  padding: 11px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.12s;
}
.learn-day:hover { background: rgba(255, 255, 255, 0.05); }
.learn-day.active { background: rgba(109, 141, 255, 0.14); border-color: rgba(109, 141, 255, 0.35); }
.learn-day.today { border-color: rgba(251, 191, 36, 0.4); }
.learn-day-title { font-size: 13px; font-weight: 600; }
.learn-day-module { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.learn-today-tag {
  font-size: 10px; padding: 1px 8px; border-radius: 999px; margin-left: 6px;
  background: rgba(251, 191, 36, 0.14); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.35);
}
.learn-main { flex: 1; overflow-y: auto; padding: 26px 32px; }
.learn-main .md { max-width: 880px; }
.learn-lesson-head { font-size: 20px; font-weight: 700; }
.learn-module-tag {
  display: inline-block; font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  background: rgba(109, 141, 255, 0.12); color: var(--accent);
  border: 1px solid rgba(109, 141, 255, 0.3); margin: 8px 0 4px;
}
.learn-section-label { font-size: 15px; font-weight: 700; margin: 24px 0 12px; }
.learn-objectives { margin: 8px 0 8px 20px; font-size: 13.5px; line-height: 1.7; }
.learn-markdown { margin-top: 10px; }
.learn-task {
  background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px; padding: 14px 18px; font-size: 13.5px; line-height: 1.7; max-width: 880px;
}
.learn-quiz-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 15px 18px; margin-bottom: 12px; max-width: 880px;
}
.quiz-stem { font-weight: 600; font-size: 14px; margin-bottom: 10px; line-height: 1.6; }
.quiz-option { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
.quiz-option input { accent-color: var(--accent); width: 15px; height: 15px; }
.quiz-textarea { width: 100%; resize: vertical; line-height: 1.6; }
.quiz-total { margin: 6px 0 14px; font-size: 14px; }
.score-badge { font-size: 13px; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.score-badge.pass {
  background: rgba(52, 211, 153, 0.14); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.35);
}
.score-badge.fail {
  background: rgba(248, 113, 113, 0.12); color: var(--err); border: 1px solid rgba(248, 113, 113, 0.35);
}
.quiz-detail-card.ok { border-color: rgba(52, 211, 153, 0.3); }
.quiz-detail-card.err { border-color: rgba(248, 113, 113, 0.3); }
.quiz-feedback { font-size: 13px; color: var(--muted); line-height: 1.7; }
.learn-qa-box { display: flex; gap: 10px; max-width: 880px; margin-bottom: 16px; }
.learn-qa-box .input { flex: 1; }
.learn-qa-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 12px; max-width: 880px;
}
.learn-qa-q { font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }
.learn-qa-a { font-size: 13.5px; line-height: 1.7; }
.learn-qa-sources { margin-top: 12px; font-size: 12px; color: var(--muted); }
.learn-qa-sources ul { margin: 6px 0 0 18px; line-height: 1.7; }

/* 窄屏适配 */
@media (max-width: 900px) {
  .skills-row { grid-template-columns: 1fr; }
  .chat-sidebar { width: 190px; }
  .hero-title { font-size: 30px; }
  .learn-day-list { width: 220px; }
}
