/* PP论坛 · 用户详情页（个人资料）研究范版式
   参照「作者页·档案三栏」：通栏署名条 + 左档案 / 中长文与媒体 / 右活跃 Timeline
   只在 body.pp-sp 下生效，不影响空间其他页面
   纸白 #fdfcf9 / 墨 #1f2a30 / 朱砂 #8c2f28 */

body.pp-sp {
  --sp-ink: #1f2a30;
  --sp-ink2: #3a444c;
  --sp-ink3: #5c574c;
  --sp-muted: #8f897a;
  --sp-line: #e2ddd0;
  --sp-line2: #efeade;
  --sp-card: #ffffff;
  --sp-wash: #f6f3ea;
  --sp-cin: #8c2f28;
  --sp-cinbg: #fbf2ef;
  --sp-cinline: #efd8d2;
  --sp-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --sp-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  background: #fdfcf9 !important;
  color: var(--sp-ink2);
}

/* ---------- 顶部工具条：修掉 20px 横向滚动 ----------
   主题给 #toptb 写了 min-width:1200px + padding:0 10px，且默认 content-box，
   所以实际最小占位 1220px；视口在 1200~1219 时会多出一条横向滚动条（家园各页都有）。*/
body#space #toptb { box-sizing: border-box; }

/* ---------- 关掉旧封面与旧头像区 ---------- */
body.pp-sp #hd { display: none !important; }
body.pp-sp .profile-pic { display: none !important; }
/* 内容区统一为 1200 居中：署名条 / 页签条 / 下面三栏同宽同左边界 */
body.pp-sp .wp:not(#ft) {
  width: 1200px !important;
  max-width: calc(100% - 24px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.pp-sp .personal-profile-section {
  width: 100% !important;
  background: none !important;
  border: 0 !important;
  padding: 18px 0 0 !important;
  margin: 0 !important;
}
body.pp-sp .profile-personal {
  width: 100% !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------- 通栏署名条 ---------- */
body.pp-sp .pp-sp-id {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--sp-card);
  border: 1px solid var(--sp-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 22px 26px 20px;
}
body.pp-sp .pp-sp-av {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sp-wash);
  box-shadow: 0 0 0 1px var(--sp-line), 0 0 0 5px #fff, 0 0 0 6px var(--sp-line2);
}
body.pp-sp .pp-sp-av img {
  width: 96px !important;
  height: 96px !important;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
body.pp-sp .pp-sp-i1 { min-width: 0; flex: 1; }
body.pp-sp .pp-sp-nm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--sp-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--sp-ink);
  letter-spacing: .01em;
}
body.pp-sp .pp-sp-gr {
  font-family: var(--sp-sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--sp-cin);
  background: var(--sp-cinbg);
  border: 1px solid var(--sp-cinline);
  border-radius: 3px;
  padding: 2px 8px;
}
body.pp-sp .pp-sp-gr2 {
  font-family: var(--sp-sans);
  font-size: 11.5px;
  font-weight: 400;
  color: #7a6a3f;
  background: #f8f3e3;
  border: 1px solid #e8dcc0;
  border-radius: 3px;
  padding: 2px 8px;
}
body.pp-sp .pp-sp-mt {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--sp-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
}
body.pp-sp .pp-sp-mt span { position: relative; }
body.pp-sp .pp-sp-mt span + span::before {
  content: "·";
  position: absolute;
  left: -9px;
  color: #cfc7b6;
}
/* 单位名做成了官网链接：虚线底 + ↗ 角标，hover 转朱砂（新窗口打开） */
body.pp-sp .pp-sp-mt span a.pp-corp,
body.pp-sp .pp-kv b a.pp-corp {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed #cfc7b6;
  cursor: pointer;
}
body.pp-sp .pp-sp-mt span a.pp-corp:hover,
body.pp-sp .pp-kv b a.pp-corp:hover { color: var(--sp-cin); border-bottom-color: var(--sp-cinline); }
body.pp-sp a.pp-corp::after {
  content: "↗";
  font-size: 11.5px;
  line-height: 1;
  margin-left: 3px;
  vertical-align: 3px;
  color: #b3aa98;
  font-weight: 400;
}
body.pp-sp a.pp-corp:hover::after { color: var(--sp-cin); }
body.pp-sp .pp-sp-bt {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.pp-sp .pp-sp-bt a {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  padding: 9px 16px;
  border: 1px solid var(--sp-line);
  border-radius: 5px;
  background: #fff;
  color: var(--sp-ink2);
  text-decoration: none;
  transition: all .15s;
}
body.pp-sp .pp-sp-bt a:hover {
  border-color: var(--sp-ink);
  color: var(--sp-ink);
}
body.pp-sp .pp-sp-bt a.pri {
  background: var(--sp-ink);
  border-color: var(--sp-ink);
  color: #fff;
}
body.pp-sp .pp-sp-bt a.pri:hover { background: #0d171c; border-color: #0d171c; }

/* ---------- 页签条 ---------- */
body.pp-sp .profile-nav {
  background: var(--sp-card) !important;
  border: 1px solid var(--sp-line) !important;
  border-top: 1px solid var(--sp-line2) !important;
  border-radius: 0 0 12px 12px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.pp-sp .profile-nav-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between;
  align-items: center;
  gap: 0 !important;
  width: 100% !important;
  height: auto !important;
  border: 0 !important;
  background: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.pp-sp .profile-nav-list a {
  display: block;
  flex: 0 1 auto !important;
  width: auto !important;
  height: auto !important;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3 !important;
  padding: 13px 12px !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.2;
  color: var(--sp-ink3) !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  text-decoration: none;
}
body.pp-sp .profile-nav-list a:hover { color: var(--sp-cin) !important; }
body.pp-sp .profile-nav-list a.cur {
  color: var(--sp-cin) !important;
  border-bottom-color: var(--sp-cin) !important;
  font-weight: 600;
}
body.pp-sp .profile-nav-list a i { display: none !important; }

/* ---------- 三栏 ---------- */
body.pp-sp #ct.pp-sp-ct {
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 30px !important;
  background: transparent !important;
  border: 0 !important;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 264px;
  gap: 18px;
  align-items: start;
  float: none !important;
}
body.pp-sp .pp-sp-col { min-width: 0; }
body.pp-sp .pp-card {
  background: var(--sp-card);
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  padding: 18px 18px 20px;
}
body.pp-sp .pp-card + .pp-card { margin-top: 16px; }
body.pp-sp .pp-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--sp-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--sp-cin);
}
body.pp-sp .pp-card h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sp-line2);
}

