/* Profile follows the owner's Telegram reference; scoped to messenger only. */
.bm-shell .bm-main{position:relative}
.bm-shell .bm-avatar[role=button],.bm-shell .bm-peer-heading[data-open-profile]{cursor:pointer}
.bm-shell .bm-avatar[role=button]:focus-visible,.bm-shell .bm-peer-heading[data-open-profile]:focus-visible{outline:2px solid var(--bl-focus-ring);outline-offset:3px;border-radius:12px}
.bm-shell .bm-contact-profile{position:absolute;z-index:35;inset:0;overflow:auto;background:var(--bl-background);color:var(--bl-text-primary);overscroll-behavior:contain}
.bm-shell .bm-profile-nav{display:flex;align-items:center;gap:12px;padding:14px 18px;color:var(--bl-text-secondary)}
.bm-shell .bm-profile-nav button{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:10px;color:var(--bl-brand-primary)}
.bm-shell .bm-profile-nav svg{width:22px;height:22px}
.bm-shell .bm-profile-content{max-width:640px;margin:0 auto;padding:8px 28px 32px}
.bm-shell .bm-profile-identity{text-align:center;padding:4px 0 24px}
.bm-shell .bm-profile-photo{display:grid;place-items:center;width:112px;height:112px;min-height:112px;margin:0 auto 16px;padding:0;border-radius:50%;background:var(--bl-brand-soft);color:var(--bl-brand-primary);overflow:hidden;font-size:32px;font-weight:600;flex-shrink:0}
.bm-shell .bm-profile-photo img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.bm-shell .bm-profile-photo:disabled{cursor:default;opacity:1}
.bm-shell .bm-profile-identity h2{margin:0;font-size:22px;line-height:1.3;overflow-wrap:anywhere;font-weight:650}
.bm-shell .bm-profile-identity p{margin:7px 0 0;color:var(--bl-text-secondary);font-size:13px}
.bm-shell .bm-profile-identity small{display:block;margin-top:8px;color:var(--bl-text-secondary);font-size:12px}
.bm-shell .bm-profile-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:22px}
.bm-shell .bm-profile-actions>button,.bm-shell .bm-profile-more>button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;width:100%;min-height:76px;padding:12px 4px;background:var(--panel);border-radius:16px;color:var(--bl-brand-primary);font-size:12px}
.bm-shell .bm-profile-actions svg{width:23px;height:23px}
.bm-shell .bm-profile-actions button:hover:not(:disabled){background:var(--bl-brand-soft)}
.bm-shell .bm-profile-actions button:disabled{opacity:.45;cursor:default}
.bm-shell .bm-profile-more{position:relative}
.bm-shell [data-profile-menu]{position:absolute;z-index:2;right:0;top:calc(100% + 6px);width:210px;padding:6px;border:1px solid var(--bl-border);border-radius:12px;background:var(--panel);box-shadow:var(--design-shadow)}
.bm-shell [data-profile-menu][hidden]{display:none}
.bm-shell [data-profile-menu] button{width:100%;padding:10px;text-align:left;color:var(--bl-brand-primary)}
.bm-shell .bm-profile-info{padding:18px 20px;background:var(--panel);border-radius:16px}
.bm-shell .bm-profile-info h3{margin:0 0 6px;font-size:12px;font-weight:500;color:var(--bl-text-secondary)}
.bm-shell .bm-profile-info p{margin:0;font-size:14px}
.bm-shell .bm-profile-info small{display:block;margin-top:10px;color:var(--bl-text-secondary);font-size:12px;line-height:1.5}
.bm-shell .bm-profile-loading,.bm-shell .bm-profile-error{padding:20px;color:var(--bl-text-secondary)}
.bm-shell .bm-profile-photo-view{position:fixed;inset:0;z-index:10100;display:flex;align-items:center;justify-content:center;background:var(--bl-text-primary);color:var(--panel);padding:88px 24px 24px}
.bm-shell .bm-profile-photo-view header{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px}
.bm-shell .bm-profile-photo-view header strong{display:block;font-size:14px;overflow-wrap:anywhere}
.bm-shell .bm-profile-photo-view header small{display:block;font-size:12px;opacity:.8}
.bm-shell .bm-profile-photo-view header button{flex-shrink:0;width:42px;height:42px;padding:10px;color:var(--panel)}
.bm-shell .bm-profile-photo-view header button:hover{background:var(--bl-text-secondary)}
.bm-shell .bm-profile-photo-view svg{width:22px;height:22px}
.bm-shell .bm-profile-photo-view img{max-width:100%;max-height:100%;object-fit:contain;border-radius:0}
.bm-shell .bm-profile-photo-view [hidden]{display:none}
.bm-shell .bm-group-person{display:flex;align-items:center;gap:7px;margin-bottom:7px}
.bm-shell .bm-group-person .bm-group-avatar{display:block;width:28px;height:28px;min-height:28px;flex:0 0 28px;padding:0;border-radius:50%;overflow:hidden;background:var(--bl-brand-soft);color:var(--bl-brand-primary)}
.bm-shell .bm-group-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.bm-shell .bm-group-avatar i{font-size:12px;font-style:normal}
.bm-shell .bm-group-person .bm-group-sender{margin:0;padding:0;min-height:28px;text-align:left;font-size:12px;color:var(--bl-brand-primary);font-weight:600}
@media(max-width:750px){.bm-shell .bm-profile-content{padding:8px 18px 24px}.bm-shell .bm-profile-photo{width:104px;height:104px;min-height:104px}.bm-shell .bm-profile-identity h2{font-size:21px}.bm-shell .bm-profile-nav{padding:8px 12px}.bm-shell .bm-profile-actions{gap:7px}.bm-shell .bm-profile-actions>button,.bm-shell .bm-profile-more>button{min-height:72px;font-size:11px;border-radius:14px}}

