* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #f6f3ee; color: #33302b; font-size: 16px; line-height: 1.5;
}
.pf-app { max-width: 640px; margin: 0 auto; padding: 0 16px 96px; }
.pf-head { padding: 24px 4px 12px; }
.pf-head h1 { font-size: 22px; margin: 0 0 6px; color: #7a5a2e; }
.pf-sub { margin: 0; font-size: 13px; color: #9b9285; }

.pf-group { background: #fff; border-radius: 14px; margin-top: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(120,100,60,.06); }
.pf-gh { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; font-weight: 600; color: #5c4a30; cursor: pointer; background: #fbf8f2; }
.pf-arrow { transition: transform .2s; color: #c3b49a; }
.pf-gh.collapsed .pf-arrow { transform: rotate(-90deg); }
.pf-gb { padding: 4px 16px 14px; }

.pf-field { padding: 10px 0; border-top: 1px solid #f0ebe2; }
.pf-field:first-child { border-top: none; }
.pf-label { display: block; font-size: 14px; color: #6b6355; margin-bottom: 7px; }
.pf-prefilled .pf-label::after { content: "已填"; margin-left: 8px; font-size: 11px; color: #a98b52; background: #f6edda; padding: 1px 7px; border-radius: 8px; }

.pf-ctrl { width: 100%; }
input.pf-ctrl, textarea.pf-ctrl, select.pf-ctrl {
  border: 1px solid #e3dccf; border-radius: 10px; padding: 11px 12px; font-size: 16px;
  background: #fff; color: #33302b; outline: none; font-family: inherit;
}
input.pf-ctrl:focus, textarea.pf-ctrl:focus, select.pf-ctrl:focus { border-color: #c9a35f; }
textarea.pf-ctrl { min-height: 78px; resize: vertical; }

.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { padding: 7px 14px; border-radius: 18px; border: 1px solid #e3dccf; background: #fff; font-size: 14px; color: #6b6355; cursor: pointer; }
.pf-chip.on { background: #c9a35f; border-color: #c9a35f; color: #fff; }

.pf-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #f6f3ee 70%, transparent); }
.pf-save { display: block; width: 100%; max-width: 608px; margin: 0 auto; padding: 14px; border: none; border-radius: 12px; background: #b3843c; color: #fff; font-size: 17px; font-weight: 600; }
.pf-save:disabled { opacity: .6; }

.pf-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(10px); background: rgba(50,44,36,.92); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; }
.pf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pf-sku-sel { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-sku-sel:empty { display: none; }
.pf-sku-search { width: 100%; border: 1px solid #e3dccf; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin-top: 8px; background: #fff; outline: none; }
.pf-sku-search:focus { border-color: #c9a35f; }
.pf-sku-results { border: 1px solid #eee4d3; border-radius: 10px; margin-top: 6px; max-height: 220px; overflow-y: auto; background: #fff; }
.pf-sku-opt { padding: 10px 12px; border-bottom: 1px solid #f2ece1; font-size: 15px; color: #4d463b; cursor: pointer; }
.pf-sku-opt:last-child { border-bottom: none; }
.pf-sku-opt:active { background: #f6edda; }

/* 题目下方灰色说明 */
.pf-hint { font-size: 12px; color: #a89f90; margin: -3px 0 7px; }

/* 深度段未解锁提示卡 */
.pf-locked { background: #fbf7ef; border: 1px dashed #dcc9a4; border-radius: 14px; margin-top: 14px; padding: 22px 20px; text-align: center; }
.pf-locked-ico { font-size: 26px; margin-bottom: 8px; }
.pf-locked-t { font-size: 16px; font-weight: 600; color: #7a5a2e; margin-bottom: 8px; }
.pf-locked-d { font-size: 13px; color: #9b9285; line-height: 1.7; }

/* 深度段已解锁庆祝卡（比锁定卡更亮/已激活，营造优越感）*/
.pf-unlocked { background: linear-gradient(135deg, #fdf6e8, #f7ecd2); border: 1px solid #d9b877; border-radius: 14px; margin-top: 14px; padding: 22px 20px; text-align: center; box-shadow: 0 2px 10px rgba(201,163,95,.14); }
.pf-unlocked-ico { font-size: 30px; margin-bottom: 8px; }
.pf-unlocked-t { font-size: 17px; font-weight: 700; color: #9a6f27; margin-bottom: 8px; }
.pf-unlocked-d { font-size: 13px; color: #7d7059; line-height: 1.8; }

/* 加载中占位（防授权往返白屏）*/
.pf-loading { text-align: center; color: #9b9285; font-size: 14px; padding: 60px 20px; line-height: 2; }
.pf-spinner { width: 26px; height: 26px; margin: 0 auto 14px; border: 3px solid #eadfc8; border-top-color: #c9a35f; border-radius: 50%; animation: pf-spin .8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* 表单页顶部「← 返回我的档案」（2026-08-18，表单已降为二级页） */
.pf-back {
  display: inline-block; margin-bottom: 10px; font-size: 13px;
  color: #9a7b3f; text-decoration: none; background: #f6f1e6;
  padding: 6px 12px; border-radius: 9px;
}

/* 空状态：还没档案 / 一号多档案 / 暂时打不开（2026-08-18） */
.pf-empty { text-align: center; padding: 46px 24px 30px; }
.pf-empty-ico { font-size: 44px; line-height: 1; margin-bottom: 16px; }
.pf-empty-t { font-size: 17px; font-weight: 700; color: #4a4034; margin-bottom: 10px; }
.pf-empty-b { font-size: 14px; color: #8d8375; line-height: 1.85; margin: 0 auto 26px; max-width: 300px; }
.pf-empty-btn {
  display: block; max-width: 300px; margin: 0 auto 12px; padding: 14px 18px;
  border-radius: 12px; text-decoration: none; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #d8b26a, #c9a35f); color: #fff;
  box-shadow: 0 3px 12px rgba(201, 163, 95, .28);
}
.pf-empty-btn + .pf-empty-btn {
  background: #f6f1e6; color: #7d7465; box-shadow: none; font-weight: 500;
}
