/* Consistent viewport/layer policies shared by every member route. */
html body.nexo-liquid[data-nexo-glass="1"]{--font-family:-apple-system,BlinkMacSystemFont,"Thonburi","Noto Sans Thai",Tahoma,Arial,sans-serif;font-family:var(--font-family);}
html body.nexo-liquid[data-nexo-glass="1"]{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--motion-fast:160ms;--motion-normal:220ms;--ease-standard:cubic-bezier(.2,.8,.2,1);--layer-nav:40;--layer-toast:80;--layer-overlay:100;}
html.nexo-overlay-open{overflow:hidden;overscroll-behavior:none;}
html.nexo-overlay-open body{overflow:hidden;}
html body.nexo-liquid[data-nexo-glass="1"] .ui-toast{border-inline-start:4px solid var(--primary);}
html body.nexo-liquid[data-nexo-glass="1"] .ui-toast[data-kind=success]{border-inline-start-color:var(--success);}
html body.nexo-liquid[data-nexo-glass="1"] .ui-toast[data-kind=error]{border-inline-start-color:var(--danger);}
html body.nexo-liquid[data-nexo-glass="1"] .ui-toast[data-kind=warning]{border-inline-start-color:var(--textSecondary);}
/* Reserve feed media space before bytes arrive, including profile post cards. */
html body.nexo-liquid[data-nexo-glass="1"] .feed-post-image{aspect-ratio:4/3;max-height:620px;}
html body.nexo-liquid[data-nexo-glass="1"] .feed-post-image img{width:100%;height:100%;max-height:none;object-fit:contain;}
html body.nexo-liquid[data-nexo-glass="1"] dialog{box-sizing:border-box;max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px);max-height:calc(var(--nexo-visible-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain;scroll-padding-bottom:24px;background:var(--surface);color:var(--textPrimary);border:1px solid var(--border);animation:nexo-dialog-in var(--motion-normal) var(--ease-standard);}
html body.nexo-liquid[data-nexo-glass="1"] dialog::backdrop{background:rgb(0 0 0 / .35);backdrop-filter:none;}
html body.nexo-liquid[data-nexo-glass="1"] :is(dialog.feed-dialog,dialog.nx-sheet,dialog#chat-menu,dialog#chat-appearance,dialog#friend-scanner){max-height:calc(var(--nexo-visible-height,100dvh) - max(12px,env(safe-area-inset-top)));}
html body.nexo-liquid[data-nexo-glass="1"] dialog#feed-compose-dialog{height:var(--nexo-visible-height,100dvh);max-height:var(--nexo-visible-height,100dvh);}
html body.nexo-liquid[data-nexo-glass="1"] .nx-sheet{padding-bottom:max(16px,env(safe-area-inset-bottom));}
html body.nexo-liquid[data-nexo-glass="1"] :is(.message-composer textarea,.bubble .message-body){overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal;line-height:1.65;}
html body.nexo-liquid[data-nexo-glass="1"] .message-composer textarea{min-height:44px;max-height:128px;resize:none;transition:none;}
html body.nexo-liquid[data-nexo-glass="1"] .send-message:disabled{opacity:.4;transform:none;}
html body.nexo-liquid[data-nexo-glass="1"] :is(.chat-new-messages,.chat-history,.chat-retry,.chat-pending-retry){min-height:44px;padding:8px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--primary);font:inherit;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-new-messages{position:absolute;bottom:calc(var(--composer-height,80px) + env(safe-area-inset-bottom) + 32px);left:50%;transform:translateX(-50%);z-index:20;box-shadow:0 2px 8px rgb(0 0 0 / .08);white-space:nowrap;}
html body.nexo-liquid[data-nexo-glass="1"] .conversation-pane{position:relative;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-history{flex:0 0 auto;align-self:center;font-size:var(--smallSize);}
html body.nexo-liquid[data-nexo-glass="1"] .chat-window-spacer{flex-shrink:0;pointer-events:none;width:100%;margin:0;padding:0;}
html body.nexo-liquid[data-nexo-glass="1"] :is(#messages,#group-messages){gap:8px;overflow-anchor:none;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-pending{opacity:.75;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-upload-progress{width:100%;height:4px;flex-basis:100%;accent-color:var(--primary);}
html body.nexo-liquid[data-nexo-glass="1"] :is(#messages,#group-messages) .bubble .message-image{width:240px;max-width:100%;height:180px;object-fit:contain;background:var(--background);border-radius:12px;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-file-card video{width:240px;max-width:100%;aspect-ratio:4/3;object-fit:contain;background:var(--background);}
html body.nexo-liquid[data-nexo-glass="1"] .chat-preference-options{display:grid;gap:8px;padding:16px;}
html body.nexo-liquid[data-nexo-glass="1"] .chat-preference-options button{min-height:44px;text-align:left;padding:12px 16px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--textPrimary);}
html body.nexo-liquid[data-nexo-glass="1"] .chat-muted-label{color:var(--textSecondary);font-size:var(--smallSize);margin-left:8px;}
html body.nexo-liquid[data-nexo-glass="1"] .nx-filter-empty{padding:24px 16px;text-align:center;color:var(--textSecondary);}
html body.nexo-liquid[data-nexo-glass="1"] .nx-filter-row{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;}
html body.nexo-liquid[data-nexo-glass="1"] .nx-chip{flex-shrink:0;}
html body.nexo-liquid[data-nexo-glass="1"] .ui-toast{z-index:var(--layer-toast);bottom:calc(var(--navSpace) + env(safe-area-inset-bottom) + 16px);}
html body.nexo-liquid[data-nexo-glass="1"] dialog .ui-toast{position:sticky;bottom:0;left:auto;right:auto;margin-top:16px;}
html body.nexo-liquid[data-nexo-glass="1"] .nx-media-viewer{width:calc(100vw - 24px);height:calc(var(--nexo-visible-height,100dvh) - 24px);padding:16px;}
html body.nexo-liquid[data-nexo-glass="1"] .nx-media-viewer img{display:block;max-width:100%;max-height:calc(var(--nexo-visible-height,100dvh) - 110px);margin:auto;object-fit:contain;touch-action:pan-x pan-y pinch-zoom;}
@keyframes nexo-dialog-in{from{opacity:0;transform:translateY(12px) scale(.98);}to{opacity:1;transform:none;}}
.message-action-list{display:grid;gap:8px;}
html body.nexo-liquid[data-nexo-glass="1"] .message-action-list button{min-height:44px;white-space:normal;overflow-wrap:anywhere;padding:12px 16px;border:1px solid var(--border);border-radius:12px;color:var(--textPrimary);background:var(--surface);text-align:left;}
html body.nexo-liquid[data-nexo-glass="1"] .message-reactions{display:flex;flex-wrap:wrap;gap:4px;}
html body.nexo-liquid[data-nexo-glass="1"] .message-reactions button{min-width:44px;min-height:44px;padding:4px 8px;border:1px solid var(--border);background:var(--surface);color:var(--textPrimary);border-radius:12px;}
html body.nexo-liquid[data-nexo-glass="1"] .message-reactions button[aria-pressed=true]{background:var(--soft);color:var(--primary);}
html body.nexo-liquid[data-nexo-glass="1"] .message-reply-preview{display:block;width:100%;min-height:44px;white-space:normal;text-align:left;padding:8px 12px;border:0;border-left:3px solid var(--primary);border-radius:8px;background:var(--surface);color:var(--textSecondary);}
html body.nexo-liquid[data-nexo-glass="1"] .message-reply-composer{display:flex;justify-content:space-between;align-items:center;padding:8px 16px;flex-shrink:0;background:var(--surface);border-top:1px solid var(--border);}
html body.nexo-liquid[data-nexo-glass="1"] .message-reply-composer span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--smallSize);}
html body.nexo-liquid[data-nexo-glass="1"] .message-reply-composer button{min-width:44px;min-height:44px;}
html body.nexo-liquid[data-nexo-glass="1"] .message-highlight{outline:2px solid var(--primary);animation:nexo-dialog-in var(--motion-fast) var(--ease-standard);}
@media(prefers-reduced-motion:reduce){html body.nexo-liquid[data-nexo-glass="1"] dialog{animation:none;}}
