.avatar { display: grid; place-items: center; overflow: hidden; color: var(--ink); text-decoration: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* The account form remains a compact auth card; only the authenticated profile becomes a page shell. */
.profile-card { width: min(100%, 1120px); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.profile-card > .eyebrow { margin-bottom: 14px; }
.profile-card > h1 { max-width: 720px; margin-bottom: 10px; }
.profile-card > .subhead { max-width: 560px; margin-bottom: 0; }
.profile-card > .status { margin-top: 18px; }

.profile-hero { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 30px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-avatar { display: grid; place-items: center; width: 104px; height: 116px; overflow: hidden; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--lime); font-size: 28px; font-weight: 700; letter-spacing: -.08em; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; }
.profile-kicker { margin: 0 0 9px; color: var(--green); font: 500 10px var(--mono); letter-spacing: .13em; }
.profile-identity h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(28px, 5vw, 46px); line-height: .98; letter-spacing: -.06em; }
.profile-email { margin: 9px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; }
.profile-details { display: flex; flex-wrap: wrap; gap: 24px; margin: 20px 0 0; }
.profile-details div { min-width: 130px; }
.profile-details dt { color: var(--muted); font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.profile-details dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 14px; }
.profile-bib { display: grid; min-width: 148px; padding: 15px 18px; border-left: 1px solid var(--line); color: var(--muted); text-align: right; }
.profile-bib span, .profile-bib small { font: 500 9px var(--mono); letter-spacing: .11em; }
.profile-bib strong { margin: 4px 0; color: var(--ink); font-size: 38px; line-height: .9; letter-spacing: -.08em; }

.profile-board { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 32px; align-items: start; margin-top: 34px; }
.profile-tournaments { min-width: 0; }
.tournament-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.tournament-columns section { min-width: 0; padding: 20px 24px 0 0; }
.tournament-columns section + section { padding-right: 0; padding-left: 24px; border-left: 1px solid var(--line); }
.profile-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.profile-section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.profile-section-heading span { color: var(--muted); font: 500 10px var(--mono); }
.tournament-list { display: grid; gap: 0; }
.tournament-item { display: grid; gap: 3px; padding: 14px 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 12px; }
.tournament-item:first-child { border-top: 1px solid var(--line); }
.tournament-item strong { font-size: 14px; line-height: 1.2; }
.tournament-item span, .tournament-item small { color: var(--muted); }
.tournament-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tournament-empty { margin: 0; padding: 15px 0; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 12px; }

.profile-edit { min-width: 0; padding-left: 26px; border-left: 1px solid var(--line); }
.profile-edit h2 { margin: 0 0 20px; font-size: 22px; line-height: 1.04; letter-spacing: -.045em; }
.profile-edit form { margin-top: 0; }
.profile-edit label { margin-bottom: 14px; }
.profile-edit input { padding: 11px 12px; font-size: 13px; }
.profile-edit .primary-button { margin-top: 18px; padding: 13px 14px; }
.profile-footer { justify-content: flex-start; margin: 35px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .profile-card { width: 100%; }
  .profile-hero { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
  .profile-avatar { width: 76px; height: 88px; font-size: 22px; }
  .profile-bib { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-width: 0; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
  .profile-bib strong { margin: 0; font-size: 26px; }
  .profile-board { grid-template-columns: 1fr; gap: 34px; }
  .profile-edit { padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 540px) {
  .profile-card > h1 { font-size: 38px; }
  .profile-hero { margin-top: 22px; padding: 20px 0; }
  .profile-details { gap: 14px; margin-top: 15px; }
  .tournament-columns { grid-template-columns: 1fr; }
  .tournament-columns section, .tournament-columns section + section { padding: 18px 0 0; border-left: 0; }
  .tournament-columns section + section { margin-top: 15px; border-top: 1px solid var(--line); }
}
