/* ================================================================
   文案板块 · 笔记润色 / 文案仿写（2026-09-15 · 开发员13号）
   独立样式表：刻意不写进 437KB 的 style.css，避免与同事并发互相覆盖。
   全部沿用根变量（--primary / --grad / --card / --text / --radius），视觉与站内一致。
   ⚠️ 注释里禁止出现星号加斜杠的序列，会提前结束注释吞掉后面的规则。
   ================================================================ */

/* ---------- 步骤卡片 ---------- */
.ct-step {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(249, 89, 1, 0.08);
}
.ct-step-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ct-step-no {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--grad);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(249, 89, 1, 0.3);
}
.ct-step-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ct-step-req {
  font-size: 11px; font-weight: 600; color: #fff;
  background: var(--primary-light);
  padding: 2px 7px; border-radius: 999px;
}
.ct-step-opt {
  font-size: 11px; font-weight: 500; color: var(--text2);
  background: var(--chip-bg);
  padding: 2px 7px; border-radius: 999px;
}
.ct-step-tip { font-size: 12px; color: var(--text2); line-height: 1.6; margin-bottom: 10px; }

/* ---------- 单选 / 多选胶囊 ---------- */
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip {
  border: none; cursor: pointer; font-family: inherit;
  background: var(--chip-bg); color: var(--text);
  font-size: 13.5px; font-weight: 500;
  padding: 8px 15px; border-radius: 999px;
  transition: transform 0.12s, background 0.18s, box-shadow 0.18s;
}
.ct-chip:active { transform: scale(0.95); }
.ct-chip.on {
  background: var(--grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(249, 89, 1, 0.32);
}
.ct-chip-note { font-size: 11.5px; color: var(--text2); font-weight: 400; }

/* ---------- 档位说明条（选哪个档，解释随动） ---------- */
.ct-note {
  margin-top: 11px;
  font-size: 12.5px; line-height: 1.65; color: var(--text2);
  background: #fff8f3;
  border-left: 3px solid var(--primary-light);
  border-radius: 0 10px 10px 0;
  padding: 9px 12px;
}
.ct-note b { color: var(--primary); font-weight: 600; }

/* ---------- 输入 ---------- */
.ct-input {
  width: 100%; border: none; outline: none; font-family: inherit;
  background: #fff5ee; border-radius: 14px;
  padding: 13px 14px; font-size: 15px; color: var(--text);
  line-height: 1.6;
}
.ct-input::placeholder { color: #c9b4a5; }
.ct-count { font-size: 11.5px; color: var(--text2); text-align: right; margin-top: 6px; }
.ct-count.over { color: var(--danger); font-weight: 600; }

/* ---------- 生成按钮 ---------- */
.ct-gen { margin-top: 14px; }
.ct-gen .gen-btn { width: 100%; letter-spacing: 1px; }
.ct-gen .gen-btn:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

/* ---------- 等待进度（渐近，不假造百分比） ---------- */
.ct-loading { padding: 18px 4px 6px; text-align: center; }
.ct-loading-row { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13.5px; color: var(--text2); }
.ct-spin {
  width: 15px; height: 15px;
  border: 2px solid #ffd9c2; border-top-color: var(--primary);
  border-radius: 50%; animation: ct-spin 0.8s linear infinite;
}
@keyframes ct-spin { to { transform: rotate(360deg); } }
.ct-prog { height: 4px; background: #ffeede; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.ct-prog i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width 0.7s ease; }

/* ---------- 错误提示 ---------- */
.ct-err {
  margin-top: 12px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px;
  padding: 11px 13px; font-size: 13px; line-height: 1.6; color: #b91c1c;
}

/* ---------- 结果卡片 ---------- */
.ct-res {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-top: 14px;
  box-shadow: 0 2px 10px rgba(249, 89, 1, 0.1);
}
.ct-res-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ct-res-title { font-size: 14.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.ct-copy {
  border: none; cursor: pointer; font-family: inherit; flex: none;
  background: var(--chip-bg); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; transition: all 0.15s;
}
.ct-copy:active { transform: scale(0.95); }
.ct-copy.done { background: #dcfce7; color: #15803d; }

/* ---------- 标题候选 ---------- */
.ct-titlebox { background: #fff8f3; border-radius: 12px; padding: 13px 14px; }
.ct-title-main { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.55; }
.ct-title-alt { margin-top: 9px; padding-top: 9px; border-top: 1px dashed #ffe0cc; font-size: 13px; color: var(--text2); line-height: 1.75; }
.ct-title-alt span { color: var(--text); }

/* ---------- 正文 ---------- */
.ct-body { font-size: 15px; line-height: 1.9; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* ---------- 话题标签 ---------- */
.ct-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ct-tag {
  background: #fff1e7; color: #c2410c;
  font-size: 12.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- 改动要点 ---------- */
.ct-points { margin: 0; padding: 0; list-style: none; }
.ct-points li {
  position: relative; padding: 9px 0 9px 17px;
  font-size: 13.5px; line-height: 1.7; color: var(--text);
  border-bottom: 1px dashed #ffe6d3;
}
.ct-points li:last-child { border-bottom: none; padding-bottom: 0; }
.ct-points li:before {
  content: ''; position: absolute; left: 3px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light);
}
.ct-points li em { font-style: normal; font-weight: 600; color: var(--primary); }

/* ---------- 结构拆解表 ---------- */
.ct-dc { border: 1px solid #ffe6d6; border-radius: 13px; overflow: hidden; }
.ct-dc-row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 11px 12px; border-bottom: 1px solid #fff1e7; }
.ct-dc-row:last-child { border-bottom: none; }
.ct-dc-row:nth-child(odd) { background: #fffaf6; }
.ct-dc-seg { font-size: 12px; color: var(--text2); font-weight: 600; }
.ct-dc-fn { font-size: 13.5px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.ct-dc-what { font-size: 13px; line-height: 1.65; color: var(--text); }
.ct-dc-how { font-size: 12.5px; line-height: 1.65; color: var(--text2); margin-top: 5px; }
.ct-dc-how:before { content: '↳ '; color: #f9a56b; }

/* ---------- 骨架公式 ---------- */
.ct-formula {
  margin-top: 12px;
  background: linear-gradient(135deg, #fff4ec 0%, #fffdfb 100%);
  border: 1px dashed #ffc9a8; border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px; font-weight: 700; line-height: 1.7; color: #b34700;
}
.ct-formula-label { display: block; font-size: 11.5px; font-weight: 600; color: #d9822b; letter-spacing: 0.5px; margin-bottom: 5px; }

/* ---------- 仿写稿切换 ---------- */
.ct-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.ct-tab {
  border: none; cursor: pointer; font-family: inherit;
  background: var(--chip-bg); color: var(--text2);
  font-size: 13px; font-weight: 600;
  padding: 7px 15px; border-radius: 999px; transition: all 0.15s;
}
.ct-tab.on { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(249, 89, 1, 0.28); }

/* ---------- 护栏提示 ---------- */
.ct-warn {
  margin-top: 11px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px;
  padding: 11px 13px; font-size: 12.5px; line-height: 1.7; color: #9a3412;
}
.ct-warn b { color: #c2410c; }
.ct-pill {
  display: inline-block; background: #ffedd5; border-radius: 6px;
  padding: 1px 7px; margin: 3px 5px 0 0; font-weight: 600; color: #9a3412;
}
.ct-selfcheck {
  margin-top: 11px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 11px 13px;
  font-size: 12.5px; line-height: 1.7; color: #475569;
}

/* ---------- 结果分区小标题 ---------- */
.ct-sec-title {
  font-size: 12.5px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.6px;
  display: flex; align-items: center; gap: 7px;
  margin: 16px 0 9px;
}
.ct-sec-title:first-child { margin-top: 0; }
.ct-sec-title:after { content: ''; flex: 1; height: 1px; background: #ffe6d6; }

/* ---------- 空态 ---------- */
.ct-empty { text-align: center; padding: 26px 10px; color: var(--text2); font-size: 13px; line-height: 1.8; }
.ct-empty-ico { font-size: 26px; display: block; margin-bottom: 8px; opacity: 0.6; }
