/* Profile editor uses the existing avatar, modal, buttons and fonts. Only thumbnails are persisted. */
.profile-entry { text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.profile-entry:hover, .profile-entry:focus-visible { border-color: var(--mint-500); }
.profile-entry:focus-visible { outline: 1px solid var(--mint-500); outline-offset: 2px; }
.profile-subtitle { text-transform: none; letter-spacing: .06em; max-width: 2.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-editor { position: relative; max-width: calc(100vw - 24px); }
.profile-editor .modal__head { padding-right: .8rem; }
.profile-editor__close { position: absolute; right: .2rem; top: .2rem; min-width: 28px; min-height: 28px; }
.profile-editor .modal__actions .btn, .profile-upload .btn { min-height: 32px; }
.profile-editor__layout { display: grid; grid-template-columns: minmax(1.7rem, 22%) minmax(0, 1fr); gap: .28rem; }
.profile-preview { display: flex; align-items: center; flex-direction: column; gap: .12rem; min-width: 0; padding-top: .08rem; }
.profile-preview .avatar { --av: clamp(84px, 1.7rem, 170px); }
.profile-preview > b { font-size: max(14px, calc(.2 * var(--t))); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-preview .profile-subtitle { max-width: 100%; font-size: max(11px, calc(.12 * var(--t))); }
.profile-fields { display: flex; flex-direction: column; gap: .14rem; min-width: 0; }
.profile-subtitle-field { display: flex; flex-direction: column; gap: .06rem; font-size: max(13px, calc(.16 * var(--t))); }
.profile-subtitle-field input { width: 100%; min-width: 0; padding: .08rem .12rem; color: var(--text-hi); font: inherit; background: #07120d; border: 1px solid var(--line-2); }
.profile-subtitle-field input:focus-visible { outline: 1px solid var(--mint-500); outline-offset: 1px; }
.profile-subtitle-field small { color: var(--text-lo); font-size: max(11px, calc(.12 * var(--t))); }
.profile-subtitle-field small .num { white-space: nowrap; margin-left: .06rem; }
.profile-upload { display: flex; align-items: center; gap: .12rem; }
.profile-upload .btn { flex: none; }
.profile-upload p, .profile-local-note { margin: 0; font-size: max(11px, calc(.12 * var(--t))); color: var(--text-lo); line-height: 1.5; }
.profile-local-note { margin-top: .2rem; }
.profile-error { margin: 0; color: var(--orange-hi); font-size: max(12px, calc(.14 * var(--t))); }
.profile-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(66px, .9rem), 1fr)); align-content: start; gap: .08rem; max-height: min(36vh, 3.2rem); overflow: auto; padding: 2px; }
.profile-op { display: flex; align-items: center; flex-direction: column; gap: .04rem; min-width: 0; padding: .05rem; border: 1px solid transparent; background: rgba(0, 0, 0, .24); color: var(--text-md); font: inherit; cursor: pointer; }
.profile-op[aria-pressed="true"], .profile-op:hover, .profile-op:focus-visible { border-color: var(--mint-500); color: var(--mint-400); }
.profile-op:focus-visible { outline: 1px solid var(--mint-500); }
.profile-op img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.profile-op > span { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: max(10px, calc(.11 * var(--t))); text-align: center; }
.profile-op small { margin-left: .03rem; font-family: var(--font-num); color: var(--text-lo); }
.seat .profile-subtitle { max-width: 100%; }
/* Reveal the existing fourth bracket corner on the main profile and the room's local avatar. */
.profile-entry .avatar__badge--self,
.room-screen .seat__art .avatar__badge--self { display: none; }
@media (max-width: 700px) {
  .profile-editor { width: calc(100vw - 24px) !important; }
  .profile-editor__layout { grid-template-columns: minmax(84px, 23%) minmax(0, 1fr); gap: .18rem; }
  .profile-preview .btn { height: auto; min-height: 30px; padding: 4px 8px; font-size: 11px; }
  .profile-upload { align-items: flex-start; flex-wrap: wrap; }
  .profile-roster { max-height: 30vh; }
}
