* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", "SimSun", sans-serif;
  background: #f7f4ef;
  color: #333;
}

/* ===== 横幅：背景拉伸 + 左 logo + 右四字（高度由内容撑开） ===== */
.banner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: url(../img/title-b.png) no-repeat center;
  background-size: 100% 100%;
  padding: 10px 0 10px calc((100% - 1000px) / 2 + 16px);
  margin-top: 10px;
  gap: 10px;
}
.banner-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.banner-logo img {
  height: 64px;
  width: auto;
  display: block;
}
.banner-texts {
  flex: 0 0 auto;
  width: 66.66%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}
.banner-texts img {
  height: 64px;
  width: auto;
  display: block;
}
/* 横幅右 div 后的小字（电脑端显示） */
.banner-url {
  font-size: 13px;
  color: #99522e;
  white-space: nowrap;
}

/* ===== 导航菜单（电脑端） ===== */
.nav-bar {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  background: #fff;
  border-bottom: 2px solid #99522e;
  padding: 10px 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.nav-item {
  display: inline-block;
  padding: 6px 24px;
  color: #99522e;
  text-decoration: none;
  font-size: 15px;
  border-radius: 6px;
}
.nav-item:hover { background: #f0e6d8; }
.nav-item.active {
  background: #99522e;
  color: #fff;
}

/* ===== 手机端底部 Tab（电脑隐藏） ===== */
.tab-bar {
  display: none;
}

/* ===== 主体 ===== */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 16px 40px;
}
.intro {
  text-align: center;
  margin-bottom: 28px;
}
.intro h2 {
  font-size: 24px;
  color: #a01414;
  margin-bottom: 8px;
}
.intro p {
  font-size: 15px;
  color: #777;
}
.login-btn {
  display: inline-block;
  background: #a01414;
  color: #fff;
  font-size: 13px;
  padding: 6px 18px;
  border-radius: 6px;
  text-decoration: none;
}
.footer .login-btn {
  margin-bottom: 10px;
}

/* ===== 登录页 ===== */
.login-box {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid #a01414;
  border-radius: 12px;
  padding: 30px 20px;
}
.login-box h2 {
  color: #a01414;
  margin-bottom: 18px;
}
.qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}
.login-tip {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}
.login-tip2 {
  font-size: 12px;
  color: #999;
}
.contact-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tel-label {
  color: #a01414;
  font-weight: bold;
  font-size: 15px;
}
.tel-num {
  color: #a01414;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}

/* ===== 入口卡片 ===== */
.cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.card {
  display: block;
  width: 280px;
  padding: 26px 20px;
  background: #fff;
  border: 1px solid #e5ddd0;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transform: translateY(-3px);
}
.card h3 {
  font-size: 20px;
  color: #a01414;
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  color: #888;
}

/* ===== 首页功能卡（套用小程序框架，颜色统一欢迎大标题色） ===== */
.p-card {
  background: #fff;
  border: 1px solid #99522e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
/* 公共热线：去外框线、无内边距 */
.p-card-noline {
  border: none;
  padding: 0;
}
.pub-box {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #99522e;
  border-radius: 10px;
  overflow: hidden;
}
.pub-body { flex: 1; padding: 12px 14px; }
.pub-title {
  font-size: 17px;
  font-weight: bold;
  color: #99522e;
  margin-bottom: 4px;
}
.pub-desc {
  font-size: 12px;
  color: #99522e;
  line-height: 1.5;
  padding-left: 2em;
}
.pub-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #ffffff;
  background: #99522e;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
}
.pub-btn-t { font-size: 16px; line-height: 1.5; }
.pub-btn-a { font-size: 18px; line-height: 1.3; }
.land-map {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  display: block;
}

/* ===== 家族谱引导页（棕色系，与全站协调） ===== */
.page-hint {
  text-align: center;
  color: #99522e;
  font-size: 16px;
  margin-bottom: 22px;
}
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.grid-item {
  width: calc((100% - 5 * 12px) / 6); /* 电脑端 6 列 */
  background: #f0e6d8;
  border: 1px solid #d8c3a8;
  border-radius: 10px;
  text-align: center;
  padding: 14px 0;
  font-size: 17px;
  color: #99522e;
  text-decoration: none;
  box-sizing: border-box;
}
.grid-item:hover {
  background: #e5d5bf;
  border-color: #99522e;
}
.info-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
  box-shadow: 0 2px 10px rgba(153, 82, 46, 0.10);
}
.info-title {
  font-size: 17px;
  color: #99522e;
  font-weight: bold;
  margin-bottom: 10px;
}
.info-text {
  font-size: 13px;
  color: #6f5237;
  line-height: 1.8;
  text-indent: 2em;
  text-align: justify;
}

