/* Shared visual system for existing feed, search, chat, profile and settings views. */
body.nexo-app-theme {
 --nx-accent:#6f3fd2; --nx-on-accent:#fff; --nx-soft:#eee8fb; --nx-danger:#a62b48;
 --nx-gradient:linear-gradient(115deg,#6564ed 0%,#8a4bea 55%,#bd3cea 100%);
 --ink:var(--nx-text); --muted:var(--nx-muted); --line:var(--nx-line); --accent:var(--nx-accent); --soft:var(--nx-soft);
 --nx-radius:22px; --nx-label:13px; --nx-body:16px;
 color-scheme:light; line-height:1.55; -webkit-text-size-adjust:100%; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.nexo-app-theme *, .nexo-app-theme *::before, .nexo-app-theme *::after { box-sizing:border-box; }
.nexo-app-theme :is(button,input,select,textarea) { font-family:inherit; }
.nexo-app-theme :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--nx-accent); outline-offset:3px; }
.nexo-app-theme :is(button,[role=button],summary) { touch-action:manipulation; }
.nexo-app-theme button:disabled { opacity:.5; cursor:not-allowed; }
.nexo-app-theme [hidden], .nexo-app-theme .nx-filtered { display:none!important; }
.nexo-app-theme :is(h1,h2,h3,p) { overflow-wrap:anywhere; }
.nexo-app-theme h1 { font-size:clamp(25px,5vw,32px); letter-spacing:-.025em; line-height:1.3; }
.nexo-app-theme h2 { font-size:19px; line-height:1.45; }
.nexo-app-theme :is(.feed-heading,.directory-heading,.profile-page-title,.notification-heading,.notification-title,.page-intro) :is(h1,h2) { color:var(--nx-text); }
.nexo-app-theme :is(.shell, .shell>main) { min-width:0; }
.nexo-app-theme .shell { max-width:760px; margin:0 auto; padding:0 16px 24px; gap:0; }
.nexo-app-theme .member-header { max-width:760px; margin:auto; min-height:64px; padding:12px 16px; border:0; background:var(--nx-bg); }
.nexo-app-theme .member-header .brand { color:var(--nx-text); font-size:27px; font-weight:800; letter-spacing:-1px; gap:9px; }
.nexo-app-theme .member-header .brand::after { content:''; width:7px; height:7px; border-radius:50%; background:var(--nx-gradient); align-self:center; }
.nexo-app-theme .member-header .brand img { display:none; }
.nexo-app-theme .member-account { min-height:44px; display:flex; align-items:center; color:var(--nx-muted); font-size:13px; }
.nexo-app-theme :is(.heading,.feed-heading,.directory-heading,.profile-page-title,.notification-heading,.page-intro) { margin:12px 0 20px; gap:12px; align-items:center; }
.nexo-app-theme :is(.nexo-icon-button,.nexo-icon-tray a,.nexo-icon-tray button,.chat-back) { min-width:44px; min-height:44px; border-radius:14px; color:var(--nx-text); }
.nexo-app-theme :is(.nexo-icon-tray svg,.nexo-icon-button svg) { width:22px; height:22px; }
.nexo-app-theme :is(.directory-heading,.feed-heading,.profile-page-title) .nexo-icon-tray { background:var(--nx-surface); border:1px solid var(--nx-line); }
.nexo-app-theme :is(.directory-heading,.feed-heading,.profile-page-title) .nexo-icon-tray :is(a,button) { color:var(--nx-text); }
.nexo-app-theme .nexo-avatar { flex-shrink:0; width:46px; height:46px; border-radius:50%; background:var(--nx-soft); color:var(--nx-accent); font-style:normal; font-weight:700; overflow:hidden; }
.nexo-app-theme .nexo-avatar img { width:100%; height:100%; object-fit:cover; }
.nexo-app-theme :is(.notice,[role=alert]) { border-radius:16px; padding:14px; background:var(--nx-soft); color:var(--nx-text); overflow-wrap:anywhere; }
.nexo-app-theme :is(.empty,.feed-empty,.directory-empty,.profile-empty-state,.notification-empty) { padding:36px 22px; text-align:center; color:var(--nx-muted); }
.nexo-app-theme :is(.empty,.feed-empty,.directory-empty,.profile-empty-state,.notification-empty) :is(h2,b) { color:var(--nx-text); }
.nexo-app-theme :is(.primary,.feed-publish) { min-height:48px; padding:12px 20px; border:0; background:var(--nx-gradient); color:#fff; border-radius:16px; font-weight:700; }
.nexo-app-theme :is(.quiet,.quiet-link,.profile-friend-chat) { background:var(--nx-soft); color:var(--nx-accent); border:0; border-radius:13px; padding:10px 14px; min-height:44px; }

/* Home and post cards. Keep media uncropped and counts from the existing service. */
.nexo-app-theme .feed-column { width:100%; max-width:none; }
.nexo-app-theme .feed-home-identity { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:4px 2px 18px; color:var(--nx-text); }
.nexo-app-theme .feed-home-identity>div { min-width:0; }
.nexo-app-theme .feed-home-identity b { font-size:14px; }
.nexo-app-theme .feed-home-identity p { font-size:12px; margin:4px 0 0; }
.nexo-app-theme .feed-home-identity p { color:var(--nx-muted); }
.nexo-app-theme .feed-card { border:1px solid var(--nx-line); padding:18px; margin-bottom:16px; border-radius:var(--nx-radius); }
.nexo-app-theme .feed-author { gap:11px; align-items:center; }
.nexo-app-theme .feed-author-copy { flex:1; min-width:0; }
.nexo-app-theme .feed-author-copy b { display:block; font-size:15px; color:var(--nx-text); }
.nexo-app-theme .feed-author-copy a { font-size:12px; display:block; }
.nexo-app-theme .feed-post-body { margin:16px 0; font-size:16px; line-height:1.7; }
.nexo-app-theme .feed-post-image { display:block; border-radius:16px; overflow:hidden; background:var(--nx-bg); }
.nexo-app-theme .feed-post-image img { display:block; width:100%; height:auto; max-height:640px; object-fit:contain; }
.nexo-app-theme :is(.feed-post-stats,.feed-post-actions) { border-color:var(--nx-line); color:var(--nx-muted); }
.nexo-app-theme .feed-post-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding-top:8px; gap:4px; }
.nexo-app-theme .feed-post-actions :is(form,button) { min-width:0; margin:0; }
.nexo-app-theme .feed-post-actions button { min-height:44px; width:100%; border:0; border-radius:12px; background:transparent; color:var(--nx-muted); font-size:13px; }
.nexo-app-theme .feed-post-actions button[aria-pressed=true] { color:var(--nx-accent); background:var(--nx-soft); }
.nexo-app-theme .feed-post-menu summary { min-width:44px; min-height:44px; text-align:center; }
.nexo-app-theme .feed-post-menu form { background:var(--nx-surface); border:1px solid var(--nx-line); border-radius:14px; color:var(--nx-danger); z-index:10; }
.nexo-app-theme .feed-compose-prompt button { background:var(--nx-bg); border:1px solid var(--nx-line); color:var(--nx-muted); border-radius:18px; min-height:48px; padding:12px; text-align:start; }
.nexo-app-theme .feed-compose-tools button { color:var(--nx-accent); min-height:44px; background:transparent; }
.nexo-app-theme .nx-lazy-card { content-visibility:auto; contain-intrinsic-size:auto 440px; }
/* A top-layer comments sheet must not be clipped by content-visibility. */
.nexo-app-theme .nx-lazy-card:has(dialog[open]) { content-visibility:visible; }

