/* ============ 个人 AI 工作台 · 国风水墨主题 ============ */
:root {
  --bg: #f3efe7;
  --bg-soft: #faf7f0;
  --bg-warm: #ede5d3;
  --card: #ffffff;
  --card-alt: #fdfcf8;
  --border: #e8e1d4;
  --border-strong: #d4c9b3;
  --text: #2b2a26;
  --text2: #5d5648;
  --text3: #9a9384;
  --primary: #2d5a3d;
  --primary-2: #1a3d2e;
  --primary-weak: #e6ede7;
  --accent: #b04a3a;
  --accent-weak: #f6e6e2;
  --gold: #b8924d;
  --gold-weak: #f6efde;
  --serif: "STKaiti", "Kaiti SC", "KaiTi", "STSong", "FangSong", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --shadow: 0 1px 2px rgba(45, 30, 10, .04), 0 4px 18px rgba(45, 30, 10, .05);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d4c9b3; border-radius: 4px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); outline: none; }

/* ============ 浏览器外壳 ============ */
#app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.browser-bar {
  height: 38px; flex-shrink: 0; display: flex; align-items: center;
  padding: 0 16px; gap: 14px; background: linear-gradient(180deg, #efe9da, #ede5d3);
  border-bottom: 1px solid var(--border-strong); position: relative;
}
.traffic { display: flex; gap: 8px; }
.traffic i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.traffic .red { background: #ff5f57; }
.traffic .yellow { background: #febc2e; }
.traffic .green { background: #28c840; }
.address-bar {
  flex: 1; max-width: 520px; margin: 0 auto; height: 26px;
  background: rgba(255,255,255,.6); border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--text2);
}
.address-bar .lock { font-size: 11px; }
.shortcut-hint { font-size: 12px; color: var(--text3); }

/* ============ 主区 ============ */
.workspace { flex: 1; display: flex; overflow: hidden; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: 200px; flex-shrink: 0; background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px 16px; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2d5a3d, #1a3d2e);
  position: relative; display: flex; align-items: center; justify-content: center;
  box-shadow: inset -2px -3px 4px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.15);
}
.brand-logo::before {
  content: "🌙"; position: absolute; font-size: 20px; color: #f3efe7; opacity: .9;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 14px; font-weight: 700; }
.brand-text span { font-size: 11px; color: var(--text3); }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: var(--text2); text-decoration: none; font-size: 13px; transition: all .15s;
}
.nav-item:hover { background: var(--bg-warm); color: var(--text); }
.nav-item.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.nav-item.active::before { content: ""; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; margin-left: -6px; margin-right: 4px; }
.nav-ico { width: 18px; text-align: center; font-size: 14px; opacity: .8; }
.nav-sub { font-size: 10px; color: var(--text3); margin-left: auto; opacity: .5; }
.nav-item.active .nav-sub { color: var(--primary); opacity: .6; }

.member-card {
  margin-top: auto; padding: 14px 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  transition: all .15s;
}
.member-card:hover { border-color: var(--gold); }
.member-card .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f9b04a, #b04a3a);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 2px 6px rgba(176,74,58,.3);
}
.member-card .text strong { display: block; font-size: 13px; }
.member-card .text span { font-size: 11px; color: var(--text3); }
.member-card .arrow { margin-left: auto; color: var(--text3); }

