/* replica（爆款复刻）页面专用样式：类名统一 rp- 开头 */
.rp-page .panel { margin-bottom: 16px; }
.rp-page .panel-hd h3 { display: flex; align-items: center; gap: 8px; }
.rp-page .panel-hd h3 .ic { width: 17px; height: 17px; color: var(--brand); }
.rp-page .empty.err b { color: var(--red); }

/* ---------- 新建 ---------- */
.rp-new { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-tabs { display: flex; gap: 4px; padding: 3px; background: var(--line-2); border-radius: 9px; }
.rp-tab { height: 28px; padding: 0 12px; border-radius: 7px; color: var(--sub); font-size: 13px; white-space: nowrap; }
.rp-tab.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 32, 70, .08); }
.rp-src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 560px; overflow-y: auto; padding: 2px; }
.rp-src-grid > .empty { grid-column: 1 / -1; }
.rp-src {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 6px;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.rp-src:hover { border-color: #c9d5f5; }
.rp-src.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rp-src-th { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #eef1f6; color: #c3c9d8; }
.rp-src-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-src-th .ic { width: 28px; height: 28px; }
.rp-src-tt { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.rp-src-meta { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-src-ok { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--brand); color: #fff; }
.rp-src-ok .ic { width: 15px; height: 15px; }
.rp-src.on .rp-src-ok { display: grid; }
.rp-link { display: grid; gap: 8px; }
.rp-link[hidden], .rp-src-grid[hidden], .rp-quote[hidden] { display: none; }

.rp-segbtn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-segbtn button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.rp-segbtn button b { font-size: 14px; font-weight: 600; }
.rp-segbtn button small { font-size: 12px; color: var(--mute); }
.rp-segbtn button.on { border-color: var(--brand); background: var(--brand-soft); }
.rp-segbtn button.on b { color: var(--brand); }
.rp-segbtn.sm button { padding: 6px 10px; }
.rp-segbtn.sm button b { font-size: 13px; }

.rp-refs { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-ref { position: relative; width: 86px; height: 86px; border-radius: 10px; overflow: hidden; background: #eef1f6; border: 1px solid var(--line); display: grid; place-items: center; }
.rp-ref img { width: 100%; height: 100%; object-fit: cover; }
.rp-ref i { font-style: normal; font-size: 12px; color: var(--sub); }
.rp-ref-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 20, 35, .6); color: #fff; }
.rp-ref-x .ic { width: 13px; height: 13px; }
.rp-ref-add { flex-direction: column; gap: 4px; color: var(--brand); border-style: dashed; background: #fafbfd; font-size: 12px; }
.rp-ref-add .ic { width: 20px; height: 20px; }
.rp-refs.sm .rp-ref { width: 60px; height: 60px; }
.rp-warn-txt { color: #b25e09 !important; line-height: 1.6; }
.rp-warn-txt .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.rp-go { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 4px; }
.rp-go .btn { height: 40px; padding: 0 22px; font-size: 15px; }
.rp-go small { font-size: 12.5px; line-height: 1.6; }

.rp-hlist { display: flex; flex-direction: column; }
.rp-hrow { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
.rp-hrow:last-child { border-bottom: 0; }
.rp-hmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.rp-hth { width: 44px; height: 58px; flex: none; border-radius: 7px; overflow: hidden; background: #eef1f6; display: grid; place-items: center; color: #c3c9d8; }
.rp-hth img { width: 100%; height: 100%; object-fit: cover; }
.rp-htx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-htx b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-htx small { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-hmain:hover b { color: var(--brand); }
.rp-htime { color: var(--mute); font-size: 12px; white-space: nowrap; }
.rp-hdel:hover { color: var(--red); background: #ffefed; }

/* ---------- 一条复刻 ---------- */
.rp-steps { list-style: none; margin: 0 0 16px; padding: 12px 16px; display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.rp-step { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; white-space: nowrap; }
.rp-step + .rp-step::before { content: ""; flex: 0 1 28px; min-width: 8px; height: 1.5px; background: var(--line); margin-right: 2px; }
.rp-step i { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--mute); }
.rp-step i .ic { width: 14px; height: 14px; }
.rp-step.done i { background: #e7f8ef; color: var(--green); }
.rp-step.done { color: var(--sub); }
.rp-step.now i { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.rp-step.now { color: var(--brand); font-weight: 600; }
.rp-step.err i { background: var(--red); color: #fff; }
.rp-step.err { color: var(--red); }

.rp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.rp-aside { position: sticky; top: 16px; }
.rp-wait { padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; }
.rp-wait > b { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--brand); }
.rp-wait p { margin: 0; }
.rp-bdsteps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.rp-bdsteps li { display: flex; align-items: center; gap: 8px; color: var(--sub); font-size: 13.5px; }
.rp-bdsteps li i { width: 20px; height: 20px; flex: none; display: grid; place-items: center; font-style: normal; color: var(--mute); }
.rp-bdsteps li i .ic { width: 15px; height: 15px; }
.rp-bdsteps li.ok i { color: var(--green); }
.rp-bdsteps li.run { color: var(--brand); font-weight: 600; }
.rp-bdsteps li.err { color: var(--red); }
.rp-bdsteps small { color: var(--mute); font-weight: 400; margin-left: 4px; }
.rp-err { color: var(--red); }

/* 对标原片 */
.rp-srcvid { width: 100%; max-height: 360px; border-radius: 10px; background: #000; display: block; }
.rp-srct { margin: 10px 0 8px; font-weight: 600; line-height: 1.5; }
.rp-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; font-size: 13px; margin-bottom: 10px; }
.rp-kv span { color: var(--mute); white-space: nowrap; }
.rp-kv b { font-weight: 500; color: var(--text); word-break: break-word; }

/* 报价 */
.rp-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.rp-price span { color: var(--sub); }
.rp-price b { font-size: 32px; color: var(--red); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.rp-price em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #e7f8ef; color: #0e9a59; }
.rp-formula { margin: 0 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text); }
.rp-notes { margin: 0 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.6; color: var(--mute); }
.rp-ck { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.55; background: var(--line-2); color: var(--sub); }
.rp-ck .ic { width: 15px; height: 15px; margin-top: 2px; }
.rp-ck.ok { background: #e7f8ef; color: #0e7c49; }
.rp-ck.bad { background: #ffecea; color: #c2352a; }
.rp-ck.warn { background: #fff4e5; color: #b25e09; }
.rp-eta { font-size: 12.5px; margin: 0 0 10px; }
.rp-gen { width: 100%; justify-content: center; height: 42px; font-size: 15px; margin-bottom: 8px; }
.rp-gen.btn-ghost { height: 36px; font-size: 13.5px; }
.rp-gen:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.rp-recheck { display: block; margin: 2px auto 0; }

/* 生成中 / 失败 / 成品 */
.rp-bar { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .6s ease; }
.rp-run-row { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
.rp-run-row span { color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }
.rp-run-meta { font-size: 12.5px; margin: 0 0 6px; word-break: break-all; }
.rp-run p { margin: 0 0 10px; font-size: 12.5px; }
.rp-fail .panel-bd { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: #fff7f6; border-radius: var(--radius); }
.rp-fail b { display: flex; align-items: center; gap: 6px; color: var(--red); }
.rp-fail.cancel .panel-bd { background: #fffaf2; }
.rp-fail.cancel b { color: #b25e09; }
.rp-fail p { margin: 0; color: var(--sub); line-height: 1.6; }
.rp-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rp-res { display: flex; flex-direction: column; gap: 8px; }
.rp-res video { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; background: #000; border-radius: 10px; object-fit: contain; }
.rp-res-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 13px; }
.rp-res-meta .btn { margin-top: 4px; }
.rp-res-act { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-res-tip { margin: 0; padding: 0 18px 16px; font-size: 12.5px; }

/* 分镜编辑 */
.rp-idea { padding: 12px 14px; margin-bottom: 12px; border-radius: 10px; background: #f7f9ff; border: 1px solid #e3eaff; }
.rp-idea b { font-size: 15px; }
.rp-idea p { margin: 6px 0 0; color: var(--sub); font-size: 13.5px; line-height: 1.7; }
.rp-ok { display: flex; align-items: center; gap: 6px; color: #0e7c49; font-size: 13px; margin: 0 0 12px; }
.rp-ok .ic { width: 15px; height: 15px; }
.rp-issues { padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.rp-issues ul { margin: 4px 0 0; padding-left: 18px; }
.rp-issues.bad { background: #fff3f2; border: 1px solid #ffd9d5; color: #b3261e; }
.rp-issues.warn { background: #fffaf0; border: 1px solid #ffe7c2; color: #8a4b05; }
.rp-hits { margin-top: 6px; }
.rp-hits summary { cursor: pointer; color: var(--brand); }
.rp-hits p { margin: 6px 0 0; display: grid; gap: 2px; padding: 6px 8px; background: #fff; border-radius: 6px; }
.rp-hits span:last-child { color: var(--mute); }
.rp-sets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.rp-adv { margin-bottom: 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; background: #fafbfd; }
.rp-adv summary { cursor: pointer; color: var(--sub); font-size: 13px; }
.rp-adv[open] summary { margin-bottom: 10px; }
.rp-adv .field { margin-bottom: 10px; }
.rp-seg { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.rp-seghd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #f7f9fc; border-bottom: 1px solid var(--line-2); }
.rp-seghd b { font-size: 14.5px; }
.rp-seghd .mute { font-size: 12.5px; flex: 1; min-width: 0; }
.rp-secsel { width: auto; height: 30px; }
.rp-seghd .icon-btn:hover { color: var(--red); background: #ffefed; }
.rp-shot { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: grid; gap: 8px; }
.rp-shot-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-shot-no { font-weight: 600; color: var(--brand); font-size: 13px; background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; }
.rp-time { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--sub); }
.rp-time .input { width: 62px; height: 30px; padding: 0 6px; text-align: center; }
.rp-speak { width: auto; height: 30px; font-size: 13px; }
.rp-shot-hd .icon-btn { margin-left: auto; }
.rp-shot-hd .icon-btn:hover { color: var(--red); background: #ffefed; }
.rp-zh { height: 32px; font-size: 13px; color: var(--sub); background: #fafbfd; }
.rp-line { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 4px 8px; }
.rp-line > span { font-size: 13px; color: var(--sub); padding-top: 8px; }
.rp-line .textarea { min-height: 52px; }
.rp-cnt { grid-column: 2; font-size: 12px; color: var(--mute); }
.rp-cnt em { font-style: normal; }
.rp-cnt em.bad { color: var(--red); font-weight: 600; }
.rp-vis summary { cursor: pointer; font-size: 12.5px; color: var(--mute); }
.rp-vis[open] summary { margin-bottom: 6px; }
.rp-vis .textarea { font-size: 12.5px; min-height: 70px; }
.rp-seg-ft { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 10px 14px; }
.rp-prompt { flex: 1; min-width: 200px; }
.rp-prompt summary { cursor: pointer; font-size: 12.5px; color: var(--mute); line-height: 30px; }
.rp-prompt pre { margin-top: 6px; font-size: 12px; max-height: 320px; }
.rp-segadd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-note { max-width: 420px; }
.rp-savebar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-top: -4px; border-radius: 12px; background: #1d2640; color: #fff; box-shadow: 0 10px 30px rgba(20, 30, 70, .25);
}
.rp-savebar[hidden] { display: none; }
.rp-savebar > span { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13.5px; min-width: 120px; }
.rp-savebar .ic { width: 16px; height: 16px; color: var(--amber); }
.rp-savebar .btn-ghost { background: transparent; color: #cfd6ea; border-color: #46506c; }

/* 弹窗 */
.rp-confirm p { margin: 0 0 10px; line-height: 1.6; }
.rp-c-big { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 12px 14px; border-radius: 10px; background: #fff4e5; color: #8a4b05; }
.rp-c-big b { font-size: 20px; color: var(--red); }
.rp-c-big .ic { width: 20px; height: 20px; }
.rp-c-act { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rp-danger { background: var(--red); box-shadow: 0 4px 12px rgba(240, 71, 58, .28); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1100px) {
  .rp-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 860px) {
  .rp-new { grid-template-columns: 1fr; }
  .rp-layout { display: flex; flex-direction: column; gap: 0; }
  .rp-main, .rp-aside { display: contents; }
  .rp-o1 { order: 1; }
  .rp-o2 { order: 2; }
  .rp-o3 { order: 3; }
  .rp-o4 { order: 4; }
  .rp-layout > * > * { width: 100%; }
  .rp-src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .rp-segbtn { grid-template-columns: 1fr; }
  .rp-sets { grid-template-columns: 1fr; }
  .rp-step span { display: none; }
  .rp-step.now span { display: inline; }
  .rp-htime { display: none; }
  .rp-rgrid { grid-template-columns: 1fr; }
  .rp-res video { max-height: 80vh; }
  .rp-line { grid-template-columns: 1fr; }
  .rp-line > span { padding-top: 0; }
  .rp-cnt { grid-column: 1; }
}
