/* ============================================================================
   图片复刻（sub-replica）· 2026-09-21 · 开发员18号
   ----------------------------------------------------------------------------
   只作用于 #sub-replica，不碰 style.css（80KB、多人改）。
   设计主张：**双色对照** —— 图一=橙（全站主色）、图二=紫，
   两张图的角色靠颜色就能分清，不需要读文字。
   ⚠️ 注释里绝不写「星号紧跟斜杠」那种连写，否则注释会在那一行提前闭合，
      紧跟其后的第一条规则会整块被吞掉（2026-09-19 踩过）。
   ============================================================================ */

#sub-replica {
  padding-bottom: 96px;            /* fixed TabBar 实测 74px + 余量 */
}
/* 作者样式（display:flex/grid）会盖掉浏览器默认的 [hidden]{display:none}，
   每个子页都要自己兜一条，且**只能**限定在本子页内 */
#sub-replica [hidden] { display: none !important; }

/* ============================== 顶部说明 ============================== */
.rp-hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 20px 16px 16px; margin-bottom: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(249, 89, 1, .16) 0%, rgba(249, 89, 1, 0) 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(124, 58, 237, .16) 0%, rgba(124, 58, 237, 0) 60%),
    linear-gradient(135deg, #fffaf6 0%, #ffffff 50%, #faf7ff 100%);
  border: 1px solid #f2e7dd;
}
.rp-hero-tag {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: #b8420a; border: 1px solid #f7d9c0;
}
.rp-hero-t { font-size: 21px; font-weight: 800; color: #3a2a1e; margin: 9px 0 7px; line-height: 1.3; }
.rp-hero-s { font-size: 13px; line-height: 1.7; color: #7a6a5e; }
.rp-hero-s b { color: #c2410c; }
.rp-hero-s i { color: #6d28d9; font-style: normal; font-weight: 700; }

.rp-roles { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rp-role {
  flex: 1 1 40%; min-width: 120px; border-radius: 12px; padding: 9px 10px;
  font-size: 12px; line-height: 1.45;
}
.rp-role b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.rp-role.a { background: #fff4ec; border: 1px solid #fbdcc4; color: #9a3412; }
.rp-role.b { background: #f7f3ff; border: 1px solid #e2d8fb; color: #5b21b6; }
.rp-role-arrow { font-size: 15px; color: #c9b8ac; }

.rp-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rp-step {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: #8a7a6e; border: 1px solid #efe3d8;
}

/* ============================== 卡片小件 ============================== */
.rp-ct { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-req {
  font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  background: #fff1e7; color: #c2410c; border: 1px solid #f8dcc8;
}
.rp-req.ok { background: #eefbf3; color: #15803d; border-color: #cdf0dc; }
.rp-note { font-size: 12px; line-height: 1.65; color: #9a8a7e; margin: 9px 0 0; }
.rp-note b { color: #c2410c; }
.rp-note i { color: #6d28d9; font-style: normal; font-weight: 700; }

/* ============================== 上传位（大） ============================== */
.rp-slot {
  position: relative; margin-top: 12px;
  border-radius: 16px; border: 1.5px dashed #e6d8cc; background: #fffdfb;
  min-height: 168px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s;
}
.rp-slot:active { background: #fff7f1; }
.rp-slot.has { border-style: solid; border-color: #ecdccd; background: #fff; }
.rp-slot-a.has { border-color: #f7cfa8; }
.rp-slot-b.has { border-color: #ddd0f8; }
.rp-slot img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; display: block; background: #faf7f4; }
.rp-slot-empty { text-align: center; padding: 22px 16px; }
.rp-slot-ico { font-size: 30px; line-height: 1; }
.rp-slot-t { font-size: 13.5px; font-weight: 700; color: #5a4a3e; margin-top: 9px; }
.rp-slot-s { font-size: 11.5px; color: #a8988c; margin-top: 5px; line-height: 1.5; }
.rp-slot-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); border: 1px solid #f0e2d6; color: #a0522d;
}
.rp-slot-badge.b { color: #6d28d9; border-color: #e6dcfa; }
.rp-slot-del {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(30, 20, 12, .55); color: #fff; font-size: 15px; line-height: 26px; padding: 0;
}
.rp-slot-dim {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
  background: rgba(30, 20, 12, .5); color: #fff;
}

/* ============================== 模式（换哪一处） ============================== */
.rp-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
@media (min-width: 560px) { .rp-modes { grid-template-columns: repeat(4, 1fr); } }
.rp-mode {
  border: 1px solid #efe3d8; background: #fffdfb; border-radius: 14px;
  padding: 11px 8px; cursor: pointer; font-family: inherit; text-align: center;
  transition: all .15s;
}
.rp-mode-ico { font-size: 19px; line-height: 1; display: block; }
.rp-mode-t { font-size: 12.5px; font-weight: 600; color: #6a5a4e; margin-top: 6px; display: block; line-height: 1.35; }
.rp-mode.active {
  border-color: #f09a5a; background: linear-gradient(160deg, #fff4ec 0%, #fdf1ff 100%);
  box-shadow: 0 4px 12px rgba(249, 89, 1, .14);
}
.rp-mode.active .rp-mode-t { color: #b8420a; }
.rp-mode-tip {
  font-size: 12px; line-height: 1.6; color: #7a5c46; margin-top: 10px;
  padding: 9px 11px; border-radius: 11px; background: #fff6ef; border: 1px solid #f8e2d0;
}
.rp-mode-tip b { color: #c2410c; }

/* ============================== 一句话 ============================== */
.rp-instr { margin-top: 12px; }
.rp-instr .prompt-area { min-height: 64px; }
.rp-counter { text-align: right; font-size: 11px; color: #b0a094; margin-top: 5px; }
.rp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.rp-quick .chip { font-size: 12px; padding: 6px 12px; }

/* ============================== 高级（必须保留 / 尺寸） ============================== */
.rp-adv-toggle {
  width: 100%; margin-top: 4px; border: 1px solid #efe3d8; background: #fffdfb;
  border-radius: 14px; padding: 12px; font-family: inherit; font-size: 13.5px;
  font-weight: 600; color: #6a5a4e; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rp-adv-toggle span.rp-adv-caret { font-size: 11px; color: #b0a094; transition: transform .18s; }
.rp-adv-toggle.open span.rp-adv-caret { transform: rotate(180deg); }
.rp-adv-body { margin-top: 12px; }
.rp-sub-t { font-size: 13px; font-weight: 700; color: #5a4a3e; margin: 0 0 8px; }
.rp-sub-t span { font-weight: 400; font-size: 11.5px; color: #a8988c; margin-left: 6px; }

.rp-keeps { display: flex; flex-direction: column; gap: 7px; }
.rp-keep {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  border: 1px solid #f0e4d9; background: #fffdfb; border-radius: 12px; padding: 10px;
  transition: all .15s;
}
.rp-keep.on { background: linear-gradient(120deg, #f4fbf6 0%, #f7f9ff 100%); border-color: #cfe8d9; }
.rp-keep-box {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px; margin-top: 1px;
  border: 1.5px solid #dcc9b8; background: #fff; color: #fff;
  font-size: 12px; line-height: 16px; text-align: center; font-weight: 700;
}
.rp-keep.on .rp-keep-box { background: #16a34a; border-color: #16a34a; }
.rp-keep-main { flex: 1 1 auto; min-width: 0; }
.rp-keep-t { font-size: 13px; font-weight: 600; color: #5a4a3e; }
.rp-keep-d { font-size: 11.5px; line-height: 1.55; color: #a09084; margin-top: 3px; }
.rp-keeps-all { display: flex; gap: 8px; margin-bottom: 9px; }
.rp-mini-btn {
  border: 1px solid #ecdccd; background: #fff; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 11.5px; color: #8a6a52; padding: 5px 12px;
}

/* ============================== 复刻清单回显 ============================== */
.rp-sum {
  margin-top: 14px; border-radius: 14px; padding: 12px 13px;
  background: linear-gradient(135deg, #fff8f3 0%, #fbf8ff 100%);
  border: 1px solid #f0e4f5;
}
.rp-sum-h { font-size: 12px; font-weight: 700; color: #7a5c8a; margin-bottom: 8px; }
.rp-sum-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; margin-top: 5px; }
.rp-sum-k { flex: 0 0 62px; color: #a8988c; }
.rp-sum-v { flex: 1 1 auto; color: #5a4a3e; font-weight: 500; }
.rp-sum-v.chg { color: #b8420a; font-weight: 700; }
.rp-sum-v.keep { color: #15803d; }

/* ============================== 结果 ============================== */
.rp-res-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 9px; }
.rp-res-t { font-size: 15px; font-weight: 800; color: #3a2a1e; }
.rp-res-s { font-size: 12px; color: #a8988c; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rp-rcard {
  border-radius: 14px; border: 1px solid #efe3d8; background: #fff;
  overflow: hidden; position: relative;
}
.rp-rcard img { width: 100%; display: block; background: #faf7f4; }
.rp-rcard-tag {
  position: absolute; top: 7px; left: 7px; font-size: 11px; padding: 2px 8px;
  border-radius: 999px; background: rgba(30, 20, 12, .55); color: #fff;
}
.rp-rcard-tag.cmp { background: rgba(124, 58, 237, .78); }
.rp-rbar { display: flex; gap: 6px; padding: 8px; }
.rp-mini {
  flex: 1 1 0; border: 1px solid #ecdccd; background: #fff; border-radius: 9px;
  padding: 7px 0; font-size: 12px; color: #6a5a4e; cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.rp-mini.alt { border-color: #ddd0f8; color: #5b21b6; background: #fdfbff; }
.rp-mini.retry { border-color: #f2c9c9; color: #c0392b; background: #fff8f8; }
.rp-mini:disabled { opacity: .5; cursor: default; }
.rp-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; min-height: 168px; padding: 18px; text-align: center; background: #fffdfb;
}
.rp-ph-t { font-size: 13px; font-weight: 600; color: #5a4a3e; }
.rp-ph-s { font-size: 11.5px; color: #a8988c; line-height: 1.55; }
.rp-ph-err { font-size: 11.5px; color: #c0392b; line-height: 1.55; }
.rp-spin {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2.5px solid #f5e3d5; border-top-color: #f95901;
  animation: rpspin .85s linear infinite;
}
@keyframes rpspin { to { transform: rotate(360deg); } }
.rp-tip-strip {
  margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: #9a8a7e;
  padding: 9px 11px; border-radius: 11px; background: #fbf7f3;
}

/* ============================== toast ============================== */
.rp-toast {
  position: fixed; left: 50%; bottom: 13%; transform: translateX(-50%) translateY(8px);
  background: rgba(30, 20, 12, .9); color: #fff; font-size: 13px;
  padding: 9px 17px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: .22s; z-index: 9999; max-width: 84vw; text-align: center;
}
.rp-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
