* { box-sizing: border-box; }
:root {
  --brand: #1f6feb; --brand-d: #0b4ea2; --brand-l: #e8f1ff;
  --bg: #f6f8fa; --card: #ffffff; --line: #d8dee4; --line-l: #eaeef2;
  --tx: #1f2328; --tx2: #57606a; --tx3: #8b949e;
  --ok: #1a7f5a; --warn: #b45309; --err: #cf222e;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--tx); font-size: 15px; line-height: 1.6;
}
button, input, select, textarea { font-family: inherit; font-size: 15px; }
a { color: var(--brand); text-decoration: none; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; }
.login-logo { font-size: 30px; font-weight: 600; letter-spacing: 2px; text-align: center; }
.login-sub { text-align: center; color: var(--tx2); font-size: 13px; margin: 6px 0 26px; }

/* 布局 */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 18px; }
.logo { font-size: 19px; font-weight: 600; letter-spacing: 1px; }
.logo small { font-size: 11px; color: var(--tx3); font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav button { background: none; border: 0; padding: 7px 14px; border-radius: 7px; cursor: pointer; color: var(--tx2); }
.nav button.on { background: var(--brand-l); color: var(--brand-d); font-weight: 500; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx2); }
.user-chip b { color: var(--tx); font-weight: 500; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }

/* 通用控件 */
.btn { background: var(--brand); color: #fff; border: 0; padding: 9px 18px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--brand-d); }
.btn:disabled { background: #b9c3cd; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--tx); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f3f5f7; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--err); border: 1px solid #f0c2c2; }
.btn.danger:hover { background: #fff5f5; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card .desc { color: var(--tx2); font-size: 13px; margin: 0 0 16px; }
label { display: block; font-size: 13px; color: var(--tx2); margin: 0 0 5px; }
label .req { color: var(--err); }
.inp, textarea.inp, select.inp {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--tx);
}
.inp:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
textarea.inp { min-height: 78px; resize: vertical; line-height: 1.6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--tx3); margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--tx2); font-size: 13px; }
.empty { text-align: center; padding: 60px 20px; color: var(--tx3); }

