/* Account profile editor; scoped to keep collection and game layouts intact. */
#account-dialog .profile-account-entry {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px;
  margin: 5px 0 22px; border: 1px solid #a18a5266; border-radius: 12px;
  color: #ead8ac; text-align: left; cursor: pointer;
  background: linear-gradient(115deg,#34412a88,#1c2b22); box-shadow: inset 0 1px #f4e1a40a;
}
#account-dialog .profile-account-entry:hover { border-color: #c3a86f; background: #2b3b2b; }
#account-dialog .profile-account-entry>span:nth-child(2) { flex: 1; min-width: 0; }
#account-dialog .profile-account-entry strong { display: block; font-size: 14px; font-weight: 600; }
#account-dialog .profile-account-entry small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5; color: #b0bba3; }
#account-dialog .profile-entry-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid #a18c574d; border-radius: 50%; background: #1b2b20; }
#account-dialog .profile-entry-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#profile-dialog {
  width: min(540px,calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: min(850px,92dvh);
  box-sizing: border-box; padding: 27px; border: 1px solid #a28e5b88; border-radius: 18px;
  background: radial-gradient(ellipse at 12% 0,#53633c33,transparent 58%),#131f18;
  color: #e5e7db; box-shadow: 0 25px 100px #000b,inset 0 1px #f4e5bb0a;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #61714e #132119;
}
#profile-dialog::backdrop { background: #030a08c9; backdrop-filter: blur(5px); }
#profile-dialog .profile-close {
  float: right; position: relative; margin: -8px -8px 0 8px; width: 34px; height: 34px;
  border: 1px solid #a9986044; border-radius: 50%; background: #27372a; color: #dedfcf; font-size: 23px; line-height: 1;
}
#profile-dialog .profile-close:hover { background: #3c4830; }
#profile-dialog .profile-heading { margin-bottom: 21px; }
#profile-dialog .profile-heading .eyebrow { font-size: 9px; letter-spacing: 1.7px; color: #c8b275; }
#profile-dialog h2 { margin: 7px 35px 8px 0; color: #e8d2a3; font: 500 27px/1.3 Cinzel,Georgia,serif; }
#profile-dialog .profile-heading p { margin: 0; color: #aab6a5; font-size: 12px; line-height: 1.6; }
#profile-form, #profile-fields { display: block; margin: 0; padding: 0; border: 0; min-width: 0; }
#profile-dialog .profile-photo-row { display: flex; align-items: center; gap: 19px; padding: 18px; margin-bottom: 21px; border: 1px solid #697a4d55; border-radius: 14px; background: #22322255; }
#profile-dialog .profile-photo-preview { position: relative; width: 92px; height: 92px; flex: 0 0 92px; display: grid; place-items: center; overflow: hidden; border: 2px solid #baa166; border-radius: 50%; background: radial-gradient(ellipse at 35% 25%,#536845,#243b31 70%); box-shadow: 0 0 0 5px #b39c5e0c,0 7px 20px #0003; }
#profile-photo-initials { font: 500 29px/1 Cinzel,Georgia,serif; color: #e5d29f; }
#profile-photo-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
#profile-dialog .profile-photo-copy { min-width: 0; flex: 1; }
#profile-dialog .profile-photo-copy>strong { display: block; font-size: 13px; font-weight: 600; color: #e1e1cc; }
#profile-dialog .profile-photo-copy p { margin: 5px 0 12px; color: #a8b49c; font-size: 11px; line-height: 1.5; }
#profile-dialog .profile-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#profile-dialog .profile-photo-actions .button { min-height: 34px; padding: 7px 11px; font-size: 11px; }
#profile-dialog .profile-photo-actions .text-button { padding: 6px 0; font-size: 11px; color: #c8b88a; background: transparent; border: 0; }
#profile-photo-note { display: block; margin-top: 9px; color: #84937d; font-size: 10px; line-height: 1.5; }
#profile-dialog .profile-field { display: block; margin: 0; font-size: 12px; color: #d7dcca; }
#profile-dialog .profile-field>span { display: flex; align-items: baseline; gap: 7px; margin: 0 0 7px; }
#profile-dialog .profile-field small { font-size: 10px; color: #8d9f85; font-weight: 400; }
#profile-dialog :is(input[type=text],textarea) { display: block; width: 100%; box-sizing: border-box; min-height: 42px; margin: 0; padding: 11px 13px; border: 1px solid #536143; border-radius: 9px; background: #0f1b14; color: #e7e7da; font-family: inherit; font-weight: 400; font-size: 13px; line-height: 1.5; }
#profile-dialog textarea { min-height: 112px; resize: vertical; max-height: 250px; }
#profile-dialog input::placeholder,#profile-dialog textarea::placeholder { color: #7e8d7a; opacity: 1; }
#profile-dialog .profile-login { display: block; margin: 6px 1px 18px; font-size: 10px; color: #82957d; overflow-wrap: anywhere; }
#profile-dialog .profile-bio-note { display: flex; justify-content: space-between; gap: 10px; margin: 7px 1px 0; color: #879780; font-size: 10px; line-height: 1.5; }
#profile-bio-count { white-space: nowrap; }
#profile-dialog .profile-status { margin: 14px 0 0; border: 1px solid #9a86544d; border-radius: 8px; padding: 10px 12px; background: #3c3f213d; color: #dcc996; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
#profile-dialog .profile-status.is-error { color: #f0b5a7; background: #5e31263d; border-color: #ba786455; }
#profile-dialog .profile-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; padding-top: 17px; border-top: 1px solid #6e784b44; }
#profile-dialog .profile-actions .primary { min-width: 155px; min-height: 41px; padding: 10px 20px; background: linear-gradient(115deg,#e3c98f,#c4a669); border-color: #ebd29a; color: #171b15; font-size: 12px; }
#profile-dialog .profile-actions .button { min-height: 41px; padding: 10px 16px; font-size: 12px; }
#profile-dialog [hidden] { display: none!important; }
#profile-dialog :is(button,input,textarea):focus-visible,#account-dialog .profile-account-entry:focus-visible { outline: 2px solid #e5c98a; outline-offset: 3px; }
#profile-dialog button:disabled { opacity: .5; cursor: default; }
@media(max-width:420px) {
  #profile-dialog { padding: 20px; width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: 94dvh; border-radius: 14px; }
  #profile-dialog h2 { font-size: 24px; }
  #profile-dialog .profile-photo-row { padding: 14px; gap: 14px; }
  #profile-dialog .profile-photo-preview { width: 72px; height: 72px; flex-basis: 72px; }
  #profile-dialog .profile-photo-copy p { margin-bottom: 9px; font-size: 10px; }
  #profile-photo-note { font-size: 9px; }
  #profile-dialog .profile-bio-note { font-size: 9px; }
  #profile-dialog .profile-actions .primary { min-width: 0; flex: 1; }
}
@media(prefers-reduced-motion:reduce) { #profile-dialog *,#account-dialog .profile-account-entry { transition: none; } }
#profile-dialog .profile-formats-field { margin-top: 19px; }
#profile-dialog .profile-formats-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; color: #d7dcca; font-size: 12px; }
#profile-dialog .profile-formats-heading small { font-size: 10px; color: #8d9f85; }
#profile-formats,.profile-format-tags { display: flex; flex-wrap: wrap; gap: 6px; }
#profile-dialog .profile-format-chip { min-height: 32px; padding: 6px 10px; border: 1px solid #67764c66; border-radius: 7px; background: #1c2b20; color: #aebda5; font-size: 11px; cursor: pointer; }
#profile-dialog .profile-format-chip[aria-pressed=true] { color: #f0d596; border-color: #b99e60; background: #60572c55; }
#profile-dialog .profile-format-chip:disabled:not([aria-pressed=true]) { opacity: .4; }
#profile-dialog .profile-visibility-note { margin: 15px 0 0; color: #86977f; font-size: 10px; line-height: 1.6; }
.profile-avatar-slot { position: relative; }
.profile-avatar-visual { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; overflow: hidden; }
.profile-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-avatar-image[hidden] { display: none!important; }
.profile-avatar-initials { position: relative; }
.profile-avatar-link { cursor: pointer; }
.profile-avatar-link:focus-visible { outline: 2px solid #e5c98a; outline-offset: 3px; }
.profile-format-tag { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid #a18c5755; border-radius: 6px; background: #3e482b44; color: #d9c997; font-size: 10px; }
#user-profile-dialog { width: min(420px,calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: 90dvh; box-sizing: border-box; padding: 27px; border: 1px solid #a28e5b88; border-radius: 18px; background: radial-gradient(ellipse at 50% 0,#53633c55,transparent 65%),#131f18; color: #e5e7db; box-shadow: 0 25px 100px #000b; overflow: auto; }
#user-profile-dialog::backdrop { background: #030a08c9; backdrop-filter: blur(5px); }
#user-profile-dialog .profile-close { float: right; position: relative; margin: -8px -8px 0 8px; width: 34px; height: 34px; border: 1px solid #a9986044; border-radius: 50%; background: #27372a; color: #dedfcf; font-size: 23px; }
#user-profile-body { text-align: center; clear: both; padding-top: 3px; }
#user-profile-avatar { position: relative; display: grid; place-items: center; width: 94px; height: 94px; margin: 0 auto 19px; overflow: hidden; border: 2px solid #baa166; border-radius: 50%; background: radial-gradient(ellipse at 35% 25%,#536845,#243b31 70%); box-shadow: 0 0 0 6px #b39c5e0c; font: 500 29px/1 Cinzel,Georgia,serif; color: #e5d29f; }
#user-profile-body>.eyebrow { color: #b6a16e; font-size: 9px; letter-spacing: 1.5px; }
#user-profile-name { margin: 7px 0 6px; font: 500 24px/1.4 Cinzel,Georgia,serif; color: #e7d0a1; overflow-wrap: anywhere; }
#user-profile-username { margin: 0; color: #8d9e85; font-size: 11px; overflow-wrap: anywhere; }
#user-profile-bio { margin: 22px 0 17px; color: #c5ceb8; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
#user-profile-bio.is-empty { color: #82937d; font-style: italic; }
#user-profile-formats { justify-content: center; }
#user-profile-collection { display: inline-flex; justify-content: center; margin-top: 24px; padding: 11px 17px; border-color: #9e8a5866; color: #e0cc99; text-decoration: none; font-size: 12px; }
#user-profile-status { clear: both; color: #c9b77f; font-size: 12px; line-height: 1.7; }
#user-profile-status.is-error { color: #efb4a6; }
#user-profile-dialog [hidden] { display: none!important; }
#shared-profile-head { display: flex; align-items: center; gap: 18px; min-width: 0; }
#shared-profile-avatar { flex: 0 0 74px; width: 74px; height: 74px; border: 1px solid #b69b5c; border-radius: 50%; background: #304732; color: #e3ce9d; font: 24px Cinzel,Georgia,serif; }
#shared-profile-head>div:last-child { min-width: 0; }
#shared-profile-bio { max-width: 760px; margin: 12px 0 0; color: #b0bea6; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; }
#shared-profile-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
#shared-profile-bio[hidden],#shared-profile-formats[hidden],#shared-profile-avatar[hidden] { display: none!important; }
@media(max-width:420px) { #user-profile-dialog { padding: 22px; } #shared-profile-head { gap: 12px; } #shared-profile-avatar { width: 58px; height: 58px; flex-basis: 58px; } #shared-profile-bio { font-size: 12px; } }

@media(max-width:650px) { #profile-dialog :is(input[type=text],textarea) { font-size: 16px; } }

.shared-profile-avatar { position: relative; flex: 0 0 74px; width: 74px; height: 74px; border: 1px solid #b69b5c; border-radius: 50%; background: #304732; color: #e3ce9d; font: 24px Cinzel,Georgia,serif; }
.shared-profile-identity { min-width: 0; }
@media(max-width:420px) { .shared-profile-avatar { width: 58px; height: 58px; flex-basis: 58px; } }
#chat-dock #chat-peer-avatar { padding: 0; border: 0; background: transparent; width: auto; height: auto; flex: 0 0 auto; border-radius: 50%; }
.market-profile-avatar.chat-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 11px; }
button.profile-avatar-link { padding: 0; }
#shared-profile-username { margin: 4px 0 0; color: #8b9d82; font-size: 11px; overflow-wrap: anywhere; }
#profile-retry { margin-top: 10px; font-size: 11px; padding: 8px 12px; }
#profile-dialog .profile-actions { font-family: Manrope,system-ui,sans-serif; }
