:root {
  --primary: #0071e3;
  --primary-dark: #0077ed;
  --primary-soft: #f0f7ff;
  --ink: #1d1d1f;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #d2d2d7;
  --topbar: rgba(255,255,255,0.72);
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.04), 0 16px 40px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }

/* ===== 顶栏（毛玻璃） ===== */
.topbar {
  background: var(--topbar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--ink);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #0a84ff, var(--primary));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(0,113,227,0.3);
}
.brand-text h1 { font-size: 16px; font-weight: 700; letter-spacing: 0.3px; }
.brand-text p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.logout-btn {
  font-size: 12px; padding: 5px 14px;
  color: var(--muted); border-color: rgba(0,0,0,0.12);
  background: transparent;
  border-radius: 999px;
}
.logout-btn:hover { color: var(--ink); border-color: rgba(0,0,0,0.3); }
.pill {
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(0,0,0,0.05); color: var(--muted);
  border: 1px solid rgba(0,0,0,0.08);
}
.pill.live { background: rgba(52,199,123,0.14); color: #1a7f4b; border-color: rgba(52,199,123,0.3); }

/* ===== 导航 ===== */
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow-x: auto;
  position: sticky;
  top: 68px;
  z-index: 9;
}
.tab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 14px 16px;
  background: none; border: none;
  font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.tab .t-ico { font-size: 13px; opacity: 0.8; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== 内容区 ===== */
.content { max-width: 960px; margin: 0 auto; padding: 24px 16px 120px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 底部导航（App 式，3 个主入口） ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.bn-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px;
  background: none; border: none;
  color: var(--muted); font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: color .2s;
}
.bn-item .bn-ico { font-size: 22px; line-height: 1; }
.bn-item.active { color: var(--primary); font-weight: 700; }

/* ===== AI 助手页顶部（主输入框 + 子导航） ===== */
.ai-top, .me-top { display: none; }
.ai-top.visible, .me-top.visible { display: block; }
.ai-tagline { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 14px; line-height: 1.5; }
.ai-input-wrap { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.ai-input-wrap textarea {
  flex: 1; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); font-size: 16px; resize: none;
  background: var(--card); color: var(--ink); min-height: 48px; line-height: 1.4;
}
.ai-input-wrap .btn { border-radius: 14px; padding: 0 20px; white-space: nowrap; }
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.module-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); cursor: pointer; text-align: left; transition: all .15s; }
.module-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.module-card:active { transform: translateY(0); }
.module-ico { font-size: 22px; line-height: 1; }
.module-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.module-desc { font-size: 12px; color: var(--muted); }
.sub-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.sub-item {
  flex-shrink: 0; padding: 7px 14px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; cursor: pointer; transition: all .2s;
}
.sub-item.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

.panel-head { margin-bottom: 24px; }
.panel-head h2 { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; }
.panel-head .lead { font-size: 15px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 14px; letter-spacing: -0.2px; }
/* 个人/商家身份选择 */
.mode-picker { display: flex; gap: 12px; }
.mode-card { flex: 1; border: 2px solid var(--border); border-radius: 14px; padding: 18px 14px; text-align: center; cursor: pointer; transition: all .18s; background: #fff; }
.mode-card:hover { border-color: #ff6b35; }
.mode-card.selected { border-color: #ff6b35; background: #fff5f0; box-shadow: 0 0 0 3px rgba(255,107,53,.12); }
.mode-icon { font-size: 32px; margin-bottom: 8px; }
.mode-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.mode-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hint { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.65; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 8px; }

/* ===== 表单 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.field span { font-size: 13px; font-weight: 600; color: var(--text); }
.field span .req { color: #ff3b30; font-style: normal; font-weight: 700; margin-left: 2px; }
.field input, .field textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px; font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.12);
}
.field textarea { resize: vertical; }
.f-hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ===== 语音输入 ===== */
.voice-wrap { position: relative; }
.voice-wrap textarea { padding-right: 46px; }
.voice-btn {
  position: absolute; right: 8px; top: 8px;
  width: 34px; height: 34px;
  background: var(--primary-soft); border: none; border-radius: 10px;
  cursor: pointer; font-size: 17px; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.voice-btn:hover { background: #dceaff; }
.voice-btn.recording { background: #ff3b30; color: #fff; animation: voicePulse 1s ease infinite; }
@keyframes voicePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,59,48,.4); } 50% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  font-size: 15px; font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,113,227,0.28);
}
.btn.primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px rgba(0,113,227,0.36); }
.btn.primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn.ghost:hover { background: var(--primary-soft); }
.btn.ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; margin-top: 16px; }

