/* 档案页：关系图谱 + 老照片墙（替换原生"家人""图片资料"两张列表卡） */

.pf-graph, .pf-photo { padding: 16px 16px 14px !important; }
.pf-graph .pf-gh, .pf-photo .pf-gh {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
}
.pf-graph .pf-gh b, .pf-photo .pf-gh b { font-size: 15.5px; font-weight: 700; color: #1e1c19; letter-spacing: .2px; }
.pf-graph .pf-gh span, .pf-photo .pf-gh span { font-size: 12px; color: #9c948a; }

/* 放射图谱 */
.pf-gsvg { position: relative; margin: 2px 0 6px; }
.pf-gsvg svg { display: block; width: 100%; height: auto; }
.pf-n { cursor: pointer; }
.pf-n circle { transition: transform .15s ease; }
.pf-n:active circle { transform: scale(.96); }

/* 人员列表 */
.pf-glist { margin-top: 8px; }
.pf-grow {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 0; border-top: 1px solid #f0ece5;
}
.pf-grow:first-child { border-top: 0; }
.pf-gav {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: #eef1f4; color: #3c5870; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pf-gnm { flex: 1 1 auto; min-width: 0; font-size: 14.5px; color: #1e1c19; }
.pf-gnm em { font-style: normal; font-size: 12px; color: #9c948a; margin-left: 6px; }
.pf-gtag { font-size: 12px; color: #6d6a63; background: #f3efea; border-radius: 10px; padding: 3px 8px; }

.pf-add {
  width: 100%; height: 42px; margin-top: 12px; border-radius: 12px;
  border: 1px solid #cfd6db; background: #fff; color: #2f4a42;
  font-size: 14.5px; font-weight: 600; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.pf-add:active { background: #f4f7f8; }

/* 老照片墙 */
.pf-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 4px; }
.pf-pcell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  background: #f1ede7;
}
.pf-pcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-pempty {
  grid-column: 1 / -1; aspect-ratio: auto; border: 1px dashed #ded7cc; border-radius: 10px;
  padding: 14px 12px; text-align: center; font-size: 12.5px; color: #a49b90; line-height: 1.6;
}
.pf-ptip { font-size: 12px; color: #9c948a; margin: 6px 0 0; line-height: 1.6; }

/* 编辑态收起 */
.content.pf-edit .pf-graph,
.content.pf-edit .pf-photo { display: none !important; }
/* 概览态原生的家人/图片列表卡由新卡替代 */
.native-hide { display: none !important; }

/* 基本信息（四格） */
.pf-basic { padding: 14px 16px 8px !important; }
.pf-basic .pf-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.pf-edit-link {
  margin-left: auto; border: 0; background: none; color: #2f4a42;
  font-size: 13.5px; font-weight: 600; padding: 8px 2px 8px 10px;
  -webkit-tap-highlight-color: transparent;
}
.pf-basic .pf-brow { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; }
.pf-basic .pf-brow + .pf-brow { border-top: 1px solid #f3efe9; }
.pf-bk { font-size: 13px; color: #8e857b; }
.pf-bv { font-size: 14.5px; color: #1e1c19; font-weight: 600; max-width: 74%; text-align: right; }
.pf-bv.is-empty { color: #b4aca1; font-weight: 400; }

.pf-gtip { margin: 10px 0 0; padding: 9px 12px; border-radius: 9px; background: #f6f4ef; color: #6f6659; font-size: 12.5px; line-height: 1.65; }

/* 人物弹层 */
.pf-sheet-mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(24,20,16,.4);
  display: flex; align-items: flex-end; animation: pfFade .18s ease;
}
@keyframes pfFade { from { opacity: 0 } to { opacity: 1 } }
.pf-sheet {
  width: 100%; background: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 76vh; overflow-y: auto;
  animation: pfUp .22s cubic-bezier(.22,.8,.35,1);
}
@keyframes pfUp { from { transform: translateY(16px); opacity: .6 } to { transform: none; opacity: 1 } }
.pf-sheet-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pf-sheet-h b { font-size: 17px; color: #1e1c19; }
.pf-sheet-h span { font-size: 12.5px; color: #8e857b; }
.pf-sheet-x {
  margin-left: auto; border: 0; background: #f4f1ec; color: #6f6659;
  font-size: 12.5px; padding: 7px 13px; border-radius: 999px;
}
.pf-qlabel { font-size: 12px; color: #a49b90; margin: 12px 0 8px; letter-spacing: .3px; }
.pf-qrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #f4f1ec; }
.pf-qrow em { font-style: normal; font-size: 12px; font-weight: 700; color: #2f4a42; background: #eef2ef; border-radius: 8px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; flex: 0 0 20px; margin-top: 1px; }
.pf-qrow span { font-size: 14px; color: #2c2925; line-height: 1.6; }
.pf-qmeta { font-size: 12.5px; color: #8e857b; line-height: 1.7; margin: 2px 0; }
.pf-quote { font-size: 15px; color: #2c2925; line-height: 1.75; padding: 12px 14px; background: #f7f5f0; border-radius: 10px; position: relative; }
.pf-src { font-style: normal; font-size: 12px; color: #b08a3e; margin-left: 5px; cursor: pointer; padding: 2px; }
.pf-goto { margin-top: 14px; }

/* AI 形象资产 */
.pf-visual { padding: 16px 16px 14px !important; }
.pf-vlist-row { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 0; border-top: 1px solid #f3efe9; }
.pf-vlist-row:first-child { border-top: 0; }
.pf-vlist-row .pf-gnm em { display: block; font-style: normal; font-size: 12px; color: #8e857b; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.pf-gtag.ok { background: #e7efe9; color: #2f6b4f; }
.pf-vsub { font-size: 12px; color: #a49b90; margin: 14px 0 6px; }
.pf-scene { font-size: 13px; color: #4a453e; padding: 7px 10px; background: #f7f5f0; border-radius: 8px; margin-bottom: 6px; }

/* 弹层内形象编辑 */
.pf-vis { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1ede7; }
.pf-vis-line { display: flex; align-items: baseline; gap: 8px; padding: 2px 0 8px; }
.pf-vis-v { font-size: 14px; color: #1e1c19; flex: 1; }
.pf-vis-v.is-empty { color: #b4aca1; }
.pf-vis-tag { font-size: 11.5px; color: #8a6a2b; background: #f6efdf; border-radius: 8px; padding: 3px 8px; }
.pf-vrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.pf-vrow label { flex: 0 0 76px; font-size: 13px; color: #8e857b; }
.pf-vrow input {
  flex: 1; min-width: 0; height: 44px; border: 1px solid #e2ddd4; border-radius: 10px;
  padding: 0 12px; font-size: 16px; color: #1e1c19; background: #fff;
}
.pf-vrow input:focus { border-color: #b7c9bd; outline: none; }
.pf-vact { display: flex; gap: 10px; margin-top: 14px; }
.pf-btn-ghost, .pf-btn-main {
  flex: 1; height: 44px; border-radius: 12px; font-size: 15px; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.pf-btn-ghost { flex: 0 0 auto; padding: 0 18px; border: 1px solid #d9d3c8; background: #fff; color: #4a453e; }
.pf-vis-edit { width: 100%; height: 40px; margin-top: 2px; }
.pf-btn-main { border: 0; background: #2f4a42; color: #fff; }
.pf-btn-main[disabled] { opacity: .6; }

.pf-vis-confirm { width: 100%; height: 40px; margin-top: 8px; font-size: 14.5px; border-radius: 11px; }

.pf-pcell { cursor: zoom-in; }
.pf-viewer {
  position: fixed; inset: 0; z-index: 9999; background: rgba(16,15,13,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.pf-viewer img { max-width: 100vw; max-height: 84vh; object-fit: contain; }
.pf-viewer span { color: #cfc7bb; font-size: 12px; }

/* 竖构图老照片：方形会裁掉半张脸 → 4:5 更接近人像比例 */
.pf-pgrid { grid-template-columns: repeat(3, 1fr); }
.pf-pcell { aspect-ratio: 4 / 5; }

/* 横屏（手机横过来 / 平板横放）：原来整页被夹在 480px 中间，两侧大片空白 */
@media (orientation: landscape) and (max-height: 560px) {
  .app { max-width: 760px !important; }
  .pf-pgrid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .pf-pcell { aspect-ratio: 1 / 1; }
}

/* 人物设定图（少年/青年/中年/老年）—— 一图一代，点开确认 */
.pf-shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 8px; }
.pf-shot { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #efeae3; cursor: zoom-in; }
.pf-shot img { width: 100%; height: 100%; object-fit: contain; background: #e9e3da; display: block; }
.pf-shot-age { position: absolute; left: 0; bottom: 0; right: 0; font-size: 10.5px; line-height: 1; padding: 4px 0 5px; text-align: center; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.pf-shot-st { display: none; }
.pf-shot-st.ok, .pf-shot-st.no {
  position: absolute; right: 4px; top: 4px; display: flex; align-items: center;
  font-size: 9.5px; line-height: 1; padding: 3px 5px; border-radius: 5px;
  color: #fff; font-style: normal; letter-spacing: .2px;
}
.pf-shot-st.ok { background: rgba(47,143,107,.92); }
.pf-shot-st.ok::after { content: '已确认'; }
.pf-shot-st.no { background: rgba(194,84,63,.92); }
.pf-shot-st.no::after { content: '不像'; }
.pf-shot-act { position: fixed; left: 50%; transform: translateX(-50%); bottom: 28px; display: flex; gap: 10px; z-index: 60; }
.pf-shot-act .pf-btn-main, .pf-shot-act .pf-btn-ghost { min-width: 120px; }
.pf-scstrip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 8px; }
.pf-scstrip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.pf-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; max-width: 300px; padding: 12px 16px; border-radius: 12px; background: rgba(47,74,66,.96); color: #fff; font-size: 14px; line-height: 1.5; z-index: 90; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: opacity .3s; }

/* 照片右上角改删操作 */
.pf-pcell{position:relative}
.pf-pact{position:absolute;right:4px;top:4px;display:flex;gap:4px}
.pf-pact button{border:0;border-radius:999px;padding:2px 8px;font-size:11px;background:rgba(255,255,255,.92);color:#2f4a42;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.pf-pdel{color:#b4543a!important}
