.uv-account {max-width:54rem;width:100%;margin:0 auto;color:var(--ink);}
.uv-account h1{margin:.2em 0 .65em}
.uv-account h2{margin:1.8em 0 .45em;font-size:1.32rem}
.uv-account h3{margin:1.8em 0 .45em;font-size:1.1rem}
.uv-account p,.uv-account address{line-height:1.6;max-width:65ch}
.uv-account address{font-style:normal}
.uv-account small,.account-muted{color:var(--muted)}
.uv-account a{color:inherit;text-underline-offset:.18em}
.uv-account form,.uv-account label{display:grid;gap:.6rem}
.uv-account form{gap:1rem;margin:1.4rem 0;max-width:38rem}
.uv-account input:not([type=checkbox]):not([type=range]),.uv-account select,.uv-account textarea{border:1px solid var(--line);color:var(--ink);background:var(--paper);border-radius:10px;padding:.8rem;min-height:3rem;font:inherit;min-width:0;width:100%}
.uv-account input,.uv-account textarea,.uv-account select,.uv-account button{font:inherit}
.uv-account button,.account-actions>a{padding:.65rem 1rem;min-height:44px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;text-decoration:none}
.uv-account button.account-primary{background:var(--ink);color:var(--paper);font-weight:650;border:0}
.uv-account button.account-danger{color:#ff9a9e}
.uv-account button:disabled{opacity:.55}
.account-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.registration-details{min-width:0;padding:0;margin:.25rem 0;border:0}
.registration-details legend{padding:0;font-weight:650}
.registration-details legend small{font-weight:400}
.registration-details p{margin:.35rem 0 1rem;font-size:.94rem}
.account-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem .75rem}
.account-fields label{min-width:0}
.account-fields :is(input,select){box-sizing:border-box;width:100%;height:3rem}
.uv-account .account-fields select{appearance:none;-webkit-appearance:none;padding-inline-end:2.35rem}
.account-fields label:has(>select){position:relative}
.account-fields label:has(>select)::after{content:"";position:absolute;right:1rem;bottom:1.32rem;width:.46rem;height:.46rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none}
@media(max-width:32rem){.account-fields{grid-template-columns:minmax(0,1fr)}}
@media(forced-colors:active){.uv-account .account-fields select{appearance:auto}.account-fields label:has(>select)::after{display:none}}
.account-actions{margin:.65rem 0}
.account-avatar{width:66px;height:66px;flex:none;display:inline-grid;place-content:center;font-size:1.2rem;font-weight:700;object-fit:cover;border-radius:50%;border:2px solid var(--accent);background:var(--surface)}
.account-photo .account-avatar{width:110px;height:110px}
.rider-profile{max-width:58rem}
.profile-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1.5rem;align-items:center;padding:clamp(1.1rem,3.5vw,2.2rem);border:1px solid var(--line);border-radius:1.4rem;background:linear-gradient(115deg,var(--surface),var(--paper) 75%);box-shadow:var(--shadow)}
.profile-identity{display:flex;grid-column:1/-1;align-items:center;gap:clamp(.85rem,2.4vw,1.65rem);min-width:0}
.profile-identity .account-avatar{width:clamp(6rem,12vw,9rem);height:auto;aspect-ratio:1;object-fit:cover;font-size:clamp(1.7rem,4vw,2.7rem);letter-spacing:-.04em;color:var(--active);background:var(--paper);border:3px solid var(--paper);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 60%,var(--line))}
.profile-name{min-width:0;flex:1}
.profile-name :is(h1,h2){font-size:clamp(2.1rem,4.8vw,3.9rem);line-height:1.05;letter-spacing:-.05em;margin:0;overflow-wrap:anywhere}
.profile-name p{margin:.4rem 0 0;color:var(--muted)}
.profile-meta{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem .7rem;margin-top:.65rem;color:var(--muted);font-size:.9rem}
.profile-meta span:first-child{color:var(--ink);font-weight:650}
.profile-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.profile-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;padding:.5rem .8rem;border:1px solid var(--line);border-radius:.8rem;background:var(--paper);font-size:.9rem;font-weight:600;text-decoration:none}
.profile-actions svg{flex:none;width:1.12rem;height:1.12rem}
.profile-actions :is(a,button):hover,.profile-race:hover,.profile-tabs a:hover{background:var(--surface)}
.profile-bio{grid-column:1/-1;border-top:1px solid var(--line);padding-top:1rem}
.profile-bio h2{margin:0;font-size:1rem}
.profile-bio p{white-space:pre-line;overflow-wrap:anywhere;margin:.25rem 0 0}
.profile-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:.25rem;padding:.3rem;margin:clamp(1.15rem,3vw,2rem) 0 .7rem;background:var(--surface);border-radius:1rem}
.profile-tabs a{display:flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;padding:.4rem;text-decoration:none;text-align:center;line-height:1.2;font-size:.95rem;font-weight:600;border-radius:.75rem}
.profile-tabs a[aria-current=page]{color:var(--ink);background:var(--paper);box-shadow:0 1px 5px #0002}
.profile-tabs a span{font-size:.8rem;border-radius:.5rem;padding:.18rem .38rem;color:var(--muted);font-variant-numeric:tabular-nums}
.profile-tabs a[aria-current=page] span{background:color-mix(in srgb,var(--accent) 18%,var(--paper));color:var(--active)}
.profile-list{display:flow-root}
.profile-race{display:flex;align-items:center;gap:1rem;min-height:4.8rem;padding-block:.7rem;text-decoration:none}
.profile-race+.profile-race{border-top:1px solid var(--line)}
.profile-race small{display:block;margin-top:.2rem}
.profile-year{padding:.4rem .55rem;background:var(--surface);border-radius:.55rem;font-size:.88rem;font-weight:650;font-variant-numeric:tabular-nums}
.profile-empty{color:var(--muted);margin:1.1rem .25rem}
.profile-organizer{display:inline-block;padding:.75rem .25rem;color:var(--active);font-weight:600}
@media(max-width:760px){.profile-card{grid-template-columns:minmax(0,1fr);gap:1rem}.profile-actions{justify-content:flex-start}}
@media(max-width:520px){.profile-tabs:has(a:nth-child(4)){grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr))}.profile-tabs a{font-size:.88rem;gap:.2rem}.profile-meta{margin-top:.4rem}.profile-name p{font-size:.92rem}}
.account-row{display:block;padding:.9rem 0;border-bottom:1px solid var(--line);text-decoration:none}
.account-row span{display:block;margin-top:.22rem;color:var(--muted);font-size:.88rem}
.uv-account .account-toggle{display:flex;align-items:center;gap:.8rem}
.account-toggle input{width:1.15rem;height:1.15rem}
.uv-account [hidden]{display:none}
.account-message:empty{display:none}