/* 步骤条 */
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps .st { flex: 1; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.steps .st .n { font-size: 12px; color: var(--tx3); }
.steps .st .t { font-size: 14px; font-weight: 500; }
.steps .st.on { border-color: var(--brand); background: var(--brand-l); }
.steps .st.on .t { color: var(--brand-d); }
.steps .st.done .n::after { content: " ✓"; color: var(--ok); }

/* 输出区 */
.out { border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 220px; }
.out-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-l); background: #fbfcfd; border-radius: 10px 10px 0 0; }
.out-bar .ttl { font-size: 13px; font-weight: 500; }
.out-body { padding: 18px 20px; }
.out-body.md h1 { font-size: 21px; margin: 22px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line-l); }
.out-body.md h1:first-child { margin-top: 0; }
.out-body.md h2 { font-size: 18px; margin: 24px 0 10px; color: var(--brand-d); }
.out-body.md h3 { font-size: 15px; margin: 18px 0 8px; }
.out-body.md p { margin: 9px 0; }
.out-body.md ul, .out-body.md ol { padding-left: 22px; margin: 9px 0; }
.out-body.md li { margin: 4px 0; }
.out-body.md table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13.5px; display: block; overflow-x: auto; }
.out-body.md th, .out-body.md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.out-body.md th { background: #f2f5f8; }
.out-body.md code { background: #f2f4f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.out-body.md hr { border: 0; border-top: 1px solid var(--line-l); margin: 20px 0; }
.out-body.md blockquote { margin: 10px 0; padding: 6px 14px; border-left: 3px solid var(--brand); background: #f8fafd; color: var(--tx2); }
.cursor { display: inline-block; width: 7px; height: 15px; background: var(--brand); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 方案库 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tag-chip { padding: 4px 11px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; color: var(--tx2); }
.tag-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.case-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.case-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.case-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(31,111,235,.08); }
.case-card .ct { font-weight: 500; font-size: 15px; }
.case-card .cm { font-size: 12.5px; color: var(--tx2); }
.case-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.mini-tag { font-size: 11.5px; background: var(--brand-l); color: var(--brand-d); padding: 2px 8px; border-radius: 4px; }
.prog { display: flex; gap: 4px; }
.prog i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.prog i.on { background: var(--ok); }

/* 弹层 */
.mask { position: absolute; inset: 0; background: rgba(15,22,30,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; max-width: 900px; width: 100%; padding: 22px; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: #1f2328; color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 9999; font-size: 14px; max-width: 88vw; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.warn-box { background: #fff8e6; border: 1px solid #f2d98c; color: #7a5b10; padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.err-box { background: #fff5f5; border: 1px solid #f0c2c2; color: var(--err); padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tb th, table.tb td { border-bottom: 1px solid var(--line-l); padding: 9px 8px; text-align: left; }
table.tb th { color: var(--tx2); font-weight: 500; font-size: 13px; }

@media (max-width: 720px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .topbar-in { gap: 10px; }
  .nav { overflow-x: auto; }
  .wrap { padding: 14px 12px 50px; }
}

/* ===== 可视化预览区 ===== */
.vis { margin: 0 12px 14px; border: 1px solid var(--bd, #e6e7ea); border-radius: 10px; background: #fafbfc; overflow: hidden; }
.vis-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f2f4f6; border-bottom: 1px solid #e6e7ea; font-size: 13px; }
.vis-bar b { font-weight: 600; }
.vis-bar .muted { font-size: 12px; }
.vis-h { margin: 18px 14px 10px; font-size: 14px; font-weight: 600; }
.grid-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 0 14px; }
.ph-card { background: #fff; border: 1px solid #e8e9ec; border-radius: 10px; padding: 12px; }
.ph-stage { background: #eef0f3; border-radius: 8px; padding: 10px; display: flex; align-items: center; justify-content: center; min-height: 96px; }
.ph-box { width: 100%; max-height: 120px; background: linear-gradient(160deg, #fff, #e8eaee); border: 1px solid #d8dae0; border-radius: 6px; display: flex; align-items: center; justify-content: center; text-align: center; }
.ph-tag { font-size: 11px; color: #6a6a70; padding: 4px; line-height: 1.4; }
.ph-meta { margin-top: 10px; }
.ph-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; gap: 6px; }
.ph-size { color: #c9302c; font-size: 12px; font-weight: 600; margin-top: 3px; }
.ph-desc { color: #6a6a70; font-size: 12px; line-height: 1.55; margin-top: 5px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #eceef1; color: #6a6a70; font-weight: 500; white-space: nowrap; }
.pill.hot { background: #fdecec; color: #c9302c; }
.pill.warm { background: #fff4e5; color: #b06a10; }
.grid-cr { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 14px; }
.cr-card { background: #fff; border: 1px solid #e8e9ec; border-radius: 10px; padding: 12px 14px; }
.cr-h { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed #e8e9ec; }
.cr-q { font-size: 11px; color: #c9302c; background: #fdecec; padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.cr-line { font-size: 12px; color: #3a3a3f; margin-top: 7px; line-height: 1.6; }
.cr-line i { display: inline-block; width: 34px; color: #9a9aa0; font-style: normal; }
.fm-wrap { padding: 0 14px 4px; }
.fm { max-width: 360px; background: #fff; border: 1px solid #e8e9ec; border-radius: 12px; padding: 18px; }
.fm-title { font-size: 17px; font-weight: 700; }
.fm-sub { color: #8a8a90; font-size: 12px; margin: 4px 0 14px; }
.fm-row { margin-bottom: 11px; }
.fm-row label { display: block; font-size: 12px; font-weight: 600; color: #3a3a3f; margin-bottom: 4px; }
.fm-in, .fm-ta, .fm-sel { border: 1px solid #e2e3e6; border-radius: 8px; padding: 9px 11px; font-size: 13px; color: #a8a8ae; background: #fbfbfc; }
.fm-ta { min-height: 62px; }
.fm-sel { display: flex; justify-content: space-between; }
.fm-radio { display: flex; gap: 14px; font-size: 13px; color: #7a7a80; }
.fm-radio .on { color: #c9302c; font-weight: 600; }
.fm-btn { text-align: center; background: #c9302c; color: #fff; border-radius: 8px; padding: 11px; font-weight: 600; font-size: 14px; }
.fm-priv { font-size: 11px; color: #a0a0a6; text-align: center; margin-top: 9px; }
.lp-frame { padding: 16px 14px; background: #e9eaee; }
.lp-frame .lp { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); border-radius: 4px; }
/* ---- 案例视频库 ---- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.vcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.vcard:hover { border-color: var(--brand); box-shadow: 0 3px 12px rgba(31, 111, 235, .1); }
.vthumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #1f6feb, #6aa4ff);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vthumb.noimg { background: linear-gradient(135deg, #2b3550, #5a6b8c); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-init { color: #fff; font-size: 24px; font-weight: 600; letter-spacing: 2px; }
.vthumb::after { content: '▶'; position: absolute; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .38);
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  right: 10px; bottom: 10px; pointer-events: none; }
.vbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.vbody .vt { font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.vbody .vm { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--tx2); }
.vhook { font-size: 12.5px; color: var(--tx2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.vtags { display: flex; flex-wrap: wrap; gap: 5px; }
.vis-tip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 14px 14px; padding: 10px 13px;
  border: 1px dashed var(--line); border-radius: 9px; background: #fbfcfe; font-size: 13px; color: var(--tx2); }
.vis-in { padding: 0 14px 14px; }
@media (max-width: 720px) {
  .grid-ph, .grid-cr { grid-template-columns: 1fr; }
  .vis-bar { flex-wrap: wrap; }
  .vgrid { grid-template-columns: 1fr; }
}
