/* Conventional chat product chrome, original YNX identity, no fixture content. */
body[data-social-page]{--blue:#002fa7; background:#edf2f7; padding:0;}
body[data-social-page] > .topbar{height:64px;min-height:64px;padding:8px 22px;gap:20px;box-shadow:none;backdrop-filter:none;background:#fff;}
body[data-social-page] .brand{font-size:1.05rem;font-weight:650;}
body[data-social-page] > main{height:calc(100dvh - 64px);overflow:auto;padding-left:112px;}
body[data-social-page] .topbar nav{position:fixed;inset:64px auto 0 0;transform:none;width:112px;display:flex;flex-direction:column;justify-content:flex-start;gap:8px;margin:0;padding:20px 8px;background:#fff;border-right:1px solid var(--line);}
body[data-social-page] .topbar nav a{padding:16px 8px;border-radius:12px;text-align:center;min-height:48px;font-size:.85rem;}
body[data-social-page] .topbar nav a[aria-current=page]{background:#eaf0ff;color:var(--blue);font-weight:650;}
body[data-social-page] .hero,body[data-social-page] #experience,body[data-social-page] #privacy,body[data-social-page] #downloads{display:none;}
body[data-social-page] .section{padding:24px;max-width:none;}
body[data-social-page] #private-auth-panel{display:none;}
body[data-social-page=settings] #private-auth-panel{display:block;background:#fff;}
body[data-social-page] #social-workspace{display:none;background:#fff;}
body[data-social-page=contacts] #social-workspace,body[data-social-page=settings] #social-workspace{display:block;min-height:100%;}
body[data-social-page=contacts] #profile-form,body[data-social-page=contacts] #profile-share-panel,body[data-social-page=contacts] #workspace-content > section[aria-label="Discovery privacy"],body[data-social-page=contacts] .social-chat-layout{display:none;}
body[data-social-page=settings] #people-panel,body[data-social-page=settings] .social-chat-layout{display:none;}
body[data-social-page] .social-appearance{display:none;border:1px solid var(--line);border-radius:14px;padding:16px;max-width:600px;}
body[data-social-page=settings] .social-appearance{display:flex;flex-wrap:wrap;gap:16px;}
.social-appearance label{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;}
body[data-social-page] #matrix-social-workspace{padding:0;background:#edf2f7;min-height:100%;border:0;}
body[data-social-page=contacts] #matrix-social-workspace,body[data-social-page=settings] #matrix-social-workspace{display:none;}
body[data-social-page] #matrix-social-workspace .chat-heading{padding:16px 24px;background:#fff;align-items:center;gap:12px;}
body[data-social-page] .chat-heading .chat-wordmark,body[data-social-page] .chat-heading [data-chat-copy=intro]{display:none;}
body[data-social-page] #matrix-social-workspace .chat-heading h2{font-size:1.15rem;font-weight:650;margin:0;}
body[data-social-page] #matrix-social-workspace [data-status]{margin:0;padding:10px 24px;border:0;border-radius:0;font-size:.85rem;background:#f5f7fa;}
body[data-social-page] .chat-actions{margin:0;padding:10px 24px;background:#fff;gap:12px;}
body[data-social-page] .chat-workspace-grid{grid-template-columns:340px minmax(0,1fr);gap:0;min-height:55dvh;}
body[data-social-page] .chat-sidebar{padding:20px;background:#fff;border-radius:0;border-right:1px solid var(--line);}
body[data-social-page] .chat-conversation{display:flex;flex-direction:column;border:0;border-radius:0;padding:20px;background:radial-gradient(ellipse at top right,#dde7f3,transparent 70%),#edf2f7;}
body[data-social-page] #matrix-social-workspace .chat-conversation [data-messages]{flex:1;min-height:240px;max-height:55dvh;}
body[data-social-page] #matrix-social-workspace [data-messages] li{max-width:85%;align-self:start;background:#fff;border-radius:16px 16px 16px 4px;font-size:.95rem;padding:12px 16px;}
body[data-social-page] #matrix-social-workspace .chat-conversation [data-send-form]{background:#fff;padding:12px;border-radius:18px;}
body[data-social-page] #matrix-social-workspace textarea{min-height:48px;font-size:.95rem;}
body[data-social-page] #matrix-social-workspace .chat-device-section,body[data-social-page] #matrix-social-workspace .chat-connection-details{margin:0;padding:16px 24px;background:#fff;}
body[data-social-page=chats] #social-moments{display:none;}
body[data-social-page=moments] #matrix-social-workspace > :not(#social-moments){display:none;}
body[data-social-page=moments] #social-moments{padding:24px;max-width:780px;margin:auto;background:#fff;min-height:calc(100dvh - 64px);}
body[data-social-page] button,body[data-social-page] input,body[data-social-page] textarea,body[data-social-page] select{font:inherit;}
body[data-social-page] [hidden]{display:none!important;}
@media(max-width:899px){
 body[data-social-page] > main{padding:0;height:calc(100dvh - 138px - env(safe-area-inset-bottom));}
 body[data-social-page] > .topbar{height:64px;min-height:64px;flex-wrap:nowrap;padding:8px 14px;gap:8px;}
 body[data-social-page] .topbar nav{inset:auto 0 0;transform:none;width:100%;height:auto;min-height:74px;flex-direction:row;justify-content:space-around;padding:8px 6px calc(8px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--line);gap:2px;}
 body[data-social-page] .topbar nav a{flex:1;padding:12px 4px;font-size:.8rem;min-width:0;}
 body[data-social-page] #connect-wallet{font-size:.75rem;padding:8px 10px;min-height:44px;}
 body[data-social-page] .chat-workspace-grid{grid-template-columns:minmax(0,1fr);}
 body[data-social-page] .chat-sidebar{border:0;border-bottom:1px solid var(--line);}
 body[data-social-page] .chat-composer-actions{display:flex;}
 body[data-social-page] .chat-actions{display:flex;}
 body[data-social-page] .chat-actions a{font-size:.8rem;}
 body[data-social-page] .brand{min-width:0;font-size:.95rem;}
 body[data-social-page] .section{padding:18px;}
}

/* Reviewed SDK conversation presentation and real single-pane mobile navigation. */
body[data-social-page] #matrix-social-workspace .chat-room{display:flex;align-items:center;gap:12px;min-height:76px;border:0;border-radius:0;padding:12px 4px;text-align:start;background:#fff;color:var(--ink);}
body[data-social-page] #matrix-social-workspace .chat-room-selected{background:#edf2ff;}
.chat-room-avatar{flex:none;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#e5edff;color:#002fa7;font-weight:650;}
.chat-room-copy{flex:1;min-width:0;display:grid;gap:5px;overflow-wrap:anywhere;}
.chat-room-copy strong{font-size:1rem;font-weight:650;}
.chat-room-preview{font-size:.85rem;color:#667085;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.chat-room-detail{display:grid;justify-items:end;gap:8px;font-size:.75rem;color:#667085;}.chat-unread{min-width:24px;padding:3px 7px;border-radius:14px;text-align:center;color:#fff;background:#002fa7;}
.chat-conversation-heading{display:flex;align-items:center;gap:12px;background:#fff;padding:4px 12px;margin:-20px -20px 16px;}
.chat-conversation-heading h3{flex:1;min-width:0;font-size:1rem;font-weight:650;overflow-wrap:anywhere;}
[data-chat-back]{display:none;}
body[data-social-page] #matrix-social-workspace [data-messages] .chat-message-own{justify-self:end;border-radius:16px 16px 4px 16px;background:#e0eaff;}
.chat-message-meta{display:block;text-align:end;margin-top:6px;color:#667085;font-size:.75rem;}
@media(max-width:899px){
 body[data-social-page=chats] #matrix-social-workspace[data-chat-pane=list] .chat-conversation{display:none;}
 body[data-social-page=chats] #matrix-social-workspace[data-chat-pane=conversation] .chat-sidebar,body[data-social-page=chats] #matrix-social-workspace[data-chat-pane=conversation] > .chat-heading,body[data-social-page=chats] #matrix-social-workspace[data-chat-pane=conversation] > .chat-actions{display:none;}
 body[data-social-page=chats][data-social-chat-pane=conversation] .topbar nav{display:none;}
 body[data-social-page=chats][data-social-chat-pane=conversation] > main{height:calc(100dvh - 64px);}
 body[data-social-page=chats] [data-chat-back]{display:inline-flex;align-items:center;justify-content:center;min-width:48px;}
 body[data-social-page=chats] #matrix-social-workspace[data-chat-pane=conversation] .chat-workspace-grid{min-height:calc(100dvh - 140px);}
}
/* Local, account-scoped chat appearance. The editor never unlocks data roots. */
.chat-appearance-entry,.chat-appearance-notice{display:none}
body[data-social-page="settings"] .chat-appearance-entry{display:block;margin:16px 24px;min-height:48px}
body[data-social-page="settings"] .chat-appearance-notice:not(:empty){display:block;margin:12px 24px;color:#b42318}
[data-messages]{background-size:cover;background-position:center;background-repeat:no-repeat}
.chat-appearance-dialog{width:min(580px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #dce4ed;border-radius:22px;color:#14263b;background:#fff;overflow:auto}
.chat-appearance-dialog::backdrop{background:rgba(16,24,40,.5)}
.chat-appearance-dialog[data-theme="dark"]{color:#eef5fc;background:#142332}
.chat-appearance-header{display:flex;gap:12px;align-items:center;justify-content:space-between}
.chat-appearance-dialog h2{font-size:1.25rem;letter-spacing:0;line-height:1.3;margin:0}
.chat-appearance-dialog p{font-size:.875rem;line-height:1.55}
.chat-appearance-dialog button{min-height:48px;font-size:.875rem;line-height:1.3;white-space:normal}
.chat-appearance-dialog>div{display:grid;gap:14px}
.chat-appearance-options{display:flex;flex-wrap:wrap;gap:10px}
.chat-appearance-options button{color:#14263b;border:2px solid transparent}
.chat-appearance-options button[aria-checked="true"],.chat-appearance-dialog button[role="radio"][aria-checked="true"]{border:2px solid #1872db;box-shadow:0 0 0 2px #9fc9ff}
.chat-appearance-dialog button[role="radio"]{color:#14263b}
.chat-appearance-preview{min-height:180px;border-radius:16px;padding:20px;background-size:cover;background-position:center;display:flex;flex-direction:column;gap:14px}
.chat-appearance-preview p{background:#fff;color:#14263b;margin:0;border-radius:14px;padding:12px;max-width:85%;align-self:flex-start}
.chat-appearance-preview p.own{background:#002fa7;color:#fff;align-self:flex-end}
.chat-appearance-file{display:grid;gap:8px;min-height:48px;font-size:.875rem}
.chat-appearance-file input{max-width:100%;min-height:48px}
.chat-appearance-dialog .chat-appearance-confirm{background:#002fa7;color:#fff;border-radius:16px}
.chat-appearance-error:not(:empty){color:#b42318;background:#fff4f2;padding:10px;border-radius:10px}
@media(max-width:899px){.chat-appearance-dialog{padding:18px}.chat-conversation-header{gap:6px}.chat-conversation-header button{padding-inline:10px;font-size:.75rem}.chat-conversation-header h3{font-size:.875rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.chat-appearance-dialog button{border:1px solid #d3deeb;border-radius:12px;padding:12px 16px;background:#f0f4f8;color:#14263b;cursor:pointer}
.chat-appearance-dialog button[data-preset="ink"]{color:#fff}
.chat-appearance-dialog button:disabled{cursor:wait;opacity:.6}
.chat-appearance-dialog button:focus-visible,.chat-appearance-file input:focus-visible{outline:3px solid #91bdf6;outline-offset:3px}
