/* Shared V4 theme for surname, regional relatives, branch and detail pages. */
body.family-unified{--family-green:#245c4c;--family-gold:#b38b35;--family-border:#e3d9c3;background:#f5f2e9;color:#173f30;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
.family-unified .fu-wayfinding{background:#fffdf4;padding:16px 40px 0;display:flex;flex-direction:column}
.family-unified .fu-trail{order:2;margin:14px 0;font-size:12px}.family-unified .fu-levels{order:1;border-top:0;padding:0;gap:36px}.family-unified .fu-levels>span{display:none}.family-unified .fu-levels a{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;padding:14px 0;font-size:16px;font-weight:700}.family-unified .fu-levels a.is-current{color:#245c4c;background:transparent;border-bottom-color:#245c4c}.family-unified .fu-page-links{order:3;padding:0 0 12px}.family-unified .fu-relations{order:4;margin:0 0 14px}
body.family-unified main.home-wrap,body.family-unified main.affairs,body.family-unified main.family-document{background:#fffdf4;padding:20px 40px 70px}
.family-unified .home-hero,.family-unified .affairs .aff-page-heading{background:#e8eddb url('/assets/family/surname-v4-landscape.svg') center/cover;color:#173f30;border:1px solid #e3d9c3;border-radius:14px;box-shadow:none}
.family-unified .home-hero h1,.family-unified .affairs .aff-page-heading h1,.family-unified .affairs .aff-page-heading h2{color:#173f30;font-family:"Songti SC",SimSun,serif;font-weight:900;letter-spacing:.04em}
.family-unified .home-hero .eyebrow,.family-unified .home-hero .hero-seal,.family-unified .affairs .aff-page-heading .muted{color:#536950}.family-unified .home-hero .mountains{display:none}.family-unified .affairs .aff-eyebrow{color:#936e2c}.family-unified .affairs .aff-surname-emphasis{background:#fffdf4aa;border-color:#bba15f;color:#245c4c}
.family-unified .content-card,.family-unified .affairs section,.family-unified .family-document .card{background:#fffdf7;border-color:#e3d9c3;border-radius:12px;box-shadow:none}
.family-unified .content-card>h2,.family-unified .family-document h1,.family-unified .family-section h2{font-family:"Songti SC",SimSun,serif;font-weight:900;color:#173f30}.family-unified .news-item h3,.family-unified .unit b{font-family:"Microsoft YaHei","PingFang SC",sans-serif;font-weight:700}.family-unified .home-services a{background:#f4f3e8;border-color:#e3d9c3}.family-unified .home-start{gap:12px}.family-unified .home-start>a,.family-unified .home-start>button{border-color:#e3d9c3}.family-unified .home-start .repair{background:#245c4c}
@media(max-width:760px){.family-unified .fu-wayfinding{padding:8px 16px 0}.family-unified .fu-levels{gap:22px}.family-unified .fu-levels a{font-size:14px;padding:12px 0}body.family-unified main.home-wrap,body.family-unified main.affairs,body.family-unified main.family-document{padding:12px 16px 80px}.family-unified .fu-trail{line-height:1.7}.family-unified .home-hero h1{font-size:28px}.family-unified .content-card{padding:18px}}

/* Shared modal sizing and compact mobile masthead. */
body.family-unified .family-entry-dialog,body.family-unified #hometown-dialog{box-sizing:border-box;width:min(740px,94vw);max-width:94vw;max-height:90dvh;padding:24px;border:1px solid #d7e5de;border-radius:16px;background:#f3f7f5;color:#24594c;box-shadow:0 22px 70px #0d292a33}
body.family-unified .family-entry-dialog::backdrop,body.family-unified #hometown-dialog::backdrop{background:rgba(0,0,0,.78)}
body.family-unified .family-entry-dialog h2,body.family-unified #hometown-dialog h2{font:700 23px/1.5 "Microsoft YaHei",sans-serif;color:#196b59}
body.family-unified .family-entry-dialog iframe{height:min(590px,64dvh);background:#f3f7f5;border-radius:12px}
body.family-unified #hometown-dialog input,body.family-unified #hometown-dialog select{box-sizing:border-box;min-width:0;min-height:44px;border:1px solid #ceded7;border-radius:10px;background:white;color:#24594c;font-size:14px}
body.family-unified #hometown-form{padding:18px;background:white;border:1px solid #dce7e2;border-radius:14px}
body.family-unified #hometown-dialog .region-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body.family-unified #hometown-dialog .region-fields label{min-width:0;font-size:13px}body.family-unified #hometown-dialog .region-fields select{width:100%}
body.family-unified #hometown-dialog .hometown-search{display:flex;gap:10px}body.family-unified #hometown-dialog .hometown-search input{flex:1;width:0}
body.family-unified #hometown-dialog button:not([data-close-hometown]){background:#196b59;color:white;border:0;border-radius:10px;padding:10px 15px}body.family-unified #hometown-dialog [data-close-hometown],body.family-unified .entry-heading button{background:white;border:1px solid #d7e5de;border-radius:10px;color:#36594b;min-width:40px;min-height:40px}
@media(max-width:760px){body.family-unified .fu-header .fu-header-inner{display:flex;flex-wrap:nowrap;padding:12px 10px;gap:10px;min-height:60px}body.family-unified .fu-brand span{display:none}body.family-unified .fu-brand b{box-sizing:border-box;min-width:32px;width:32px;height:34px;padding:0;font-size:24px}body.family-unified .fu-header .fu-systems{order:0;flex:1;width:auto;min-width:0;justify-content:center;gap:12px;margin:0;padding:0;border:0}body.family-unified .fu-systems a{font-size:12px}body.family-unified .fu-account{margin:0;padding:7px 9px;font-size:11px}body.family-unified #hometown-dialog,body.family-unified .family-entry-dialog{padding:16px}body.family-unified #hometown-dialog h2,body.family-unified .family-entry-dialog h2{font-size:20px}body.family-unified #hometown-form{padding:12px}}
@media(max-width:360px){body.family-unified .fu-header .fu-header-inner{gap:6px;padding:10px 8px}body.family-unified .fu-header .fu-systems{gap:7px}body.family-unified .fu-systems a{font-size:11px}body.family-unified .fu-account{padding:7px 6px;font-size:10px}}

/* Archive pages keep the public records in focus. */
.family-archive-page #personDrawer,.family-archive-page #personOverlay{display:none!important}
.family-archive-page .family-archive-nav{flex-wrap:wrap}
.family-archive-page .family-archive-nav a{flex:0 0 auto;white-space:nowrap;border-color:#d6dfd3;color:#245c4c}
.family-archive-page .family-archive-nav a.active{background:#245c4c;border-color:#245c4c;color:#fff}
.family-archive-page .archive-more{text-align:center;background:#eef3ed;border-color:#d6dfd3;padding:28px 20px}
.family-archive-page .archive-more h2{font-size:22px}
.family-archive-page .archive-more p{color:#647469;line-height:1.8}

.family-index-stats.compact-index-stats{padding:12px}
.family-index-stats.compact-index-stats .family-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.family-index-stats.compact-index-stats .family-stat{padding:14px 18px;min-height:0}
.compact-index-stats .stat-pair{display:flex;align-items:center;justify-content:space-between;gap:8px}
.compact-index-stats .stat-pair+.stat-pair{margin-top:8px;padding-top:8px;border-top:1px solid #e6dfd2}
.compact-index-stats .stat-pair span{font-size:13px;color:#74675d}
.family-index-stats.compact-index-stats .stat-pair strong{margin:0;font-size:26px;line-height:1.2}
@media(max-width:480px){.family-index-stats.compact-index-stats .family-stat{padding:12px 10px}.compact-index-stats .stat-pair span{font-size:11px}.family-index-stats.compact-index-stats .stat-pair strong{font-size:22px}}

/* Hero-first family landing pages. */
body.family-home-layout main.home-wrap,body.family-affairs-layout main.affairs{padding-top:24px}
.family-home-layout .home-wrap>.fu-wayfinding,.family-affairs-layout .affairs>.fu-wayfinding{padding:0;background:transparent;margin:0 0 22px;max-width:none;border-bottom:1px solid #e3d9c3}
.family-home-layout .fu-levels,.family-affairs-layout .fu-levels{min-height:58px;align-items:center}
.family-home-layout .fu-trail,.family-affairs-layout .fu-trail{margin:10px 0;color:#7b8275;font-size:11px}
.family-home-layout .fu-page-links{gap:8px;flex-wrap:wrap;padding:0 0 14px}
.family-home-layout .fu-page-links a{background:#f1f3e9;border:1px solid #e1e5d7;border-radius:6px;padding:7px 12px;font-size:13px}
.family-home-layout .fu-relations{font-size:12px;border:0;background:transparent;margin:0 0 12px;padding:0}
.family-home-layout .home-hero{padding:30px 36px;border-radius:14px 14px 0 0}
.family-home-layout .home-hero h1{font-size:38px;margin:12px 0}.family-home-layout .hero-actions{margin-top:18px}
.family-home-layout .home-stats{padding:14px 0;background:#f3f4e9;border:1px solid #e3d9c3;border-radius:10px}
.family-home-layout .home-start{margin:18px 0}.family-home-layout .home-service-card{padding:16px 20px}.family-home-layout .home-service-card h2{font-size:17px;margin-bottom:12px}
.family-home-layout .home-services a{display:flex;align-items:center;justify-content:center;gap:12px;padding:12px;font-size:20px}.family-home-layout .home-services b{margin:0}
.family-affairs-layout .affairs>.aff-page-heading{margin:0;border-radius:14px 14px 0 0;padding:28px 30px}
.family-affairs-layout .affairs>.aff-utility{display:flex;flex-wrap:wrap;gap:16px;margin:0 0 16px;font-size:13px}
.family-affairs-layout .affairs #aff-guide{margin:16px 0;padding:14px 20px}
@media(max-width:760px){
body.family-home-layout main.home-wrap,body.family-affairs-layout main.affairs{padding-top:12px}
.family-home-layout .home-hero{padding:24px 20px}.family-home-layout .home-hero h1{font-size:28px}
.family-home-layout .fu-levels,.family-affairs-layout .fu-levels{justify-content:space-between;gap:12px}
.family-home-layout .fu-page-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.family-home-layout .fu-page-links a{font-size:11px;padding:8px 4px;text-align:center}
.family-home-layout .home-services{grid-template-columns:repeat(2,minmax(0,1fr))}.family-home-layout .home-services a{font-size:18px;padding:10px 6px}
.family-home-layout .home-stats b{font-size:18px}.family-home-layout .home-stats span{font-size:10px}
.family-affairs-layout .affairs>.aff-page-heading{padding:22px 18px}.family-affairs-layout .aff-page-heading .muted{line-height:1.8}
}

.family-affairs-layout .affairs>.fu-wayfinding{border:0;border-bottom:1px solid #e3d9c3;border-radius:0;box-shadow:none}
.family-affairs-layout .affairs .fu-levels{gap:36px;justify-content:flex-start;margin:0;border-bottom:1px solid #e3d9c3}
.family-affairs-layout .affairs .fu-levels a{font-size:16px;font-weight:700;padding:16px 0;text-decoration:none}
.family-affairs-layout .affairs .fu-trail{justify-content:flex-start;gap:10px;padding:0}.family-affairs-layout .affairs .fu-trail a{font-size:11px}
@media(max-width:760px){.family-affairs-layout .affairs .fu-levels{justify-content:space-between;gap:12px}.family-affairs-layout .affairs .fu-levels a{font-size:14px}}

/* Branch reading and archive pages share the hero-first hierarchy. */
.family-chronicle-page .family-document>.fu-wayfinding,.family-archive-page main>.fu-wayfinding{padding:0;background:transparent;margin:0 0 24px;max-width:none;border-bottom:1px solid #e3d9c3}
.family-chronicle-page .fu-local-nav{position:static;max-width:none;padding:12px 0;margin:0;background:transparent;border:0;flex-wrap:wrap;font-size:13px}
.family-chronicle-page .fu-page-links,.family-archive-page .fu-page-links{gap:8px;flex-wrap:wrap;padding-bottom:14px}
.family-chronicle-page .fu-page-links a,.family-archive-page .fu-page-links a{padding:7px 12px;background:#f1f3e9;border:1px solid #e1e5d7;border-radius:6px;font-size:13px;text-decoration:none}
.family-chronicle-page .fu-relations,.family-archive-page .fu-relations{display:none}
.family-chronicle-page .home-hero{padding:28px 32px}.family-chronicle-page .home-hero h1{font-size:34px;margin:12px 0}
.family-archive-page main.family-wrap{width:min(1200px,100%);padding:24px 40px 60px;background:#fffdf4}
.family-archive-page .archive-heading{padding:28px 32px;background:#e8eddb url('/assets/family/surname-v4-landscape.svg') center/cover;border:1px solid #e3d9c3;border-radius:14px 14px 0 0}
.family-archive-page .archive-heading h1{font:900 34px/1.4 SimSun,serif;color:#173f30;margin:12px 0}.family-archive-page .archive-heading p{font-size:14px;color:#536950}.family-archive-page .archive-heading a{display:inline-block;margin-top:12px;color:#245c4c}
.family-archive-page .family-section{box-shadow:none;border:1px solid #e3d9c3;border-radius:12px;background:#fffdf7;margin:18px 0}
@media(max-width:760px){.family-archive-page main.family-wrap{padding:12px 16px 60px}.family-archive-page .archive-heading,.family-chronicle-page .home-hero{padding:24px 20px}.family-archive-page .archive-heading h1,.family-chronicle-page .home-hero h1{font-size:28px}.family-archive-page .fu-page-links,.family-chronicle-page .fu-page-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.family-archive-page .fu-page-links a,.family-chronicle-page .fu-page-links a{font-size:11px;padding:8px 4px;text-align:center}.family-archive-page .fu-levels,.family-chronicle-page .fu-levels{justify-content:space-between;gap:12px}}

.family-unified .fu-page-links a[aria-current="page"]{background:#245c4c;color:#fff;border-color:#245c4c;font-weight:700}

.family-chronicle-page .home-hero .hero-copy>p{color:#536950!important}.family-chronicle-page .home-hero{margin-bottom:0}.family-chronicle-page .family-document>.content-card{padding:18px 22px}.family-chronicle-page .family-document>.content-card h2{font-size:18px;margin-bottom:10px}

.family-archive-page .archive-secondary{display:flex;gap:20px;flex-wrap:wrap;font-size:13px;margin:12px 0}.family-archive-page .archive-secondary a{color:#245c4c;text-decoration:none}

.family-archive-page .branch-tomb-card { box-shadow: none; container-type: inline-size; }
.family-archive-tomb-section .branch-tomb-grid {
    container-type: inline-size;
    --cover-width: calc((100cqw - 36px) / 3);
}
@media (max-width: 1100px) {
    .family-archive-tomb-section .branch-tomb-grid { --cover-width: calc((100cqw - 18px) / 2); }
}
@media (max-width: 700px) {
    .family-archive-tomb-section .branch-tomb-grid { --cover-width: 100cqw; }
}
.family-archive-tomb-section .single-tomb-preview { --cover-width: min(460px, 100cqw); }
.family-archive-tomb-section .branch-tomb-grid > .branch-tomb-card {
    display: grid;
    container-type: normal;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
}
.family-archive-tomb-section .branch-tomb-card > footer {
    grid-row: 2;
    align-self: start;
    grid-template-rows: repeat(2, 1fr);
}
.family-archive-tomb-section .branch-tomb-card > div.branch-tomb-actions { grid-row: 3; align-self: start; }
.family-archive-page .branch-tomb-actions:not([data-action-count="5"]) .tomb-navigate { grid-column: auto; }
.family-archive-page .family-archive-tomb-section .branch-tomb-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-sizing: border-box;
    aspect-ratio: auto;
    min-height: max(420px, calc(var(--cover-width) * 1.08));
    padding: clamp(62px, calc(var(--cover-width) * .18), 94px) 12px 24px;
    container-type: inline-size;
}
.family-archive-page .branch-tomb-cover > :is(.branch-tomb-era, .branch-tomb-name) {
    position: relative;
    inset: auto;
    transform: none;
    flex: none;
}
.family-archive-page .branch-tomb-era { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.family-archive-page .branch-tomb-name {
    inline-size: max-content;
    max-height: none;
    white-space: nowrap;
    font-size: clamp(24px, 8cqw, 32px);
}

/* One geometry for the three surname landing tabs. */
body.family-unified.family-landing{--landing-inset:40px;--landing-hero-height:280px;--landing-nav-height:62px}
.family-unified.family-landing .fu-header-inner{box-sizing:border-box;height:78px;min-height:78px;padding:16px 30px}
.family-unified.family-landing main.affairs{box-sizing:border-box;max-width:1200px;margin:0 auto;padding:0 var(--landing-inset) 48px}
.family-unified.family-landing .v4-hero,.family-unified.family-landing .affairs>.aff-page-heading,.family-unified.family-landing .branch-directory-heading{box-sizing:border-box;height:var(--landing-hero-height);min-height:var(--landing-hero-height);padding:32px var(--landing-inset);margin:0 auto;border:0;border-radius:0;background:#e8eddb url('/assets/family/surname-v4-landscape.svg') center/cover;display:flex;align-items:center;justify-content:space-between;gap:24px}
.family-unified.family-landing .affairs>.aff-page-heading{margin:0 calc(-1 * var(--landing-inset));width:calc(100% + 2 * var(--landing-inset))}
.family-unified.family-landing .v4-hero h1{font-size:48px}.family-unified.family-landing .aff-page-heading h2,.family-unified.family-landing .branch-directory-heading h1{font-size:38px;line-height:1.3;margin:12px 0 16px}
.family-unified.family-landing .aff-page-heading>div{min-width:0}.family-unified.family-landing .aff-page-heading .muted{font-size:14px;margin:0;line-height:1.8}.family-unified.family-landing .aff-surname-emphasis{font-size:inherit;padding:0;border:0;background:none;margin-right:16px}
.family-unified.family-landing .v4-main>.v4-subheader{padding:0;margin:0 var(--landing-inset) 24px;border:0}
.family-unified.family-landing .fu-wayfinding{padding:0 var(--landing-inset);margin:0 auto;background:#fffdf4;border:0;max-width:1200px}
.family-unified.family-landing .affairs>.fu-wayfinding{padding:0;margin:0 0 24px}
.family-unified.family-landing .v4-subheader nav,.family-unified.family-landing .fu-levels{box-sizing:border-box;height:var(--landing-nav-height);min-height:var(--landing-nav-height);padding:0;margin:0;gap:40px;display:flex;align-items:stretch;justify-content:flex-start;border:0;border-bottom:1px solid #e3d9c3}
.family-unified.family-landing .v4-subheader nav a,.family-unified.family-landing .fu-levels a{box-sizing:border-box;display:flex;align-items:center;height:100%;font:700 16px/1.5 "Microsoft YaHei",sans-serif;padding:0;border:0;border-bottom:3px solid transparent;margin:0;text-decoration:none;white-space:nowrap;color:#245c4c}
.family-unified.family-landing .v4-subheader nav a[aria-current],.family-unified.family-landing .fu-levels a.is-current{border-bottom-color:#245c4c}
.family-unified.family-landing .fu-trail{font-size:12px;line-height:1.6;margin:14px 0 0;padding:0;gap:10px}.family-unified.family-landing .fu-trail a{font-size:12px}
.family-unified.family-landing .v4-tasks{margin:0 var(--landing-inset) 28px}.family-unified.family-landing .v4-section{margin:28px var(--landing-inset) 36px}
.family-unified.family-landing.branch-directory-page main.family-wrap{padding:24px var(--landing-inset) 48px}.family-unified.family-landing .family-front-map-shell{height:480px}.family-unified.family-landing .branch-grid{max-height:428px}
.family-unified.family-landing .aff-directory-filter h2{font:700 20px/1.5 "Microsoft YaHei",sans-serif;margin:0 0 16px}.family-unified.family-landing .aff-directory-filter{padding:22px;margin:0 0 20px}
@media(max-width:760px){
body.family-unified.family-landing{--landing-inset:18px;--landing-hero-height:240px;--landing-nav-height:54px}
.family-unified.family-landing .fu-header-inner{height:60px;min-height:60px;padding:10px 16px}
.family-unified.family-landing .v4-hero,.family-unified.family-landing .affairs>.aff-page-heading,.family-unified.family-landing .branch-directory-heading{padding:24px var(--landing-inset);gap:12px}
.family-unified.family-landing .v4-hero h1{font-size:36px}.family-unified.family-landing .aff-page-heading h2,.family-unified.family-landing .branch-directory-heading h1{font-size:28px}
.family-unified.family-landing .aff-page-heading{position:relative}.family-unified.family-landing .aff-page-heading .aff-help-link{position:absolute;right:18px;top:18px;padding:6px 10px;font-size:11px}.family-unified.family-landing .aff-page-heading .muted{font-size:12px;max-width:290px}
.family-unified.family-landing .v4-subheader nav,.family-unified.family-landing .fu-levels{gap:0;justify-content:space-between}.family-unified.family-landing .v4-subheader nav a,.family-unified.family-landing .fu-levels a{font-size:14px}
.family-unified.family-landing .branch-directory-total{min-width:54px}.family-unified.family-landing .branch-directory-total span{font-size:10px;white-space:normal}
.family-unified.family-landing .v4-main>.v4-subheader{margin-bottom:18px}.family-unified.family-landing .v4-section{margin:24px var(--landing-inset)}
.family-unified.family-landing .family-front-map-shell{height:360px}.family-unified.family-landing .branch-grid{max-height:none}.family-unified.family-landing .aff-directory-filter{padding:16px}
}

/* Organization workbench uses the same landing geometry, with compact tools. */
.family-workbench .affairs .fu-page-links{display:flex;gap:8px;flex-wrap:wrap;padding:14px 0;margin:0}
.family-workbench .affairs .fu-page-links a{display:block;font-size:13px;line-height:1.5;padding:8px 12px;background:#f1f3e9;border:1px solid #e1e5d7;border-radius:6px;text-decoration:none}
.family-workbench .affairs .fu-page-links a[aria-current]{background:#245c4c;color:white;border-color:#245c4c}
.family-workbench .affairs .fu-wayfinding .fu-relations{margin:0;padding:0 0 12px;border:0;background:none;box-shadow:none;font-size:12px;border-radius:0}
.family-workbench .affairs .fu-relations summary{font-size:12px;padding:0}.family-workbench .affairs .fu-relations>div{padding-top:10px}
.family-workbench .affairs>.aff-org-heading{margin:0 0 12px;padding:18px 22px;align-items:center;border-left:4px solid #245c4c}
.family-workbench .affairs>.aff-org-heading img{width:56px;height:56px}.family-workbench .affairs>.aff-org-heading h3{font-size:22px;margin:0 0 6px}.family-workbench .affairs>.aff-org-heading p{font-size:13px;line-height:1.7;margin:0}
.family-workbench .affairs>.aff-org-actions,.family-workbench .affairs>.aff-sharing-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:10px 0;padding:0;border:0;background:transparent;font-size:13px}
.family-workbench .aff-org-actions a,.family-workbench .aff-sharing-actions a{display:inline-block;border:1px solid #d6dfd2;border-radius:7px;background:#fffdf7;padding:8px 12px;text-decoration:none;color:#245c4c}
.family-workbench .affairs>.aff-own-branches{padding:18px 22px;margin:18px 0}.family-workbench .aff-own-branches h3{font-size:18px;margin:0 0 10px}.family-workbench .aff-own-branches p{margin:8px 0;font-size:13px}
.family-workbench .affairs>.aff-workspace{margin-top:20px}.family-workbench .affairs>.aff-utility{margin-top:24px;padding-top:16px;border-top:1px solid #e3d9c3}
@media(max-width:760px){.family-workbench .affairs .fu-page-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.family-workbench .affairs .fu-page-links a{font-size:11px;padding:8px 4px;text-align:center}.family-workbench .affairs>.aff-org-heading{padding:16px}.family-workbench .affairs>.aff-org-heading h3{font-size:19px}.family-workbench .affairs>.aff-own-branches{padding:16px}}

/* Organization and branch home share the same shell as their directory. */
body.family-unified.family-landing.family-home-layout main.home-wrap{box-sizing:border-box;max-width:1200px;margin:0 auto;padding:0 var(--landing-inset) 70px}
.family-unified.family-landing.family-home-layout .home-hero{box-sizing:border-box;height:var(--landing-hero-height);min-height:var(--landing-hero-height);padding:28px var(--landing-inset);margin:0 calc(-1 * var(--landing-inset));width:calc(100% + 2 * var(--landing-inset));border:0;border-radius:0;display:flex;align-items:center;background:#e8eddb url('/assets/family/surname-v4-landscape.svg') center/cover}
.family-unified.family-landing.family-home-layout .home-wrap>.fu-wayfinding{padding:0;margin:0 0 24px;max-width:none}
.family-unified.family-landing.family-home-layout .home-hero h1{font-size:38px;line-height:1.3;margin:10px 0}.family-unified.family-landing.family-home-layout .hero-copy p{margin:6px 0;line-height:1.6}.family-unified.family-landing.family-home-layout .hero-actions{margin-top:16px}
.family-unified.family-landing.family-home-layout .hero-actions a{padding:9px 16px}
.family-unified.family-landing.family-home-layout .fu-page-links{padding-top:14px}
@media(max-width:760px){.family-unified.family-landing.family-home-layout .home-hero h1{font-size:28px}.family-unified.family-landing.family-home-layout .hero-copy{max-width:90%}.family-unified.family-landing.family-home-layout .hero-actions{gap:8px}.family-unified.family-landing.family-home-layout .hero-actions a{font-size:12px;padding:8px 10px}}

.family-home-layout .home-services.org-services{grid-template-columns:repeat(5,minmax(0,1fr))}.family-home-layout .org-services a{gap:8px}.family-home-layout .org-services b{white-space:nowrap}
@media(max-width:760px){.family-home-layout .home-services.org-services{grid-template-columns:repeat(2,minmax(0,1fr))}.family-home-layout .org-services a:last-child{grid-column:1/-1}}

/* Consolidated branch services and a footer aligned to the content cards. */
.family-home-layout .home-services.branch-services{grid-template-columns:repeat(3,minmax(0,1fr))}
.family-home-layout .branch-login-hint{display:block;font-size:.8em;font-weight:400;color:#54644f}
.family-home-layout .branch-services a{gap:8px;min-height:60px}
.family-home-layout .home-bottom{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:8px 12px max(8px,env(safe-area-inset-bottom))}
.family-home-layout .home-bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:54px;border-radius:8px;color:#245c4c;transition:background .15s}
.family-home-layout .home-bottom a:hover,.family-home-layout .home-bottom a:focus-visible{background:#eaf0e2}
.family-home-layout .home-bottom span{font-size:12px;margin-top:4px}
@media(min-width:761px){
.family-unified.family-home-layout .home-bottom{width:calc(100% - 80px);max-width:1120px;margin:0 auto 24px;border:1px solid #e3d9c3;border-top:3px solid #245c4c;border-radius:12px;background:#fffdf8;box-shadow:0 4px 18px #243f3408}
body.family-unified.family-landing.family-home-layout main.home-wrap{padding-bottom:24px}
}
@media(max-width:760px){
.family-home-layout .home-services.branch-services{grid-template-columns:repeat(2,minmax(0,1fr))}
.family-home-layout .branch-services a:last-child{grid-column:auto}
.family-unified.family-home-layout .home-bottom{width:100%;border-radius:0;border-top:1px solid #d5decc;box-shadow:0 -3px 16px #243f3408}
body.family-unified.family-landing.family-home-layout main.home-wrap{padding-bottom:32px}
}

/* Shared branch secondary-page geometry. */
body.family-unified.branch-secondary main:is(.affairs,.family-wrap,.family-document,.home-wrap){box-sizing:border-box;width:100%;max-width:1200px;margin:0 auto;padding:0 var(--landing-inset) 48px;background:#fffdf4}
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero){box-sizing:border-box;height:280px;min-height:280px;width:calc(100% + 2 * var(--landing-inset));margin:0 calc(-1 * var(--landing-inset));padding:32px var(--landing-inset);border:0;border-radius:0;background:#e8eddb url('/assets/family/surname-v4-landscape.svg') center/cover;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;color:#173f30}
body.family-unified.branch-secondary main>.home-hero{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}
.branch-secondary .home-hero .mountains{display:none}
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero) h1{font:700 36px/1.3 "Songti SC",SimSun,serif;margin:12px 0 16px;color:#173f30}
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero) p{font-size:14px;line-height:1.7;margin:4px 0;color:#536950}
body.family-unified.branch-secondary .hero-actions{display:flex;gap:12px;margin-top:18px}
body.family-unified.branch-secondary .hero-actions a,body.family-unified.branch-secondary .archive-heading>a{display:inline-block;align-self:flex-start;padding:9px 16px;border:1px solid #cbd6bf;border-radius:8px;background:#fffdf5;color:#245c4c;text-decoration:none;font:13px/1.6 "Microsoft YaHei",sans-serif}
body.family-unified.branch-secondary .archive-heading>a{margin-top:18px}
body.family-unified.branch-secondary main>.fu-wayfinding{max-width:none;margin:0 0 24px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
body.family-unified.branch-secondary .fu-page-links{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0 16px;margin:0;border-bottom:1px solid #e3d9c3}
body.family-unified.branch-secondary .fu-page-links a{display:block;padding:8px 12px;border:1px solid #e1e5d7;border-radius:6px;background:#f1f3e9;font:600 13px/1.5 "Microsoft YaHei",sans-serif;text-decoration:none;color:#245c4c}
body.family-unified.branch-secondary .fu-page-links a[aria-current]{background:#245c4c;border-color:#245c4c;color:white}
body.family-unified.branch-secondary .fu-relations{display:none}
.branch-secondary .branch-search{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0}
.branch-secondary .branch-search input[type=search]{flex:1;min-width:160px;width:auto}
.branch-secondary .branch-search button{width:auto;margin:0}
.branch-secondary .activity-search{padding:18px;background:#fffdf7;border:1px solid #e3d9c3;border-radius:12px}
@media(max-width:760px){
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero){height:240px;min-height:240px;padding:24px var(--landing-inset)}
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero) h1{font-size:28px;margin:10px 0 12px}
body.family-unified.branch-secondary main>:is(.home-hero,.archive-heading,.branch-page-hero) p{font-size:12px}
body.family-unified.branch-secondary .fu-page-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
body.family-unified.branch-secondary .fu-page-links a{font-size:12px;text-align:center;padding:8px 4px}
}

.branch-secondary .family-archive-card .family-archive-cover{width:100%;height:180px;min-height:0;aspect-ratio:16/9;object-fit:cover}
.branch-secondary .family-archive-card-body{padding:18px}
.branch-secondary .family-archive-card-title{margin:10px 0 14px;line-height:1.5}
.branch-secondary .family-archive-summary{margin-top:10px;line-height:1.7}
.branch-secondary .family-archive-card{min-height:0}

.branch-secondary .family-archive-card-title,.branch-secondary .family-archive-summary{min-height:0}
.branch-secondary .family-resource-tags:empty{display:none}

body.family-unified.branch-secondary:has(.family-archive-tomb-section) :is(main.family-wrap, .fu-header-inner) {
    max-width: 1440px;
    width: 100%;
}
