.profile-shell { max-width: 930px; }
.profile-shell > .notice { margin-bottom: 12px; animation: profile-enter 220ms ease-out both; }
.profile-head { overflow: hidden; background: #28251f; }
.profile-cover { position: relative; display: flex; justify-content: flex-end; align-items: center; overflow: hidden; height: 101px; border-bottom: 1px solid #61563e; background: #393b32 url("art/profile-cover.svg?v=5") center / cover no-repeat; }
.profile-cover img { position: relative; width: 76px; height: 76px; margin-right: 36px; object-fit: contain; filter: saturate(.66) drop-shadow(0 4px 4px #1a160ed0); }
.profile-identity { display: flex; align-items: flex-start; gap: 15px; padding: 0 19px 19px; }
.profile-avatar { position: relative; flex: 0 0 84px; width: 84px; height: 84px; margin-top: -19px; border: 3px solid #28251f; border-radius: 21px; background: #4d402a; }
.profile-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile-name { flex: 1; min-width: 0; padding-top: 13px; }
.profile-name h1 { color: #f7efe0; font-size: clamp(1.75rem, 4vw, 2.7rem); }
.profile-status { margin-top: 5px; color: #ebdec8; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-joined { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: .83rem; }
.profile-joined .icon { width: 16px; height: 16px; color: #c5ab7a; }
.profile-identity > .button { flex: none; align-self: center; border-color: #74634a; }
.profile-hint { display: flex; align-items: center; gap: 9px 12px; flex-wrap: wrap; margin-top: 13px; padding: 10px 13px; }
.profile-hint > .icon { color: #d9be85; }
.profile-hint p { flex: 1; min-width: 170px; color: var(--muted); }
.profile-hint .button { color: #eddaaa; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 15px 0 17px; border-bottom: 1px solid #565045; }
.profile-tab.button { min-height: 46px; border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 9px 9px 0 0; }
.profile-tab.button[aria-current] { color: #f1ddad; border-bottom-color: #d3ae68; background: #382f23; }
.profile-tab .icon { width: 17px; height: 17px; }
.profile-detail { animation: profile-enter 180ms ease-out both; }
.profile-detail > h2 { margin-bottom: 11px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.profile-metric { display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 83px; padding: 13px; background: #2c2923; transition: border-color 160ms ease, background-color 160ms ease; }
.profile-metric:hover { border-color: #8b7655; background: #322d23; }
.profile-metric-icon { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border: 1px solid #67573f; border-radius: 8px; background: #3c3327; color: #dec38d; }
.profile-metric-icon .icon { width: 17px; height: 17px; }
.profile-metric h3 { margin: 0 0 3px; color: #d9cbb5; font-size: .81rem; font-weight: 630; line-height: 1.3; overflow-wrap: anywhere; }
.profile-metric strong { color: #f5ead5; font-size: 1.55rem; font-weight: 830; line-height: 1.1; font-variant-numeric: tabular-nums; }
.profile-rank-list { display: grid; max-width: 680px; gap: 7px; padding: 0; margin: 0; list-style: none; }
.profile-rank-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(max-content, 12%) minmax(max-content, 13%); align-items: center; column-gap: 12px; min-height: 60px; padding: 10px 13px; border-color: #48453e; background: #252420; }
.profile-rank-row .profile-metric-icon { width: 32px; height: 32px; color: #e5c180; }
.profile-rank-row h3 { margin: 0; color: #f6f1e6; font-size: .95rem; font-weight: 750; overflow-wrap: anywhere; }
.profile-placement, .profile-rank-score { line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.profile-placement { text-align: center; color: #f6f1e6; font-size: 1.2rem; font-weight: 800; }
.profile-rank-score { text-align: right; color: #e7cd93; font-size: .875rem; font-weight: 600; }
.profile-empty-activity { margin-top: 12px; color: var(--muted); font-size: .91rem; }
.profile-activity { margin-top: 13px; padding: 15px; background: #282621; }
.profile-section-heading { display: flex; align-items: center; gap: 8px; }
.profile-section-heading > .icon { color: #ddc187; }
.profile-section-heading h2 { font-size: 1.12rem; }
.activity-total { margin: 5px 0 11px; color: #d5cbb8; font-size: .86rem; }
.activity-plot { display: block; width: 100%; height: 65px; }
.activity-grid { fill: none; stroke: #9b927840; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.activity-column { fill: #676153; }
.activity-column.filled { fill: #c6a671; animation: activity-grow 230ms ease-out both; transform-box: fill-box; transform-origin: 50% 100%; }
.activity-axis { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0 12px; color: #d7cbb7; font-size: .72rem; }
.activity-values { border-top: 1px solid #555044; }
.activity-values summary { min-height: 44px; padding: 10px 2px; color: #e5d4b4; cursor: pointer; font-size: .85rem; }
.activity-values ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0; list-style: none; }
.activity-values li { display: flex; min-width: 0; justify-content: space-between; gap: 7px; padding: 3px 7px; border-radius: 5px; background: #343025; color: #efdfc1; font-size: .78rem; }
.profile-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: start; gap: 10px; }
.profile-editor { animation: profile-enter 180ms ease-out both; }
.profile-editor-section { padding-top: 12px; border-top: 1px solid var(--border); }
.profile-editor .switch-label small { line-height: 1.35; }
.profile-editor .switch-track { pointer-events: none; }
.profile-security { display: grid; gap: 12px; padding: 13px; }
.profile-security .button { justify-content: space-between; }
.search-tabs { width: fit-content; margin: 12px 0; }
.search-list .search-result { animation: profile-enter 140ms ease-out both; }
.search-list .search-result:hover { border-color: #8c7653; }
.search-person .search-outer-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #3a3124; color: #d6b47d; }
.search-person .search-outer-icon .icon { width: 19px; height: 19px; }
.auth-disclosure { color: var(--muted); font-size: .78rem; line-height: 1.4; }
@keyframes profile-enter { from { opacity: .55; transform: translateY(4px); } }
@keyframes activity-grow { from { transform: scaleY(.15); } }

@media (max-width: 690px) {
  .profile-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-security { max-width: 360px; }
  .profile-metrics { grid-template-columns: repeat(2,minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .profile-cover { height: 72px; }
  .profile-cover img { width: 57px; height: 57px; margin-right: 17px; }
  .profile-identity { flex-wrap: wrap; gap: 7px 10px; padding: 0 12px 12px; }
  .profile-avatar { flex-basis: 61px; width: 61px; height: 61px; margin-top: -13px; border-radius: 15px; }
  .profile-name { flex: 1 1 calc(100% - 71px); }
  .profile-identity > .button { margin-top: 2px; margin-left: auto; }
  .profile-tabs .button { padding-inline: 10px; }
  .profile-metric { gap: 7px; padding: 9px; }
  .profile-metric-icon { flex-basis: 26px; width: 26px; height: 26px; }
  .profile-metric-icon .icon { width: 15px; height: 15px; }
  .profile-rank-row { column-gap: 8px; padding-block: 8px; }
  .profile-placement { font-size: 1.125rem; }
  .activity-values ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-shell *, .search-list .search-result { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
