.avatar{overflow:hidden;flex-shrink:0}.avatar img{display:block;width:100%;height:100%;object-fit:cover}
.chat-image-link{display:block;margin-top:6px;max-width:320px;border-radius:14px;overflow:hidden;border:1px solid var(--border);background:var(--tint)}
.chat-image{display:block;width:100%;height:220px;object-fit:contain}
.chat-card{display:flex;flex-direction:column;height:clamp(420px,calc(100dvh - 300px),740px);overflow:visible}
.chat-header{flex-shrink:0}.chat-feed{flex:1;min-height:120px;height:auto;overflow-y:auto;overscroll-behavior:contain}
.chat-compose{display:block;flex-shrink:0;background:#fff;border-radius:0 0 18px 18px;padding:16px 20px}
.chat-compose .chat-sender{margin-bottom:10px}.chat-compose>.form-error{margin-top:6px}.chat-compose>small{display:block;margin-top:8px}
.chat-input-row{display:flex;gap:8px;align-items:flex-end;min-width:0}
.chat-input-bubble{display:flex;align-items:flex-end;flex:1;min-width:0;gap:2px;background:var(--tint);border:1px solid var(--border);border-radius:26px;padding:4px}
.chat-input-bubble:focus-within{border-color:var(--teal)}
.chat-compose .chat-input-bubble textarea{flex:1;display:block;min-width:0;width:0;min-height:44px;height:44px;max-height:120px;resize:none;margin:0;padding:11px 3px;border:0;box-shadow:none!important;outline:none;background:transparent;line-height:22px;font-size:16px}
.chat-control,.chat-send{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;cursor:pointer;flex-shrink:0;border:0;border-radius:50%;background:transparent;color:var(--muted)}
.chat-control .icon,.chat-send .icon{display:block;width:24px;height:24px}.chat-control:hover{background:var(--sky);color:var(--navy)}
.chat-send{width:52px;height:52px;background:var(--teal);color:white}.chat-send:hover{background:var(--teal-dark)}.chat-send:disabled{opacity:.5;cursor:wait}
.chat-compose .attachment-preview{margin-bottom:12px}
.chat-emojis{position:relative}.chat-emojis summary{list-style:none}.chat-emojis summary::-webkit-details-marker{display:none}
.emoji-panel{width:min(350px,calc(100vw - 80px));padding:10px;border:1px solid var(--border);border-radius:16px;background:white;box-shadow:0 8px 30px #0d304725;position:absolute;z-index:10;bottom:calc(100% + 12px);left:-5px}
.emoji-panel input{margin:0 0 8px;padding:9px 10px;min-height:42px;font-size:16px!important}
.emoji-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;border-bottom:1px solid var(--border);padding-bottom:8px;margin-bottom:8px}
.chat-compose .emoji-category{height:44px;min-height:44px;font-size:19px;padding:5px;background:none;border:0;border-radius:8px;justify-self:stretch}
.emoji-category[aria-pressed=true]{background:var(--sky)}
.emoji-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:2px;max-height:min(190px,28dvh);overflow-y:auto;overscroll-behavior:contain}
.chat-compose .emoji-button{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:25px!important;min-width:40px;height:44px;min-height:44px;padding:4px;border:0;background:transparent;line-height:1;justify-self:stretch}
.emoji-empty{grid-column:1/-1;font-size:13px;padding:12px}
.emoji-button:hover,.emoji-button:focus-visible{background:var(--sky)}
.attach-image{position:relative}.attach-image:focus-within{outline:2px solid var(--navy);outline-offset:3px}
.chat-compose .attachment-preview{grid-column:1/-1}
.attachment-preview{display:flex;align-items:center;gap:12px;min-width:0;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--tint)}
.attachment-preview[hidden]{display:none}.attachment-preview img{width:74px;height:74px;object-fit:contain;border-radius:8px;background:white;flex-shrink:0}
.attachment-name{font-size:13px;overflow-wrap:anywhere;min-width:0;flex:1}
.attachment-preview .button{padding:8px;min-height:44px}
.profile-heading{display:flex;align-items:center;gap:18px;margin-bottom:22px}.profile-heading>div{min-width:0}.profile-heading h3{margin:0 0 6px}.profile-heading p{margin:0;overflow-wrap:anywhere}
.profile-heading .profile-avatar{width:88px;height:88px;font-size:28px}.profile-preview img{width:110px;height:110px;object-fit:cover;aspect-ratio:1;border-radius:50%}
.profile-password{border-top:1px solid var(--border);margin-top:18px;padding-top:12px}
.profile-name-form{border-bottom:1px solid var(--border);padding-bottom:20px;margin-bottom:24px}
.mobile-account .avatar{width:50px;height:50px;grid-row:1/3;grid-column:1}.mobile-account:has(.avatar){grid-template-columns:50px minmax(0,1fr);column-gap:12px}.mobile-account:has(.avatar)>strong,.mobile-account:has(.avatar)>span:not(.avatar){grid-column:2}
@media(max-width:900px){
 .content:has(>.chat-card){display:flex;flex-direction:column;gap:10px;padding:12px;height:calc(100dvh - 132px - 76px - env(safe-area-inset-bottom,0px));min-height:390px}
 .content:has(>.chat-card)>.page-heading{margin:0;flex-shrink:0}.content:has(>.chat-card)>.page-heading>div:first-child{display:none}
 .content:has(>.chat-card)>.page-heading:has(.heading-actions:empty){display:none}
 .main:has(.chat-card)>.page-footer{display:none}
 .chat-card{flex:1;height:auto;min-height:0;margin:0}.chat-header{padding:12px}.chat-header .badge{display:none}
 .chat-feed{min-height:100px;height:auto;padding:16px 10px}.chat-compose{padding:10px}
 .chat-compose .chat-sender{font-size:12px;margin-bottom:7px}.chat-compose .chat-sender span{display:none}
 .chat-compose>small{font-size:10px;line-height:1.4}.chat-send{width:48px;height:48px;min-width:48px}
 .chat-control{width:40px;min-width:40px;padding:8px}.chat-input-row{gap:6px}.chat-input-bubble{padding:2px}
}
@media(max-width:480px){.chat-image{height:190px}.attachment-preview{flex-wrap:wrap}.attachment-preview .attachment-name{flex-basis:calc(100% - 98px)}.profile-heading{gap:12px}.profile-heading .profile-avatar{width:72px;height:72px}}

.profile-security{border-top:1px solid var(--border);margin-top:24px;padding-top:8px}
.profile-security .profile-password{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0;margin-top:12px;padding:0}
.profile-password .button{min-height:48px;padding:12px 16px;font-size:14px;line-height:1.4;white-space:normal;text-align:left;justify-content:flex-start}
@media(max-width:600px){.profile-security .profile-password{grid-template-columns:minmax(0,1fr)}}
