[data-user-avatar] { display: grid; overflow: hidden; place-items: center; background: var(--ink); color: var(--acid); line-height: 1; }
.user-avatar__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-editor { display: flex; gap: 15px; align-items: center; margin: -8px 0 30px; padding: 15px; border: 1px solid var(--line); background: #f1f1eb; }
.avatar-editor__preview { position: relative; flex: 0 0 auto; width: 74px; height: 74px; }
.avatar-editor__preview > [data-user-avatar] { width: 100%; height: 100%; border-radius: 50%; font: 500 20px "DM Mono", monospace; }
.avatar-editor__control { position: absolute; right: -3px; bottom: -3px; display: grid; width: 28px; height: 28px; place-items: center; border: 2px solid var(--white); border-radius: 50%; background: var(--orange); color: #fff; cursor: pointer; font-size: 15px; font-weight: 800; }
.avatar-editor__control:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.avatar-editor__copy b { display: block; font-size: 11px; }
.avatar-editor__copy p { max-width:370px; margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.avatar-editor__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.avatar-editor__button, .avatar-editor__remove, .avatar-cropper__reset, .avatar-cropper__cancel { min-height: 31px; padding: 0 11px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font: 500 9px "DM Mono", monospace; text-transform: uppercase; }
.avatar-editor__button { background: var(--ink); color: var(--acid); }
.avatar-editor__remove { border-color: #a84131; color: #a84131; }
.avatar-editor__button:hover, .avatar-cropper__reset:hover, .avatar-cropper__cancel:hover { background: var(--acid); }
.avatar-editor__remove:hover { background: #ffe1da; }
.avatar-editor__button:focus-visible, .avatar-editor__remove:focus-visible, .avatar-cropper button:focus-visible, .avatar-cropper input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.avatar-cropper[hidden] { display: none; }
.avatar-cropper { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 20px; }
.avatar-cropper__backdrop { position: absolute; inset: 0; background: rgba(8, 12, 11, .72); }
.avatar-cropper__dialog { position: relative; z-index: 1; width: min(100%, 430px); padding: 24px; border: 1px solid var(--line); background: #f7f7f1; box-shadow: 10px 10px 0 var(--orange); }
.avatar-cropper__dialog h3 { margin: 5px 0 0; font-size: clamp(24px, 6vw, 34px); line-height: 1.05; }
.avatar-cropper__close { position: absolute; top: 10px; right: 10px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1; }
.avatar-cropper__hint { margin: 9px 0 17px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.avatar-cropper__stage { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; background: #1d2520; cursor: grab; touch-action: none; user-select: none; }
.avatar-cropper__stage:active { cursor: grabbing; }
.avatar-cropper__stage::after { position: absolute; z-index: 2; inset: 0; border: 2px solid rgba(255,255,255,.94); border-radius: 50%; box-shadow: 0 0 0 999px rgba(8, 12, 11, .48); content: ""; pointer-events: none; }
.avatar-cropper__stage img { position: absolute; top: 50%; left: 50%; max-width: none; max-height: none; transform-origin: center; pointer-events: none; }
.avatar-cropper__zoom { display: grid; grid-template-columns: 68px 1fr; gap: 12px; align-items: center; margin: 17px auto 0; width: min(100%, 300px); color: var(--muted); font: 500 9px "DM Mono", monospace; text-transform: uppercase; }
.avatar-cropper__zoom input { width: 100%; accent-color: var(--orange); }
.avatar-cropper__actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; margin-top: 21px; }
.avatar-cropper__actions .primary { min-height: 31px; padding: 0 12px; font-size: 9px; }
body.avatar-cropper-open { overflow: hidden; }
.chat-message-row { display: flex; gap: 7px; align-items: flex-end; margin: 7px 0; }
.chat-message-row--mine { justify-content: flex-end; }
.chat-message-row .message { margin: 0; }
.chat-user-avatar { flex: 0 0 auto; width: 23px; height: 23px; border-radius: 50%; font: 500 7px "DM Mono", monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 500px) { .avatar-editor { margin-bottom: 24px; } .avatar-editor__copy p { max-width: 210px; } .avatar-cropper { padding: 12px; } .avatar-cropper__dialog { padding: 20px 16px; } .avatar-cropper__actions { grid-template-columns: 1fr 1fr; } .avatar-cropper__actions > span { display: none; } }