/* ===== 图片上传 ===== */
.upload-block { margin-bottom: 18px; }
input[type="file"] { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb {
  width: 64px; height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s;
}
.thumb.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,113,227,0.2); }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-wrap .thumb { display: block; }
.thumb-tag {
  position: absolute; bottom: 4px; left: 2px; right: 2px;
  font-size: 10px; line-height: 1.2; color: #fff;
  background: rgba(0,0,0,0.65); padding: 2px 4px; border-radius: 6px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-tag.pending { color: #ffd666; }
.mixcut-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; margin: 0; }
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--accent); transition: width .5s; }

/* ===== 尽调向导 ===== */
.dd-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dd-progress-bar { flex: 1; height: 8px; background: rgba(0,0,0,0.06); border-radius: 4px; overflow: hidden; }
.dd-progress-bar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s ease; }
.dd-progress-text { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 38px; }

.dd-steps { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.dd-step {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff; color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.dd-step:hover { border-color: var(--primary); color: var(--primary); }
.dd-step.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.dd-step.done { background: #f0faf3; border-color: #b7e6c9; color: #1a7f4b; }

.dd-nav { display: flex; gap: 10px; margin-bottom: 16px; }
.dd-nav .btn { flex: 1; }

/* ===== 视频类型 ===== */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.type-btn {
  padding: 14px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff; color: var(--text);
  cursor: pointer;
  transition: all .2s;
}
.type-btn:hover { border-color: var(--primary); color: var(--primary); }
.type-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.type-btn .type-name { display: block; font-size: 14px; font-weight: 600; }
.type-btn .type-tag {
  display: inline-block; margin-top: 6px;
  font-size: 11px; font-weight: 500; line-height: 1.5;
  padding: 2px 8px; border-radius: 999px;
}
.type-tag.mode-avatar { background: #e8f5ee; color: #1a7f4b; }
.type-tag.mode-hybrid { background: #fff7e6; color: #b76e00; }
.type-tag.mode-shoot  { background: #e8f1fe; color: #1a56db; }

/* ===== 创作目标引导 ===== */
.goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.goal-btn {
  padding: 12px 8px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff; color: var(--text);
  cursor: pointer;
  transition: all .2s;
}
.goal-btn:hover { border-color: var(--primary); color: var(--primary); }
.goal-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.type-btn.recommended {
  box-shadow: 0 0 0 2px var(--primary);
  border-color: var(--primary);
  position: relative;
}
.type-btn.recommended::after {
  content: "推荐";
  position: absolute; top: -8px; right: -6px;
  font-size: 10px; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: 2px 6px; border-radius: 999px;
}

/* ===== 级联选择（导航型行业分类） ===== */
.cascade-wrap { display: flex; flex-direction: column; gap: 6px; }
.cascade-wrap select { width: 100%; box-sizing: border-box; }

/* ===== 生产方式引导 + 发布包 ===== */
.prod-guide { padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.65; margin-bottom: 14px; }
.prod-guide.mode-avatar { background: #e8f5ee; color: #1a7f4b; }
.prod-guide.mode-hybrid { background: #fff7e6; color: #b76e00; }
.prod-guide.mode-shoot  { background: #e8f1fe; color: #1a56db; }
.publish-box { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.publish-pkg { margin-top: 12px; }
.pp-item { display: flex; gap: 12px; margin-bottom: 10px; align-items: flex-start; }
.pp-label { flex: 0 0 62px; font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 2px; }
.pp-val { flex: 1; font-size: 13px; background: #f5f5f7; padding: 8px 12px; border-radius: 10px; line-height: 1.6; }
.pp-val.pre { white-space: pre-wrap; }

/* ===== 结果展示 ===== */
.result-card { margin-top: 4px; }
.note { font-size: 13px; color: var(--muted); padding: 12px 14px; background: #f5f5f7; border-radius: 12px; margin-bottom: 12px; }

.result-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; margin-top: 18px; }
.cover-side { position: sticky; top: 140px; align-self: start; }
.cover-side img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); }
.cover-caption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.cover-template-select { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; background: var(--card); color: var(--ink); }
.cover-tpl-grid { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.cover-tpl-item { width: 74px; height: 96px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.cover-tpl-item.active { border-color: var(--accent); }
.cover-title-input { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; background: var(--card); color: var(--ink); }
.cover-person-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.script-title { font-size: 18px; font-weight: 700; margin: 4px 0 14px; letter-spacing: -0.2px; }
.revise-box { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }
.revise-row { display: flex; gap: 8px; align-items: center; }
.revise-row input { flex: 1; margin: 0; }
.revise-row .btn { margin-top: 0; flex-shrink: 0; white-space: nowrap; }
.revise-row .btn.ghost { padding: 0 12px; }
#reviseStatus { margin-top: 8px; }

#cover { width: 100%; border-radius: 16px; }
#detailImg, #video { width: 100%; border-radius: 16px; margin-top: 10px; box-shadow: var(--shadow); }
#video { background: #000; }

/* ===== 评分 ===== */
.score-box { font-size: 14px; font-weight: 700; color: var(--ink); padding: 14px 16px; background: #f5f5f7; border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; margin: 12px 0; }
.score-row { display: flex; align-items: center; gap: 10px; margin: 7px 0 3px; font-size: 13px; }
.score-name { width: 72px; flex-shrink: 0; color: var(--muted); }
.score-bar { flex: 1; height: 8px; background: rgba(0,0,0,0.06); border-radius: 4px; overflow: hidden; }
.score-fill { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s ease; }
.score-val { width: 32px; text-align: right; font-weight: 700; }
.score-comment { font-size: 12px; color: var(--muted); margin: 0 0 8px 82px; }

/* ===== 合规 / AI味 ===== */
.compliance { font-size: 13px; padding: 12px 14px; border-radius: 14px; margin: 12px 0; line-height: 1.6; }
.compliance.ok { background: #f0faf3; color: #1a7f4b; border: 1px solid #b7e6c9; }
.compliance.warn { background: #fff7ed; color: #c05621; border: 1px solid #fed7aa; font-weight: 600; }
.compliance-cat { margin-top: 8px; font-size: 13px; color: #c05621; }
.compliance-hit { font-size: 12.5px; color: var(--muted); margin: 3px 0 3px 8px; }
.compliance-hit .cw { color: #d92d20; font-weight: 700; }
.compliance-hit .cc { color: #98a0ab; }
.compliance-sug { font-size: 12.5px; color: #8a6d1a; background: #fffbeb; border: 1px solid #f5e6b8; border-radius: 10px; padding: 8px 12px; margin: 6px 0 10px 8px; }

/* ===== 对标 / 诊断 ===== */
.benchmark-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 16px; font-family: inherit; resize: vertical; margin-bottom: 12px; }
.asset-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.optimize-row { display: flex; gap: 10px; align-items: center; }
.optimize-row select { flex: 1; }

/* ===== 表格（脚本分镜表） ===== */
#scriptContent table, #diagnosisContent table, #benchmarkContent table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0;
}
#scriptContent th, #scriptContent td, #diagnosisContent th, #diagnosisContent td, #benchmarkContent th, #benchmarkContent td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top;
}
#scriptContent th, #diagnosisContent th, #benchmarkContent th { background: #f5f5f7; font-weight: 600; }
#scriptContent h3, #diagnosisContent h3, #benchmarkContent h3 { font-size: 16px; margin: 16px 0 8px; }
#scriptContent h4, #diagnosisContent h4 { font-size: 14px; margin: 12px 0 6px; }
#scriptContent p, #diagnosisContent p { font-size: 13.5px; line-height: 1.7; margin: 6px 0; }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px; }

/* ===== markdown 通用样式（策略/营销方案等 md-body） ===== */
.md-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.md-body th { background: #f5f5f7; font-weight: 600; }
.md-body h3 { font-size: 16px; margin: 16px 0 8px; }
.md-body h4 { font-size: 14px; margin: 12px 0 6px; }
.md-body p { font-size: 13.5px; line-height: 1.7; margin: 6px 0; }
.md-body li { font-size: 13.5px; line-height: 1.7; margin: 4px 0; }
.md-body ul, .md-body ol { padding-left: 20px; margin: 6px 0; }
.md-body blockquote { margin: 8px 0; padding: 10px 14px; background: #f5f5f7; border-left: 3px solid var(--primary); color: var(--muted); font-size: 13px; border-radius: 0 8px 8px 0; }
.md-body strong { font-weight: 600; }

/* ===== 内容库 ===== */
.lib-list { display: flex; flex-direction: column; gap: 12px; }
.lib-item { padding: 14px 16px; }
.lib-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-tag { background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.lib-vtype { background: #f0f0f2; color: var(--text); font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.lib-time { margin-left: auto; font-size: 11px; color: var(--muted); }
.lib-del { background: none; border: none; color: #d9534f; font-size: 12px; cursor: pointer; }
.lib-title { font-size: 15px; font-weight: 600; margin-top: 10px; }
.lib-content { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.lib-toggle { margin-top: 8px; background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; }

/* ===== 观察点 ===== */
.observe-box { margin-top: 12px; }
.obs-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.obs-avg { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.obs-suggestion { font-size: 13px; padding: 10px 12px; background: #fff8e6; border-left: 3px solid #f0a500; border-radius: 8px; line-height: 1.6; }

/* ===== 新手引导 ===== */
.guide-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.guide-overlay.hidden { display: none; }
.guide-card {
  background: #fff;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  padding: 32px 28px 24px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: guideIn .35s ease;
}
@keyframes guideIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.guide-skip { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.guide-skip:hover { color: var(--ink); }
.guide-step { display: none; text-align: center; }
.guide-step.active { display: block; animation: fade .25s ease; }
.guide-emoji { font-size: 44px; margin-bottom: 12px; }
.guide-step h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 12px; color: var(--ink); }
.guide-lead { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.guide-video { width: 100%; max-height: 300px; border-radius: 12px; background: #000; margin-bottom: 16px; object-fit: contain; }
.guide-list { text-align: left; font-size: 14px; line-height: 1.8; padding-left: 20px; margin: 0 auto 16px; max-width: 420px; }
.guide-list li { margin: 6px 0; }
.guide-list .req { color: #ff3b30; font-style: normal; font-weight: 700; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 16px; }
.guide-table th, .guide-table td { border: 1px solid var(--border); padding: 9px 10px; text-align: center; }
.guide-table th { background: #f5f5f7; font-weight: 600; }
.guide-table td:first-child { text-align: left; font-weight: 500; }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.guide-nav .btn { flex: 1; }
.guide-dots { display: flex; gap: 6px; }
.guide-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all .2s; }
.guide-dots .dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* ===== 响应式 ===== */
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .result-grid { grid-template-columns: 1fr; }
  .cover-side { position: static; max-width: 280px; margin: 0 auto; }
  .topbar { padding: 10px 14px; }
  .brand-text h1 { font-size: 14px; }
  .brand-text p { display: none; }
  .topbar-right { gap: 6px; }
  .topbar-right .pill { display: none; }
  #guideBtn, .logout-btn { padding: 5px 10px; font-size: 11px; }
  .content { padding: 18px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .service-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  .tabs { padding: 0 12px; }
}


/* ===== 推荐广场 ===== */
.tpl-card { margin-bottom: 12px; }
.tpl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tpl-tag { background: #f0f0f0; color: #666; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.tpl-data { font-size: 13px; color: #ff6b35; margin-bottom: 8px; }
.tpl-script { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.tpl-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 方法论 ===== */
.method-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.method-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 16px; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.method-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.method-title { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 6px; }
.method-desc { font-size: 13px; color: #666; line-height: 1.6; }

/* ===== 在线客服 ===== */
.service-fab {
  position: fixed; right: 16px; bottom: 88px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  font-size: 24px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,113,227,.35);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.service-fab:hover { transform: scale(1.06); }
.service-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 950;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.service-modal.hidden { display: none; }
.service-card {
  background: #fff; border-radius: 16px;
  max-width: 360px; width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  animation: guideIn .3s ease;
}
.service-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.service-head h3 { font-size: 16px; font-weight: 700; }
.service-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.service-body { padding: 18px; }
.service-intro { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.service-item { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 12px 0; }
.service-item a { color: var(--primary); text-decoration: none; font-weight: 600; }
.service-qr { text-align: center; margin: 16px 0 6px; }
.service-qr img { width: 160px; height: 160px; border-radius: 12px; border: 1px solid var(--border); }
.service-qr p { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ===== 隐私提示 ===== */
.privacy-note {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f0f7ff; border: 1px solid #d6e8ff;
  border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: #555; line-height: 1.7;
  margin-bottom: 16px;
}
.privacy-note a { color: var(--primary); text-decoration: none; font-weight: 600; }
.privacy-detail { margin-top: 8px; }
.privacy-detail ul { padding-left: 0; list-style: none; }
.privacy-detail li { margin: 6px 0; }
.privacy-detail.hidden { display: none; }

/* ===== 首屏快速开始 ===== */
.quick-start {
  background: linear-gradient(135deg, #f0f7ff, #e8f3ff);
  border: 1px solid #d6e8ff;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin-bottom: 18px;
}
.quick-start-btn { width: 100%; font-size: 16px; font-weight: 700; padding: 14px 20px; }
.quick-start-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.quick-title { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.quick-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.quick-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; text-align: left; }
.quick-fields input, .quick-fields select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; font-size: 16px; font-family: inherit; background: #fff;
}
.quick-note {
  background: #fff8e6; border: 1px solid #f5e6b8; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; color: #8a6d1a; margin: 12px 0; text-align: left;
}
#quickOutput { text-align: left; margin-top: 12px; }
.quick-demo-link { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.quick-demo-link a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ===== 深度版解锁 ===== */
.pro-upsell {
  margin-top: 16px;
  background: linear-gradient(135deg, #fff8e6, #fff3d6);
  border: 1px solid #f5e6b8;
  border-radius: 14px;
  padding: 16px 18px;
}
.pro-upsell-head { font-size: 15px; font-weight: 700; color: #8a6d1a; margin-bottom: 6px; }
.pro-upsell-lead { font-size: 13px; color: #6b5a1f; line-height: 1.6; margin-bottom: 8px; }
.pro-upsell-list { font-size: 13px; color: #6b5a1f; padding-left: 18px; margin-bottom: 12px; }
.pro-upsell-list li { margin: 4px 0; }

/* ===== 客户见证（社会证明） ===== */
.social-proof {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.social-proof-head { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.social-proof-item {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: #555; line-height: 1.6;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.social-proof-item:last-child { border-bottom: none; }
.social-proof-item .sp-icon { flex-shrink: 0; }

/* ===== 模型展示（内测平台统一配置） ===== */
.model-show { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.model-show-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--primary-soft);
  border-radius: 10px; font-size: 13px;
}
.ms-label { color: var(--muted); }
.ms-model { color: var(--ink); font-weight: 600; }

/* ===== 移动端：禁用毛玻璃 backdrop-filter（避免滚动抖动/飘动）+ 避免 iOS 字体缩放跳动 ===== */
@media (max-width: 768px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,0.96); }
  html { -webkit-text-size-adjust: 100%; }
}

/* ===== 等级锁定态（air/pro/max 分级） ===== */
.tab.locked { opacity: 0.55; }
.tab-lock {
  display: inline-block; margin-left: 5px;
  font-size: 10px; font-weight: 600; line-height: 1;
  padding: 2px 6px; border-radius: 999px;
  background: #ffb020; color: #fff;
  vertical-align: 1px;
}
.tab.locked .t-ico { opacity: 0.6; }

/* ===== 桌面端侧边栏（移动端默认隐藏） ===== */
.sidebar { display: none; }

/* ===== 桌面端（≥1024px）：深色侧边栏 + 宽屏科技感布局 ===== */
@media (min-width: 1024px) {
  body { padding-left: 240px; }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    z-index: 100;
    background: linear-gradient(180deg, #0f1419 0%, #161b22 100%);
    color: #fff;
    padding: 28px 16px 20px;
    box-shadow: 2px 0 24px rgba(0,0,0,0.18);
  }
  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .sidebar-brand .logo { width: 40px; height: 40px; font-size: 20px; border-radius: 11px; }
  .sidebar-brand .brand-text h1 { color: #fff; font-size: 15px; }
  .sidebar-brand .brand-text p { color: #8b949e; }
  .logo-glow { background: linear-gradient(135deg, #0071e3, #5ac8fa); color: #fff; box-shadow: 0 0 20px rgba(0,113,227,0.5); }
  .sidebar-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; flex: 1; }
  .sidebar-nav .bn-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 12px 14px;
    border: none; border-radius: 10px;
    background: transparent; color: #c9d1d9;
    font-size: 15px; font-weight: 500; cursor: pointer;
    text-align: left; transition: all .18s;
    border-left: 3px solid transparent;
  }
  .sidebar-nav .bn-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .sidebar-nav .bn-item.active {
    background: rgba(0,113,227,0.16);
    color: #fff;
    border-left-color: #0071e3;
  }
  .sidebar-nav .bn-ico { font-size: 18px; }
  .sidebar-foot { padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .sidebar-tier { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8b949e; }
  .tier-dot { width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 8px rgba(48,209,88,0.7); }
  .sidebar-slogan { font-size: 12px; color: #6e7681; margin-top: 10px; }
  .bottom-nav { display: none; }
  .topbar { position: sticky; top: 0; z-index: 90; }
  .topbar .brand { display: none; }
  .content { max-width: 1280px; padding: 32px 40px 80px; }
}

/* ===== 策略选题（一键生成文案） ===== */
.strategy-topics { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.st-head { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.st-col { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.st-topic { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.st-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.st-txt { flex: 1; font-size: 14px; color: var(--text); line-height: 1.5; }
.btn.small { padding: 5px 12px; font-size: 12px; }

/* 出镜形象预览（内置人物资产库） */
.avatar-preview{display:flex;gap:14px;align-items:center;margin:10px 0 16px;padding:12px;border-radius:14px;background:var(--accent,#f5f5f7);border:1px solid var(--border,#e5e5ea)}
.avatar-preview img{width:84px;height:150px;object-fit:cover;object-position:top center;border-radius:10px;flex:0 0 auto;background:#ddd}
.avatar-preview .avatar-meta{min-width:0}
.avatar-preview .avatar-name{font-weight:600;font-size:16px;margin-bottom:4px}
.avatar-preview .avatar-desc{font-size:13px;line-height:1.5;color:var(--muted-foreground,#6e6e73)}
.avatar-preview .avatar-voice{font-size:13px;margin-top:6px;color:var(--accent-strong,#0071e3)}

/* 跳转反馈：轻提示条 + 面板高亮闪烁 + 评析结论徽标 */
.app-toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));transform:translate(-50%,16px);z-index:999;max-width:88vw;padding:10px 18px;border-radius:999px;background:rgba(0,0,0,.82);color:#fff;font-size:13px;line-height:1.4;opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease}
.app-toast.show{opacity:1;transform:translate(-50%,0)}
@media (min-width:1024px){.app-toast{bottom:40px}}
@keyframes panelFlash{0%{box-shadow:0 0 0 0 rgba(0,113,227,.45);background-color:rgba(0,113,227,.06)}70%{box-shadow:0 0 0 10px rgba(0,113,227,0);background-color:rgba(0,113,227,.02)}100%{box-shadow:0 0 0 0 rgba(0,113,227,0)}}
.flash-in{animation:panelFlash 1.1s ease-out}
.tab-panel.active{animation:panelFadeIn .28s ease-out}
@keyframes panelFadeIn{from{opacity:.35;transform:translateY(6px)}to{opacity:1;transform:none}}
.verdict-badge{margin:0 0 12px;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.5}
.verdict-badge.ok{background:rgba(52,199,89,.12);border:1px solid rgba(52,199,89,.35)}
.verdict-badge.warn{background:rgba(255,159,10,.12);border:1px solid rgba(255,159,10,.35)}
.verdict-badge.bad{background:rgba(255,59,48,.12);border:1px solid rgba(255,59,48,.35)}

/* 主输入框下方示例说明 */
.ai-input-hint{margin:6px 2px 12px;font-size:13px;line-height:1.5;color:var(--muted-foreground,#6e6e73)}
