/* 在线修谱插件 样式表 */
.xiupu-wrap { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.xiupu-wrap h1.xiupu-title { font-size: 24px; margin-bottom: 16px; color: #1e293b; }
.xiupu-wrap h2.xiupu-subtitle { font-size: 18px; margin: 24px 0 12px; color: #334155; border-left: 3px solid #2563eb; padding-left: 10px; }

/* 家族列表 */
.xiupu-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.xiupu-family-card {
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px;
  background: #fff; transition: all .2s; text-decoration: none; color: inherit; display: block;
}
.xiupu-family-card:hover { border-color: #2563eb; box-shadow: 0 6px 20px -8px rgba(37,99,235,.25); transform: translateY(-2px); }
.xiupu-family-card .surname { font-size: 28px; font-weight: 700; color: #2563eb; letter-spacing: 2px; }
.xiupu-family-card .name { font-size: 18px; font-weight: 600; margin: 6px 0 4px; }
.xiupu-family-card .origin { font-size: 13px; color: #64748b; }
.xiupu-family-card .stats { margin-top: 12px; font-size: 12px; color: #94a3b8; }

/* 家族概览 */
.xiupu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.xiupu-stat-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; text-align: center; }
.xiupu-stat-item .num { font-size: 24px; font-weight: 700; color: #2563eb; }
.xiupu-stat-item .label { font-size: 12px; color: #64748b; margin-top: 4px; }

/* 人物列表 */
.xiupu-persons { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.xiupu-person-card {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; text-decoration: none; color: inherit;
  background: #fff; display: flex; gap: 12px; align-items: center;
}
.xiupu-person-card:hover { border-color: #2563eb; }
.xiupu-person-card .avatar {
  width: 48px; height: 48px; border-radius: 50%; background: #dbeafe;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #2563eb; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.xiupu-person-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.xiupu-person-card .info { flex: 1; min-width: 0; }
.xiupu-person-card .pname { font-weight: 600; color: #1e293b; }
.xiupu-person-card .psub { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* 人物详情 */
.xiupu-person-detail { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.xiupu-person-detail .avatar-big {
  width: 200px; height: 200px; border-radius: 16px; background: #dbeafe;
  display: flex; align-items: center; justify-content: center; font-size: 72px; color: #2563eb; font-weight: 700;
  overflow: hidden;
}
.xiupu-person-detail .avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.xiupu-person-detail .pname-big { font-size: 28px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.xiupu-person-detail .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.xiupu-person-detail .field-item { font-size: 14px; }
.xiupu-person-detail .field-label { color: #94a3b8; font-size: 12px; }
.xiupu-person-detail .field-value { color: #334155; }
.xiupu-section-title { font-size: 16px; font-weight: 600; margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; color: #1e293b; }
.xiupu-relations { display: flex; flex-wrap: wrap; gap: 8px; }
.xiupu-relation-chip {
  display: inline-block; padding: 4px 12px; background: #f1f5f9; border-radius: 20px;
  font-size: 13px; color: #475569; text-decoration: none;
}
.xiupu-relation-chip:hover { background: #2563eb; color: #fff; }

/* 编辑表单 */
.xiupu-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.xiupu-form .form-row { display: flex; flex-direction: column; gap: 4px; }
.xiupu-form label { font-size: 13px; color: #64748b; font-weight: 500; }
.xiupu-form input, .xiupu-form select, .xiupu-form textarea {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 14px;
  outline: none; transition: border-color .2s; background: #fff;
}
.xiupu-form input:focus, .xiupu-form select:focus, .xiupu-form textarea:focus { border-color: #2563eb; }
.xiupu-form .full-width { grid-column: 1 / -1; }
.xiupu-btn { padding: 10px 24px; background: #2563eb; color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.xiupu-btn:hover { background: #1d4ed8; }
.xiupu-btn-secondary { background: #64748b; }
.xiupu-btn-secondary:hover { background: #475569; }
.xiupu-btn-danger { background: #ef4444; }

/* ========== 家族树可视化 ========== */
.xiupu-tree-container { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid #e2e8f0; background: #fafbfc; height: calc(100vh - 180px); }
.xiupu-toolbar {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 10;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.xiupu-toolbar .tb-group {
  display: flex; gap: 4px; background: rgba(255,255,255,.95); border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 4px;
}
.xiupu-toolbar .tb-btn {
  padding: 6px 12px; border-radius: 6px; border: none; background: transparent; cursor: pointer;
  font-size: 13px; color: #475569; transition: all .15s;
}
.xiupu-toolbar .tb-btn:hover { background: #f1f5f9; }
.xiupu-toolbar .tb-btn.active { background: #2563eb; color: #fff; }
.xiupu-toolbar .tb-select {
  padding: 6px 10px; border-radius: 6px; border: 1px solid #e2e8f0; font-size: 13px; color: #475569; background: #fff;
}
.xiupu-tree-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  cursor: grab; overflow: hidden;
}
.xiupu-tree-canvas.dragging { cursor: grabbing; }
.xiupu-tree-scene { position: absolute; transform-origin: 0 0; }

/* 树节点 */
.xiupu-node {
  position: absolute; width: 110px; text-align: center; transition: box-shadow .15s;
  cursor: pointer;
}
.xiupu-node-card {
  border-radius: 10px; padding: 10px 8px; background: #fff; border: 2px solid #e2e8f0;
  box-shadow: 0 2px 6px -4px rgba(0,0,0,.1);
  transition: all .2s;
}
.xiupu-node-card:hover { box-shadow: 0 4px 16px -4px rgba(37,99,235,.4); transform: translateY(-2px); }
.xiupu-node.male .xiupu-node-card { border-color: #3b82f6; background: linear-gradient(135deg,#eff6ff,#fff); }
.xiupu-node.female .xiupu-node-card { border-color: #ec4899; background: linear-gradient(135deg,#fdf2f8,#fff); }
.xiupu-node.deceased .xiupu-node-card { opacity: .75; }
.xiupu-node.highlight .xiupu-node-card { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.3); }
.xiupu-node .n-avatar {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 4px;
  background: #e2e8f0; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #64748b; overflow: hidden;
}
.xiupu-node .n-avatar img { width: 100%; height: 100%; object-fit: cover; }
.xiupu-node.male .n-avatar { background: #dbeafe; color: #1d4ed8; }
.xiupu-node.female .n-avatar { background: #fce7f3; color: #be185d; }
.xiupu-node .n-name { font-weight: 600; font-size: 13px; color: #1e293b; line-height: 1.2; }
.xiupu-node .n-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* 连接线 SVG */
.xiupu-tree-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.xiupu-tree-svg line, .xiupu-tree-svg path { stroke: #94a3b8; stroke-width: 1.5; fill: none; }
.xiupu-tree-svg .spouse-line { stroke: #ec4899; stroke-dasharray: 4 3; }

/* 世代分隔 */
.xiupu-gen-label {
  position: absolute; font-size: 11px; color: #cbd5e1; font-weight: 600;
  letter-spacing: 2px; transform: rotate(-90deg); transform-origin: left center;
  left: 0; z-index: 1;
}

/* 筛选/搜索面板 */
.xiupu-search-panel {
  position: absolute; top: 12px; right: 12px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 10px; box-shadow: 0 4px 16px -4px rgba(0,0,0,.08); z-index: 10;
  min-width: 240px;
}
.xiupu-search-panel .panel-title { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.xiupu-search-panel input[type=text] {
  width: 100%; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; box-sizing: border-box;
}
.xiupu-search-panel .option-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.xiupu-search-panel .chip {
  padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #f1f5f9; color: #64748b;
  cursor: pointer; border: 1px solid transparent;
}
.xiupu-search-panel .chip.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* 模态框 */
.xiupu-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.xiupu-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; }
.xiupu-modal-header { padding: 16px 20px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.xiupu-modal-header h3 { margin: 0; font-size: 16px; color: #1e293b; }
.xiupu-modal-close { background: none; border: none; font-size: 22px; color: #94a3b8; cursor: pointer; }
.xiupu-modal-body { padding: 20px; }
.xiupu-modal-footer { padding: 14px 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 8px; }

/* ========== 中国风主题 · 修谱首页 ========== */
.xp-home {
  margin: 0; color: #2b2b2b;
  font-family: "Songti SC", "STSong", "SimSun", "PingFang SC", serif;
}
.xp-home, .xp-paper, .xp-paper * { -webkit-font-smoothing: antialiased; }

.xp-hero {
  position: relative; overflow: hidden; padding: 64px 16px 80px; color: #2b2b2b;
  background-color: #f6eedc;
  background-image:
    radial-gradient(circle at 12% 16%, rgba(176, 141, 87, .18), transparent 42%),
    radial-gradient(circle at 86% 4%, rgba(158, 43, 37, .14), transparent 46%),
    repeating-linear-gradient(0deg, rgba(43, 43, 43, .028) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #faf5e9 0%, #f3ead7 52%, #ece0c9 100%);
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0;
  background-size: auto, auto, auto, auto;
  border-bottom: 1px solid #e2d5bd;
}
.xp-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='34' viewBox='0 0 64 34'%3E%3Cg fill='none' stroke='%239e2b25' stroke-opacity='.4' stroke-width='1.2'%3E%3Cpath d='M0 30a16 16 0 0 1 32 0'/%3E%3Cpath d='M32 30a16 16 0 0 1 32 0'/%3E%3Cpath d='M-16 12a16 16 0 0 1 32 0'/%3E%3Cpath d='M16 12a16 16 0 0 1 32 0'/%3E%3Cpath d='M48 12a16 16 0 0 1 32 0'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: 0 100%; background-size: 64px 34px;
  opacity: .55; border-top: 1px solid rgba(158, 43, 37, .16);
}
.xp-hero-inner {
  position: relative; z-index: 2; max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1.35fr .9fr; gap: 44px; align-items: center;
}
.xp-hero-badge {
  display: inline-block; padding: 6px 16px; font-size: 12px; letter-spacing: 3px;
  color: #8a6a3d; background: rgba(255, 255, 255, .6);
  border: 1px solid #d9c9a9;
}
.xp-hero-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 52px; line-height: 1.2; letter-spacing: 10px; margin: 22px 0 16px;
  font-weight: 700; color: #1f1f1f;
}
.xp-hero-desc {
  font-size: 15px; line-height: 2; color: #5f5a52; max-width: 540px; margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.xp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.xp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 26px; font-size: 14px; text-decoration: none; letter-spacing: 2px;
  border-radius: 2px; transition: all .2s;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.xp-btn-primary {
  background: #9e2b25; color: #fdf8ef; border: 1px solid #8c211c;
  box-shadow: 0 10px 22px -14px rgba(140, 33, 28, .9);
}
.xp-btn-primary:hover { background: #8c211c; transform: translateY(-2px); }
.xp-btn-ghost { color: #6b4a2f; border: 1px solid #c9b48c; background: rgba(255, 255, 255, .35); }
.xp-btn-ghost:hover { background: rgba(255, 255, 255, .8); border-color: #9e2b25; color: #9e2b25; }
.xp-btn-inline { margin-top: 22px; }
.xp-hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.xp-stat {
  position: relative; text-align: center; padding: 20px 12px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid #ddcbaa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.xp-stat::before {
  content: ""; position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid rgba(176, 141, 87, .22); pointer-events: none;
}
.xp-stat-num {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 30px; font-weight: 700; line-height: 1.1; color: #9e2b25;
}
.xp-stat-label { font-size: 12px; color: #7a6a52; margin-top: 8px; letter-spacing: 3px; }
.xp-hero-ornament {
  position: absolute; right: 3%; bottom: -46px; z-index: 1; pointer-events: none;
  width: 170px; height: 170px; display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 92px; color: #fdf8ef; font-weight: 700;
  background: rgba(158, 43, 37, .16); border: 3px double rgba(158, 43, 37, .28);
  transform: rotate(-8deg);
}

.xp-section {
  box-sizing: border-box; width: 100%; max-width: 1080px;
  margin: 0 auto; padding: 56px 24px 4px;
}
.xp-section-head { text-align: center; }
.xp-section-head h2 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 28px; margin: 0; letter-spacing: 6px; color: #1f1f1f;
}
.xp-section-head h2::after {
  content: ""; display: block; width: 56px; height: 2px; margin: 16px auto 0;
  background: #9e2b25;
}
.xp-section-head p { margin: 14px 0 0; font-size: 14px; color: #7a6a52; letter-spacing: 1px; }

.xp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 30px; }
.xp-feature {
  background: #fbf6ec; border: 1px solid #e2d5bd; padding: 24px 20px;
  transition: all .22s;
}
.xp-feature:hover { border-color: #c9b48c; transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(70, 50, 20, .55); }
.xp-feature-icon {
  width: 44px; height: 44px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  color: #9e2b25; background: #f3e7d2; border: 1px solid #e0cfae;
}
.xp-feature h3 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px; margin: 0; color: #1f1f1f; letter-spacing: 2px;
}
.xp-feature p { font-size: 13px; line-height: 1.9; color: #6f675c; margin: 9px 0 0; }

.xp-family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 30px; }
.xp-family-card {
  display: flex; gap: 16px; padding: 18px; text-decoration: none; color: inherit;
  background: #fbf6ec; border: 1px solid #e2d5bd; transition: all .22s;
}
.xp-family-card:hover { border-color: #9e2b25; transform: translateY(-3px); box-shadow: 0 18px 32px -24px rgba(70, 50, 20, .6); }
.xp-family-stamp {
  width: 58px; height: 58px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 26px; font-weight: 700; letter-spacing: 2px; color: #fdf8ef;
  background: #9e2b25; border: 3px double #f0e2c8; box-shadow: 0 0 0 1px #9e2b25;
}
.xp-family-body { flex: 1; min-width: 0; }
.xp-family-name {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 17px; font-weight: 600; color: #1f1f1f; letter-spacing: 2px;
}
.xp-family-meta { font-size: 12px; color: #8b8072; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-family-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.xp-tag { font-size: 11px; padding: 2px 10px; color: #6b5a3f; background: #f0e6d2; border: 1px solid #e0cfae; }
.xp-tag-muted { color: #9e2b25; background: #f7e6e2; border-color: #e6c4bd; }
.xp-family-arrow { margin-left: auto; color: #b0a08a; font-size: 15px; }

.xp-empty {
  margin-top: 30px; padding: 52px 24px; text-align: center;
  background: #fbf6ec; border: 1px dashed #d5c3a1;
}
.xp-empty-mark {
  width: 66px; height: 66px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 30px; font-weight: 700; color: #fdf8ef;
  background: #9e2b25; border: 3px double #f0e2c8;
}
.xp-empty h3 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 18px; margin: 0; color: #1f1f1f; letter-spacing: 2px;
}
.xp-empty p { font-size: 13px; color: #82796a; line-height: 2; max-width: 460px; margin: 12px auto 0; }

.xp-footer-dot { margin: 0 10px; color: #9e2b25; }

/* ========== 中国风 · 建谱页 ========== */
.xp-paper {
  margin: 0; min-height: 100vh; padding: 1px 0 48px;
  font-family: "Songti SC", "STSong", "SimSun", "PingFang SC", serif; color: #2b2b2b;
  --xp-panel-w: 760px;
}
.xp-paper:has(.xp-paper-panel.is-wide) { --xp-panel-w: 1040px; }
.xp-paper:has(.xp-paper-panel.is-narrow) { --xp-panel-w: 620px; }
/* 返回链接与内容面板左边缘对齐（同宽居中，不再贴左） */
.xp-back {
  display: block; box-sizing: border-box; width: 100%;
  max-width: var(--xp-panel-w, 760px); margin: 26px auto 0;
  font-size: 13px; color: #7a6a52; text-decoration: none; letter-spacing: 1px;
}
.xp-back:hover { color: #9e2b25; }
.xp-paper-panel {
  position: relative;
  max-width: 760px; margin: 18px auto 0; padding: 34px 36px 30px;
  border: 1px solid #e2d5bd;
  /* 纸底：已移除左右角的祥云暗纹，保持纯净纸面 */
  background-color: #fdfaf2;
  background-image: none;
  box-shadow: 0 22px 46px -34px rgba(70, 50, 20, .55), inset 0 0 0 6px #fdfaf2, inset 0 0 0 7px #eadfca;
}
.xp-panel-head { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid #e8dcc4; }
.xp-seal {
  width: 52px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 26px; font-weight: 700;
  color: #fdf8ef; background: #9e2b25; border: 3px double #f0e2c8;
}
.xp-panel-head .xiupu-title { margin: 0; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 22px; letter-spacing: 4px; color: #1f1f1f; }
.xp-panel-sub { margin: 7px 0 0; font-size: 12px; line-height: 1.8; color: #82796a; }
.xp-notice {
  margin: 20px 0 0; padding: 11px 16px; font-size: 13px; color: #8c4a1c;
  background: #f8eede; border-left: 3px solid #b08d57;
}

/* 新手引导（建谱页） */
.xp-guide {
  margin: 22px 0 0; padding: 18px 20px 20px;
  background: #f7efdf; border: 1px solid #e8dcc4; border-left: 3px solid #9e2b25;
}
.xp-guide-title {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px; letter-spacing: 2px; color: #1f1f1f;
}
.xp-guide-title::before {
  content: "新"; flex-shrink: 0;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fdf8ef; background: #9e2b25;
}
.xp-guide-intro { margin: 9px 0 0; font-size: 13px; line-height: 1.9; color: #7a6a52; }
.xp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.xp-step {
  position: relative; padding: 12px 12px 12px 42px;
  background: #fdfaf2; border: 1px solid #e2d5bd;
}
.xp-step-num {
  position: absolute; top: 12px; left: 12px; width: 21px; height: 21px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fdf8ef; background: #9e2b25; border-radius: 50%;
}
.xp-step h4 {
  margin: 0; font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 13px; letter-spacing: 1px; color: #1f1f1f;
}
.xp-step p { margin: 5px 0 0; font-size: 12px; line-height: 1.7; color: #8b8072; }
.xp-field-hint { margin: 3px 0 0; font-size: 12px; line-height: 1.6; color: #a3927a; }
.xp-form-divider {
  margin: 26px 0 2px; padding-bottom: 8px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 14px; letter-spacing: 2px; color: #1f1f1f;
  border-bottom: 1px solid #e8dcc4;
}

@media (max-width: 900px) {
  .xp-hero { padding: 46px 16px 54px; }
  .xp-hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .xp-hero-title { font-size: 36px; letter-spacing: 6px; }
  .xp-hero-ornament { width: 120px; height: 120px; font-size: 64px; bottom: -26px; }
  .xp-hero-stats { grid-template-columns: repeat(4, 1fr); }
  .xp-stat { padding: 14px 6px; }
  .xp-stat-num { font-size: 22px; }
  .xp-stat-label { font-size: 11px; letter-spacing: 1px; }
  .xp-paper-panel { margin-left: 16px; margin-right: 16px; padding: 26px 20px; }
  .xp-back { padding: 0 16px; }
  .xp-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .xp-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .xp-family-grid { grid-template-columns: 1fr; }
  .xp-panel-head { align-items: flex-start; }
  .xp-steps { grid-template-columns: 1fr; }
  .xp-guide { padding: 16px 14px; }
}

/* ========== 中国风 · 前台通用组件覆盖 ========== */
.xiupu-wrap h1.xiupu-title,
.xiupu-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  letter-spacing: 3px; color: #1f1f1f;
}
.xiupu-subtitle { border-left: 3px solid #9e2b25 !important; color: #3b332a !important; letter-spacing: 2px; }
.xiupu-family-card, .xiupu-person-card, .xiupu-stat-item {
  border: 1px solid #e2d5bd; background: #fbf6ec; border-radius: 2px;
}
.xiupu-family-card { background: #fdfaf2; box-shadow: inset 0 0 0 5px #fdfaf2, inset 0 0 0 6px #eee2cc; padding: 20px; }
.xiupu-family-card:hover, .xiupu-person-card:hover { border-color: #9e2b25; box-shadow: 0 16px 30px -24px rgba(70, 50, 20, .55); }
.xiupu-family-card .surname { color: #9e2b25; font-family: "Songti SC", "STSong", "SimSun", serif; }
.xiupu-family-card .name { font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: 1px; color: #1f1f1f; }
.xiupu-family-card .origin, .xiupu-family-card .stats, .xiupu-person-card .psub { color: #8b8072; }
.xiupu-person-card .avatar, .xiupu-person-detail .avatar-big { background: #f3e7d2; color: #9e2b25; border-radius: 2px; }
.xiupu-stat-item .num { color: #9e2b25; font-family: "Songti SC", "STSong", "SimSun", serif; }
.xiupu-stat-item .label { color: #7a6a52; letter-spacing: 2px; }
.xiupu-section-title {
  font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: 2px;
  border-bottom: 1px solid #e2d5bd; color: #1f1f1f;
}
.xiupu-relation-chip { background: #f0e6d2; color: #6b5a3f; border-radius: 2px; border: 1px solid #e0cfae; }
.xiupu-relation-chip:hover { background: #9e2b25; color: #fdf8ef; border-color: #9e2b25; }
.xiupu-form input, .xiupu-form select, .xiupu-form textarea {
  border: 1px solid #ddcbaa; border-radius: 2px; background: #fdfaf2; color: #2b2b2b;
}
.xiupu-form input:focus, .xiupu-form select:focus, .xiupu-form textarea:focus { border-color: #9e2b25; box-shadow: 0 0 0 3px rgba(158, 43, 37, .1); }
.xiupu-form label { color: #7a6a52; letter-spacing: 1px; }
.xiupu-btn {
  background: #9e2b25; color: #fdf8ef; border-radius: 2px; letter-spacing: 2px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  border: 1px solid #8c211c;
}
.xiupu-btn:hover { background: #8c211c; }
.xiupu-btn-secondary { background: #8b8072; border-color: #7a6a52; }
.xiupu-btn-secondary:hover { background: #756a5c; }
.xiupu-btn-danger { background: #b3402f; }
.xp-form-actions { display: flex; gap: 12px; align-items: center; }
.xiupu-tree-container { border: 1px solid #ddcbaa; border-radius: 2px; background: #faf5e9; }
.xiupu-toolbar .tb-group { border: 1px solid #ddcbaa; border-radius: 2px; background: rgba(253, 250, 242, .96); }
.xiupu-toolbar .tb-btn.active { background: #9e2b25; color: #fdf8ef; }
.xiupu-node-card { border-radius: 2px; border-width: 1px; background: #fdfaf2; }
.xiupu-node.male .xiupu-node-card { border-color: #3c5a76; background: linear-gradient(135deg, #eef2f6, #fdfaf2); }
.xiupu-node.female .xiupu-node-card { border-color: #a63a58; background: linear-gradient(135deg, #f8eef1, #fdfaf2); }
.xiupu-node.highlight .xiupu-node-card { border-color: #b08d57; box-shadow: 0 0 0 3px rgba(176, 141, 87, .3); }

/* ========== 中国风 · 页面基底 ========== */
body {
  margin: 0;
  color: #2b2b2b;
  font-family: "Songti SC", "STSong", "SimSun", "PingFang SC", serif;
  background-color: #f7efdd;
  background-image:
    repeating-linear-gradient(0deg, rgba(43, 43, 43, .022) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #faf5e9 0%, #f3ead7 100%);
  background-repeat: repeat, no-repeat;
  background-position: 0 0, 0 0;
  background-size: auto, auto;
  background-attachment: fixed, fixed;
  -webkit-font-smoothing: antialiased;
}
/* 整页壁纸已移除：避免龙纹 + 祥云 + 「龙」字整页平铺造成背景过乱。
   页面装饰交由 body 自带的低透明度团龙水印、祥云瓦片与纸纹承担。 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: none;
}

/* 面板宽度变体 */
.xp-paper-panel.is-wide { max-width: 1040px; }
.xp-paper-panel.is-narrow { max-width: 620px; }

/* 页内信息块 */
.xp-info-block {
  margin: 22px 0 0; padding: 16px 18px;
  font-size: 14px; line-height: 1.9; color: #4a4238;
  background: #f7efdf; border: 1px solid #e8dcc4; border-left: 3px solid #b08d57;
}

/* 页内小标题（与 .xp-section 区块容器区分，勿混用） */
.xp-block-title {
  margin: 30px 0 14px; padding-bottom: 8px;
  font-size: 15px; letter-spacing: 3px; color: #1f1f1f;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  border-bottom: 1px solid #e2d5bd;
}
.xp-block-title small { margin-left: 8px; font-size: 12px; letter-spacing: 1px; color: #a3927a; }

/* 徽章 */
.xp-badge {
  display: inline-block; padding: 3px 12px;
  font-size: 12px; letter-spacing: 2px; border: 1px solid;
}
.xp-badge.alive { color: #3f6b45; background: #eef3e6; border-color: #c9d8b6; }
.xp-badge.dead  { color: #8c211c; background: #f8e7e3; border-color: #e6c3bb; }

/* 筛选工具条 */
.xp-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.xp-filter input, .xp-filter select {
  padding: 9px 12px; font-size: 14px; color: #2b2b2b; font-family: inherit;
  background: #fdfaf2; border: 1px solid #ddcbaa; border-radius: 2px;
}
.xp-filter input:focus, .xp-filter select:focus {
  outline: none; border-color: #9e2b25; box-shadow: 0 0 0 3px rgba(158, 43, 37, .1);
}
.xp-filter input[type="text"] { min-width: 200px; }

/* 详情字段 */
.xiupu-person-detail .pname-big { color: #1f1f1f; font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: 2px; }
.xiupu-person-detail .field-label { color: #a3927a; letter-spacing: 2px; }
.xiupu-person-detail .field-value { color: #3b332a; }
.xiupu-person-detail .field-item { padding-bottom: 8px; border-bottom: 1px dotted #e8dcc4; }
.xiupu-person-card .pname { color: #1f1f1f; font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: 2px; }

/* 关系分组小标 */
.xp-rel-label { margin-bottom: 8px; font-size: 12px; letter-spacing: 2px; color: #8b8072; }

/* 分页 */
.xp-pager { margin: 26px 0 4px; text-align: center; }
.xp-pager a {
  display: inline-block; min-width: 30px; padding: 5px 10px; margin: 0 3px;
  font-size: 13px; color: #7a6a52; text-decoration: none;
  background: #fdfaf2; border: 1px solid #ddcbaa; border-radius: 2px;
}
.xp-pager a:hover { border-color: #9e2b25; color: #9e2b25; }
.xp-pager a.active { background: #9e2b25; border-color: #8c211c; color: #fdf8ef; }

/* 空状态（面板内） */
.xp-paper .xp-empty { padding: 54px 0; text-align: center; font-size: 13px; letter-spacing: 2px; color: #a3927a; }

/* 弹窗 */
.xiupu-modal { border: 1px solid #ddcbaa; border-radius: 2px; background: #fdfaf2; }
.xiupu-modal-header { border-bottom: 1px solid #e8dcc4; }
.xiupu-modal-header h3 { font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: 2px; color: #1f1f1f; }
.xiupu-modal-footer { border-top: 1px solid #e8dcc4; }

/* 弹窗表单域 */
.xp-modal-field { display: flex; flex-direction: column; gap: 6px; }
.xp-modal-field label { font-size: 12px; letter-spacing: 2px; color: #8b8072; }
.xp-modal-field input, .xp-modal-field select {
  width: 100%; padding: 9px 12px; font-family: inherit; font-size: 14px;
  color: #2b2b2b; background: #fdfaf2; border: 1px solid #ddcbaa; border-radius: 2px;
}
.xp-modal-field input:focus, .xp-modal-field select:focus {
  outline: none; border-color: #9e2b25; box-shadow: 0 0 0 3px rgba(158, 43, 37, .1);
}

/* 搜索下拉结果 */
.xp-result-list {
  max-height: 150px; overflow: auto; margin-top: 4px;
  background: #fdfaf2; border: 1px solid #e8dcc4; border-radius: 2px;
}
.xp-result-item {
  padding: 8px 10px; font-size: 13px; color: #3b332a; cursor: pointer;
  border-bottom: 1px solid #f0e6d2;
}
.xp-result-item:last-child { border-bottom: 0; }
.xp-result-item:hover { background: #f7efdf; color: #9e2b25; }
.xp-result-empty { padding: 8px 10px; font-size: 12px; color: #a3927a; }

/* 响应式 */
@media (max-width: 768px) {
  .xiupu-person-detail { grid-template-columns: 1fr; }
  .xiupu-tree-container { height: 60vh; }
  .xiupu-node { width: 88px; }
  .xiupu-node .n-name { font-size: 11px; }
  .xiupu-node .n-avatar { width: 32px; height: 32px; font-size: 14px; }
  .xp-filter input[type="text"] { min-width: 0; flex: 1 1 100%; }
}

/* ========== 站内公共页头（所有前台页面共用） ========== */
.xp-site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 245, 233, .97);
  border-bottom: 1px solid #e2d5bd;
  box-shadow: 0 12px 24px -22px rgba(70, 50, 20, .8);
}
.xp-site-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  min-height: 60px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.xp-site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.xp-site-brand-seal {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px; font-weight: 700; color: #fdf8ef;
  background: #9e2b25; border: 2px double #f0e2c8;
}
.xp-site-brand-name {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 17px; letter-spacing: 3px; color: #1f1f1f;
}
.xp-site-brand-sub {
  padding-left: 10px; font-size: 11px; letter-spacing: 2px;
  color: #a3927a; border-left: 1px solid #e2d5bd;
}
.xp-site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.xp-site-nav a {
  padding: 7px 12px; font-size: 13px; letter-spacing: 1px; color: #6b5a3f;
  text-decoration: none; border: 1px solid transparent;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.xp-site-nav a:hover { color: #9e2b25; background: #f7efdf; border-color: #e8dcc4; }
.xp-site-nav a.xp-site-nav-home {
  margin-left: 4px; padding-left: 16px; color: #9e2b25;
  border-left: 1px solid #e2d5bd;
}
.xp-site-nav a.xp-site-nav-home:hover { background: #f7efdf; border-color: transparent; border-left-color: #9e2b25; }

/* ========== 站内公共页脚（接入真实祥云纹素材） ========== */
.xp-site-footer {
  position: relative;
  margin-top: 48px; padding: 36px 16px 40px; text-align: center;
  font-size: 12px; letter-spacing: 3px; color: #6b5a3f;
  border-top: 1px solid #e2d5bd;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  background-color: #efe3cd;
  /* 页脚不再铺 543.jpg 龙纹壁纸，改为纯色，仅保留顶部 tiaowen 花边 */
  background-image: none;
}
.xp-site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 92px;
  background: none;
  opacity: .6; pointer-events: none;
}
.xp-site-footer-inner { position: relative; z-index: 1; }
.xp-site-footer a { color: #9e2b25; text-decoration: none; }
.xp-site-footer a:hover { text-decoration: underline; }

/* 首页主视觉：已移除 3333.jpg 团龙水印，恢复纯 CSS 中国风 */
.xp-hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  right: -110px; bottom: -140px; width: 700px; height: 700px;
  background: none;
  opacity: .32; mix-blend-mode: multiply;
}
/* 主视觉标题下的祥云点缀：已移除 444.png，恢复纯 CSS 中国风 */
.xp-hero-text::after {
  content: ""; display: block; width: 130px; height: 56px; margin-top: 26px;
  background: none;
  opacity: .7;
}

/* 大屏：六个功能卡片一排显示 */
@media (min-width: 1024px) {
  .xp-features { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .xp-feature { padding: 20px 14px 18px; }
  .xp-feature-icon { width: 38px; height: 38px; margin-bottom: 12px; font-size: 17px; }
  .xp-feature h3 { font-size: 15px; letter-spacing: 1px; }
  .xp-feature p { margin-top: 8px; font-size: 12px; line-height: 1.85; }
}
@media (max-width: 640px) {
  .xp-site-header-inner { min-height: 54px; }
  .xp-site-brand-sub { display: none; }
  .xp-site-nav a { padding: 6px 9px; font-size: 12px; letter-spacing: 0; }
  .xp-hero::before { width: 380px; height: 380px; right: -120px; bottom: -100px; }
}