/* ============ 主内容 ============ */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.topbar {
  height: 60px; flex-shrink: 0; display: flex; align-items: center;
  padding: 0 24px; gap: 16px; background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.search-bar {
  flex: 1; max-width: 380px; height: 36px; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; padding: 0 14px;
  display: flex; align-items: center; gap: 8px; transition: all .15s;
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,90,61,.08); }
.search-bar input { flex: 1; background: none; border: none; font-size: 13px; }
.search-bar .hint { font-size: 11px; color: var(--text3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }
.topbar-spacer { flex: 1; }
.btn-create {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 18px;
  background: linear-gradient(180deg, #2d5a3d, #1a3d2e); color: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 600; transition: all .15s;
  box-shadow: 0 2px 8px rgba(45,90,61,.25);
}
.btn-create:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,90,61,.35); }
.notif { width: 36px; height: 36px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.notif .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, #c8956a, #8b5d3b); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}

.page { flex: 1; overflow-y: auto; padding: 24px 32px 40px; }

/* ============ 页面顶部（中堂标题 + 水墨装饰） ============ */
.page-hero {
  position: relative; padding: 28px 28px 22px; margin-bottom: 22px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-radius: 12px; overflow: hidden;
}
.page-hero .ink-deco {
  position: absolute; right: -10px; top: -10px; width: 320px; height: 200px;
  background: radial-gradient(ellipse at 70% 50%, rgba(45,90,61,.08) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .ink-deco::before {
  content: ""; position: absolute; right: 30px; top: 30px; width: 100px; height: 80px;
  border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, rgba(176,74,58,.15) 0%, transparent 70%);
  filter: blur(10px);
}
.page-hero .ink-deco::after {
  content: "🌙 ✨ ☁️"; position: absolute; right: 40px; top: 40px;
  font-size: 32px; opacity: .3; letter-spacing: 12px;
}
.page-title { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: 2px; position: relative; z-index: 1; }
.page-title .accent { color: var(--accent); font-size: 18px; vertical-align: super; margin-left: 4px; }
.page-sub { font-size: 13px; color: var(--text2); margin-top: 8px; position: relative; z-index: 1; }

/* ============ 通用组件 ============ */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head-no-border { border-bottom: none; }
.card-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-title .ico { font-size: 16px; }
.card-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(180deg, #2d5a3d, #1a3d2e); color: #fff; box-shadow: 0 2px 8px rgba(45,90,61,.2); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,90,61,.3); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-soft { background: var(--primary-weak); color: var(--primary); }
.btn-soft:hover { background: #d6e2d8; }
.btn-outline { border: 1px solid var(--border); color: var(--text2); background: var(--card); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--text2); }
.btn-ghost:hover { color: var(--primary); }
.btn-danger { background: var(--accent-weak); color: var(--accent); }
.btn-danger:hover { background: #f0d4cd; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

.input, .textarea, .select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px;
  background: var(--card); transition: all .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,90,61,.08); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.7; font-family: var(--sans); }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.label-row .label { margin-bottom: 0; }
.hint { font-size: 11px; color: var(--text3); margin-top: 4px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; background: var(--bg-warm); color: var(--text2);
}
.tag-primary { background: var(--primary-weak); color: var(--primary); }
.tag-accent { background: var(--accent-weak); color: var(--accent); }
.tag-gold { background: var(--gold-weak); color: var(--gold); }
.tag-green { background: var(--primary-weak); color: var(--primary); }

.empty { text-align: center; padding: 36px 20px; color: var(--text3); font-size: 13px; }
.empty .ico { font-size: 30px; display: block; margin-bottom: 8px; }

.stat-num { font-size: 26px; font-weight: 800; line-height: 1.2; font-family: var(--serif); }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 2px; }
.stat-delta { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.stat-delta.up { color: var(--primary); }
.stat-delta.down { color: var(--accent); }

/* ============ 模态框 / Toast ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 30, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border-radius: 14px; width: 100%; max-width: 580px; max-height: 84vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(15,18,30,.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 16px; }
.modal-close:hover { background: var(--bg-warm); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed; bottom: 36px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px;
  z-index: 200; opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 首页 Dashboard ============ */
.hero-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.todo-card { padding: 18px; }
.todo-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; }
.todo-check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); flex-shrink: 0; margin-top: 3px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; transition: all .15s; }
.todo-check.checked { background: var(--primary); border-color: var(--primary); }
.todo-text { font-size: 13px; line-height: 1.5; }
.todo-text.done { color: var(--text3); text-decoration: line-through; }
.todo-add { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--primary); cursor: pointer; }

