/* Member-selected colour is server-validated; never used for game statistics or page contrast. */
.profile-header.has-profile-style{border-top:3px solid var(--profile-accent)}
.profile-supporter-badge{display:inline-flex;padding:4px 10px;border:1px solid var(--profile-accent);border-radius:999px;color:var(--profile-accent);font-size:12px;font-weight:650;line-height:1.5;white-space:nowrap}
.profile-banner-frame{margin:-24px -24px 24px;aspect-ratio:16/5;background:var(--surface-raised)}
.profile-banner-frame[hidden]{display:none}.profile-banner{display:block;width:100%;height:100%;object-fit:cover}
.profile-perks h2{font-size:20px;font-weight:750;margin-bottom:12px}.profile-perks-note{font-size:13px;color:var(--muted);line-height:1.7;margin-block:10px;max-width:72ch}
.profile-perks-form{margin-top:24px}.profile-perks fieldset{display:grid;gap:10px;min-width:0;border:0;margin:0 0 24px;padding:0}.profile-perks fieldset:disabled{opacity:.65}
.profile-perks label{display:block;font-size:14px;font-weight:650}.profile-perks input[type=color]{display:block;min-width:88px;width:88px;min-height:48px;border:1px solid var(--stroke);background:var(--page);border-radius:8px;margin-top:10px;padding:5px;cursor:pointer}
.profile-perks input[type=file]{display:block;max-width:100%;font-size:14px;margin-top:10px;padding:10px 0}.profile-perks input[type=checkbox]{accent-color:var(--accent);width:18px;height:18px}
.profile-perks label.profile-perks-check{display:flex;align-items:center;gap:10px;min-height:44px}.profile-perks-actions{display:flex;gap:12px;flex-wrap:wrap}.profile-perks button:disabled{opacity:.5;cursor:not-allowed}
.profile-perks :where(input,button):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(min-width:640px){.profile-banner-frame{margin:-32px -32px 28px}}
@media(max-width:480px){.profile-supporter-badge{font-size:11px}.profile-perks-actions{flex-direction:column}.profile-header h1{flex-wrap:wrap}}

.has-profile-style .profile-player-name{color:var(--profile-accent)}
.has-profile-style .profile-avatar{border-color:var(--profile-accent)}

.profile-bbcode{margin-top:20px;max-width:74ch;line-height:1.8;overflow-wrap:anywhere;color:var(--text)}
.profile-bbcode h3{font-size:1.25rem;line-height:1.4;margin:24px 0 10px;font-weight:750;color:var(--text)}
.profile-bbcode a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.profile-bbcode a:focus-visible,.profile-bbcode summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.profile-bbcode blockquote{margin:16px 0;padding:12px 20px;border-inline-start:1px solid var(--stroke);color:var(--muted)}
.profile-bbcode ul{list-style:disc;padding-inline-start:26px;margin:12px 0}.profile-bbcode li{margin:6px 0}
.profile-bbcode details{margin:16px 0;border:1px solid var(--stroke);border-radius:12px}.profile-bbcode summary{padding:12px 16px;cursor:pointer;font-weight:650}.profile-bbcode details>div{padding:0 16px 16px}
.profile-bbcode img{display:block;max-width:100%;height:auto;border-radius:12px;margin:16px 0}
.profile-editor-note{font-size:13px;color:var(--muted);line-height:1.7;margin:10px 0;max-width:74ch}
.profile-editor-tools{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 12px}.profile-editor-tools .button-quiet{font-size:13px;padding:8px 12px;min-height:40px}.profile-editor-tools button:disabled{opacity:.45;cursor:not-allowed}
#profile-bio{font-family:inherit;line-height:1.65;min-height:200px}#profile-bio:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.profile-editor-help{margin:16px 0;font-size:13px;line-height:1.7}.profile-editor-help summary{cursor:pointer;min-height:32px;font-weight:650}.profile-editor-help code{display:block;white-space:normal;overflow-wrap:anywhere;padding:12px;background:var(--page);border-radius:8px;direction:ltr;text-align:left}
.profile-preview-title{margin-top:24px;font-weight:700}.profile-editor-preview{min-height:80px;margin:8px 0 20px;padding:16px;background:var(--page);border-radius:12px}.profile-editor-preview[aria-busy=true]{opacity:.7}
.profile-image-library{padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}.profile-image-library li{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.profile-image-library img{width:88px;height:60px;object-fit:contain;border-radius:8px;background:var(--page)}
#profile-inline-image{display:block;max-width:100%;padding:12px 0}#profile-editor :where(button,input,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.profile-role-badge{display:inline-flex;align-items:center;padding:4px 10px;border:1px solid currentColor;border-radius:999px;font-size:12px;font-weight:700;line-height:1.5;white-space:nowrap}
.profile-role-owner{color:var(--warning)}.profile-role-admin{color:#ff9bc4}.profile-role-developer,.profile-role-tournament{color:#d2b4ff}.profile-role-moderator{color:#8fddee}.profile-role-nominator{color:#9fe1b3}
@media(max-width:480px){.profile-role-badge{font-size:11px}}