.profile-identity:not(:has(~ .profile-card-actions)) { grid-column: 1 / -1; }
.profile-card-actions { display: grid; justify-items: end; gap: .6rem; }
.profile-social { display: flex; gap: .35rem; }
@media (max-width: 760px) {
  .profile-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
  .profile-social { margin-inline-start: auto; }
}
.profile-social-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
}
.profile-social-link:is(:hover, :focus-visible) {
  outline: 2px solid var(--accent, #d64161);
  outline-offset: 1px;
}

.result-match { padding: 1rem; margin-block: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.result-match h4,.result-match p { margin: 0; }
.result-match p,.result-match a { color: var(--muted); }
.result-match a { display: inline-block; padding-block: .35rem; }
.result-match .account-actions { margin-top: .55rem; gap: .5rem; }

.rider-name-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem 1rem}
.rider-name-row .profile-social{flex:none;gap:0}
.profile-card-actions{grid-column:1/-1;justify-self:end}
@media(max-width:540px){
  .profile-identity{display:grid;grid-template-columns:minmax(0,1fr);gap:.85rem}
  .rider-name-row{gap:.4rem}
  .profile-card-actions{justify-self:start}
}
.settings-section{border-top:1px solid var(--line);margin-top:1.3rem;padding:1.25rem 0 .3rem}
.settings-section h2{margin:0 0 .65rem}
.profile-meta .profile-following{display:inline-flex;align-items:center;min-height:36px;padding:0 .75rem;color:var(--active);background:var(--tint);border-radius:.6rem;text-decoration:none;font-weight:650}
