/* 人物真实感 · 单图上传位 + 出图比例胶囊
 * ============================================================================
 * 只做本功能需要的两块：人像大上传位、比例胶囊。
 * 其余（banner / 卡片 / 补充要求 / 效果示例 / 结果区 / toast）复用 xt-* 与 ix-*。
 * ⚠️ 按项目规约：所有选择器带 #sub-photoreal 作用域，不碰 style.css。
 * ========================================================================== */

/* ── 人像上传位：独占一行，固定高度，cover 预览（原图不裁，只影响缩略）── */
#sub-photoreal .pr-drop {
  position: relative;
  width: 100%;
  height: 300px;
  border: 1.5px dashed #f0c9a8;
  border-radius: 16px;
  background: #fffaf6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

#sub-photoreal .pr-drop:active { background: #fff2e8; }
#sub-photoreal .pr-drop.drag { border-color: var(--primary); background: #fff2e8; }

#sub-photoreal .pr-drop.has-img { border-style: solid; border-color: #ffdcbf; background: #fff; }
#sub-photoreal .pr-drop.has-img .pr-hint { display: none; }
#sub-photoreal .pr-drop.has-img .pr-prev { display: block; }
#sub-photoreal .pr-drop.has-img .pr-del { display: block; }

/* ── 上传位内部 ───────────────────────────────────────────────── */
#sub-photoreal .pr-hint {
  text-align: center;
  padding: 0 10px;
  pointer-events: none;
}

#sub-photoreal .pr-plus {
  font-size: 24px;
  line-height: 1;
  color: #d8a67a;
  font-weight: 300;
}

#sub-photoreal .pr-hint-t {
  margin-top: 8px;
  font-size: 12.5px;
  color: #9a7b62;
  line-height: 1.5;
}

#sub-photoreal .pr-prev {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#sub-photoreal .pr-del {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 15px;
  line-height: 24px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

/* 角标「必填」 */
#sub-photoreal .pr-req {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(249, 89, 1, .92);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  z-index: 2;
}

#sub-photoreal .pr-ok { color: #12a05c; font-weight: 700; margin-left: 4px; }

#sub-photoreal .pr-cap {
  margin-top: 6px;
  font-size: 11.5px;
  color: #9a7b62;
  text-align: center;
  line-height: 1.4;
}

/* ── 出图比例胶囊 ─────────────────────────────────────────────── */
#sub-photoreal .pr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

#sub-photoreal .pr-chip {
  border: 1px solid #f0d8c4;
  background: #fff;
  color: #8a6a52;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  flex: 1 1 calc(33.33% - 8px);
  text-align: center;
  transition: all .15s;
}

#sub-photoreal .pr-chip.active {
  border-color: var(--primary);
  background: #fff2e8;
  color: var(--primary);
  font-weight: 600;
}

#sub-photoreal .pr-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9a8b80;
}

/* ── 上传建议列表 ─────────────────────────────────────────────── */
#sub-photoreal .pr-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

#sub-photoreal .pr-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.10);
  font-size: 13px;
  line-height: 1.55;
}

#sub-photoreal .pr-tip b {
  flex: 0 0 auto;
  min-width: 62px;
  color: #4f46e5;
  font-weight: 600;
}

#sub-photoreal .pr-tip span { color: #4b5563; flex: 1 1 auto; }

/* 案例图统一用横版；小屏按卡片宽度自适应缩小，再用最大高度兜底，避免在平板上拉得过高 */
@media (max-width: 640px) {
  #sub-photoreal .xt-sample-img {
    width: auto;
    max-width: 100%;
    max-height: 190px;
    margin-left: auto;
    margin-right: auto;
  }
}
