.profile-grid--economy { grid-template-columns: minmax(0, 1fr); }
.profile-grid [hidden], .leaderboard-table [hidden] { display: none; }
.leaderboard-table td:nth-last-child(-n+2) { font-variant-numeric: tabular-nums; }
#view-profile [hidden] { display: none; }
#view-profile .profile-card { padding: 1rem; }
#view-profile .profile-card__identity { gap: 1rem; padding: 0; border: 0; }
#view-profile .profile-card__identity img, #view-profile .profile-card__fallback { width: 4rem; height: 4rem; flex: none; }
#view-profile .profile-card__identity h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
#view-profile .capability-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: .75rem; }
#view-profile .capability-strip span { min-width: 0; padding: .65rem .75rem; border-right: 1px solid var(--line); border-bottom: 0; }
#view-profile .capability-strip span:last-child { border: 0; }
#view-profile .capability-strip b { color: var(--bone-dim); }
#view-profile .leti-profile { min-width: 0; margin-top: 1rem; padding: 1rem; background: var(--void-panel); }
#view-profile .profile-balances { padding: 0; border: 0; background: transparent; }
#view-profile .section-head { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
#view-profile .leti-profile > .section-head, #view-profile .profile-history > .section-head { margin-bottom: .75rem; }
#view-profile .leti-profile h3, #view-profile .profile-history h3, #view-profile .operational-preferences h3, #view-profile .identity-wallets h3 { margin: 0; font-size: 1rem; line-height: 1.4; }
#view-profile .profile-economy-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 .75rem; }
#view-profile .profile-economy-metrics dd { margin: 0; color: var(--bone); font: 600 clamp(1rem, 1.4vw, 1.25rem)/1.4 var(--mono); white-space: nowrap; overflow-x: auto; }
#view-profile .profile-economy-metrics dd:focus-visible { outline: 1px solid var(--ink-orange); outline-offset: 2px; }
#view-profile .profile-leti-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; }
#view-profile .profile-leti-metrics > div { justify-content: flex-start; padding: .25rem 0; border: 0; background: transparent; }
#view-profile .profile-leti-metrics dd { margin: 0; color: var(--bone); font: 600 1rem/1.4 var(--mono); }
#view-profile .profile-leti-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .75rem 0 0; }
#view-profile .profile-leti-secondary dt, #view-profile .profile-card__facts dt { color: var(--bone-dim); font: .65rem/1.5 var(--mono); }
#view-profile .profile-leti-secondary dd, #view-profile .profile-card__facts dd { margin: .3rem 0 0; color: var(--bone); font: .75rem/1.5 var(--mono); overflow-wrap: anywhere; }
#view-profile .profile-card__facts { gap: .5rem 1rem; }
#view-profile .profile-card__facts > div { min-width: 0; min-height: 0; justify-content: flex-start; padding: .65rem 0; border: 0; }
#view-profile .profile-conversion { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem 1rem; margin-top: .75rem; }
#view-profile .profile-conversion label { min-width: 0; }
#view-profile .profile-conversion__advanced { min-width: 0; color: var(--bone-dim); font: .7rem/1.6 var(--mono); }
#view-profile .profile-conversion__advanced summary { cursor: pointer; }
#view-profile .profile-conversion__advanced label { display: grid; gap: .4rem; margin-top: .5rem; }
#view-profile .profile-conversion > p { grid-column: 1 / -1; margin: 0; color: var(--bone-dim); font: .7rem/1.6 var(--mono); overflow-wrap: anywhere; }
#view-profile .profile-conversion > p:empty { display: none; }
#view-profile .leti-profile__notice { color: var(--bone-dim); line-height: 1.6; }
#view-profile .profile-history { margin: 1.25rem 0 0; padding: 1rem; }
#view-profile .leti-history__entries { grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: .75rem 0; }
#view-profile .operational-preferences, #view-profile .identity-wallets { margin-top: 1.25rem; }
#view-profile .operational-preferences__scope, #view-profile .identity-wallets__scope { color: var(--bone-dim); font-size: .75rem; line-height: 1.6; }
#view-profile .profile-editor { align-items: start; gap: .75rem; }
#view-profile .profile-editor fieldset, #view-profile .identity-wallets { padding: 1rem; }
@media (max-width: 700px) {
  #view-profile .leti-profile, #view-profile .profile-history, #view-profile .profile-card { padding: .75rem; }
  #view-profile .profile-balances { padding: 0; }
  #view-profile .profile-economy-metrics > div { padding: .75rem; }
  #view-profile .profile-leti-metrics { gap: .5rem; }
  #view-profile .profile-leti-metrics dt { font-size: .6rem; }
  #view-profile .profile-leti-metrics dd { font-size: .9rem; }
  #view-profile .profile-conversion { grid-template-columns: minmax(0, 1fr) auto; }
  #view-profile .profile-conversion__advanced,
  #view-profile #leti-conversion-submit { grid-column: 1 / -1; }
  #view-profile .capability-strip span { flex-direction: column; gap: .25rem; font-size: .6rem; }
  #view-profile .economy-progression { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .5rem; }
}
@media (max-width: 640px) {
  .leaderboard-table table { min-width: 38rem; }
  .leaderboard-table th, .leaderboard-table td { padding: .65rem; }
}
