.profile-dialog { color:var(--fg); background:var(--bg); border:1px solid var(--line,#d5c9b5); border-radius:16px; width:min(660px,calc(100% - 24px)); max-height:90dvh; padding:0; box-shadow:0 24px 100px #0006; }
.profile-dialog::backdrop { background:#171a18b8; backdrop-filter:blur(4px); }
.profile-top { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:26px; border-bottom:1px solid var(--line,#d5c9b5); }
.profile-top h2 { margin:6px 0 0; }
.profile-fields,.profile-tools { display:grid; gap:18px; padding:26px; }
.profile-tools { border-bottom:1px solid var(--line,#d5c9b5); }
.profile-tools h3,.profile-identity p { margin:0; }
.profile-identity { display:flex; gap:18px; align-items:center; }
.profile-avatar { flex:0 0 86px; width:86px; height:86px; border-radius:50%; display:grid; place-items:center; overflow:hidden; background:var(--gold,#b99b62); color:#18231f; font:36px var(--display,serif); }
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-dialog input,.profile-dialog select { width:100%; min-width:0; }
.profile-dialog .flexy { gap:12px; flex-wrap:wrap; }
.profile-dialog .flexy input { flex:1; min-width:160px; }
.profile-dialog .status { font-size:14px; }

.person-avatar { position:relative; display:inline-grid; place-items:center; flex:0 0 32px; width:32px; height:32px; margin-inline-end:8px; overflow:hidden; vertical-align:middle; border-radius:50%; background:var(--gold); color:var(--on-gold); font:700 12px var(--body,sans-serif); letter-spacing:0; text-transform:none; }
.person-avatar img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
.msg-who { align-items:center; flex-wrap:wrap; }
.msg-who .person-avatar { color:var(--on-gold); margin-inline-end:0; font-size:12px; }
.me-head > .person-avatar { width:64px; height:64px; flex-basis:64px; font-size:22px; }
.pick button .person-avatar { color:var(--on-gold); }
@media print { .person-avatar { display:none; } }

.directory-dialog { width:min(820px,calc(100% - 24px)); }
.directory-dialog .profile-tools p { margin:0; }
.directory-list { padding:0 26px 20px; }
.directory-member { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; padding:22px 0; border-bottom:1px solid var(--line,#d5c9b5); }
.directory-member:last-child { border-bottom:0; }
.directory-person { display:flex; align-items:center; gap:12px; min-width:0; }
.directory-person .person-avatar { width:44px; height:44px; flex-basis:44px; margin:0; }
.directory-person h3 { font-size:17px; margin:0 0 5px; overflow-wrap:anywhere; }
.directory-person p { margin:0; }
.directory-contact { display:grid; align-content:center; gap:8px; overflow-wrap:anywhere; }
.directory-contact a { color:var(--fg); text-underline-offset:4px; }
.directory-contact a:hover { color:var(--gold); }
@media (max-width:540px) { .directory-member { grid-template-columns:minmax(0,1fr); gap:12px; } .directory-contact { padding-left:56px; } }

.person-avatar[data-member-profile] { cursor:pointer; }
.person-avatar[data-member-profile]:hover { box-shadow:0 0 0 3px var(--gold); }
.person-avatar[data-member-profile]:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.member-summary { display:grid; grid-template-columns:1fr 1fr; gap:24px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.member-summary h3 { margin:8px 0; }
.member-score { display:block; font-size:40px; color:var(--gold); }
.member-detail section h3 { margin-top:0; }
.member-detail textarea { width:100%; box-sizing:border-box; margin:10px 0; font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:12px; }
.member-gigs,.member-notes { list-style:none; padding:0; }
.member-gigs li,.member-notes li { padding:16px 0; border-bottom:1px solid var(--line); }
.member-gigs span { display:block; margin-top:6px; }
.member-notes p { white-space:pre-wrap; overflow-wrap:anywhere; margin-top:0; }
.member-notes small { color:var(--muted); }
@media(max-width:600px) { .member-detail textarea { font-size:16px; } }

.member-portrait { width:min(100%,320px); aspect-ratio:1; justify-self:center; display:grid; place-items:center; overflow:hidden; border-radius:18px; background:var(--gold); color:var(--on-gold); font:72px var(--display,serif); }
.member-portrait img { display:block; width:100%; height:100%; object-fit:contain; }
#member-access-form:not([hidden]) { display:grid; gap:12px; margin-top:16px; }
#member-access-form button { justify-self:start; }