.ink-tag { font-family: var(--serif); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ink-tag::before { content: "🌿"; font-size: 12px; opacity: .7; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 20px;
  font-size: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text2);
  transition: all .15s; cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }

.insp-input-card { padding: 18px; }
.insp-input { display: flex; flex-direction: column; gap: 10px; }
.insp-textarea { min-height: 80px; font-family: var(--serif); font-size: 14px; }
.insp-foot { display: flex; align-items: center; justify-content: space-between; }

.tasks-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.task-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; transition: all .15s;
}
.task-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.task-head { display: flex; align-items: center; gap: 10px; }
.task-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 13px; font-weight: 700; }
.task-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.task-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text2); }
.progress-bar { flex: 1; height: 4px; background: var(--bg-warm); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .3s; }

.assist-row { display: flex; gap: 14px; margin-bottom: 20px; }
.assist-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  transition: all .15s;
}
.assist-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.assist-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-warm); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); }
.assist-name { font-size: 13px; font-weight: 600; }
.assist-desc { font-size: 11px; color: var(--text3); }

.data-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.data-card { padding: 16px; }
.data-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.data-ico { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* ============ 热点库 ============ */
.hs-filters { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.hs-search { flex: 1; }
.hs-select {
  height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); font-size: 12px; color: var(--text2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.hs-select .arrow { font-size: 10px; opacity: .5; }

.hs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.hs-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: all .15s;
}
.hs-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.hs-cover {
  height: 130px; position: relative;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 10px;
}
.hs-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.45)); }
.hs-cover-tags { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.hs-cover-tag { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,.92); color: var(--text); }
.hs-body { padding: 12px 14px; }
.hs-title { font-size: 13px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.hs-author { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hs-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-warm); color: var(--text2); font-size: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.hs-meta { font-size: 11px; color: var(--text3); margin-top: 6px; display: flex; align-items: center; gap: 8px; }

/* ============ 生成中心 ============ */
.gen-tabs { display: flex; gap: 8px; padding: 14px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.gen-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border); color: var(--text2);
  font-size: 13px; font-weight: 600; transition: all .15s;
}
.gen-tab:hover { color: var(--primary); }
.gen-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.gen-tab .ico { font-size: 15px; }

.gen-layout { display: grid; grid-template-columns: 300px 1fr 240px; gap: 16px; align-items: start; }
.gen-result-list { display: flex; flex-direction: column; gap: 14px; }
.gen-result-card { padding: 18px; }
.gen-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.gen-result-title { font-size: 14px; font-weight: 700; color: var(--primary); }
.gen-result-actions { display: flex; gap: 6px; }
.gen-result-body { font-size: 13px; line-height: 1.85; color: var(--text); white-space: pre-wrap; }
.gen-section { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.gen-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.gen-section-label { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 6px; letter-spacing: 1px; }

.tools-list { display: flex; flex-direction: column; gap: 8px; }
.tools-title { font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; }
.tools-item {
  padding: 10px 12px; border-radius: 8px; background: var(--card-alt);
  display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all .15s;
  border: 1px solid transparent;
}
.tools-item:hover { border-color: var(--border); background: var(--card); }
.tools-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-warm); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--primary); }
.tools-info { flex: 1; min-width: 0; }
.tools-name { font-size: 12px; font-weight: 600; }
.tools-desc { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ============ 图片中心 ============ */
.image-layout { display: grid; grid-template-columns: 240px 1fr 300px; gap: 16px; align-items: start; }
.canvas-card { padding: 14px; }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.canvas-frame {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-radius: 8px; padding: 14px; min-height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.canvas-size { font-size: 11px; color: var(--text3); background: var(--card); padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border); }

.recent-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.recent-card {
  aspect-ratio: 3/4; background: linear-gradient(135deg, var(--bg-warm), var(--bg));
  border-radius: 8px; cursor: pointer; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text3); transition: all .15s;
}
.recent-card:hover { border-color: var(--primary); }