.bm-shell [data-open-group-profile]{cursor:pointer}.bm-shell [data-open-group-profile]:focus-visible{outline:2px solid var(--bl-focus-ring);outline-offset:3px;border-radius:12px}

/* Shared brand tokens; scoped to the group editor outside #app. */
.bm-shell .bm-group-profile .bm-profile-nav{position:sticky;top:0;z-index:2;background:var(--panel);border-bottom:1px solid var(--bl-border);font-size:14px;font-weight:600}
.bm-shell .bm-group-profile .bm-profile-content{max-width:600px;padding:28px 24px 32px}
.bm-shell .bm-group-profile .bm-profile-identity{display:flex;align-items:center;gap:20px;text-align:left;padding:0 0 26px}
.bm-shell .bm-group-profile .bm-profile-photo{width:80px;height:80px;min-height:80px;margin:0;border:1px solid var(--bl-brand-border);border-radius:24px}
.bm-shell .bm-group-profile .bm-profile-photo img{border-radius:0}
.bm-shell .bm-group-profile [data-group-cover]>svg{width:36px;height:36px}
.bm-shell .bm-group-identity-copy{min-width:0}
.bm-shell .bm-group-eyebrow{display:block;margin-bottom:5px;font-size:10px;letter-spacing:.12em;font-weight:700;color:var(--bl-brand-primary)}
.bm-shell .bm-group-profile .bm-profile-identity h2{font-size:20px;line-height:1.35;font-weight:650}
.bm-shell .bm-group-profile .bm-profile-identity p{font-size:13px;margin-top:5px}
.bm-shell .bm-group-settings{display:grid;gap:22px;margin:0;padding:24px;border:1px solid var(--bl-border);border-radius:24px;background:var(--panel);box-shadow:var(--design-shadow)}
.bm-shell .bm-group-section-title{font-size:16px;font-weight:650;color:var(--bl-text-primary)}
.bm-shell .bm-group-settings label,.bm-shell .bm-group-cover-field{display:grid;gap:9px;font-size:12px;font-weight:550;color:var(--bl-text-secondary)}
.bm-shell .bm-group-settings input[name=name]{width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;border:1px solid var(--bl-input-border);border-radius:12px;font:inherit;font-size:14px;font-weight:500;color:var(--bl-text-primary);background:var(--panel)}
.bm-shell .bm-group-settings input:focus-visible,.bm-shell .bm-group-settings button:focus-visible{outline:2px solid var(--bl-focus-ring);outline-offset:3px}
.bm-shell .bm-group-upload{display:flex;align-items:center;gap:12px;padding:16px;border:1px dashed var(--bl-brand-border);border-radius:16px;background:var(--bl-background)}
.bm-shell .bm-group-upload-icon{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:12px;background:var(--bl-brand-soft);color:var(--bl-brand-primary)}
.bm-shell .bm-group-upload-icon svg{width:22px;height:22px}
.bm-shell .bm-group-upload b{display:block;font-size:13px;font-weight:600;color:var(--bl-text-primary)}
.bm-shell .bm-group-upload small{display:block;margin-top:4px;font-size:11px;font-weight:400;color:var(--bl-text-secondary)}
.bm-shell .bm-group-settings button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 14px;border-radius:12px;font:inherit;font-size:13px;font-weight:600;line-height:1.3;cursor:pointer}
.bm-shell .bm-group-settings button svg{width:18px;height:18px;flex-shrink:0}
.bm-shell .bm-group-settings [data-pick-cover]{margin-left:auto;background:var(--panel);border:1px solid var(--bl-brand-border);color:var(--bl-brand-primary);white-space:nowrap}
.bm-shell .bm-group-settings [data-remove-cover]{justify-self:start;min-height:32px;padding:4px 0;color:var(--bl-text-secondary);background:transparent}
.bm-shell .bm-group-settings [hidden]{display:none!important}
.bm-shell .bm-group-form-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--bl-border);padding-top:20px}
.bm-shell .bm-group-form-actions [data-cancel]{border:1px solid var(--bl-input-border);background:var(--panel);color:var(--bl-text-secondary)}
.bm-shell .bm-group-form-actions [type=submit]{background:var(--bl-brand-primary);border:1px solid var(--bl-brand-primary);color:var(--panel);min-height:46px;padding:12px 18px}
.bm-shell .bm-group-form-actions [type=submit]:hover:not(:disabled){background:var(--bl-brand-hover)}
.bm-shell .bm-group-settings button:disabled{opacity:.5;cursor:wait}
.bm-shell .bm-group-settings [data-upload-status],.bm-shell .bm-group-settings [data-error]{margin:0;font-size:12px;line-height:1.5;color:var(--bl-text-secondary);font-weight:400}
.bm-shell .bm-group-settings [data-upload-status]:empty{display:none}
.bm-shell .bm-group-settings [data-error]{padding:12px;border:1px solid var(--bl-brand-border);border-radius:12px;background:var(--bl-brand-soft);color:var(--bl-text-primary)}
@media(max-width:600px){.bm-shell .bm-group-profile .bm-profile-content{padding:20px 14px}.bm-shell .bm-group-profile .bm-profile-identity{gap:14px;padding-bottom:20px}.bm-shell .bm-group-profile .bm-profile-photo{width:64px;height:64px;min-height:64px;border-radius:20px}.bm-shell .bm-group-profile .bm-profile-identity h2{font-size:18px}.bm-shell .bm-group-settings{padding:18px;gap:20px;border-radius:20px}.bm-shell .bm-group-upload{flex-wrap:wrap}.bm-shell .bm-group-settings [data-pick-cover]{width:100%;margin:2px 0 0}.bm-shell .bm-group-form-actions{flex-wrap:wrap}.bm-shell .bm-group-form-actions [type=submit]{flex:1}.bm-shell .bm-group-form-actions [data-cancel]{flex:0 0 auto}}

.bm-shell .bm-group-profile .bm-profile-content{padding-top:20px;padding-bottom:20px}.bm-shell .bm-group-profile .bm-profile-identity{padding-bottom:20px}.bm-shell .bm-group-profile .bm-profile-photo{width:64px;height:64px;min-height:64px;border-radius:20px}.bm-shell .bm-group-settings{padding:20px;gap:16px}.bm-shell .bm-group-upload{padding:12px}.bm-shell .bm-group-form-actions{padding-top:16px}