/* Sheets: native dialog semantics, existing forms and focus restoration. */
.nexo-app-theme :is(dialog.feed-dialog,dialog.nx-sheet,dialog#chat-menu,dialog#chat-appearance) {
 width:min(100%,560px); max-height:88dvh; margin:auto auto 0; padding:20px 20px calc(20px + env(safe-area-inset-bottom));
 border:1px solid var(--nx-line); border-bottom:0; border-radius:28px 28px 0 0; background:var(--nx-surface); color:var(--nx-text); overflow:auto; overscroll-behavior:contain;
}
.nexo-app-theme dialog::backdrop { background:rgb(6 9 18 / .58); backdrop-filter:blur(6px); }
.nexo-app-theme :is(.feed-dialog>header,.nx-sheet-heading,.chat-menu-heading,.appearance-heading) { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 18px; padding:0 0 12px; border-bottom:1px solid var(--nx-line); background:var(--nx-surface); color:var(--nx-text); width:100%; }
.nexo-app-theme :is(.feed-dialog>header,.nx-sheet-heading,.chat-menu-heading,.appearance-heading) h2 { color:var(--nx-text); }
.nexo-app-theme .nx-comments-empty { color:var(--nx-muted); text-align:center; padding:24px 0; }
.nexo-app-theme :is(.nx-sheet-heading h2,.feed-dialog h2) { margin:0; }
.nexo-app-theme :is(.nx-dismiss,[data-close-dialog]) { min-width:44px; min-height:44px; border:0; border-radius:14px; background:var(--nx-bg); color:var(--nx-text); padding:10px 14px; }
.nexo-app-theme .feed-dialog textarea { border:0; min-height:150px; background:transparent; padding:16px 0; font-size:18px; }
.nexo-app-theme :is(.feed-photo-picker,.feed-share-target,.chat-menu-row) { border:1px solid var(--nx-line); background:var(--nx-bg); color:var(--nx-text); border-radius:16px; padding:14px; min-height:48px; }
.nexo-app-theme .feed-audience-hint { color:var(--nx-muted); font-size:13px; }
.nexo-app-theme .feed-photo-preview img { max-height:300px; border-radius:16px; }
.nexo-app-theme .feed-publish { width:100%; }
.nexo-app-theme .feed-comments { border:0; padding:0; }
.nexo-app-theme .feed-comment { align-items:flex-start; gap:10px; margin:12px 0; }
.nexo-app-theme .feed-comment p { background:var(--nx-bg); color:var(--nx-text); border-radius:0 16px 16px 16px; padding:12px 14px; margin:0; }
.nexo-app-theme .feed-comment p b { display:block; margin-bottom:4px; font-size:13px; color:var(--nx-accent); }
.nexo-app-theme .feed-comment-initial { background:var(--nx-soft); color:var(--nx-accent); border-radius:50%; }
.nexo-app-theme .feed-comment-form { position:sticky; bottom:0; background:var(--nx-surface); padding-top:12px; gap:8px; }
.nexo-app-theme .feed-comment-form input { min-width:0; min-height:48px; }
.nexo-app-theme .feed-comment-form button { width:48px; height:48px; background:var(--nx-gradient); color:#fff; border:0; border-radius:16px; }
.nx-sheet-open #nexo-app-tabs { visibility:hidden; }

/* Explore, friend search and real relationship controls. */
.nexo-app-theme.nx-explore :is(.feed-home-identity,.feed-composer,.feed-post,.feed-empty) { display:none; }
.nexo-app-theme .nx-explore-hint { padding:28px 16px; text-align:center; color:var(--nx-muted); font-size:14px; }
.nexo-app-theme .feed-friend-results { background:var(--nx-surface); border:1px solid var(--nx-line); border-radius:22px; padding:16px; margin-top:18px; }
.nexo-app-theme .feed-friend-row { border-color:var(--nx-line); padding:16px 0; gap:12px; }
.nexo-app-theme .feed-friend-copy { color:var(--nx-text); min-width:0; }
.nexo-app-theme .feed-friend-copy small { color:var(--nx-muted); }
.nexo-app-theme .feed-friend-actions button { min-height:44px; border-radius:14px; background:var(--nx-soft); color:var(--nx-accent); }
.nexo-app-theme :is(.friend-search-form,.directory-search) { display:flex; align-items:center; gap:8px; border:1px solid var(--nx-line); border-radius:17px; background:var(--nx-surface); padding:4px 8px; }
.nexo-app-theme :is(.friend-search-form,.directory-search) input { width:100%; min-width:0; border:0; background:transparent; min-height:44px; box-shadow:none; }
.nexo-app-theme .friend-search-form button { min-height:44px; min-width:44px; border:0; background:transparent; color:var(--nx-accent); }
.nexo-app-theme .people-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.nexo-app-theme .people-grid .person { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:4px 12px; padding:16px; text-align:start; }
.nexo-app-theme .person>.nexo-avatar { grid-column:1; grid-row:1/3; }
.nexo-app-theme .person>h2 { grid-column:2; margin:0; font-size:16px; }
.nexo-app-theme .person>p { grid-column:2; margin:0; font-size:13px; color:var(--nx-muted); }
.nexo-app-theme .person>form { grid-column:3; grid-row:1/3; margin:0; }
.nexo-app-theme .person>form button { min-height:44px; border:0; border-radius:14px; background:var(--nx-soft); color:var(--nx-accent); padding:10px 12px; }
.nexo-app-theme .person>.primary { grid-column:2/4; text-align:center; margin-top:8px; }
.nexo-app-theme .person>.safety-menu { grid-column:1/-1; font-size:12px; color:var(--nx-muted); }
.nexo-app-theme .person>.safety-menu summary { padding:10px 0; }

/* Chat directory. Pin/clear remain accessible instead of being hidden behind fake controls. */
.nexo-app-theme .chat-directory { padding:0; border:0; border-radius:0; background:transparent; }
.nexo-app-theme .chat-workspace:not(.has-peer) { display:block; border:0; background:transparent; }
.nexo-app-theme .chat-workspace:not(.has-peer)>.conversation-pane { display:none; }
.nexo-app-theme .conversation-shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:16px 0; }
.nexo-app-theme .conversation-shortcuts a { min-width:0; padding:12px; border:1px solid var(--nx-line); border-radius:16px; background:var(--nx-surface); color:var(--nx-text); }
.nexo-app-theme .conversation-shortcuts small { color:var(--nx-muted); font-size:11px; }
.nexo-app-theme .conversation-shortcut-icon { background:var(--nx-soft); color:var(--nx-accent); }
.nexo-app-theme :is(.nx-filter-row,.notification-filters,.profile-section-tabs) { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; margin:0 0 10px; border:0; }
.nexo-app-theme :is(.nx-chip,.notification-filters a,.profile-section-tabs a) { min-height:44px; border:1px solid var(--nx-line); border-radius:22px; background:var(--nx-surface); color:var(--nx-muted); padding:10px 16px; text-decoration:none; font-size:13px; }
.nexo-app-theme :is(.nx-chip[aria-pressed=true],.notification-filters a[aria-current],.profile-section-tabs a[aria-current]) { background:var(--nx-gradient); color:#fff; border-color:transparent; }
.nexo-app-theme .conversation-row { background:var(--nx-surface); border-bottom:1px solid var(--nx-line); padding:8px 0; gap:0; }
.nexo-app-theme .contact-row { padding:10px; min-height:72px; border:0; background:transparent; gap:12px; }
.nexo-app-theme .contact-row[aria-current] { border-radius:16px; background:var(--nx-soft); }
.nexo-app-theme .contact-copy { min-width:0; }
.nexo-app-theme .contact-copy b { color:var(--nx-text); font-size:15px; }
.nexo-app-theme .contact-copy small { color:var(--nx-muted); font-size:13px; }
.nexo-app-theme .chat-directory .contact-copy b { color:var(--nx-text); }
.nexo-app-theme .chat-directory .contact-copy small { color:var(--nx-muted); }
.nexo-app-theme .contact-meta { color:var(--nx-muted); font-size:11px; }
.nexo-app-theme .unread-count { background:var(--nx-gradient); color:#fff; min-width:21px; height:21px; border-radius:11px; display:grid; place-items:center; font-size:11px; }
.nexo-app-theme :is(.conversation-pin,.conversation-clear) { min-height:44px; min-width:32px; color:var(--nx-muted); background:transparent; border:0; }
.nexo-app-theme .conversation-pin[aria-pressed=true] { color:var(--nx-accent); }
.nexo-app-theme .conversation-clear { color:var(--nx-danger); }

/* Full-screen private/group timeline, same message composer and same delivery logic. */
.nexo-app-theme.nx-conversation { padding-bottom:0; }
.nexo-app-theme.nx-conversation .member-header { display:none; }
.nexo-app-theme.nx-conversation .shell { max-width:900px; padding:0; }
.nexo-app-theme.nx-conversation .shell>main>.heading { display:none; }
.nexo-app-theme.nx-conversation .chat-workspace.has-peer { display:block; height:100dvh; border:0; border-radius:0; }
.nexo-app-theme.nx-conversation .has-peer>.chat-directory { display:none; }
.nexo-app-theme.nx-conversation .conversation-pane { height:100%; min-height:0; border:0; border-radius:0; background:var(--chat-wallpaper,var(--nx-bg)); background-size:cover; background-position:center; }
.nexo-app-theme .conversation-heading { min-height:72px; padding:12px 10px; gap:9px; border-bottom:1px solid var(--nx-line); }
.nexo-app-theme .conversation-heading>.nexo-avatar { width:36px; height:36px; }
.nexo-app-theme .conversation-heading>div { min-width:0; }
.nexo-app-theme .conversation-heading b { font-size:15px; overflow-wrap:anywhere; }
.nexo-app-theme .conversation-heading small { font-size:11px; }
.nexo-app-theme :is(.call-toolbar,.group-call-header-actions) { gap:0; }
.nexo-app-theme :is(.call-toolbar,.group-call-header-actions) button { width:40px; min-width:40px; height:44px; color:var(--nx-text); background:transparent; }
.nexo-app-theme :is(#messages,#group-messages) { padding:18px 16px; background-color:transparent; overscroll-behavior:contain; }
.nexo-app-theme .bubble { max-width:82%; font-size:16px; line-height:1.6; padding:11px 14px; margin-bottom:10px; box-shadow:none; overflow-wrap:anywhere; }
.nexo-app-theme .bubble:not(.mine) { background:var(--nx-surface); border:1px solid var(--nx-line); }
.nexo-app-theme .bubble.mine { background:var(--nx-gradient); }
.nexo-app-theme .bubble small { font-size:10px; }
.nexo-app-theme .message-sender-avatar { background:var(--nx-soft); color:var(--nx-accent); }
.nexo-app-theme .message-image { border-radius:14px; max-width:100%; height:auto; }
.nexo-app-theme :is(.chat-file-card,.shared-post-link,.call-record) { background:var(--nx-surface); color:var(--nx-text); border:1px solid var(--nx-line); border-radius:16px; }
.nexo-app-theme .message-composer { display:flex; flex-wrap:wrap; gap:6px; padding:10px 10px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--nx-line); align-items:flex-end; }
.nexo-app-theme .message-composer #attach-button { order:0; }
.nexo-app-theme .message-composer textarea { order:1; flex:1 1 100px; min-width:70px; min-height:44px; max-height:110px; padding:10px 12px; resize:none; border:1px solid var(--nx-line); }
.nexo-app-theme .message-composer .nx-emoji-button { order:2; font-size:24px; }
.nexo-app-theme .message-composer .nx-attachments-button { order:0; font-size:26px; }
.nexo-app-theme .message-composer .nx-mic-button { order:3; }
.nexo-app-theme .message-composer .nx-mic-button svg { width:22px; height:22px; }
.nexo-app-theme .message-composer .composer-photo { order:4; }
.nexo-app-theme .message-composer .send-message { order:4; background:var(--nx-gradient); color:#fff; }
.nexo-app-theme .message-composer>button { min-width:40px; width:40px; height:44px; border-radius:14px; border:0; padding:8px; }
.nexo-app-theme .message-composer>button:not(.send-message) { background:var(--nx-bg); color:var(--nx-text); }
.nexo-app-theme .message-composer .attachment-selection { order:5; flex-basis:100%; background:var(--nx-bg); border-color:var(--nx-line); border-radius:16px; }
.nexo-app-theme .composer-hint { display:none; }
.nexo-app-theme :is(.chat-typing,#chat-status,#group-status) { color:var(--nx-muted); background:var(--nx-surface); padding-inline:14px; font-size:12px; }
.nexo-app-theme .nx-emoji-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.nexo-app-theme .nx-emoji-grid button { min-height:48px; border:0; background:var(--nx-bg); border-radius:14px; font-size:26px; }
.nexo-app-theme .nx-message-preview { max-height:30vh; overflow:auto; white-space:pre-wrap; user-select:text; -webkit-user-select:text; background:var(--nx-bg); border-radius:16px; padding:16px; }
.nexo-app-theme .nx-menu-row { display:block; width:100%; min-height:48px; margin:8px 0; border:0; border-radius:14px; background:var(--nx-soft); color:var(--nx-accent); }

/* Profile / edit / account / privacy / friend lists / notifications. */
.nexo-app-theme .profile-layout { max-width:none; }
.nexo-app-theme.profile-page .profile-showcase { min-height:0; justify-content:flex-start; }
.nexo-app-theme.profile-page .profile-showcase::after { display:none; }
.nexo-app-theme.profile-page .profile-showcase-top { position:relative; top:auto; left:auto; right:auto; }
.nexo-app-theme.profile-page .profile-showcase-top a { color:var(--nx-text); background:var(--nx-bg); }
.nexo-app-theme.profile-page .profile-showcase .nexo-icon-tray { background:transparent; border:0; }
.nexo-app-theme.profile-page .profile-showcase-person { display:block; margin-top:12px; text-align:start; padding:12px 0; }
.nexo-app-theme.profile-page .profile-showcase.has-cover .profile-showcase-person { margin-top:80px; }
.nexo-app-theme.profile-page .profile-cover-image { height:150px; }
.nexo-app-theme.profile-page .profile-showcase-person h1 { color:var(--nx-text); text-shadow:none; }
.nexo-app-theme.profile-page .profile-showcase .profile-photo-large .nexo-avatar { width:80px; height:80px; min-width:80px; box-shadow:none; border:3px solid var(--nx-surface); }
.nexo-app-theme.profile-page .profile-showcase-actions { padding:8px 0 0; }
.nexo-app-theme.profile-page .profile-showcase-actions svg { width:20px; height:20px; }
.nexo-app-theme.profile-page .profile-showcase-actions b { background:var(--nx-soft); }
.nexo-app-theme.profile-page .profile-section-tabs { background:transparent; }
.nexo-app-theme.profile-page .profile-section-tabs { flex-wrap:nowrap; overflow-x:auto; }
.nexo-app-theme.profile-page .profile-section-tabs a { flex:0 0 auto; white-space:nowrap; padding:10px 16px; }
.nexo-app-theme #line-chat-notifications form label { display:flex; gap:10px; align-items:flex-start; margin:16px 0; min-height:44px; }
.nexo-app-theme #line-chat-notifications input[type=checkbox] { flex:0 0 22px; width:22px; height:22px; margin:2px 0 0; accent-color:var(--nx-accent); }
.nexo-app-theme.profile-page .profile-form :is(input,textarea) { background:var(--nx-bg); color:var(--nx-text); border-color:var(--nx-line); }
.nexo-app-theme .profile-showcase { position:relative; overflow:hidden; border:1px solid var(--nx-line); border-radius:26px; padding:18px; background:var(--nx-surface); color:var(--nx-text); }
.nexo-app-theme .profile-showcase:not(.has-cover)::before { content:''; position:absolute; inset:0 0 auto; height:120px; background:linear-gradient(145deg,var(--nx-soft),transparent); pointer-events:none; }
.nexo-app-theme .profile-showcase-top { position:relative; z-index:1; }
.nexo-app-theme .profile-showcase-person { position:relative; padding:20px 0 12px; text-align:start; }
.nexo-app-theme .profile-photo-large { display:block; width:88px; margin-bottom:16px; }
.nexo-app-theme .profile-photo-large .nexo-avatar { width:88px; height:88px; border:3px solid var(--nx-surface); outline:2px solid var(--nx-accent); }
.nexo-app-theme .profile-showcase-person h1 { margin:12px 0 0; color:var(--nx-text); font-size:26px; }
.nexo-app-theme :is(.showcase-handle,.showcase-bio) { color:var(--nx-muted); font-size:14px; }
.nexo-app-theme .showcase-bio { color:var(--nx-text); margin-block:12px; }
.nexo-app-theme .profile-showcase-actions { display:flex; flex-wrap:wrap; gap:8px; }
.nexo-app-theme .profile-showcase-actions a { flex:1; min-width:90px; min-height:48px; border:1px solid var(--nx-line); border-radius:14px; background:var(--nx-bg); color:var(--nx-text); font-size:13px; }
.nexo-app-theme .profile-section { padding:20px; border:1px solid var(--nx-line); margin:16px 0; }
.nexo-app-theme :is(.profile-shortcut,.nexo-appearance-button) { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px; margin:12px 0; border:1px solid var(--nx-line); border-radius:18px; color:var(--nx-text); text-decoration:none; background:var(--nx-surface); }
.nexo-app-theme .profile-shortcut :is(b,small) { display:block; }
.nexo-app-theme .profile-shortcut small { color:var(--nx-muted); font-size:12px; margin-top:5px; }
.nexo-app-theme .profile-form { display:grid; gap:10px; }
.nexo-app-theme .profile-form :is(input,textarea) { width:100%; padding:13px 14px; }
.nexo-app-theme .profile-form label { color:var(--nx-muted); font-size:13px; margin-top:8px; }
.nexo-app-theme.profile-page .profile-photo-actions .quiet { background:var(--nx-soft)!important; color:var(--nx-accent)!important; border-color:var(--nx-line)!important; }
.nexo-app-theme .profile-account-summary dl>div { padding:14px 0; border-bottom:1px solid var(--nx-line); }
.nexo-app-theme .profile-account-summary dt { color:var(--nx-muted); }
.nexo-app-theme .profile-account-summary dd { color:var(--nx-text); margin:5px 0 0; overflow-wrap:anywhere; }
.nexo-app-theme .profile-verified { background:var(--nx-soft); color:var(--nx-accent); padding:4px 8px; border-radius:12px; font-size:11px; }
.nexo-app-theme .profile-friend-row { border-color:var(--nx-line); padding:14px 0; gap:10px; }
.nexo-app-theme .profile-friend-copy { min-width:0; color:var(--nx-text); }
.nexo-app-theme .profile-friend-copy small { color:var(--nx-muted); }
.nexo-app-theme .logout-button { color:var(--nx-danger); min-height:44px; }
.nexo-app-theme .notification-list { border:1px solid var(--nx-line); border-radius:22px; overflow:hidden; background:var(--nx-surface); }
.nexo-app-theme .notification-item { margin:0; border-bottom:1px solid var(--nx-line); }
.nexo-app-theme .notification-item>button { width:100%; padding:18px 14px; border:0; background:transparent; color:var(--nx-text); text-align:start; display:flex; align-items:center; gap:12px; }
.nexo-app-theme .notification-item.is-unread { background:var(--nx-soft); }
.nexo-app-theme .notification-copy { flex:1; min-width:0; font-size:14px; }
.nexo-app-theme .notification-copy time { display:block; font-size:11px; color:var(--nx-muted); margin-top:5px; }
.nexo-app-theme .notification-dot { width:7px; height:7px; background:var(--nx-accent); border-radius:50%; flex-shrink:0; }
.nexo-app-theme .notification-more { min-height:48px; display:block; text-align:center; padding:14px; color:var(--nx-accent); }
.nexo-app-theme .nx-offline { position:sticky; top:0; z-index:100; padding:12px 16px; margin:0; background:var(--nx-soft); border-bottom:1px solid var(--nx-line); color:var(--nx-text); font-size:13px; }
/* Match the legacy conversation stylesheet's high-specificity layout rules. */
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .conversation-heading { background:var(--nx-surface); border-color:var(--nx-line); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .conversation-heading b { color:var(--nx-text); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .conversation-heading button { color:var(--nx-text); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .conversation-heading :is(.call-toolbar,.group-call-header-actions,.preview-toolbar) button { width:44px; min-width:44px; height:44px; min-height:44px; flex-shrink:0; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .conversation-heading .chat-back { color:var(--nx-text); min-width:44px; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble small { color:var(--nx-muted); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble.mine small { color:#fff; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble { background:var(--nx-surface); color:var(--nx-text); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble.mine { background:var(--nx-gradient); color:#fff; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble>.message-meta { background:var(--nx-surface); color:var(--nx-muted); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble.mine>.message-meta { background:transparent; color:var(--nx-muted); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble.mine>.message-meta small { color:var(--nx-muted); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer .bubble>.message-author { background:var(--nx-surface); color:var(--nx-accent); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form).message-composer { display:grid!important; grid-template-columns:44px minmax(0,1fr) 44px 44px 44px; gap:4px; background:var(--nx-surface); border-color:var(--nx-line); padding:10px 8px calc(10px + env(safe-area-inset-bottom)); align-items:end; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) #message-body { grid-column:2; grid-row:1; width:100%; min-width:0; min-height:44px; box-sizing:border-box; background:var(--nx-bg); color:var(--nx-text); border:1px solid var(--nx-line); border-radius:16px; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form)>button { width:44px; min-width:44px; height:44px; min-height:44px; grid-row:1; margin:0; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form)>.nx-attachments-button { grid-column:1; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form)>.nx-emoji-button { grid-column:3; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form)>.nx-mic-button { grid-column:4; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form)>.send-message { grid-column:5; }
body.nexo-app-theme.nx-conversation .message-composer>.attachment-selection { grid-column:1/-1; grid-row:2; min-width:0; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) #attach-button { order:0; color:var(--nx-text); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) .nx-emoji-button { order:2; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) .send-message { order:4; background:var(--nx-gradient); }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) .composer-photo { order:4; color:var(--nx-text); }
.nexo-app-theme .nx-voice-sheet { display:none; }
.nexo-app-theme .nx-voice-sheet[open] { display:flex; flex-direction:column; gap:14px; }
.nexo-app-theme .nx-voice-sheet [hidden] { display:none!important; }
.nexo-app-theme .nx-voice-note { font-size:13px; color:var(--nx-muted); margin:0; }
.nexo-app-theme .nx-voice-status { margin:0; font-size:15px; }
.nexo-app-theme .nx-voice-clock { font:600 36px ui-monospace,monospace; text-align:center; margin:0; }
.nexo-app-theme .nx-voice-sheet[data-state="recording"] .nx-voice-clock { color:var(--nx-danger); }
.nexo-app-theme .nx-voice-preview { width:100%; }
.nexo-app-theme .nx-voice-primary,.nexo-app-theme .nx-voice-stop { min-height:48px; border:0; border-radius:16px; background:var(--nx-gradient); color:#fff; padding:12px; }
.nexo-app-theme .nx-voice-stop { background:#b71f43; }
.nexo-app-theme .nx-attachment-actions { display:flex; flex-direction:column; gap:10px; }
body.nexo-app-theme.nx-conversation .chat-workspace.has-peer :is(#message-form,#group-form) .nx-attachment-actions :is(#attach-button,.composer-photo) { width:100%; min-height:48px; height:auto; padding:12px; border-radius:14px; background:var(--nx-bg); color:var(--nx-text); text-align:left; }
@media(prefers-color-scheme:dark) {
 body.nexo-app-theme { --nx-accent:#c0a5ff; --nx-soft:#28203e; --nx-danger:#ff9bad; color-scheme:dark; }
 .nexo-app-theme #nexo-app-tabs { background:var(--nx-bg); border-color:var(--nx-line); }
}
@media(min-width:700px) {
 .nexo-app-theme dialog.nx-sheet,.nexo-app-theme dialog.feed-dialog { margin:auto; border-radius:26px; border-bottom:1px solid var(--nx-line); }
}
@media(max-width:360px) {
 .nexo-app-theme .shell { padding-inline:10px; }
 .nexo-app-theme .feed-card { padding:13px; }
 .nexo-app-theme .message-composer { gap:3px; padding-inline:6px; }
 .nexo-app-theme .message-composer>button { min-width:36px; width:36px; }
 .nexo-app-theme .conversation-heading { gap:4px; }
}
@media(prefers-reduced-motion:no-preference) {
 .nexo-app-theme :is(button,a) { transition:background-color .15s,opacity .15s; }
 .nexo-app-theme button:active { opacity:.8; }
 .nexo-app-theme dialog[open] { animation:nx-sheet-in .18s ease-out; }
 @keyframes nx-sheet-in { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
}
