:root {
  --bg: #f6f4ef;
  --paper: #fffdfa;
  --card: #ffffff;
  --ink: #20242a;
  --ink-2: #4a5158;
  --muted: #858c92;
  --line: #e7e3da;
  --accent: #933f31;
  --accent-soft: #f7ebe8;
  --green: #356b5b;
  --green-soft: #e9f2ee;
  --gold: #b48a4a;
  --gold-soft: #f7f0e2;
  --shadow: 0 8px 30px rgba(45, 38, 25, .07);
  --shadow-sm: 0 2px 10px rgba(45, 38, 25, .05);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "Source Han Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }

/* 通用按钮 */
.btn-primary {
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 11px 24px; border-radius: 10px; font-weight: 600; letter-spacing: .02em;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 14px rgba(147, 63, 49, .18);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(147, 63, 49, .24); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-primary.block { width: 100%; }
.btn-ghost {
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 9px; transition: border-color .15s, background .15s;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-text { background: none; border: none; color: var(--muted); padding: 6px 4px; }
.btn-text:hover { color: var(--accent); }

.fatal {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  text-align: center; color: var(--ink-2); line-height: 1.9;
}

/* 登录 */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--paper);
}
.auth-brand {
  padding: 72px 8vw; background: linear-gradient(155deg, #2f4a43 0%, #243b39 55%, #1d3130 100%);
  color: #f4f1e9; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-brand::after {
  content: "思"; position: absolute; right: -30px; bottom: -120px; font-family: var(--serif);
  font-size: 380px; color: rgba(255,255,255,.035); line-height: 1; pointer-events: none;
}
.brand-mark {
  width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.4); border-radius: 14px;
  display: grid; place-items: center; font-family: var(--serif); font-size: 28px; color: #f0e6d2;
}
.brand-kicker { margin-top: 34px; font-size: 11px; letter-spacing: .32em; color: rgba(244,241,233,.55); }
.auth-brand h1 { font-family: var(--serif); font-size: 58px; letter-spacing: .06em; margin-top: 6px; font-weight: 500; }
.brand-sub { margin-top: 12px; font-size: 17px; color: rgba(244,241,233,.75); font-family: var(--serif); }
.brand-points { margin-top: 60px; display: grid; gap: 20px; max-width: 400px; }
.brand-points > div { display: flex; gap: 16px; align-items: flex-start; }
.brand-points span { font-size: 12px; color: #d8bd85; letter-spacing: .1em; padding-top: 3px; }
.brand-points p { color: rgba(244,241,233,.78); font-size: 14px; }
.auth-card {
  padding: 60px 7vw; display: flex; flex-direction: column; justify-content: center;
  max-width: 520px; width: 100%; margin: 0 auto;
}
.auth-card h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; }
.auth-card > .muted { font-size: 13.5px; margin-bottom: 30px; }
.auth-tabs { display: flex; gap: 6px; background: #f2efe8; padding: 5px; border-radius: 11px; margin-bottom: 26px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; padding: 9px 6px; border-radius: 8px;
  color: var(--muted); font-size: 13.5px; transition: .15s;
}
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; font-weight: 600; }
input[type="email"], input[type="tel"], input[type="text"], textarea, .review-textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 11px 14px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(53,107,91,.1); }
textarea { resize: vertical; line-height: 1.8; }
.otp-row { display: flex; gap: 10px; }
.otp-row input { flex: 1; }
.otp-row .btn-ghost { white-space: nowrap; }
.hint { min-height: 22px; font-size: 13px; color: var(--accent); margin: 2px 0 10px; }
.hint.ok { color: var(--green); }
.privacy-note { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* 顶栏与标签 */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner, .tabbar-inner, .container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px;
}
.logo strong { display: block; font-family: var(--serif); font-size: 18px; letter-spacing: .08em; line-height: 1.2; }
.logo small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .16em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.user-label { font-size: 13px; color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.tabbar-inner { display: flex; gap: 36px; }
.tab {
  border: none; background: none; padding: 14px 2px 13px; color: var(--muted);
  font-size: 14px; letter-spacing: .12em; border-bottom: 2px solid transparent; transition: .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; letter-spacing: 0; line-height: 18px;
}
.container { padding-top: 44px; padding-bottom: 70px; min-height: calc(100vh - 190px); }
.view { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Hero 与输入区 */
.hero { max-width: 760px; margin-bottom: 32px; }
.eyebrow { font-size: 11px; letter-spacing: .28em; color: var(--accent); }
.hero h1 { font-family: var(--serif); font-size: 38px; line-height: 1.45; margin: 14px 0 14px; font-weight: 500; }
.hero p { color: var(--ink-2); font-size: 14.5px; max-width: 680px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 28px; margin-bottom: 22px; }
.card h3 { font-size: 16px; font-family: var(--serif); margin-bottom: 18px; letter-spacing: .03em; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2 { font-family: var(--serif); font-size: 20px; }
.counter { font-size: 12px; color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 26px; }
.example-chip {
  border: 1px dashed var(--line); background: #fbfaf7; color: var(--ink-2);
  border-radius: 20px; padding: 5px 12px; font-size: 12px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: .15s;
}
.example-chip:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; transition: .15s;
}
.chip:hover { border-color: var(--green); }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.chip.accent.active { background: var(--accent); border-color: var(--accent); }
.ai-row {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 26px; padding: 16px;
  background: var(--gold-soft); border: 1px solid #ecdfc6; border-radius: 12px;
}
.switch { position: relative; flex: none; width: 42px; height: 24px; margin-top: 2px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { display: block; width: 42px; height: 24px; border-radius: 12px; background: #cfc7b5; transition: .2s; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.ai-copy strong { display: block; font-size: 13.5px; }
.ai-copy small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.submit-row { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.submit-note { font-size: 12px; color: var(--muted); }

/* 方案展示 */
.result-area { margin-top: 8px; }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 18px; }
.plan-header h2 { font-family: var(--serif); font-size: 24px; }
.plan-header .plan-date { font-size: 12px; color: var(--muted); }
.plan-summary {
  background: linear-gradient(150deg, #2f4a43, #223835); color: #f5f1e7; border-radius: 16px;
  padding: 34px 36px; position: relative; overflow: hidden; margin-bottom: 22px;
}
.plan-summary::after {
  content: "\201D"; position: absolute; right: 24px; top: -48px; font-family: var(--serif);
  font-size: 200px; color: rgba(255,255,255,.06); line-height: 1;
}
.plan-summary .kicker { font-size: 11px; letter-spacing: .26em; color: #d8bd85; }
.plan-summary blockquote { margin: 14px 0 12px; font-family: var(--serif); font-size: 25px; line-height: 1.6; max-width: 760px; }
.plan-summary cite { font-style: normal; font-size: 13px; color: rgba(245,241,231,.7); }
.plan-insight { white-space: pre-line; color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag-pill { background: var(--green-soft); color: var(--green); border-radius: 20px; padding: 3px 11px; font-size: 12px; }
.tag-pill.neutral { background: #f1efe9; color: var(--ink-2); }
.lens-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lens-card {
  background: #fbfaf7; border: 1px solid var(--line); border-radius: 13px; padding: 20px;
  display: flex; flex-direction: column;
}
.lens-index { font-size: 11px; letter-spacing: .18em; color: var(--accent); }
.lens-card h4 { font-family: var(--serif); font-size: 17px; margin: 8px 0 2px; }
.lens-domain { font-size: 11.5px; color: var(--muted); }
.lens-quote { font-family: var(--serif); font-size: 14px; color: var(--ink); margin: 14px 0 8px; line-height: 1.7; border-left: 2px solid var(--gold); padding-left: 12px; }
.lens-core { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; }
.lens-apply { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--green); line-height: 1.75; }
.lens-hits { margin-top: 10px; font-size: 11px; color: var(--muted); }
.plan-section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.plan-section-title h3 { margin: 0; font-size: 18px; }
.plan-section-title span { font-size: 12px; color: var(--muted); }
.action-list { display: grid; gap: 10px; }
.action-item {
  display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; transition: .15s; align-items: flex-start;
}
.action-item:hover { border-color: #cfd9d3; background: #fcfdfc; }
.action-item.done { background: #f6f8f6; border-color: #dfe8e2; }
.action-item.done .action-title { text-decoration: line-through; color: var(--muted); }
.action-check {
  flex: none; width: 20px; height: 20px; margin-top: 3px; border: 1.5px solid #c9cec9;
  border-radius: 6px; background: #fff; display: grid; place-items: center; color: #fff;
  font-size: 12px; line-height: 1; padding: 0; transition: .15s;
}
.action-check.done { background: var(--green); border-color: var(--green); }
.action-body { flex: 1; min-width: 0; }
.action-title { font-weight: 600; font-size: 14px; }
.action-detail { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; }
.action-meta { font-size: 11px; color: var(--muted); margin-top: 7px; }
.action-meta em { font-style: normal; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-right: 8px; }
.milestone-list { display: grid; gap: 0; }
.milestone { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.milestone:last-child { border-bottom: none; }
.milestone-window {
  flex: none; width: 74px; font-family: var(--serif); color: var(--accent); font-size: 15px; padding-top: 2px;
}
.milestone-body strong { font-size: 14px; }
.milestone-body p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; }
.outlook-box { background: var(--gold-soft); border: 1px solid #ecdfc6; border-radius: 13px; padding: 22px 24px; }
.outlook-box h3 { margin-bottom: 10px; }
.outlook-box .outlook-head { font-family: var(--serif); font-size: 16px; line-height: 1.8; }
.outlook-box ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }
.outlook-box .next-check { margin-top: 14px; font-size: 12px; color: var(--accent); }
.ai-box { border-left: 3px solid var(--gold); background: #fcfaf4; padding: 16px 18px; border-radius: 0 10px 10px 0; }
.ai-box .ai-label { font-size: 11px; letter-spacing: .18em; color: var(--gold); margin-bottom: 8px; }
.ai-box .ai-text { white-space: pre-wrap; font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.ai-box .ai-error { color: var(--accent); font-size: 12.5px; }

/* 档案 */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.section-head h2 { font-family: var(--serif); font-size: 28px; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.head-actions { display: flex; gap: 8px; flex: none; }
.archive-list { display: grid; gap: 12px; }
.archive-card {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px 22px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: .15s;
}
.archive-card:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow); }
.archive-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.archive-cat { font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 2px 8px; }
.archive-date { font-size: 11.5px; color: var(--muted); }
.archive-title { font-family: var(--serif); font-size: 17px; margin: 10px 0 6px; }
.archive-excerpt { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-bottom { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.progress-bar { flex: 1; height: 5px; background: #eeece6; border-radius: 3px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.archive-progress { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.empty-state { text-align: center; padding: 80px 20px; background: #fff; border: 1px dashed var(--line); border-radius: 16px; }
.empty-mark { font-size: 44px; color: #d6d1c5; line-height: 1; }
.empty-state h3 { font-family: var(--serif); font-size: 20px; margin: 16px 0 8px; }
.empty-state p { color: var(--muted); font-size: 13.5px; }

/* 洞察 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 20px; box-shadow: var(--shadow-sm); }
.kpi-value { font-family: var(--serif); font-size: 32px; color: var(--accent); line-height: 1.2; }
.kpi-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { margin-bottom: 16px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-label { width: 76px; flex: none; font-size: 12.5px; color: var(--ink-2); }
.bar-track { flex: 1; height: 9px; background: #f1efe9; border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.bar-count { width: 24px; text-align: right; font-size: 12px; color: var(--muted); }
.mood-svg { width: 100%; height: 180px; display: block; }
.mood-legend { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-chip { background: var(--green-soft); color: var(--green); border-radius: 20px; padding: 5px 13px; font-size: 12.5px; }
.tag-chip small { color: var(--muted); margin-left: 5px; }
.pattern-list, .suggestion-list { display: grid; gap: 12px; }
.pattern-item { border-left: 3px solid var(--line); padding: 4px 0 4px 16px; }
.pattern-item strong { font-size: 14px; }
.pattern-item p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.75; }
.highlight-card { background: linear-gradient(150deg, #fffdf7, #fbf5e9); border-color: #ecdfc6; }
.suggestion-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed #e9e0cd; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-size: 12px; }
.suggestion-body strong { font-size: 14px; }
.suggestion-body p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.75; }
.suggestion-basis { font-size: 11.5px; color: var(--accent); margin-top: 6px; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-date { flex: none; width: 96px; font-size: 12px; color: var(--muted); }
.timeline-text { font-size: 13px; }
.timeline-text small { color: var(--muted); margin-left: 8px; }

/* 弹层与复盘 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(28, 30, 28, .45); backdrop-filter: blur(2px); }
.modal-panel { position: relative; width: min(920px, 100%); background: var(--bg); border-radius: 18px; padding: 32px; box-shadow: 0 24px 70px rgba(0,0,0,.2); margin-bottom: 40px; }
.modal-close { position: absolute; top: 16px; right: 18px; border: none; background: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; color: var(--ink-2); line-height: 1; box-shadow: var(--shadow-sm); }
.modal-close:hover { color: var(--accent); }
.modal .card { margin-bottom: 16px; }
.modal .plan-summary { padding: 26px 28px; }
.modal .plan-summary blockquote { font-size: 21px; }
.review-box { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 22px; }
.review-box h3 { margin-bottom: 10px; }
.review-textarea { min-height: 96px; }
.score-row { display: flex; align-items: center; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.score-row > span { font-size: 12.5px; color: var(--ink-2); margin-right: 4px; }
.score-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 12px; font-size: 12.5px; color: var(--ink-2); }
.score-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.review-actions { display: flex; gap: 10px; align-items: center; }
.danger-link { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 12px; }
.danger-link:hover { color: var(--accent); }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: #26302c; color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: 86vw; text-align: center;
}
.toast.error { background: var(--accent); }
.loading { display: inline-flex; align-items: center; gap: 9px; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { border-top: 1px solid var(--line); padding: 22px 28px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11.5px; background: var(--paper); }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 44px 28px; }
  .auth-brand h1 { font-size: 42px; }
  .brand-points { margin-top: 32px; }
  .auth-card { padding: 36px 28px 60px; }
  .lens-grid, .kpi-grid, .chart-grid, .field-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 620px) {
  .topbar-inner, .tabbar-inner, .container { padding-left: 16px; padding-right: 16px; }
  .container { padding-top: 28px; }
  .tabbar-inner { gap: 22px; }
  .hero h1 { font-size: 25px; }
  .card { padding: 20px; }
  .lens-grid, .kpi-grid, .chart-grid, .field-grid { grid-template-columns: 1fr; }
  .plan-summary { padding: 24px; }
  .plan-summary blockquote { font-size: 20px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .modal-panel { padding: 22px 16px; }
  .submit-row { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; gap: 4px; }
}

/* ============ 语音输入 / 文件导入 ============ */
select, input[type="search"] {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 11px 14px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #858c92 50%), linear-gradient(135deg, #858c92 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:focus, input[type="search"]:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(53,107,91,.1); }

.input-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); padding: 8px 13px; border-radius: 9px;
  font-size: 13px; white-space: nowrap; transition: .15s;
}
.tool-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.tool-btn:disabled { opacity: .55; cursor: not-allowed; }
.tool-btn.recording { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); animation: voicePulse 1.6s infinite; }
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(147,63,49,.2); }
  50% { box-shadow: 0 0 0 7px rgba(147,63,49,0); }
}
.tool-status { flex: 1; min-width: 200px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.tool-status.listening { color: var(--accent); }
.tool-status.ok { color: var(--green); }
.tool-status.warn { color: #9c742f; }
.drop-hint {
  margin-top: 12px; padding: 14px; text-align: center; font-size: 13px;
  border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.input-card.dropping { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(147,63,49,.1); }
.pin-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pin-row select { flex: 1; min-width: 230px; max-width: 460px; }
.pin-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

.lens-card { position: relative; }
.lens-region { position: absolute; top: 18px; right: 18px; font-size: 10.5px; padding: 2px 8px; border-radius: 10px; }
.lens-region.cn { background: var(--accent-soft); color: var(--accent); }
.lens-region.ov { background: #eef1f5; color: #5c6b78; }
.lens-link {
  margin-top: auto; padding: 14px 0 0; background: none; border: none;
  color: var(--green); font-size: 11.5px; text-align: left;
}
.lens-link:hover { text-decoration: underline; }

/* ============ 知识库 ============ */
.lib-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.lib-progress { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 2px; }
.lib-progress .progress-bar { flex: 1 1 160px; }
.lib-progress span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.lib-progress .lib-scope { flex: 1 1 100%; white-space: normal; font-size: 11px; color: var(--muted); }
.lib-daily { background: linear-gradient(150deg, #fffdf7, #fbf4e5); border-color: #ecdfc6; }
.daily-label { font-size: 10.5px; letter-spacing: .24em; color: var(--gold); }
.lib-daily blockquote { font-family: var(--serif); font-size: 20px; line-height: 1.7; margin: 12px 0 8px; }
.daily-from { font-size: 12.5px; color: var(--ink-2); }
.daily-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.lib-toolbar { padding: 20px 22px; }
.lib-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lib-search-row input { flex: 1; min-width: 220px; }
.lib-search-row select { flex: none; max-width: 185px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-2); font-size: 13px; }
.lib-search-row .btn-ghost { flex: none; }
.lib-filter-row { display: grid; gap: 12px; margin-top: 16px; }
.lib-filter { display: flex; align-items: flex-start; gap: 12px; }
.lib-filter > span { flex: none; width: 76px; font-size: 12.5px; color: var(--muted); padding-top: 7px; }
.lib-filter .chip { font-size: 12px; padding: 5px 10px; }
.chips.scrollable { max-height: 88px; overflow-y: auto; padding: 2px 4px 2px 0; }
.lib-result-meta { font-size: 12px; color: var(--muted); margin: 18px 2px 12px; }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lib-card {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: .15s;
  display: flex; flex-direction: column; min-height: 250px;
}
.lib-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow); }
.lib-card.studied { border-color: #d9e6df; background: #fcfdfc; }
.lib-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-region { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.lib-region.cn { background: var(--accent-soft); color: var(--accent); }
.lib-region.ov { background: #eef1f5; color: #5c6b78; }
.lib-school-tag { font-size: 10.5px; color: var(--ink-2); background: #f2f0ea; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.lib-done { font-size: 10.5px; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 10px; margin-left: auto; }
.lib-card h3 { font-family: var(--serif); font-size: 20px; margin: 14px 0 2px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lib-card h3 small { font-size: 11px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.lib-domain { font-size: 11.5px; color: var(--muted); }
.lib-quote { font-family: var(--serif); font-size: 14px; margin: 14px 0 8px; padding-left: 10px; border-left: 2px solid var(--gold); line-height: 1.7; }
.lib-core { font-size: 12px; color: var(--ink-2); line-height: 1.75; flex: 1; }
.lib-topics { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.lib-topics span { font-size: 10.5px; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 10px; }
.lib-card-foot { display: flex; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); }
.lib-card-foot span:last-child { color: var(--green); white-space: nowrap; }

/* 人物档案详情 */
.td-head { margin-bottom: 20px; }
.td-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.td-head h2 { font-family: var(--serif); font-size: 30px; margin: 12px 0 4px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.td-head h2 small { font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.td-domain { font-size: 14px; color: var(--ink-2); }
.td-school-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.td-quote blockquote { font-family: var(--serif); font-size: 21px; line-height: 1.7; margin: 0 0 10px; }
.td-quote cite { font-style: normal; font-size: 12.5px; color: var(--muted); }
.td-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.td-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.td-steps li { display: flex; gap: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.td-step-no { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 11px; margin-top: 3px; }
.td-works { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.td-works li { border-left: 2px solid var(--gold); padding-left: 14px; }
.td-works strong { display: block; font-family: var(--serif); font-size: 15px; }
.td-works span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; }
.td-caveat { background: #fffaf8; border-color: #eddcd6; }
.td-caveat h3 { color: var(--accent); }
.td-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.td-topic { font-size: 12px; background: var(--green-soft); color: var(--green); padding: 4px 11px; border-radius: 16px; }
.td-topic.neutral { background: #f2f0ea; color: var(--ink-2); }
.td-actions { display: flex; gap: 10px; margin: 6px 0 18px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .lib-grid { grid-template-columns: 1fr; }
  .lib-stats { grid-template-columns: repeat(2, 1fr); }
  .lib-progress { flex-direction: column; align-items: flex-start; gap: 6px; }
  .lib-progress .progress-bar { width: 100%; }
  .lib-filter { flex-direction: column; gap: 6px; }
  .lib-filter > span { width: auto; padding-top: 0; }
  .lib-search-row { flex-direction: column; }
  .tool-status { min-width: 100%; }
  .pin-row select { max-width: none; min-width: 100%; }
  .td-head h2 { font-size: 24px; }
  .td-quote blockquote { font-size: 18px; }
  .td-actions .btn-primary, .td-actions .btn-ghost { flex: 1; }
}


/* ---- 多国标签体系与增强档案 ---- */
.stat-inline { color: var(--accent); font-weight: 600; }
.lib-country-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 14px 2px 0; }
.bar-label { color: var(--muted); font-size: 11.5px; margin-right: 4px; white-space: nowrap; }
.country-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); border-radius: 16px; padding: 3px 10px;
  font-size: 11.5px; transition: .15s;
}
.country-pill i { font-style: normal; font-size: 10px; color: var(--muted); }
.country-pill:hover { border-color: var(--green); }
.country-pill.active { background: var(--green); border-color: var(--green); color: #fff; }
.country-pill.active i { color: #d9e9e1; }
.country-pill.ea { border-left: 3px solid #b46a55; }
.country-pill.sa { border-left: 3px solid #b99552; }
.country-pill.eu { border-left: 3px solid #6b83a8; }
.country-pill.na { border-left: 3px solid #6f9a84; }
.country-pill.mena { border-left: 3px solid #9a7aa8; }
.lib-country { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; border-left: 3px solid transparent; }
.lib-country.ea { background: var(--accent-soft); color: var(--accent); border-left-color: #b46a55; }
.lib-country.sa { background: var(--gold-soft); color: #8a6a2f; border-left-color: #b99552; }
.lib-country.eu { background: #eef2f8; color: #4a5f80; border-left-color: #6b83a8; }
.lib-country.na { background: var(--green-soft); color: var(--green); border-left-color: #6f9a84; }
.lib-country.mena { background: #f4eef7; color: #77558a; border-left-color: #9a7aa8; }
/* 新增文化圈配色 */
.country-pill.nordic { border-left: 3px solid #5a8fa8; }
.country-pill.persia { border-left: 3px solid #b07a4e; }
.country-pill.africa { border-left: 3px solid #8a9a52; }
.country-pill.latam { border-left: 3px solid #c06a6a; }
.country-pill.cee { border-left: 3px solid #7a7fae; }
.lib-country.nordic { background: #eaf3f7; color: #3f6f87; border-left-color: #5a8fa8; }
.lib-country.persia { background: #f8f0e6; color: #8a5c32; border-left-color: #b07a4e; }
.lib-country.africa { background: #f1f5e7; color: #5f6f34; border-left-color: #8a9a52; }
.lib-country.latam { background: #fbeceb; color: #9a4444; border-left-color: #c06a6a; }
.lib-country.cee { background: #eeeff8; color: #555a92; border-left-color: #7a7fae; }
.lib-bloc-tag { font-size: 10.5px; color: var(--ink-2); background: #f2f0ea; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.lib-topics .lib-tag-mini { background: #eef2f8; color: #4a5f80; }
.td-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.td-two-col h3 { margin-bottom: 8px; }
.td-concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.td-concept { background: #fbfaf6; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.td-concept strong { display: block; font-family: var(--serif); font-size: 15px; color: var(--accent); margin-bottom: 4px; }
.td-concept span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.75; }
.td-works-note { font-size: 12px; color: var(--muted); margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.td-question { background: var(--gold-soft); border-color: #ecdfc6; }
.td-question p { font-family: var(--serif); font-size: 18px; line-height: 1.8; }
.td-topic.tag { background: #eef2f8; color: #4a5f80; }

@media (max-width: 900px) {
  .td-two-col { grid-template-columns: 1fr; gap: 14px; }
  .td-concepts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .lib-search-row select { max-width: none; flex: 1 1 44%; }
  .td-concepts { grid-template-columns: 1fr; }
  .country-pill { font-size: 11px; }
}
