.tf-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.clan-view{padding:18px 4px 28px;color:#123e32}.clan-view h2,.clan-sheet h2{font-family:Georgia,serif}.clan-view>header{padding:4px 8px 20px}.clan-view p{line-height:1.5}.clan-group{background:#fcf9f0;border:1px solid #ded8c8;border-radius:20px;padding:18px;margin:16px 0}.clan-group h3{font:1.45rem Georgia,serif;margin:0 0 16px}.clan-group h4{font-size:14px;font-weight:650;margin:18px 0 10px}.clan-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}.clan-person-card{border:1px solid #ded8c8;border-radius:16px;background:#fffdf7;color:#143d31;padding:14px;display:flex;flex-direction:column;gap:7px;align-items:center;overflow-wrap:anywhere;min-height:180px}.clan-person-card>span:not(.clan-avatar){font-size:12px}.clan-person-card strong{font-size:14px}.clan-avatar,.clan-node-portrait{display:grid;place-items:center;width:66px;height:70px;border-radius:12px;overflow:hidden;background:#ecebdd}.clan-avatar img,.clan-node-portrait img{width:100%;height:100%;object-fit:cover}.clan-avatar .portrait-fallback,.clan-node-portrait .portrait-fallback{font-size:22px}.clan-pill{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:1px dotted #bd9d5b;border-radius:30px;background:#fbefd2;color:#785921;padding:6px 10px;font-size:12px;line-height:1.2;white-space:normal}.clan-pill.confirmed{border-style:dotted;border-color:#709b7d;background:#e5efdf;color:#21593b}.clan-pill.contested{background:#f7e7df;color:#893e2e;border-color:#a57359}.clan-pill.provenance{background:#f3f0e7;border-color:#aaa28b;color:#5f6656}.clan-question-actions,.clan-actions{display:flex;flex-direction:column;gap:10px;margin:18px 0}.clan-actions .button,.clan-question-actions .button{min-height:46px;white-space:normal}.clan-empty,.clan-gap-note,.clan-clarification{background:#f3eddd;border-radius:12px;padding:12px;color:#655a38;font-size:14px}.tf-card .clan-pill{position:absolute;bottom:7px;left:6px;right:6px;min-height:32px;padding:5px;font-size:11px;cursor:pointer;z-index:3}.tf-card:has(.clan-pill) .tf-person{padding-bottom:36px}.tf-card:has(.clan-pill) .tf-avatar{height:62px;width:58px}.tf-card .clan-gap{position:absolute;bottom:-19px;left:0;right:0;font-size:10px;line-height:1.1;color:#776b4c;border:0;background:transparent;padding:4px;cursor:pointer}.tf-card:has(.clan-pill){border-style:solid}.clan-gap:focus-visible{outline:2px solid #b99645}.clan-sheet{width:min(580px,calc(100% - 24px));max-height:90dvh;padding:0;border:1px solid #ded8c8;border-radius:24px;background:#fcf9f0;color:#123b30;box-shadow:0 20px 60px #123b3040}.clan-sheet::backdrop{background:#153d3280}.clan-sheet-body{padding:26px;overflow-wrap:anywhere;position:relative}.clan-sheet h2{font-size:1.6rem;line-height:1.2;margin:12px 28px 18px 0}.clan-grip{display:block;width:48px;height:4px;border-radius:4px;background:#b5b09e;margin:0 auto 18px}.clan-close{position:absolute;right:14px;top:16px;width:44px;height:44px;border:0;border-radius:50%;background:#eeeadd;color:#214c3e;font-size:25px}.clan-summary{text-align:center}.clan-progress{text-align:center;padding:14px 0;border-block:1px solid #e1dbc8}.clan-progress strong{font-size:22px}.clan-sources,.clan-witness,.clan-node-membership{border:1px solid #e1dbc8;border-radius:14px;background:#fffdf8;padding:14px;margin:12px 0}.clan-witness summary{cursor:pointer;min-height:36px;color:#214e3c}.clan-witness time{font-size:12px;color:#657469}.clan-initial{padding:14px;border:1px dotted #879f75;border-radius:14px;color:#345c3b;font-size:14px}.clan-sheet form{display:grid;gap:14px;margin:20px 0}.clan-sheet label{display:grid;gap:7px;font-size:14px}.clan-sheet select,.clan-sheet textarea,.clan-sheet input:not([type=checkbox]){width:100%;box-sizing:border-box;padding:12px;border:1px solid #d1d6c8;background:#fffefb;color:#20483a;border-radius:10px;min-height:46px;font:inherit}.clan-sheet textarea{min-height:100px;resize:vertical}.clan-sheet .clan-consent{display:flex;gap:9px;align-items:flex-start;line-height:1.4}.clan-consent input{flex:0 0 22px;width:22px;height:22px;margin:0;accent-color:#174f3d}.clan-sheet fieldset{border:1px solid #d9d5c6;border-radius:12px;padding:14px;display:grid;gap:12px}.clan-sheet legend{font-size:14px}.clan-error{color:#883d2e;font-size:14px}.clan-node-overview{display:flex;gap:16px;align-items:center}.clan-node-membership{display:flex;flex-direction:column;gap:7px;width:100%;color:#214d3e;text-align:left;cursor:pointer}.clan-node-membership small{font-size:12px}.clan-question-actions .button{font-size:14px}.clan-overlay{fill:none;stroke:#baa064;stroke-width:1.4;stroke-dasharray:3 4;pointer-events:none}.clan-overlay-label{fill:#8a6b32;font:11px system-ui}.clan-legend{display:flex;gap:14px;flex-wrap:wrap;padding:12px 6px;font-size:12px;color:#506751}.clan-legend i{display:inline-block;width:30px;border-top:2px solid #215b43;margin-right:7px;vertical-align:middle}.clan-legend i.dotted{border-top:2px dotted #ad945a}@media(max-width:700px){.clan-sheet{width:100%;max-height:92dvh;margin:auto 0 0;border-radius:24px 24px 0 0;border-bottom:0}.clan-sheet-body{padding:24px 18px 30px}.clan-group{padding:16px}.clan-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.clan-view{padding:14px 0 24px}.tf-tabs button{min-height:44px;font-size:14px}}

#clan-admin-main button{min-height:44px;border-radius:12px;padding:10px 16px;cursor:pointer}#clan-admin-main button[type=submit]{background:#174b3c;color:#fff;border:1px solid #174b3c;font:inherit}#clan-admin-main fieldset{padding:14px;border:1px solid #d8d3c5;border-radius:12px}.tf-card .clan-pill:before{content:'';position:absolute;inset:-6px 0}.clan-pill{position:relative}

.tf-card:has(.clan-pill){height:176px}.tf-card:has(.clan-pill) .tf-person{padding-bottom:48px;padding-top:12px}.tf-card:has(.clan-pill) .tf-avatar{height:70px;width:66px}.tf-card .clan-pill{min-height:36px;font-size:12px;bottom:8px}.tf-card .clan-gap{left:auto;right:-8px;bottom:-7px;width:26px;height:26px;border:1px solid #c5b78e;border-radius:50%;background:#f7f2df;font-size:15px;padding:0;display:grid;place-items:center}.tf-card .clan-gap:before{content:'';position:absolute;inset:-7px}.clan-gap-note{font-size:14px}

/* Match the established tree stylesheet specificity so badges reserve real space. */
html body.tf-active #application#application#application #page-family .tf-card:has(.clan-pill){height:176px!important}
html body.tf-active #application#application#application #page-family .tf-card:has(.clan-pill) .tf-person{padding:8px 5px 48px!important;gap:4px!important;justify-content:flex-start!important;flex-direction:column!important;flex-wrap:nowrap!important}
html body.tf-active #application#application#application #page-family .tf-card:has(.clan-pill) .tf-avatar{height:66px!important;width:66px!important;flex-shrink:0}
html body.tf-active #application#application#application #page-family .tf-card:has(.clan-pill) .tf-person strong{max-height:30px!important;line-height:15px!important;flex-shrink:0}
html body.tf-active #application#application#application #page-family .tf-card .clan-pill{bottom:8px;left:6px;right:6px;min-height:36px;max-height:40px;box-sizing:border-box;font-size:11px;line-height:12px}

html body.tf-active #application#application#application #page-family .tf-band[data-g='0'] .tf-card.tf-self:has(.clan-pill){height:176px!important}


/* Concise forms: one primary action, supporting detail on request. */
dialog .form-details { margin: 16px 0; border-top: 1px solid var(--border, #9b9b9b66); padding-top: 8px; }
dialog .form-details > summary { cursor: pointer; padding: 12px 4px; font-weight: 600; line-height: 1.4; min-height: 44px; box-sizing: border-box; }
dialog .form-details > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
dialog .form-details[open] > summary { margin-bottom: 8px; }
dialog .form-details .clan-actions { display: grid; gap: 10px; }
@media (max-width: 760px) {
 #clan-dialog form > .button-primary,
 #family-network-dialog form > .button-primary,
 #collection-question-content .modal-actions > .button-primary,
 #heritage-context-form .modal-actions > .button-primary { width: 100%; min-height: 48px; }
 #collection-question-content .modal-actions,
 #heritage-context-form .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
 dialog .form-details .button { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
}
