body[data-view="profile"] .main-panel.alt-view { display:flex; min-width:0; min-height:0; padding:0; overflow:hidden; }
#personProfileView:not(.hidden) { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; min-width:0; overflow:auto; padding:0; }
#personProfileView > .person-profile { flex:1 0 auto; display:flex; }
#personProfileView .person-profile-column { padding-top:clamp(1rem,5vh,3rem); }
#personProfileView .person-profile-backdrop { background-position:center; }
.person-profile-nav,.person-quick-head,.person-quick-actions,.server-people-dialog>header {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.6rem;
  padding:.65rem .8rem;
}
.person-profile-notice { padding:1rem; }
.person-profile { position:relative; isolation:isolate; color:#f1f5ff; background:#0a142a; overflow:hidden; }
.person-profile-backdrop { position:absolute; inset:0; z-index:-1; pointer-events:none; background-image:var(--profile-art); background-size:cover; background-position:center; }
img.person-profile-backdrop { width:100%; height:100%; object-fit:cover; }
[data-profile-background="night"] { --profile-art:radial-gradient(ellipse at 0 54%,#174465 0%,transparent 54%),radial-gradient(ellipse at 100% 30%,#293459 0%,transparent 58%),linear-gradient(145deg,#091223,#122245); }
[data-profile-background="nebula"] { --profile-art:radial-gradient(ellipse at 5% 62%,#087584 0%,transparent 52%),radial-gradient(ellipse at 94% 26%,#923f9a 0%,transparent 50%),linear-gradient(145deg,#091223,#283476); }
[data-profile-background="sunset"] { --profile-art:radial-gradient(ellipse at 15% 55%,#c97162,transparent 54%),radial-gradient(ellipse at 90% 65%,#ac5862,transparent 54%),linear-gradient(165deg,#291735,#63374e 70%,#2a243d); }
[data-profile-background="aster"] { --profile-art:url("./assets/profile/aster.webp"); }
.person-profile[data-profile-motion="true"] div.person-profile-backdrop { animation:profile-scenery 12s ease-in-out infinite alternate; }
@keyframes profile-scenery { from { transform:scale(1.02); filter:saturate(.96); } to { transform:scale(1.1); filter:saturate(1.25) brightness(1.12); } }
.person-profile-column { width:min(68%,53rem); min-width:min(100%,29rem); min-height:24rem; margin-inline:auto; padding:clamp(1rem,4vw,2.25rem); background:linear-gradient(145deg,#101b36f2,#0b1429ef); }
.person-profile-identity { display:flex; align-items:center; gap:1.25rem; min-width:0; overflow-wrap:anywhere; margin-bottom:1.3rem; }
.person-profile-identity h2 { font-size:clamp(1.25rem, 2.2vw, 2rem); margin:0; }
.person-profile-identity small { display:block; color:#bdcae2; margin-block:.25rem; }
.person-profile-identity .status-label { display:block; }
.person-profile-avatar.avatar { width:4.65rem; height:4.65rem; flex:0 0 auto; border-radius:20%; font-size:1.55rem; }
.person-profile-content { display:grid; gap:.7rem; }
.person-profile-content section { padding:.85rem 1rem; border:1px solid #8aa9d52e; border-radius:.55rem; background:#111d36d9; overflow-wrap:anywhere; }
.person-profile-content h3 { font-size:1rem; margin:0 0 .35rem; }
.person-profile-content p { margin:0; color:#c6d2e9; white-space:pre-wrap; line-height:1.4; }
.person-profile-content ul { display:flex; flex-wrap:wrap; gap:.45rem; padding:0; margin:.45rem 0 0; list-style:none; }
.person-profile-content li { padding:.27rem .55rem; border-radius:.4rem; background:#233451; }
.person-quick-profile {
  position:fixed; z-index:2147483000; width:min(22rem,calc(100vw - 20px)); max-height:calc(100dvh - 20px);
  overflow:auto; border:1px solid var(--skin-accent,var(--line-strong)); border-radius:.65rem;
  background:var(--skin-deep,var(--panel)); color:var(--text); box-shadow:0 .85rem 2.6rem #0009;
}
.person-quick-actions { justify-content:flex-start; }
.person-profile-compact .person-profile-column { width:100%; min-width:0; min-height:0; padding:1rem; background:linear-gradient(#0a12276b,#0b1429f2 58%); }
.person-profile-compact .person-profile-avatar { width:3rem; height:3rem; font-size:1.1rem; }
.person-profile-compact .person-profile-identity h2 { font-size:1.1rem; }
.person-profile-compact .person-profile-content section { padding:.5rem .65rem; }
.person-profile-compact .person-profile-content p { font-size:.85rem; }
.avatar[data-avatar-frame] { position:relative; overflow:visible; }
[data-avatar-frame="gold"] { --profile-frame:linear-gradient(135deg,#fff2b0,#b98339 45%,#fbe0a1 75%,#85612d); --profile-frame-light:#ffce7580; }
[data-avatar-frame="aurora"] { --profile-frame:conic-gradient(from 0deg,#40f6e5,#437dff,#a771ff,#f3b5ff,#40f6e5); --profile-frame-light:#64d5ff80; }
[data-avatar-frame="orbit"] { --profile-frame:conic-gradient(from 0deg,#414d8e,#b9beff 14%,#fcf6ff 19%,#414d8e 25%,#414d8e 62%,#e69fff 75%,#414d8e 82%); --profile-frame-light:#bb9bfa90; }
.avatar:is([data-avatar-frame="gold"],[data-avatar-frame="aurora"],[data-avatar-frame="orbit"])::before {
  content:""; position:absolute; inset:-4px; border-radius:inherit; padding:2px; pointer-events:none;
  background:var(--profile-frame); box-shadow:0 0 6px var(--profile-frame-light);
  mask:linear-gradient(white 0 0) content-box exclude,linear-gradient(white 0 0);
}
.avatar[data-avatar-frame-motion="true"]::before { animation:profile-frame-shine 3s ease-in-out infinite alternate; }
.avatar[data-market-avatar-frame] { border-radius:50%; }
.avatar[data-market-avatar-frame]::before {
  content:""; position:absolute; inset:-15%; pointer-events:none;
  background:var(--market-profile-frame) center/contain no-repeat; animation:none;
}
.avatar[data-market-frame-image]::before { content:none; }
.market-profile-avatar-image,.market-profile-frame-image { position:absolute; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.market-profile-avatar-image { inset:0; border-radius:inherit; }
.market-profile-frame-image { inset:-15%; width:130%; height:130%; }
@keyframes profile-frame-shine { from { filter:brightness(.9) hue-rotate(-18deg); } to { filter:brightness(1.38) hue-rotate(34deg); } }
body.reduce-motion .person-profile .person-profile-backdrop,body.reduce-motion .avatar[data-avatar-frame-motion]::before,body.reduce-motion .market-profile-frame-image { animation:none !important; }
@media(prefers-reduced-motion:reduce) { .person-profile .person-profile-backdrop,.avatar[data-avatar-frame-motion]::before { animation:none !important; } }

#nowView .approved-friend-row > button.home-friend-profile { flex:1; min-width:0; display:flex; align-items:center; gap:.6rem; padding:0; text-align:start; background:transparent !important; border-color:transparent !important; color:inherit; }
.home-friend-profile > span { display:grid; min-width:0; }
.home-friend-profile :is(strong,small) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.server-people [hidden],[data-account-pane][hidden],.server-people-dialog:not([open]) { display:none !important; }
.server-people { min-width:0; }
.server-people header { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:.3rem; }
.server-people header h2 { margin:0; }
.server-people header small,.server-person-row small { color:var(--muted); }
.server-people-tabs,.profile-settings-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; margin-block:.65rem; }
:is(.server-people-tabs,.profile-settings-tabs,.profile-cosmetic-options) button[aria-pressed="true"] { outline:2px solid var(--skin-accent,var(--green)); outline-offset:-2px; }
#serverPeopleSearch { width:100%; min-width:0; }
.server-people-list { display:grid; gap:.45rem; margin-top:.65rem; }
.server-people-list summary { padding:.5rem .3rem; cursor:pointer; font-weight:650; }
.server-people-list summary small { margin-inline-start:.35rem; color:var(--muted); }
.server-people-rows { display:grid; gap:.25rem; }
.server-person-row { width:100%; min-width:0; border:1px solid transparent; border-radius:.4rem; background:transparent; color:inherit; display:flex; align-items:center; gap:.65rem; text-align:start; padding:.4rem .3rem; cursor:pointer; }
.server-person-row:hover,.server-person-row:focus-visible { background:color-mix(in srgb,var(--text) 7%,transparent); border-color:var(--line-strong); }
.server-person-row>span:nth-child(2) { min-width:0; flex:1; display:grid; }
.server-person-row strong,.server-person-role { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.server-person-role { color:var(--muted); font-size:.76em; max-width:35%; }
.server-people-dialog { width:min(28rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); border:1px solid var(--skin-accent,var(--line-strong)); border-radius:.65rem; background:var(--skin-deep,var(--panel)); color:var(--text); }
.server-people-dialog::backdrop { background:#030613a8; }
.server-people-dialog>header h2 { margin:0; font-size:1.1rem; }
.server-people-dialog .server-people { margin:0; }
#serverMembersButton { display:none; }
@media(max-width:1180px) { #serverMembersButton { display:inline-grid; } }
.profile-appearance-editor { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr)); align-items:start; gap:1rem; }
.profile-appearance-editor .settings-card { min-width:0; }
.profile-appearance-editor h3 { margin-top:0; }
.profile-collection h4 { margin-bottom:.55rem; }
.profile-collection label { display:flex; align-items:center; gap:.4rem; margin:.55rem 0; }
.profile-cosmetic-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(6.2rem,1fr)); gap:.45rem; }
.profile-cosmetic-options .profile-cosmetic-option { display:grid; justify-items:center; align-content:center; gap:.4rem; min-width:0; padding:.45rem; overflow-wrap:anywhere; white-space:normal; }
.profile-background-swatch { width:100%; height:2.3rem; border-radius:.35rem; background-color:#171f36; background-image:var(--profile-art); background-position:center; background-size:cover; }
.profile-frame-sample.avatar { width:2rem; height:2rem; margin:.1rem; }
.profile-editor-view [data-profile-editor-preview] { margin-top:.8rem; border-radius:.5rem; overflow:hidden; }
@media(max-width:640px) {
  .person-profile-column { width:100%; min-width:0; padding:1rem; background:linear-gradient(#0a12276b,#0b1429f2 55%); }
  .person-profile-identity { flex-wrap:wrap; }
}

#showOwnProfile { justify-self:start; width:max-content; max-width:100%; min-height:2rem; }
.profile-market-entry { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; }
.profile-market-entry small { color:var(--muted); }
#libraryProfileMarket { width:100%; margin-block:.55rem; }
.profile-market {
  box-sizing:border-box; width:min(67rem,calc(100vw - 1.5rem)); max-height:calc(100dvh - 1.5rem);
  overflow:auto; padding:clamp(.75rem,2vw,1.3rem); border:1px solid var(--skin-accent,var(--line-strong));
  border-radius:.85rem; color:var(--text); background:var(--skin-deep,var(--panel,#111b2a)); font:inherit;
}
.profile-market:not([open]) { display:none; }
.profile-market::backdrop { background:#040915c4; }
.profile-market>header,.profile-market-preview-title { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.profile-market>header h2,.profile-market-preview-title h3 { margin:.2rem 0 0; }
.profile-market>header span,.profile-market-preview-title small { color:var(--muted,#b8c7d9); letter-spacing:.08em; font-size:.78em; }
.profile-market-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(16rem,35%); align-items:start; gap:1rem; }
.profile-market-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(8.4rem,100%),1fr)); align-items:stretch; gap:.5rem; }
.profile-market-item {
  display:grid; align-content:start; gap:.32rem; min-width:0; min-height:5rem; padding:.4rem;
  border-radius:.45rem; border:1px solid var(--line-strong); text-align:start;
  color:inherit; background:color-mix(in srgb,var(--text) 5%,transparent); font:inherit; cursor:pointer;
}
.profile-market-item:is(:hover,:focus-visible,[aria-pressed="true"]) { border-color:var(--skin-accent,var(--green,#66e4db)); }
.profile-market-item img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:.32rem; }
.profile-market-item img.market-avatar-thumb { aspect-ratio:1; width:min(100%,4.6rem); justify-self:center; border-radius:50%; }
.market-frame-thumb { width:min(100%,4.6rem); justify-self:center; display:grid; place-items:center; isolation:isolate; }
.market-frame-thumb::before { content:""; grid-area:1/1; width:62%; aspect-ratio:1; border-radius:50%; background:color-mix(in srgb,var(--text) 12%,transparent); }
.profile-market-item .market-frame-thumb img { grid-area:1/1; aspect-ratio:1; z-index:1; }
.profile-market-item strong { overflow-wrap:anywhere; font-size:.87em; }
.profile-market-item small,.profile-market-preview p { color:var(--muted,#b8c7d9); font-size:.8em; }
.profile-market-preview { display:grid; gap:.7rem; padding:.7rem; border:1px solid var(--line-strong); border-radius:.55rem; min-width:0; }
.profile-market-preview-title b { font-size:.8em; padding:.2rem .45rem; border:1px solid currentColor; border-radius:1rem; }
.profile-market-preview .person-profile { border-radius:.45rem; }
.profile-market-preview p { margin:0; }
.profile-market [hidden] { display:none !important; }
.profile-market-terms { display:flex; gap:.55rem; align-items:flex-start; font-size:.85em; }
.profile-market-terms input { margin-top:.22rem; }
.profile-market-terms a { text-decoration:underline; color:inherit; }
[data-market-notice] { padding:.6rem; border:1px solid var(--line-strong); border-radius:.45rem; }
@media(max-width:760px) {
  .profile-market-body { grid-template-columns:1fr; }
  .profile-market-preview { grid-row:1; }
  .profile-market-preview .person-profile-content { display:none; }
}
