/* One scroll area; the composer and typing status take their own layout rows. */
.nexo-identity .chat{min-height:0;overflow:hidden;position:relative}
.nexo-identity #conversation{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden;position:relative}
.nexo-identity #conversation[hidden]{display:none!important}
.nexo-identity #message-scroll{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;padding-bottom:16px}
.nexo-identity .composer-area{position:relative;flex:0 0 auto;background:var(--paper);z-index:1}
.nexo-identity .typing-indicator{position:static!important;min-height:18px;height:auto;line-height:18px;margin:0 6px 4px;padding:0;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.latest-message-button{position:absolute;bottom:150px;left:50%;transform:translateX(-50%);z-index:2;border-radius:24px;padding:10px 16px;background:var(--accent);color:var(--nav);font-size:12px;box-shadow:0 4px 16px #0004}
.latest-message-button[hidden],.phone-account-controls[hidden],.phone-chat-more[hidden]{display:none!important}
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){
 .nexo-identity .workspace,.nexo-identity .workspace.nexo-inbox,.nexo-identity .workspace.discovering,.nexo-identity .workspace.members-list-closed{grid-template-rows:94px minmax(0,1fr)!important;gap:6px!important;padding:4px!important;border-radius:0;margin:0;width:100%;height:var(--nexo-phone-height,100dvh)!important}
 .nexo-identity .server-rail{grid-template-rows:44px 36px!important;padding:4px 8px!important;gap:4px!important;border-radius:16px}
 .nexo-identity .nexo-primary-navigation{justify-content:space-around;flex:1;gap:2px}
 .nexo-identity .nexo-utility-navigation{display:none!important}.nexo-identity .phone-account-controls .nexo-utility-navigation{display:flex!important;flex-wrap:wrap;gap:10px;margin-top:8px}
 .phone-account-controls{padding:12px;border-top:1px solid var(--line)}.phone-account-controls>small{font-size:10px;letter-spacing:1px;color:var(--muted)}
 .nexo-identity .chat{border-radius:16px!important;grid-column:auto;min-width:0}
 .nexo-identity .chat-header{height:56px!important;min-height:56px!important;padding:6px 52px 6px 8px!important;display:flex!important;flex-wrap:nowrap!important;gap:6px!important;align-content:center!important}
 .nexo-identity #channel-title{flex:1 1 auto!important;max-width:none!important;font-size:16px;line-height:1.2}
 .nexo-identity .chat-header #members-toggle{top:6px!important;right:4px!important}.nexo-identity .phone-chat-more{display:grid;flex:none!important;margin:0!important}
 .nexo-identity .workspace.mobile-sidebar .sidebar{top:104px!important;left:4px!important;bottom:4px!important;max-height:calc(100% - 108px)!important;width:min(310px,calc(100vw - 16px));border-radius:16px}
 .nexo-identity #message-scroll{padding:12px 10px 14px!important}.nexo-identity .channel-welcome{padding-top:14px!important;margin-bottom:12px}.nexo-identity .channel-welcome h1{font-size:22px}.nexo-identity .channel-welcome p{font-size:12px}
 .nexo-identity #messages .message{gap:6px!important}.nexo-identity #messages .message-content{max-width:calc(100% - 38px)!important;min-width:0!important;padding:8px 10px!important;border-radius:16px!important}
 .nexo-identity #messages .message-avatar-button,.nexo-identity #messages .message-avatar-button .avatar{width:28px!important;min-width:28px!important;height:28px!important}
 .nexo-identity #messages .message-meta{gap:5px!important;flex-wrap:wrap;line-height:16px;margin-bottom:3px!important}.nexo-identity #messages .message-meta time{font-size:9px!important}.nexo-identity #messages .message-body{font-size:14px;line-height:1.45}
 .nexo-identity .composer-area{padding:4px 8px 6px!important}.nexo-identity .composer{border-radius:20px!important;padding:4px!important;gap:4px!important}.nexo-identity #message-input{max-height:88px!important;line-height:1.35;padding:10px 2px!important}
 #phone-chat-tools{width:min(360px,calc(100vw - 24px))}.nexo-identity #phone-chat-tools>button:not(.modal-close){display:inline-flex;align-items:center;justify-content:center;margin:6px;width:48px;height:48px}
 .latest-message-button{bottom:96px;min-height:40px}.media-picker{width:calc(100vw - 12px)!important;max-height:70dvh!important;border-radius:20px!important;padding:14px!important}.media-picker-heading{gap:8px}.media-results.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* Keep page and composer anchored; only the message history scrolls. */
html:has(#workspace:not([hidden])),body:has(#workspace:not([hidden])){overflow:hidden!important;overscroll-behavior:none;scroll-behavior:auto!important}
body:has(#workspace:not([hidden])){position:fixed;inset:0;margin:0}
.nexo-identity #message-scroll{scroll-behavior:auto!important}
.phone-profile-actions{display:contents}.phone-plus-label{display:inline-flex;margin:0 0 12px;padding:4px 9px;border-radius:8px;font-size:11px;font-weight:800;background:#524372;color:#e9d8ff}.phone-plus-label[hidden]{display:none!important}
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){
 .nexo-identity .profile-wide .profile-card-content{min-height:0!important;padding:42px 16px 16px!important}
 .nexo-identity .profile-wide .card-banner{height:88px!important}.nexo-identity .profile-wide .profile-card-top{top:52px!important;left:16px!important}
 .nexo-identity .profile-wide #card-name{font-size:25px!important;margin-bottom:4px!important}.nexo-identity .profile-wide #card-username{margin-bottom:10px!important}
 .nexo-identity .profile-wide .profile-card-top .badges{gap:8px!important}
 .nexo-identity .profile-wide .phone-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
 .nexo-identity .phone-profile-actions>button:not([hidden]){display:flex!important;align-items:center;justify-content:center;min-height:44px;min-width:0!important;width:100%!important;margin:0!important;padding:10px 8px!important;font-size:12px;border-radius:12px}
 .nexo-identity .phone-profile-actions>button[hidden]{display:none!important}
 .nexo-identity .profile-wide .full-profile-details{padding:12px 16px!important}
 .nexo-identity .profile-wide .full-profile-details .profile-card-details{display:block!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--surface-card)!important;padding:12px!important}
 .nexo-identity .profile-wide .profile-card-details>div,.nexo-identity .profile-wide .profile-card-details>section{min-height:0!important;border:0!important;border-radius:0!important;background:transparent!important;padding:10px 0!important;margin:0!important}
 .nexo-identity .profile-wide .profile-card-details>div:not([hidden])+section:not([hidden]),.nexo-identity .profile-wide .profile-card-details>section:not([hidden])+section:not([hidden]){border-top:1px solid var(--line)!important}
 .nexo-identity .profile-wide h3{margin:0 0 6px!important}.nexo-identity .profile-wide #card-bio{margin:0!important;line-height:1.5!important}
 .nexo-identity .profile-wide .profile-dates{gap:4px!important}.nexo-identity .profile-wide .profile-dates>div{padding:0!important;margin:0!important;gap:4px!important}
 .nexo-identity .profile-wide .profile-section-tabs{padding:6px 10px!important;gap:6px!important}.nexo-identity .profile-section-tab{padding:9px 12px!important;min-height:42px}
 .nexo-identity .profile-wide .profile-more{right:60px!important;top:10px!important;width:40px!important;height:40px!important}.nexo-identity .profile-wide .modal-close{right:10px!important;top:10px!important;width:40px!important;height:40px!important}
}
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){.nexo-identity .phone-profile-actions>button:not([hidden]){min-height:44px!important}}

@media(max-width:760px), (pointer:coarse) and (max-width:1100px){.nexo-identity .phone-composing .nexo-spaces-strip{display:flex!important}.nexo-identity .workspace.phone-composing{grid-template-rows:94px minmax(0,1fr)!important}.nexo-identity .phone-composing .server-rail{grid-template-rows:44px 36px!important}}

/* Tab state takes precedence over the compact overview box. */
.nexo-identity .profile-wide .full-profile-layout[data-profile-tab=games] .full-profile-details .profile-card-details{display:none!important}
.nexo-identity .profile-wide .full-profile-layout[data-profile-tab=games] .full-profile-details .profile-game-widgets{display:block!important;max-width:100%;min-width:0;overflow:hidden}
.nexo-identity .profile-wide #card-bio{overflow-wrap:anywhere}
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){
 .nexo-identity .server-rail{height:94px!important;min-height:94px!important;max-height:94px!important;overflow-y:hidden!important;align-content:start}
 .nexo-identity .nexo-spaces-strip,.nexo-identity .phone-composing .nexo-spaces-strip{display:flex!important;height:36px!important;min-height:36px!important;flex-shrink:0;visibility:visible!important}
 .nexo-identity #server-list{display:flex!important;min-width:0;overflow-x:auto;overflow-y:hidden;min-height:36px!important}
}

/* Explicit rows prevent flex wrapping from clipping the space switcher. */
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){
 .nexo-identity .server-rail{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;grid-template-rows:44px 36px!important;align-items:center!important;box-sizing:border-box!important}
 .nexo-identity #nexo-home{grid-column:1;grid-row:1;width:40px!important;height:40px!important;margin:0!important}
 .nexo-identity .nexo-primary-navigation{grid-column:2;grid-row:1;width:100%;min-width:0;margin:0!important}
 .nexo-identity .nexo-spaces-strip{grid-column:1 / -1;grid-row:2!important;order:initial!important;width:100%!important;margin:0!important;min-width:0;align-items:center!important}
 .nexo-identity #server-list{width:100%;height:36px!important;align-items:center!important;gap:6px!important}
 .nexo-identity #server-list>button{height:34px!important;min-height:34px!important;margin:0!important;flex-shrink:0}
 .nexo-identity .profile-dialog{position:fixed!important;inset:0!important;margin:auto!important}
 .nexo-identity .profile-dialog .modal-close{position:absolute!important;float:none!important;right:10px!important;top:10px!important;margin:0!important;width:40px!important;height:40px!important;z-index:9}
 .nexo-identity .profile-dialog .profile-more{position:absolute!important;right:58px!important;top:10px!important;width:40px!important;height:40px!important;margin:0!important;z-index:9}
 .nexo-identity .mini-profile .card-banner{display:block!important;clear:none!important;width:100%!important;max-width:none!important;height:88px!important;box-sizing:border-box}
 .nexo-identity .mini-profile .phone-profile-actions{display:flex!important;flex-direction:column;gap:10px!important;margin-top:16px!important}
 .nexo-identity #profile-dialog.mini-profile .phone-profile-actions>button:not([hidden]){background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;text-align:left;justify-content:flex-start;padding:10px 4px!important;color:var(--ink)!important}
 .nexo-identity .mini-profile .profile-card-details{background:transparent!important;border:0!important;box-shadow:none!important;padding:12px 0!important;margin:12px 0!important}
 .nexo-identity .mini-profile .profile-card-details>section{margin:0!important;padding:10px 0!important;border:0!important;background:transparent!important}
 .nexo-identity #messages .message-actions{position:static!important;float:none!important;display:flex!important;justify-content:flex-end;opacity:1!important;pointer-events:auto!important;width:auto!important;margin:4px 0 0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
 .nexo-identity #messages .message-action{width:44px!important;height:32px!important;min-height:32px!important;background:transparent!important;border:0!important;box-shadow:none!important}
 .nexo-identity .upload-menu:not([hidden]){display:flex!important;flex-direction:column;gap:8px!important;padding:8px!important}
 .nexo-identity .upload-menu>button{min-height:44px!important;margin:0!important;border:0!important;border-radius:8px!important;padding:10px 12px!important;background:transparent!important;text-align:left}
}