/* 档案字段 */
body.pp-sp .pp-kv { list-style: none; margin: 0; padding: 0; }
body.pp-sp .pp-kv li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--sp-line2);
}
body.pp-sp .pp-kv li:first-child { padding-top: 0; }
body.pp-sp .pp-kv li:last-child { border-bottom: 0; padding-bottom: 0; }
body.pp-sp .pp-kv em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--sp-muted);
  margin-bottom: 3px;
}
body.pp-sp .pp-kv b {
  display: block;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.65;
  color: var(--sp-ink);
  word-break: break-word;
}
body.pp-sp .pp-kv b a {
  color: var(--sp-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--sp-line);
}
body.pp-sp .pp-kv b a:hover { color: var(--sp-cin); border-color: var(--sp-cinline); }

/* 擅长版块 */
body.pp-sp .pp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
body.pp-sp .pp-tags a,
body.pp-sp .pp-tags span {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1.5;
  color: #4a463c;
  background: var(--sp-wash);
  border: 1px solid var(--sp-line2);
  border-radius: 4px;
  padding: 3px 8px;
  text-decoration: none;
}
body.pp-sp .pp-tags a:hover {
  color: var(--sp-cin);
  background: var(--sp-cinbg);
  border-color: var(--sp-cinline);
}
body.pp-sp .pp-tags i {
  font-style: normal;
  color: var(--sp-muted);
  margin-left: 4px;
}

/* 微信二维码 */
body.pp-sp .pp-qr { text-align: center; padding: 2px 0 0; }
body.pp-sp .pp-qr img {
  width: 132px;
  height: 132px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--sp-line);
  border-radius: 6px;
}
body.pp-sp .pp-qr p {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--sp-muted);
  letter-spacing: .04em;
}

/* 简介 */
body.pp-sp .pp-bio {
  font-size: 14px;
  line-height: 2;
  color: var(--sp-ink2);
}
body.pp-sp .pp-bio p { margin: 0 0 14px; }
body.pp-sp .pp-bio p:last-child { margin-bottom: 0; }
body.pp-sp .pp-sign {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--sp-line2);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--sp-muted);
}
body.pp-sp .pp-sign img { max-width: 100%; vertical-align: middle; }

/* 照片 */
body.pp-sp .pp-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
body.pp-sp .pp-media a {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sp-wash);
}
/* 用 contain 而不是 cover：横幅类附件被裁成一条会像坏图 */
body.pp-sp .pp-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .4s ease;
}
body.pp-sp .pp-media a:hover img { transform: scale(1.045); }

/* 卡片标题右侧的次要链接（如「视频库」），排在分隔线之后 */
body.pp-sp .pp-card h3 .pp-h3-more {
  order: 3;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--sp-muted);
  text-decoration: none;
}
body.pp-sp .pp-card h3 .pp-h3-more:hover { color: var(--sp-cin); }

/* 视频：两列 16:9 封面 + 标题 */
body.pp-sp .pp-vid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
}
body.pp-sp .pp-vid-i { display: block; text-decoration: none; }
body.pp-sp .pp-vid-c {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #1b2329;
}
body.pp-sp .pp-vid-c img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .92;
  transition: transform .4s ease, opacity .3s ease;
}
body.pp-sp .pp-vid-i:hover .pp-vid-c img { transform: scale(1.04); opacity: 1; }
/* 播放按钮：半透明圆 + 白色三角 */
body.pp-sp .pp-vid-c i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(10, 14, 17, .46);
  border: 1px solid rgba(255, 255, 255, .78);
  box-sizing: border-box;
}
body.pp-sp .pp-vid-c i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -6px 0 0 -3px;
  border-left: 9px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