.template-item {
  display: flex; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer;
  transition: all .15s; align-items: center; border: 1px solid transparent;
}
.template-item:hover { background: var(--card-alt); }
.template-item.active { background: var(--primary-weak); border-color: var(--primary); }
.template-cover { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.template-info { flex: 1; min-width: 0; }
.template-name { font-size: 13px; font-weight: 600; }
.template-desc { font-size: 11px; color: var(--text3); margin-top: 1px; }

.brand-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; align-items: center; }
.brand-item:hover { background: var(--card-alt); }
.brand-check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); margin-left: auto; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.brand-check.checked { background: var(--primary); border-color: var(--primary); }
.brand-logo-mini { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }

/* ============ 灵感库 ============ */
.insp-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.insp-list { display: flex; flex-direction: column; gap: 10px; }
.insp-item {
  padding: 14px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; display: flex; gap: 12px; transition: all .15s;
}
.insp-item:hover { border-color: var(--border-strong); }
.insp-item.done { opacity: .55; }
.insp-item.done .insp-text { text-decoration: line-through; color: var(--text3); }
.insp-check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); flex-shrink: 0; margin-top: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.insp-check.checked { background: var(--primary); border-color: var(--primary); }
.insp-main { flex: 1; min-width: 0; }
.insp-text { font-size: 14px; line-height: 1.7; font-family: var(--serif); }
.insp-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.insp-actions { display: flex; gap: 6px; opacity: 0; transition: all .15s; }
.insp-item:hover .insp-actions { opacity: 1; }
.insp-time { font-size: 11px; color: var(--text3); }

.expand-box { margin-top: 10px; padding: 10px 12px; background: var(--card-alt); border-radius: 8px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }

/* ============ 内容库 / 复盘 ============ */
.content-item { padding: 16px 18px; }
.content-item + .content-item { border-top: 1px solid var(--border); }
.ci-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ci-title { font-size: 14px; font-weight: 600; }
.ci-body { font-size: 13px; color: var(--text2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-meta { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--text3); flex-wrap: wrap; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.bar-label { width: 80px; color: var(--text2); flex-shrink: 0; text-align: right; }
.bar-track { flex: 1; height: 8px; background: var(--bg-warm); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), #4a7e5a); }
.bar-val { width: 40px; font-weight: 600; color: var(--text); }

.record-row { display: grid; grid-template-columns: 1.5fr .8fr .8fr .7fr .7fr .7fr .7fr .7fr .7fr 90px; gap: 8px; padding: 10px 0; align-items: center; font-size: 13px; }
.record-head { font-size: 11px; color: var(--text3); font-weight: 600; border-bottom: 1px solid var(--border); }
.record-row .cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 热点拆解 ============ */
.decomp-block { padding: 16px 18px; }
.decomp-block + .decomp-block { border-top: 1px solid var(--border); }
.decomp-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; font-family: var(--serif); }
.decomp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.decomp-pill { background: var(--card-alt); border: 1px solid var(--border); padding: 5px 10px; border-radius: 6px; font-size: 12px; }

/* ============ 图片预览 ============ */
.img-preview {
  width: 100%; max-width: 360px; aspect-ratio: 3/4; border-radius: 10px;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.img-preview .mock-bg { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; position: relative; gap: 8px; }
.mock-bg .mock-text { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.4; text-align: center; }
.mock-bg .mock-sub { font-size: 12px; opacity: .7; text-align: center; }
.mock-bg .mock-author { position: absolute; bottom: 16px; font-size: 11px; opacity: .8; }

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
  .grid-4, .grid-5, .tasks-row { grid-template-columns: repeat(2, 1fr); }
  .data-row { grid-template-columns: repeat(3, 1fr); }
  .gen-layout, .image-layout { grid-template-columns: 1fr; }
  .hs-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-row { grid-template-columns: 1fr; }
  .insp-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .grid-2, .grid-3, .grid-4, .grid-5, .data-row, .hs-grid, .tasks-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
  .page { padding: 14px; }
  .page-hero { padding: 20px; }
  .page-title { font-size: 22px; }
}