.co-membership-editor{grid-column:1/-1;min-width:0;margin:8px 0 16px;padding:20px 0;border-block:1px solid var(--line,#ddd)}
.co-membership-editor h3{margin:0 0 8px;font:800 20px/1.3 var(--display)}
.co-membership-editor>p{margin:0 0 16px;color:var(--muted,#555);font:400 var(--text-label,14px)/1.5 var(--font)}
.co-membership-row{min-width:0;margin:0 0 16px;padding:14px;border:1px solid var(--line,#ddd);border-radius:7px;background:#fff}
.co-membership-row legend{padding:0 6px;font-weight:700}
.co-membership-row-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}
.co-membership-row :is(.field,input,select){min-width:0;width:100%;max-width:100%}
.co-membership-row .field{display:grid;gap:6px}
.co-membership-row :is(input,select),.co-membership-editor>.btn{border-radius:7px;min-height:44px}
.co-membership-row-head>.co-text-btn{padding:8px 0;min-height:44px;color:var(--red)}
.co-membership-units{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.co-membership-units>label{display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 10px;background:#f3f3f3;border-radius:7px;font:400 var(--text-label,14px)/1.4 var(--font);cursor:pointer}
.co-membership-units>label:has(input:checked){background:#111;color:#fff}
.co-membership-units input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--red)}
.co-membership-details,.co-membership-new{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.co-membership-new{margin-top:14px}
.co-membership-new>.field:last-child{grid-column:1/-1}
.co-membership-empty{margin-top:12px!important}
.co-athlete-affiliations{display:grid;gap:8px;margin-top:8px}
.co-athlete-affiliations .co-affiliation{display:grid;gap:2px}
.co-athlete-summary .co-athlete-affiliations :is(button,span,small){color:inherit}
.co-athlete-affiliations button{padding:0;text-align:left;background:none;border:0;font:400 var(--text-body,16px)/1.4 var(--font);cursor:pointer;min-height:32px}
.co-athlete-affiliations small{font:400 var(--text-label,14px)/1.4 var(--font);opacity:.8}
.co-membership-team-choice{display:grid;gap:10px}
.co-membership-team-choice>.btn{justify-content:space-between;text-align:left;white-space:normal;border-radius:7px;min-height:48px}
@media(max-width:540px){.co-membership-row{padding:12px}.co-membership-row-head{grid-template-columns:minmax(0,1fr);gap:4px}.co-membership-row-head>.co-text-btn{justify-self:end;min-height:36px;padding:4px 0}.co-membership-details{grid-template-columns:minmax(0,1fr)}.co-membership-new{grid-template-columns:minmax(0,1fr)}}

/* Keep the action readable under the shared modal button rules. */
.co-membership-editor .co-membership-row [data-membership-remove]{background:transparent!important;color:var(--red)!important;border:0!important;box-shadow:none!important;min-width:0;padding:8px!important}

.co-membership-units[hidden]{display:none!important}