body.pp-sp .pp-vid-i:hover .pp-vid-c i { background: rgba(140, 47, 40, .82); border-color: #fff; }
body.pp-sp .pp-vid-i b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 7px;
  font-family: var(--sp-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--sp-ink);
}
body.pp-sp .pp-vid-i:hover b { color: var(--sp-cin); }
body.pp-sp .pp-vid-i em {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-style: normal;
  color: var(--sp-muted);
  font-variant-numeric: tabular-nums;
}

/* 视频弹层：同域 iframe（pp_video.php?embed=ID） */
body.pp-sp .ppv-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 15, 19, .78);
}
body.pp-sp .ppv-box {
  width: 960px;
  max-width: 100%;
  background: #10171c;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
body.pp-sp .ppv-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: #ece7dc;
  font-family: var(--sp-sans);
  font-size: 13px;
  line-height: 1.5;
}
body.pp-sp .ppv-hd b {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.pp-sp .ppv-x {
  cursor: pointer;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  color: #a49d8f;
}
body.pp-sp .ppv-x:hover { color: #fff; }
body.pp-sp .ppv-body { position: relative; aspect-ratio: 16 / 9; background: #000; }
body.pp-sp .ppv-body iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }


/* 主题列表 */
body.pp-sp .pp-thr { list-style: none; margin: 0; padding: 0; }
body.pp-sp .pp-thr li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--sp-line2);
}
body.pp-sp .pp-thr li:first-child { padding-top: 0; }
body.pp-sp .pp-thr li:last-child { border-bottom: 0; padding-bottom: 0; }
body.pp-sp .pp-thr time {
  flex: 0 0 62px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--sp-muted);
  font-variant-numeric: tabular-nums;
}
body.pp-sp .pp-thr .t {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--sp-ink);
  text-decoration: none;
}
body.pp-sp .pp-thr .t:hover { color: var(--sp-cin); }
body.pp-sp .pp-thr .m {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--sp-muted);
  font-variant-numeric: tabular-nums;
}

/* 活跃 Timeline */
body.pp-sp .pp-tl {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 15px;
  position: relative;
}
body.pp-sp .pp-tl::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--sp-line2);
}
body.pp-sp .pp-tl li { position: relative; padding: 0 0 14px; }
body.pp-sp .pp-tl li:last-child { padding-bottom: 0; }
body.pp-sp .pp-tl li::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--sp-cin);
}
body.pp-sp .pp-tl li:first-child::before { background: var(--sp-cin); }
body.pp-sp .pp-tl strong {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--sp-ink);
}
body.pp-sp .pp-tl em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--sp-muted);
  margin-top: 2px;
}

/* 数据 */
body.pp-sp .pp-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--sp-line2);
}
body.pp-sp .pp-nums b {
  display: block;
  font-family: var(--sp-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--sp-ink);
  font-variant-numeric: tabular-nums;
}
body.pp-sp .pp-nums em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--sp-muted);
  margin-top: 3px;
}

/* 勋章 */
body.pp-sp .pp-mdls { display: flex; flex-wrap: wrap; gap: 8px; }
body.pp-sp .pp-mdls img { width: 30px; height: 30px; border-radius: 3px; }

/* 空状态 */
body.pp-sp .pp-empty {
  border: 1px dashed var(--sp-line);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 20px 14px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--sp-muted);
}
body.pp-sp .pp-empty a {
  color: var(--sp-cin);
  text-decoration: none;
  border-bottom: 1px solid var(--sp-cinline);
}
/* 左栏窄卡里的紧凑空状态 */
body.pp-sp .pp-empty-sm { padding: 12px 10px; font-size: 12px; line-height: 1.8; }

/* 违规记录（管理员） */
body.pp-sp .pp-crime { margin-top: 18px; }
body.pp-sp .pp-crime table { width: 100%; border-collapse: collapse; font-size: 12px; }
body.pp-sp .pp-crime th,
body.pp-sp .pp-crime td {
  border-bottom: 1px solid var(--sp-line2);
  padding: 8px 6px;
  text-align: left;
  color: var(--sp-ink2);
}
body.pp-sp .pp-crime th { color: var(--sp-muted); font-weight: 400; }

/* 站长推荐浮层在本页收起，避免压住右栏 */
body.pp-sp #sitefocus { display: none !important; }

/* 页脚与浮层让位 */
body.pp-sp #ft { background: #f3efe4; }

@media (max-width: 1240px) {
  /* wp 已用 max-width: calc(100% - 24px) 留边，这里不能再内缩，否则三栏会比署名条窄 */
  body.pp-sp #ct.pp-sp-ct { width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
}