/* Hold a bubble on touch screens; pointer users keep a top-corner menu. */
.nexo-identity #messages .message-actions{position:absolute!important;right:5px!important;top:5px!important;bottom:auto!important;margin:0!important;width:auto!important}
@media(min-width:761px){.nexo-identity #messages .message-meta{padding-right:36px}.nexo-identity #messages .message-action{width:30px!important;height:28px!important}}
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){.nexo-identity #messages .message-actions{width:0!important;height:0!important;padding:0!important;border:0!important;background:transparent!important}.nexo-identity #messages .message-action{display:none!important}.nexo-identity #messages .message-content{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}}
.news-banner-button{position:relative;display:block;width:100%;padding:0!important;margin:0 0 16px;border:0!important;border-radius:14px;overflow:hidden;background:#141923;cursor:pointer}
.news-banner-button>img:not(.news-banner-logo){display:block;width:100%;height:auto;max-height:260px;object-fit:cover}.news-banner-button .news-banner-logo{position:absolute;left:16px;top:16px;width:60px;height:60px;object-fit:contain;filter:drop-shadow(0 2px 5px #0008)}.news-card .news-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.news-full-view{width:min(960px,calc(100vw - 24px))!important}.news-full-view .news-banner-button{opacity:1!important;cursor:default}.news-full-view .news-banner-button>img:not(.news-banner-logo){max-height:none;object-fit:contain}.news-full-view .workspace-card{padding:0;border:0;background:transparent}
.boost-celebration{position:fixed;inset:0;z-index:200;pointer-events:none;overflow:hidden;display:grid;place-items:center}.boost-celebration-title{padding:12px 20px;border:1px solid #f8d27b;border-radius:30px;background:#131927e8;color:#fbd17d;box-shadow:0 0 40px #edc67744;text-align:center;font-weight:800}.boost-rocket{position:absolute;top:45%;left:-160px;width:130px;height:130px;animation:nexo-rocket-flight 3s ease-in-out forwards}.boost-rocket .rocket-body{font-size:100px;display:block;transform:rotate(10deg)}.boost-rocket img{position:absolute;left:34px;top:14px;width:48px;height:48px;object-fit:contain}.boost-glitter{position:absolute;color:#ffd875;font-size:24px;left:var(--x);top:var(--y);animation:nexo-glitter 3s ease-out forwards}.booster-benefit-form{display:grid;gap:12px}.booster-benefit-form label{margin:0!important}.booster-benefit-form input:not([type=checkbox]),.booster-benefit-form textarea,.booster-benefit-form select{width:100%}.booster-benefit-form textarea{min-height:100px}
@keyframes nexo-rocket-flight{0%{transform:translateX(-160px) translateY(100px) rotate(-12deg)}100%{transform:translateX(calc(100vw + 320px)) translateY(-180px) rotate(-12deg)}}@keyframes nexo-glitter{0%{opacity:0;transform:scale(.3)}20%{opacity:1}100%{opacity:0;transform:translateY(80px) scale(.5)}}@media(prefers-reduced-motion:reduce){.boost-rocket{animation:none;display:none}.boost-glitter{animation:none;display:none}}

.boost-celebration{margin:0!important;padding:0!important;border:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;background:transparent!important}

.nexo-identity .chat-image-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px;max-width:520px}.chat-image-gallery:has(>.chat-file:only-child){grid-template-columns:minmax(0,1fr)}.nexo-identity .image-attachment{position:relative;padding:0!important;margin:0!important;min-width:0;border-radius:12px;overflow:hidden}.nexo-identity .image-attachment .uploaded-photo{display:block;width:100%;max-width:100%;height:auto;max-height:320px;object-fit:contain;margin:0;background:#0c1017}.nexo-identity .image-attachment .image-download-button{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:38px;height:38px;min-height:38px;padding:0!important;margin:0!important;background:#101722e8;border:1px solid #ffffff40;border-radius:10px;color:white;font-size:24px;text-decoration:none;z-index:1}.image-download-button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.nexo-identity .file-draft{display:flex;flex-wrap:wrap;gap:8px;max-height:150px;overflow:auto}.nexo-identity .file-draft[hidden]{display:none!important}.image-draft-item{display:flex;align-items:center;gap:8px;padding:6px;border:1px solid var(--line);border-radius:10px;max-width:240px;min-width:0}.image-draft-item img{width:40px;height:40px;object-fit:cover;border-radius:6px}.image-draft-item span{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-draft-item button{flex-shrink:0}
#settings-page-applications .application-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}#settings-page-applications .application-action-grid>:is(button,a){display:flex!important;align-items:center;justify-content:flex-start!important;gap:12px!important;text-align:left!important;margin:0!important;padding:16px!important;min-height:64px;width:100%;font-size:13px}#settings-page-applications .application-action-grid>:is(button,a) svg{width:22px;height:22px;flex:none}@media(max-width:760px), (pointer:coarse) and (max-width:1100px){#settings-page-applications .application-action-grid{grid-template-columns:1fr}.nexo-identity .image-download-button{width:44px!important;height:44px!important}}

#settings-page-applications .application-action-grid>a{background:var(--surface-card);border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;box-sizing:border-box}

#settings-page-applications .application-action-grid svg{fill:none;stroke:var(--accent);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

#settings-page-applications .application-action-grid>:is(button,a)[hidden]{display:none!important}

/* Touch message options open with a long press; keep action buttons off the bubbles. */
@media(max-width:760px), (pointer:coarse) and (max-width:1100px){
 .nexo-identity #messages .message-actions{position:absolute!important;top:0!important;right:0!important;width:0!important;height:0!important;margin:0!important;padding:0!important}
 .nexo-identity #messages .message-action{display:none!important}
 .nexo-identity #messages .message-content{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
 .nexo-identity input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.nexo-identity textarea,.nexo-identity select{font-size:16px!important}
 .nexo-identity .inline-message-editor{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
 .nexo-identity #message-edit-text{font-size:16px!important;width:100%;min-width:0;max-width:100%;min-height:90px;box-sizing:border-box}
 .nexo-identity .inline-edit-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
 .nexo-identity .inline-edit-controls small{flex-basis:100%;font-size:11px}
 .nexo-identity .inline-edit-controls button{min-height:44px;margin:0!important}
}

.message-action-menu.message-menu-floating{position:fixed!important;z-index:5000!important;margin:0!important;right:auto!important;bottom:auto!important}.message-action-menu.message-menu-floating[hidden]{display:none!important}
