.fam-window .fam-crest { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 .3rem; }
.fam-window .fam-crest-img { width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto; }
.fam-window .fam-crest-txt { flex: 1 1 12rem; }
.fam-window .fam-crest-name { font-size: 1.15rem; font-weight: 700; }
.fam-window .fam-crest-motto { font-style: italic; opacity: .85; margin: .1rem 0 .35rem; }
.fam-crest-ed { flex: 1 1 100%; display: flex; flex-direction: column; gap: .45rem; padding: .5rem 0; }
.fam-crest-ed input { width: 100%; box-sizing: border-box; padding: .4rem .55rem; border: 1px solid var(--border, #555); border-radius: 6px; background: transparent; color: inherit; font: inherit; }
.fam-crest-ed .btn-secondary { align-self: flex-start; }
.fam-crest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .35rem; }
.fam-crest-opt { padding: 3px; border: 2px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
.fam-crest-opt img { width: 100%; display: block; }
.fam-crest-opt.on { border-color: var(--accent, #c9a24a); background: rgba(201, 162, 74, .15); }
.fam-window .ft-title { margin: 1rem 0 .4rem; }
.ft-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; padding: .2rem 0 .8rem; }
.ft-gen { display: flex; flex-direction: column; align-items: center; position: relative; padding-top: 1.1rem; width: 100%; }
.ft-wrap > .ft-gen:first-child { padding-top: 0; }
.ft-wrap > .ft-gen:not(:first-child)::before { content: ''; position: absolute; top: 0; left: 50%; height: 1.1rem; border-left: 2px solid var(--border, #777); }
.ft-gen-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-bottom: .3rem; }
.ft-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; position: relative; }
.ft-couple .ft-row { gap: 1.6rem; }
.ft-couple .ft-node + .ft-node::before { content: ''; position: absolute; width: 1.6rem; left: -1.6rem; top: 50%; border-top: 2px solid var(--border, #777); }
.ft-node { position: relative; min-width: 8rem; max-width: 12rem; padding: .45rem .7rem; border: 1px solid var(--border, #777); border-radius: 8px; background: var(--panel, transparent); text-align: center; }
.ft-name { font-weight: 700; overflow-wrap: anywhere; }
.ft-sub { font-size: .8rem; opacity: .8; }
.ft-me { border-color: var(--accent, #c9a24a); box-shadow: 0 0 0 1px var(--accent, #c9a24a) inset; }
.ft-heir { border-style: double; border-width: 3px; }
.ft-gone { opacity: .6; filter: grayscale(.8); border-style: dashed; }
@media (max-width: 600px) { .ft-node { min-width: 6.5rem; } .ft-couple .ft-row { gap: 1.2rem; } .fam-window .fam-crest-img { width: 64px; height: 64px; } }
