/* 提取文案 · 样式（视频板块 · 2026-09-19 升级）
 * ===========================================================================
 * 设计原则：
 *   · **一屏只问一件事**：上来先是"你从哪给我"（粘贴 / 上传），然后是主动作，然后才是结果。
 *   · 主次必须分明：**整理稿是主角**（大字、宽行距、独立卡片），
 *     原视频标题是上下文（小字、灰），未整理的原话**折叠**起来（可查但不抢视线）。
 *   · 进度**用真实步骤清单，不用假百分比** —— 上游不告诉我们进度，我们就不编。
 *   · 存疑词（[方括号]）用琥珀底高亮 —— 这是要用户**核对**的东西，不能被淹没在正文里。
 *   · 品牌橙 #f95901 只用在主按钮上。
 *   · 全部 .pk- 前缀；本文件必须排在 style.css 之后加载。
 *   · 🔴 底部留白 92px：站内 TabBar 是 fixed 的，不留最后一条会被压住看不见。
 *   · 🔴 前缀 pk- 上线前已 grep 过 style.css 与全部 css：无占用（vc- 那次撞车不能再犯）。
 */

.pk-root {
  position: relative;
  padding-bottom: 92px;
}

/* ============================================================ 一、输入区 */

.pk-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 14px rgba(58, 42, 30, .05);
}

/* 分段控件：粘贴链接 / 上传视频 */
.pk-seg {
  display: flex;
  gap: 4px;
  background: #f6f1ec;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 14px;
}

