.family-hero{background:#112d2a;color:#fff;overflow:hidden}.family-hero-inner{min-height:380px;display:grid;grid-template-columns:minmax(0,1fr) 360px;align-items:center;position:relative}.family-hero-inner>div:first-child{padding:70px 20px 70px 0;position:relative;z-index:1}.family-hero h1{font-size:clamp(3rem,5.4vw,5.7rem);margin:0 0 22px;max-width:830px}.family-hero p:last-child{font-size:1.08rem;color:#d4e0d7;max-width:640px;margin:0}.family-hero-image{height:360px;align-self:end;display:flex;align-items:end;justify-content:center}.family-hero-image img{height:390px;width:390px;max-width:none;object-fit:contain;filter:drop-shadow(0 20px 20px rgba(0,0,0,.22))}.family-explorer{background:#f9f7f1;padding:72px 0 110px}.explorer-top{display:flex;align-items:end;justify-content:space-between;gap:40px}.explorer-top .eyebrow{color:#a18046;margin-bottom:12px}.explorer-top h2{font-size:clamp(2.5rem,4vw,4.1rem)}.explorer-intro{max-width:470px;margin:0;color:#5e6d63}.explorer-controls{display:flex;align-items:center;gap:14px;margin-top:36px;background:#e9ecdf;padding:14px}.search-wrap{position:relative;flex:1}.search-icon{position:absolute;left:18px;top:50%;transform:translateY(-52%);font-size:1.75rem;color:#597365;line-height:1}.search-wrap input{width:100%;height:52px;border:1px solid #ced5c9;background:#fff;padding:0 20px 0 50px;color:#17322e;font:inherit;font-size:.95rem;outline:none}.search-wrap input:focus,.status-wrap select:focus{border-color:#a78442;box-shadow:0 0 0 2px #dbbf81}.status-wrap{display:flex;align-items:center;gap:12px;color:#536c5a;font-size:.8rem;font-weight:700}.status-wrap select{height:52px;min-width:178px;padding:0 14px;background:#fff;border:1px solid #ced5c9;color:#17322e;font:inherit;font-size:.85rem}#match-count{min-width:85px;text-align:right;font-size:.77rem;color:#5a6b60}.tree-legend{display:flex;gap:24px;align-items:center;flex-wrap:wrap;margin:23px 0 55px;color:#52665b;font-size:.8rem}.tree-legend>span{display:inline-flex;align-items:center;gap:8px}.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.legend-dot.present{background:#4b8667}.legend-dot.absent{background:#9ba29e}.legend-star{color:#b99145;font-style:normal;font-size:1rem}.tree-stage{position:relative}.generation-title{display:flex;align-items:baseline;gap:16px;border-bottom:1px solid #cdd6c9;padding-bottom:16px;margin-bottom:25px}.generation-title>span{font-size:.76rem;color:#9a7e47;letter-spacing:.13em;font-weight:700}.generation-title h3{font-size:1.65rem;margin:0}.generation-title p{margin:0 0 0 auto;font-size:.79rem;color:#677b6b}.sibling-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tree-card{background:#fff;border:1px solid #dce1d7;min-width:0;position:relative;transition:opacity .15s,box-shadow .15s,border-color .15s}.tree-card:hover{border-color:#a2b9a1;box-shadow:0 12px 32px rgba(24,55,43,.08)}.tree-card.is-dim{opacity:.28}.tree-card.is-match{outline:3px solid #d6b36a;outline-offset:2px}.tree-card.root{background:#20423a;border-color:#20423a;color:#fff}.tree-card.root .ring,.tree-card.root .relation{color:#c8d9ce}.tree-card.highlight{border-top:4px solid #d6b36a}.tree-card.root.highlight{border-color:#20423a;border-top-color:#d6b36a}.sibling-card{min-height:205px;padding:22px;display:flex;flex-direction:column}.relation{color:#8b7142;font-size:.68rem;letter-spacing:.13em;font-weight:700;text-transform:uppercase;min-height:30px}.tree-card h4{font-family:Aptos,'PingFang TC',Arial,sans-serif;font-size:1.55rem;line-height:1.1;margin:8px 0 7px;font-weight:500}.ring{font-size:.75rem;letter-spacing:.07em;color:#607365}.status-tag{display:inline-flex;align-items:center;gap:6px;font-size:.7rem;font-weight:700;white-space:nowrap}.status-tag:before{content:'';width:7px;height:7px;border-radius:50%;background:#4b8667}.status-tag.absent:before{background:#9ba29e}.tree-card.root .status-tag{color:#fff}.card-bottom{margin-top:auto;padding-top:22px;display:flex;justify-content:space-between;align-items:end;gap:10px}.achievement{font-size:.73rem;line-height:1.4;color:#82662f;font-weight:700;max-width:170px}.tree-card.root .achievement{color:#e5c67d}.branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}.branch{position:relative;border-left:1px solid #bbcab8;padding-left:18px;min-height:235px}.branch:before{content:'';position:absolute;top:22px;left:0;width:18px;height:1px;background:#bbcab8}.branch-card{padding:23px;min-height:185px}.branch-card .card-bottom{padding-top:18px}.descendant-list{display:grid;gap:10px;margin:15px 0 0 24px;position:relative}.descendant-list:before{content:'';position:absolute;left:-12px;top:-15px;bottom:20px;width:1px;background:#b8c9b7}.grandchild-card{padding:17px 19px;min-height:150px}.grandchild-card:before{content:'';position:absolute;left:-13px;top:24px;width:13px;height:1px;background:#b8c9b7}.grandchild-card h4{font-size:1.28rem}.grandchild-card .achievement{max-width:none}.branch:has(.grandchild-card.highlight)>.branch-card{border-color:#c7b17f}.tree-trunk{height:110px;margin:0 auto 14px;display:flex;justify-content:center;align-items:end;position:relative;color:#8b7142;font-size:.72rem;font-weight:700;letter-spacing:.17em;text-transform:uppercase}.tree-trunk:before{content:'';position:absolute;top:0;bottom:33px;width:1px;background:#b8c9b7;left:50%}.tree-trunk span{background:#f9f7f1;padding:7px 12px;position:relative}.source-note{margin-top:76px;padding:24px 28px;background:#e9ecdf;border-left:3px solid #b69555}.source-note strong{font-size:.85rem}.source-note p{color:#5c6f60;font-size:.82rem;margin:8px 0 0;max-width:970px}.is-hidden{display:none!important}
@media(max-width:1050px){.sibling-grid{grid-template-columns:repeat(2,1fr)}.branch-grid{grid-template-columns:repeat(2,1fr)}.generation-title p{display:none}.family-hero-inner{grid-template-columns:1fr 280px}.family-hero-image img{width:330px;height:330px}.explorer-intro{max-width:350px}}
@media(max-width:700px){.family-hero-inner{grid-template-columns:1fr}.family-hero-inner>div:first-child{padding:57px 0 0}.family-hero-image{height:290px;justify-content:flex-end}.family-hero-image img{height:280px;width:280px}.family-explorer{padding:55px 0 75px}.explorer-top{display:block}.explorer-intro{margin-top:20px}.explorer-controls{flex-wrap:wrap}.search-wrap{flex-basis:100%}.status-wrap{flex:1}.status-wrap select{min-width:0;width:100%}#match-count{min-width:80px}.tree-legend{margin-bottom:36px;gap:12px 18px}.sibling-grid,.branch-grid{grid-template-columns:1fr}.sibling-card{min-height:150px}.branch{min-height:0}.tree-trunk{height:70px}.generation-title{align-items:center}.generation-title h3{font-size:1.3rem}}
.wonder-page .family-hero-inner{min-height:470px}.wonder-page .family-hero-image{height:440px;align-items:end;position:relative}.wonder-page .family-hero-image img{width:420px;height:420px;filter:drop-shadow(0 14px 24px rgba(0,0,0,.22))}.wonder-caption{position:absolute;left:0;bottom:22px;font-family:Aptos,'PingFang TC',Arial,sans-serif;font-size:1.1rem;color:#fff}.wonder-caption small{display:block;font-family:Aptos,'PingFang TC',Arial,sans-serif;font-size:.63rem;letter-spacing:.14em;color:#d7b970}.wonder-page .sibling-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px;margin-inline:auto}
@media(max-width:700px){.wonder-page .family-hero-image{height:310px;justify-content:center}.wonder-page .family-hero-image img{width:300px;height:300px}.wonder-caption{left:0;bottom:12px}.wonder-page .sibling-grid{grid-template-columns:1fr}}

/* Progressive, compact bloodline explorer. */
.explorer-path{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 32px;padding:10px 0;border-bottom:1px solid #d9dfd3}
.explorer-path button{border:0;background:transparent;color:#426453;font:inherit;font-size:.86rem;padding:7px 9px;cursor:pointer}
.explorer-path button:hover,.explorer-path button:focus-visible{text-decoration:underline}
.explorer-path button[aria-current=page]{color:#173a31;font-weight:700;background:#e6eadf}
.path-divider{color:#ad935e}
.compact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.pigeon-card{width:100%;min-height:130px;display:flex;align-items:flex-start;gap:10px;text-align:left;border:1px solid #d4dcd0;background:#fff;color:#1c3c32;padding:13px 10px;cursor:pointer;font:inherit;position:relative;transition:border-color .15s,box-shadow .15s,transform .15s}
.pigeon-card:hover{border-color:#b18d4c;box-shadow:0 8px 20px rgba(28,55,41,.1);transform:translateY(-2px)}
.pigeon-card:focus-visible{outline:3px solid #b79656;outline-offset:2px}
.pigeon-card.selected{border-color:#ae8645;background:#f4f0e5;box-shadow:inset 0 0 0 1px #ae8645}
.pigeon-card.highlight:before{content:'★';position:absolute;top:7px;right:9px;color:#b28a3d;font-size:.9rem}
.pigeon-card.root{background:#23483c;color:#fff;border-color:#23483c}
.pigeon-card.root.selected{box-shadow:inset 0 0 0 2px #d8b36c}
.pigeon-icon{flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:#e6eddf;color:#52715d;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pigeon-icon svg{width:30px;height:30px}
.pigeon-icon img{width:100%;height:100%;object-fit:cover;object-position:center 18%}
.pigeon-info{display:flex;flex-direction:column;min-width:0;gap:3px;flex:1}
.pigeon-relation{font-size:.61rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#8d7143;line-height:1.3;min-height:1.5em;padding-right:12px}
.pigeon-info strong{font-size:1rem;line-height:1.12;overflow-wrap:anywhere}
.pigeon-ring{font-size:.69rem;letter-spacing:.03em;color:#627566}
.pigeon-meta{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:.65rem;color:#647667}
.offspring-count{color:#8a6e3b}
.compact-achievement{font-size:.67rem;line-height:1.28;color:#907039;font-weight:700;padding-top:3px}
.pigeon-card.root .pigeon-relation,.pigeon-card.root .pigeon-ring,.pigeon-card.root .pigeon-meta{color:#d2ded3}
.pigeon-card.root .compact-achievement{color:#e7c77f}
.pigeon-chevron{font-size:1.4rem;line-height:1;color:#a98a53;align-self:center}
.descendant-stage{margin-top:42px;padding-top:12px;border-top:1px solid #c9d3c4}
.descendant-stage[hidden],.search-results[hidden]{display:none}
.selection-note{font-size:.88rem;color:#627466;margin:22px 0 0}
.search-results{background:#edf1e8;border:1px solid #d9e1d3;padding:20px;margin-bottom:32px}
.search-results-heading{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap;margin-bottom:15px}
.search-results-heading span,.search-results>p{color:#66796a;font-size:.83rem}
.search-results .compact-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.wonder-page .compact-grid{max-width:560px;margin:0}
@media(max-width:700px){.compact-grid,.search-results .compact-grid{grid-template-columns:1fr}.pigeon-card{min-height:106px}.explorer-path{margin-bottom:24px}.descendant-stage{margin-top:28px}}

/* Two explicit actions per pigeon, with portrait thumbnails framed on the head. */
.category-wrap{display:flex;align-items:center;gap:9px;color:#536c5a;font-size:.8rem;font-weight:700}
.category-wrap select{height:52px;min-width:205px;max-width:245px;padding:0 12px;background:#fff;border:1px solid #ced5c9;color:#17322e;font:inherit;font-size:.82rem}
.category-wrap select:focus{border-color:#a78442;box-shadow:0 0 0 2px #dbbf81}
.explorer-controls{flex-wrap:wrap}
.explorer-controls .search-wrap{min-width:270px}
.pigeon-card{display:grid;grid-template-columns:58px minmax(0,1fr);grid-template-areas:'icon info' 'actions actions';gap:8px 10px;min-height:166px;cursor:default;padding:12px}
.pigeon-card:hover{transform:none}
.pigeon-icon{grid-area:icon;position:relative;width:58px;height:58px;flex-basis:58px}
.pigeon-icon:has(.head-photo){background:#31584a}
.pigeon-icon .head-photo{position:absolute;width:130px;height:130px;max-width:none;left:-72px;top:0;object-fit:contain;object-position:top left}
.pigeon-info{grid-area:info}
.pigeon-chevron{display:none}
.card-actions{grid-area:actions;display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:5px}
.card-actions button{min-height:29px;padding:4px 5px;border:1px solid #c8d4c6;background:#edf3eb;color:#224c3a;font:inherit;font-size:.67rem;font-weight:700;line-height:1.1;cursor:pointer;white-space:nowrap}
.card-actions button:first-child{background:#21483a;color:#fff;border-color:#21483a}
.card-actions button:hover{border-color:#ad8b50;box-shadow:0 2px 7px rgba(31,57,41,.14)}
.card-actions button:focus-visible{outline:3px solid #b79656;outline-offset:2px}
.pigeon-card.root .card-actions button:first-child{background:#d9b96e;border-color:#d9b96e;color:#183b30}
.pigeon-card.root .card-actions button:last-child{background:#345c4d;color:#fff;border-color:#6a937b}
.fiche-notice{padding:13px 17px;margin:15px 0;background:#e7eddf;border-left:3px solid #ba9656;color:#244637;font-size:.85rem}
.fiche-notice[hidden]{display:none}
.tree-stage.is-filtering>.explorer-path,.tree-stage.is-filtering>.generation-title,.tree-stage.is-filtering>#sibling-grid,.tree-stage.is-filtering>.descendant-stage,.tree-stage.is-filtering>.selection-note{display:none}
.tree-stage.is-filtering .search-results{margin:0}
@media(max-width:850px){.explorer-controls .search-wrap{flex-basis:100%}.category-wrap,.status-wrap{flex:1}.category-wrap select,.status-wrap select{min-width:0;max-width:none;width:100%}}
@media(max-width:620px){.category-wrap,.status-wrap{flex-basis:100%;justify-content:space-between}.category-wrap select,.status-wrap select{width:70%}.pigeon-card{min-height:150px}}

/* Keep the hero identity and bloodline shield visible on both family pages. */
.family-hero-image{position:relative}
.family-hero-image .family-hero-pigeon{position:relative;z-index:1}
.family-hero-meta{position:absolute;z-index:2;left:0;right:0;bottom:13px;display:flex;align-items:end;justify-content:space-between;gap:12px;pointer-events:none}
.family-hero-caption{font-family:Aptos,'PingFang TC',Arial,sans-serif;font-size:1.1rem;line-height:1.15;font-weight:700;color:#fff;text-shadow:0 2px 8px #112d2a}
.family-hero-caption small{display:block;margin-top:5px;font-size:.65rem;letter-spacing:.14em;color:#e6c77b}
.family-hero-image .family-hero-shield,.wonder-page .family-hero-image .family-hero-shield{display:block;position:absolute;z-index:2;top:23px;left:-14px;width:228px;height:83px;max-width:75%;object-fit:contain;filter:drop-shadow(0 2px 6px rgba(0,0,0,.4))}
.wonder-page .family-hero-meta{bottom:20px}
@media(max-width:700px){.family-hero-meta{bottom:10px}.family-hero-image .family-hero-shield,.wonder-page .family-hero-image .family-hero-shield{width:137px;height:57px;top:12px;left:0}}

/* Each selected ancestor keeps its own visible generation below the start group. */
.generation-layer+.generation-layer{margin-top:38px}
.generation-layer .generation-title{margin-bottom:20px}
.generation-empty{margin:0;padding:17px 20px;border-left:3px solid #b99a5b;background:#e9ecdf;color:#52665b;font-size:.84rem}
.card-actions button:first-child{display:flex;align-items:center;justify-content:space-between;gap:5px;padding-inline:9px;text-align:left;white-space:normal}
.card-actions{grid-template-columns:minmax(0,1.45fr) minmax(0,.8fr)}
.expand-chevron{display:inline-grid;place-items:center;width:19px;height:19px;border:1px solid currentColor;border-radius:50%;font-size:1.03rem;line-height:1;flex:none;transition:transform .18s}
.card-actions button[aria-expanded="true"] .expand-chevron{transform:rotate(180deg)}

/* One card scale for roots, generations and search results on both bloodline pages.
   auto-fill reserves empty tracks, so one or two birds never stretch across the row. */
.sibling-grid,.compact-grid,.search-results .compact-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));
  gap:12px;
  align-items:stretch;
}
.wonder-page .sibling-grid,.wonder-page .compact-grid{max-width:none;margin-inline:0}
.pigeon-card{max-width:330px;height:100%}
.card-actions a{display:grid;place-items:center;min-height:29px;padding:4px 5px;border:1px solid #c8d4c6;background:#edf3eb;color:#224c3a;font-size:.67rem;font-weight:700;line-height:1.1;text-align:center}
.card-actions a:hover{border-color:#ad8b50;box-shadow:0 2px 7px rgba(31,57,41,.14)}
.card-actions a:focus-visible{outline:3px solid #b79656;outline-offset:2px}
