/* ========== 家族树 ========== */
.tree-container { max-width: 100%; overflow-x: auto; padding: 20px; }
.tree { text-align: center; }
.tree ul { padding-top: 20px; position: relative; }
.tree li { display: inline-block; vertical-align: top; text-align: center; list-style: none; position: relative; padding: 20px 5px 0 5px; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid #8B0000; width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 2px solid #8B0000; }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid #8B0000; border-radius: 0 5px 0 0; }
.tree li:first-child::after { border-radius: 5px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #8B0000; width: 0; height: 20px; }
.person-card { display: inline-block; border: 2px solid #8B0000; border-radius: 8px; padding: 10px 15px; background: #fff; min-width: 80px; cursor: pointer; transition: all 0.2s; }
.person-card:hover { background: #fdf5e6; box-shadow: 0 2px 8px rgba(139,0,0,0.3); }
.person-card .name { font-size: 16px; font-weight: bold; color: #8B0000; }
.person-card .years { font-size: 12px; color: #666; }
.person-card .gen { font-size: 11px; color: #999; margin-top: 2px; }

/* ========== 搜索控件 ========== */
.tree-controls { text-align: center; margin: 15px 0; }
.tree-controls input[type="text"] { padding: 6px 12px; font-size: 14px; width: 200px; border: 1px solid #ddd; border-radius: 4px; }
.tree-controls button { padding: 6px 12px; font-size: 14px; background: #8B0000; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.tree-controls select { padding: 6px 12px; font-size: 14px; }