.pk-seg button {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  font-family: inherit;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pk-seg button.on {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(58, 42, 30, .1);
}

.pk-seg button.on .pk-seg-ico { transform: scale(1.08); }
.pk-seg-ico { font-size: 15px; line-height: 1; }

/* 贴链接 */
.pk-url {
  width: 100%;
  box-sizing: border-box;
  min-height: 92px;
  border: 1.5px solid #eee4da;
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  background: #fffdfb;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.pk-url:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(249, 89, 1, .09);
}

.pk-url::placeholder { color: #bcae9f; }

.pk-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pk-mini {
  border: 1.5px solid #eee4da;
  background: #fffdfb;
  border-radius: 11px;
  padding: 8px 13px;
  font-size: 13px;
  color: var(--text2);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}

.pk-mini:hover { border-color: #dccec0; color: var(--text); }

/* 上传投放区 —— 🔴 input[type=file] 必须藏在 label 里，手机才点得到 */
.pk-drop {
  display: block;
  border: 1.8px dashed #e6d8c9;
  border-radius: 16px;
  padding: 26px 18px;
  text-align: center;
  background: #fffdfb;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}

.pk-drop:hover, .pk-drop.over {
  border-color: var(--primary-light);
  background: #fff8f3;
}

.pk-drop input[type=file] { display: none; }
.pk-drop-ico { font-size: 30px; line-height: 1; margin-bottom: 9px; }
.pk-drop-t { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.pk-drop-s { font-size: 12.5px; color: var(--text2); line-height: 1.75; }

/* 已选中的文件 */
.pk-file {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1.5px solid #e9dfd3;
  border-radius: 14px;
  padding: 11px 13px;
  background: #fffdfb;
}

.pk-file-ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff1e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.pk-file-b { flex: 1 1 auto; min-width: 0; }
.pk-file-n {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pk-file-m { font-size: 12px; color: var(--text2); margin-top: 3px; }
.pk-file-x {
  flex: 0 0 auto;
  border: 0;
  background: #f6f1ec;
  color: var(--text2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* 主动作 */
.pk-go {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 15px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(249, 89, 1, .26);
  transition: transform .12s, box-shadow .18s, opacity .18s;
}

.pk-go:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(249, 89, 1, .22); }
.pk-go[disabled] { opacity: .55; cursor: default; box-shadow: none; }

.pk-hint {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.75;
  margin: 10px 0 0;
  text-align: center;
}

/* 平台小标 */
.pk-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.pk-plat {
  font-size: 11.5px;
  color: var(--text2);
  background: #f7f2ec;
  border-radius: 8px;
  padding: 4px 9px;
  white-space: nowrap;
}

.pk-plat.more { background: #fff1e7; color: #c0560f; font-weight: 600; }

/* ============================================================ 二、进度（真实步骤，不编百分比） */

.pk-prog {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 14px rgba(58, 42, 30, .05);
}

.pk-prog-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.pk-prog-t { font-size: 15px; font-weight: 700; color: var(--text); }
.pk-prog-sec {
  font-size: 12.5px;
  color: var(--text2);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.pk-steps { position: relative; }

.pk-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-bottom: 16px;
}

.pk-step:last-child { padding-bottom: 0; }

/* 连接线：只画到下一个点，最后一条不画 */
.pk-step::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: #eee4da;
}

.pk-step:last-child::before { display: none; }

.pk-step-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eee4da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  transition: background .2s;
}

.pk-step-t {
  font-size: 14px;
  color: #b6a795;
  line-height: 1.5;
  padding-top: 1px;
}

/* 已完成 */
.pk-step.done .pk-step-dot { background: #34a853; }
.pk-step.done .pk-step-t { color: var(--text2); }

/* 进行中 */
.pk-step.now .pk-step-dot { background: var(--primary); }
.pk-step.now .pk-step-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(249, 89, 1, .45);
  animation: pk-pulse 1.4s ease-out infinite;
}
.pk-step.now .pk-step-t { color: var(--text); font-weight: 600; }

@keyframes pk-pulse {
  0%   { transform: scale(.85); opacity: .9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.pk-step-note {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.7;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed #f0e7dd;
}

/* ============================================================ 三、结果 */

/* 来源条：这是"上下文"，不是主角 —— 小字、灰 */
.pk-src {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 2px 12px;
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.6;
}

.pk-src-badge {
  background: #f2ece5;
  border-radius: 8px;
  padding: 3px 9px;
  font-weight: 600;
  color: #8a7667;
}

.pk-src-title {
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 主角卡 */
.pk-main {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(58, 42, 30, .06);
  overflow: hidden;
  margin-bottom: 14px;
}

.pk-main-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 11px;
  border-bottom: 1px solid #f4ece4;
}

.pk-main-l {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.pk-main-l .pk-tag {
  font-size: 11px;
  font-weight: 600;
  color: #2f7d4f;
  background: #e9f6ee;
  border-radius: 6px;
  padding: 2px 7px;
}

.pk-copy {
  flex: 0 0 auto;
  border: 0;
  background: #fff1e7;
  color: #c0560f;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
}

.pk-copy:active { background: #ffe3d0; }
.pk-copy.ok { background: #e9f6ee; color: #2f7d4f; }

.pk-body {
  padding: 16px;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: .2px;
}

.pk-body:empty::before {
  content: '（没有内容）';
  color: var(--text2);
  font-size: 14px;
}

/* 存疑词高亮 —— 这是要用户**核对**的东西，不能被正文淹没 */
.pk-mark {
  background: #fdf0d5;
  border-bottom: 2px solid #e8b34b;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
  cursor: help;
}

/* 存疑提示条 */
.pk-warn {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fffaf0;
  border: 1px solid #f2e0bb;
  border-radius: 13px;
  padding: 12px 13px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.75;
  color: #8a6116;
}

.pk-warn-ico { flex: 0 0 auto; font-size: 15px; }
.pk-warn b { color: #744f0d; }

/* 护栏拦下时的提示（更强） */
.pk-warn.red {
  background: #fff5f5;
  border-color: #f5d0d0;
  color: #a03232;
}
.pk-warn.red b { color: #8a2626; }

/* 折叠：看原话 */
.pk-fold {
  border-radius: 15px;
  background: var(--card);
  box-shadow: 0 1px 8px rgba(58, 42, 30, .04);
  margin-bottom: 14px;
  overflow: hidden;
}

.pk-fold-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text2);
  user-select: none;
}

.pk-fold-h .pk-fold-arrow { font-size: 11px; transition: transform .2s; }
.pk-fold.open .pk-fold-arrow { transform: rotate(180deg); }

.pk-fold-b {
  padding: 0 16px 15px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #9c8b7c;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.pk-fold-note {
  font-size: 12px;
  color: #b6a795;
  margin-bottom: 8px;
  line-height: 1.7;
}

/* 次要动作：改成我的口播稿 */
.pk-cta2 {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 14px rgba(58, 42, 30, .05);
  margin-bottom: 14px;
}

.pk-btn2 {
  width: 100%;
  border: 1.5px solid #f0d9c6;
  background: #fffaf6;
  color: #b25210;
  border-radius: 14px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}

.pk-btn2:hover { background: #fff4ea; border-color: var(--primary-light); }
.pk-btn2[disabled] { opacity: .5; cursor: default; }

.pk-cta2-note {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.75;
  margin: 10px 0 0;
  text-align: center;
}

/* 改写结果卡 —— 必须一眼看出"这不是原话" */
.pk-main.alt .pk-main-h { background: #fffaf3; }
.pk-main.alt .pk-main-l .pk-tag { color: #a8651a; background: #fdf0d5; }

/* ============================================================ 四、空态 / 错误 / 登录 */

.pk-err {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fff5f5;
  border: 1px solid #f5d0d0;
  border-radius: 13px;
  padding: 13px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #a03232;
}

.pk-login {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: 0 2px 14px rgba(58, 42, 30, .05);
}

.pk-login-ico { font-size: 30px; margin-bottom: 10px; }
.pk-login h4 { font-size: 15.5px; color: var(--text); margin: 0 0 8px; font-weight: 700; }
.pk-login p { font-size: 13px; color: var(--text2); line-height: 1.8; margin: 0 0 16px; }

/* 空态预览：没提取过时也让用户看见"会得到什么" */
.pk-preview {
  background: #fffdfb;
  border: 1px dashed #eadfd3;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.pk-preview-t {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.pk-preview-b {
  font-size: 14px;
  line-height: 1.95;
  color: #b6a795;
  white-space: pre-wrap;
}

.pk-preview-f {
  font-size: 12px;
  color: #c4b6a8;
  line-height: 1.7;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #f0e7dd;
}

/* 🔴 hidden 会被 display:flex 盖掉 —— 必须补这一条 */
.pk-root [hidden] { display: none !important; }

/* toast（与站内其它模块同款位置：底部 84px，避开 fixed TabBar） */
.pk-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(58, 42, 30, .93);
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 70;
  max-width: 84vw;
  text-align: center;
  line-height: 1.5;
}

.pk-toast[hidden] { display: none !important; }

/* 窄屏（<360）微调 */
@media (max-width: 360px) {
  .pk-body { font-size: 15px; padding: 14px; }
  .pk-seg button { font-size: 13px; padding: 9px 4px; }
}