/* ===== 公共热线页（棕色系，与全站协调） ===== */
.pub-page-title {
  color: #99522e;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 18px;
}
.pub-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d8c3a8;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(153, 82, 46, 0.10);
  overflow: hidden;
}
.pub-bar-btn {
  flex-shrink: 0;
  padding: 0 26px;
  height: 52px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #fff;
}
.pub-copy {
  background: #e08a3c;
  border-radius: 0;
}
.pub-copy:hover { background: #c9762c; }
.pub-call {
  background: #2e5b44;
  border-radius: 0;
}
.pub-call:hover { background: #254a38; }
.pub-info {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 15px;
  color: #99522e;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pub-group {
  background: #fff;
  border: 1px solid #d8c3a8;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 18px;
}
.pub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pub-item {
  width: calc((100% - 5 * 10px) / 6); /* 电脑端 6 列 */
  background: #f0e6d8;
  border: 1px solid #d8c3a8;
  border-radius: 8px;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: #99522e;
  box-sizing: border-box;
  cursor: pointer;
}
.pub-item:hover {
  background: #e5d5bf;
  border-color: #99522e;
}
.pub-item-on {
  border-color: #99522e;
  background: #99522e;
  color: #fff;
}

/* ===== 家族谱分支动态页（棕色系） ===== */
.clan-main {
  max-width: none;
  padding: 10px;
}
/* 始祖框行：居中，不随树滚动 */
.root-row {
  display: flex;
  justify-content: center;
  margin: 4px 0 20px;
}
.root-box {
  width: 300px;
  height: 48px;
  border: 3px solid #464646;
  box-sizing: border-box;
  font-size: 22px;
  font-weight: bold;
  color: #464646;
  background: #f7f4ef;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 4px;
  line-height: 1;
  white-space: nowrap;
}
/* 树形滚动区 */
.tree-scroll {
  overflow-x: auto;
}
.tree-content {
  position: relative;
  min-width: 100%;
}
.lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}
.line {
  position: absolute;
}
.abs-node {
  position: absolute;
}
.box {
  border: 2px solid #99522e;
  box-sizing: border-box;
  position: relative;
}
/* 多节点代：竖框（两小框上下叠，各自竖排文字） */
.v-box {
  width: 34px;
  height: 132px;
  display: flex;
  flex-direction: column;
  border: none;
}
.v-box .sub {
  border: 1.5px solid #99522e;
  margin: 4px;
}
/* 单节点代：横框（两小框左右并排，横排文字） */
.h-box {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: none;
}
.h-box .sub {
  writing-mode: horizontal-tb;
  font-size: 14px;
  letter-spacing: 0;
  padding: 10px 14px;
  flex: 0 0 auto;
  border: 1.5px solid #99522e;
  margin: 4px;
}
/* 小框内容：竖排；已故=70灰透明，在世=浅棕底 */
.sub {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  color: #99522e;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 1px;
  flex: 1;
  min-height: 40px;
}
.dead {
  background: transparent;
  color: #464646;
  border-color: #464646;
}
.alive {
  background: #f0e6d8;
  color: #99522e;
}
/* 标题：辈份；骑在边框线上，页面底色做假透明遮线 */
.node-title {
  position: absolute;
  color: #99522e;
  white-space: nowrap;
  background: #f7f4ef;
  z-index: 6;
}
.t-top {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  padding: 0 4px;
}
.t-right {
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  font-size: 11px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 2px;
  padding: 2px 3px;
}
.t-dead {
  color: #464646;
}
/* 无数据占位 */
.no-data {
  padding: 120px 0;
  text-align: center;
}
.nd-title {
  font-size: 20px;
  color: #99522e;
}
.nd-sub {
  font-size: 14px;
  color: #8a6b52;
  margin-top: 12px;
}

/* ===== 返回按钮 ===== */
.back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  display: inline-block;
  padding: 6px 10px;
  background: rgba(247, 244, 239, 0.85);
  border: 1px solid #d8c3a8;
  border-radius: 6px;
  color: #99522e;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

/* ===== 转屏触发元素（与 clan 页同一套已验证有效方式） ===== */
.rotate-trigger {
  display: none;
  width: 1px;
  height: 1px;
}
@keyframes rotateShake {
  from { opacity: 0.99; }
  to { opacity: 1; }
}
/* 横屏也发信号：转横屏时更新"转屏前宽度"，保证再转回竖屏时判断成立 */
@media (min-width: 601px) {
  .rotate-trigger {
    display: block;
    animation: rotateShake 100ms;
  }
}

/* ===== 版本标记（右下角，便于确认加载的代码版本） ===== */
.ver-mark {
  position: fixed;
  right: 6px;
  bottom: 6px;
  z-index: 999;
  font-size: 10px;
  color: #c9b8a0;
}

/* ===== 联系管理员弹窗 ===== */
.modal-mask {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.modal {
  position: relative;
  background: #fff;
  border: 1px solid #99522e;
  border-radius: 12px;
  padding: 26px 22px 22px;
  width: 320px;
  max-width: 88%;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: none;
  font-size: 24px;
  color: #99522e;
  cursor: pointer;
}
.modal h3 {
  color: #99522e;
  margin-bottom: 14px;
}
.qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}
.contact-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tel-label {
  color: #99522e;
  font-weight: bold;
  font-size: 15px;
}
.tel-num {
  color: #99522e;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}
.login-tip {
  font-size: 14px;
  color: #333;
  margin-bottom: 12px;
}
.login-tip2 {
  font-size: 12px;
  color: #999;
}

/* ===== 页脚 ===== */
.footer {
  background: #efe8de;
  padding: 14px 16px;
  text-align: center;
}
.footer p {
  font-size: 13px;
  color: #999;
}

/* ===== 首页科技背景（v27：剪纸家族树 SVG，仅首页 body.home-body 生效） ===== */
.home-body {
  background: #081426 url(../img/bg-tree.svg) no-repeat center center fixed;
  background-size: cover;
}

/* ===== 首页深色玻璃拟态：导航/页脚融进背景（仅首页，其他页面不动） ===== */
/* 横幅：去掉橙色渐变背景，改为深色玻璃条 + 雌黄底线（仅首页） */
.home-body .banner {
  background: rgba(18, 31, 54, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 199, 75, 0.4);
  margin-top: 0;
}
/* 横幅四字（雌黄版）：加同色系辉光，更精神 */
.home-body .banner-texts img {
  filter: drop-shadow(0 0 10px rgba(255, 199, 75, 0.35));
}
/* 网址小字：棕 → 雌黄 */
.home-body .banner-url { color: #FFC64B; }
.home-body .nav-bar {
  background: rgba(8, 20, 38, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(143, 195, 240, 0.35);
}
.home-body .nav-item { color: #cfe2f5; }
.home-body .nav-item:hover { background: rgba(143, 195, 240, 0.15); }
.home-body .nav-item.active {
  background: #FFC64B;
  color: #2E4E7E;
  font-weight: bold;
}
.home-body .footer {
  background: rgba(8, 20, 38, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.home-body .footer p { color: rgba(207, 226, 245, 0.55); }

