/* Mobile is a distinct navigation surface, not a compressed desktop sidebar. */
.m-chat-sub {display:none;}
@media (max-width:767px) {
  html.mobile-v2 {--font:system-ui,-apple-system,'Segoe UI',sans-serif;--mobile-nav-h:72px;--m-bottom:calc(68px + env(safe-area-inset-bottom,0px));--bub-mine-bg:#57452b;--bub-mine-line:#655134;--bub-mine-txt:#fff3dc;--bub-other-bg:#242a34;--bub-other-line:#2c3340;--bub-mine-time:#cbb792;}
  .mobile-v2 body {font-family:var(--font);background:#11151c;font-size:15px;-webkit-tap-highlight-color:transparent;}
  .mobile-v2 #root {height:var(--app-visible-height,100dvh);display:flex;flex-direction:column;overflow:hidden;isolation:isolate;}
  .mobile-v2 #root>.app {height:auto!important;min-height:0;min-width:0;flex:1;display:block;overflow:hidden;padding:0!important;}
  .mobile-v2 .app>.rail,.mobile-v2 .app>.sidebar,.mobile-v2 .app>.members,.mobile-v2 .side-scrim {display:none!important;}
  .mobile-v2 .app>.main {height:100%;padding:0!important;min-height:0;min-width:0;overflow:hidden;}
  .mobile-v2 .app-solo-wrap {height:100%;padding-bottom:0!important;}
  .mobile-v2 .module-host {min-height:0;overflow:auto;}
  .mobile-v2 .mobile-global-nav {display:grid!important;position:relative;inset:auto;grid-template-columns:repeat(4,minmax(0,1fr));flex:none;width:100%;height:var(--m-bottom);min-height:var(--m-bottom);padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));gap:2px;background:#171c24;border-top:1px solid #262d37;border-radius:0;box-shadow:none;backdrop-filter:none;z-index:40;}
  .mobile-v2 .mobile-global-nav .mobile-nav-item {height:58px;min-height:0;min-width:0;max-width:none;padding:3px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#8993a3;font-size:11px;font-weight:600;border-radius:0;background:none;}
  .mobile-v2 .mobile-global-nav .mobile-nav-item.on {color:var(--amber);background:none;}
  .mobile-v2 .m-nav-icon {width:54px;height:30px;border-radius:17px;display:grid;place-items:center;position:relative;}
  .mobile-v2 .mobile-nav-item.on .m-nav-icon {background:#f2b24a17;}
  .mobile-v2 .mobile-nav-ic {width:23px!important;height:23px!important;}
  .mobile-v2 .m-nav-icon .avatar {width:25px;height:25px;border-radius:50%;font-size:11px;}
  .mobile-v2 .m-nav-badge {position:absolute;right:1px;top:-2px;border-radius:12px;min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px;background:var(--amber);color:#231c11;font-size:10px;line-height:1;border:2px solid #171c24;}
  .mobile-v2[data-mobile-screen=conversation] .mobile-global-nav {display:none!important;}
  .mobile-v2 .m-page-head {height:67px;min-height:67px;display:flex;align-items:center;justify-content:space-between;padding:8px 18px;gap:12px;}
  .mobile-v2 .m-page-head h1 {font-size:27px;letter-spacing:-.8px;line-height:1.2;font-weight:750;color:#f4f5f8;}
  .mobile-v2 .m-head-actions {display:flex;gap:3px;}
  .mobile-v2 .icon-btn {width:42px;height:42px;flex:none;border-radius:50%;color:#a6b0bf;}
  .mobile-v2 .icon-btn:active {background:#ffffff0b;}
  .mobile-v2 .m-chats {height:100%;display:flex;flex-direction:column;position:relative;background:#11151c;min-height:0;}
  .mobile-v2 .m-search {display:flex;align-items:center;gap:9px;min-width:0;height:41px;margin:0 16px 9px;padding:0 13px;border-radius:13px;background:#202630;color:#7f8a9b;}
  .mobile-v2 .m-search>svg {width:18px;height:18px;flex:none;}
  .mobile-v2 .m-search input {width:100%;min-width:0;padding:0;height:100%;border:0;background:none;box-shadow:none;font:inherit;font-size:15px;color:#edf0f5;}
  .mobile-v2 .m-search input::placeholder {color:#8a94a3;}
  .mobile-v2 .m-search:focus-within {box-shadow:0 0 0 1px #f2b24a70;}
  .mobile-v2 .m-chat-filters {display:flex;gap:22px;overflow-x:auto;scrollbar-width:none;padding:0 19px;border-bottom:1px solid #252c36;flex:none;}
  .mobile-v2 .m-filter {position:relative;min-height:44px;flex:none;font-size:13px;font-weight:650;color:#8995a5;padding:0 0 12px;padding-top:9px;}
  .mobile-v2 .m-filter.on {color:var(--amber);}
  .mobile-v2 .m-filter.on::after {content:'';position:absolute;bottom:0;left:0;right:0;height:3px;border-radius:3px 3px 0 0;background:var(--amber);}
  .mobile-v2 .m-conversations {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px 0 88px;scrollbar-width:thin;}
  .mobile-v2 .m-conversations .conv-row {position:relative;min-height:86px;border-radius:0;gap:13px;padding:12px 17px;align-items:center;background:transparent;}
  .mobile-v2 .m-conversations .conv-row:active,.mobile-v2 .m-conversations .conv-row:hover {background:#1b222d;}
  .mobile-v2 .m-conversations .conv-row::after {content:'';position:absolute;left:84px;right:0;bottom:0;height:1px;background:#ffffff05;}
  .mobile-v2 .m-conversations .avatar {height:55px;width:55px;min-width:55px;border-radius:50%;font-size:19px;}
  .mobile-v2 .m-conversations .conv-row .grow {gap:5px;align-self:stretch;justify-content:center;}
  .mobile-v2 .conv-top {gap:8px;}
  .mobile-v2 .conv-name {font-size:16px;font-weight:650;line-height:1.3;color:#e9edf3;}
  .mobile-v2 .conv-ts {font-family:var(--font);font-size:11px;color:#7c889a;}
  .mobile-v2 .conv-prev {font-size:13px;line-height:1.45;color:#8e9aaa;font-weight:400;}
  .mobile-v2 .conv-prev.unread {color:#c7cfda;font-weight:500;}
  .mobile-v2 .conv-row .badge {align-self:center;font-size:11px;min-width:21px;height:21px;background:var(--amber);color:#241b0b;border-radius:12px;font-family:var(--font);}
  .mobile-v2 .conv-priv {color:#9aaf9d;width:14px;}
  .mobile-v2 .conv-priv svg,.mobile-v2 .conv-pin svg {width:13px;height:13px;}
  .mobile-v2 .conv-pin {color:#778394;}
  .mobile-v2 .m-compose-fab {position:absolute;bottom:19px;right:19px;z-index:4;width:56px;height:56px;display:grid;place-items:center;color:#241b0c;background:var(--amber);border-radius:19px;box-shadow:0 5px 22px #0005;}
  .mobile-v2 .m-compose-fab svg {width:25px;height:25px;}
  .mobile-v2 .m-empty {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;text-align:center;padding:38px 23px;min-height:260px;}
  .mobile-v2 .m-empty>.ic-l {width:45px;height:45px;color:#657185;}
  .mobile-v2 .m-empty h2 {font-size:20px;font-weight:700;line-height:1.3;}
  .mobile-v2 .m-empty p {color:#8d99ab;font-size:14px;line-height:1.65;max-width:310px;}
  .mobile-v2 .m-empty .btn {min-height:44px;padding:10px 17px;border-radius:12px;}
  .mobile-v2 .m-groups {height:100%;display:grid;grid-template-columns:72px minmax(0,1fr);min-height:0;background:#12161f;}
  .mobile-v2 .m-server-rail {display:flex;flex-direction:column;align-items:center;gap:12px;overflow:auto;overscroll-behavior:contain;background:#0c0f16;padding:17px 8px 20px;scrollbar-width:none;}
  .mobile-v2 .m-server,.mobile-v2 .m-server-add {position:relative;display:grid;place-items:center;width:49px;height:49px;min-height:49px;flex:none;border-radius:17px;color:#a9b4c7;font-size:16px;font-weight:750;}
  .mobile-v2 .m-server-image {position:relative;width:49px;height:49px;display:grid;place-items:center;overflow:hidden;border-radius:50%;transition:border-radius .16s ease;color:#eee;}
  .mobile-v2 .m-server-image img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .mobile-v2 .m-server.on .m-server-image {border-radius:15px;box-shadow:0 0 0 2px var(--amber);}
  .mobile-v2 .m-server.on::before {position:absolute;content:'';left:-11px;top:10px;bottom:10px;width:4px;background:var(--amber);border-radius:0 4px 4px 0;}
  .mobile-v2 .m-server-add {border-radius:17px;background:#18252a;color:#7ccb9d;}
  .mobile-v2 .m-server-badge {position:absolute;right:-3px;bottom:-4px;border:3px solid #0c0f16;padding:1px 4px;border-radius:11px;min-width:20px;background:var(--red);color:#fff;font-size:10px;line-height:1.4;}
  .mobile-v2 .m-server-voice {position:absolute;right:-3px;top:-5px;width:21px;height:21px;border:3px solid #0c0f16;background:#60bf86;color:#102117;border-radius:50%;display:grid;place-items:center;}
  .mobile-v2 .m-server-voice svg {width:11px;height:11px;}
  .mobile-v2 .m-server-panel {min-width:0;display:flex;flex-direction:column;overflow:hidden;border-radius:20px 0 0 0;background:#151a23;}
  .mobile-v2 .m-server-head {padding:21px 17px 16px;border-bottom:1px solid #252c38;}
  .mobile-v2 .m-server-heading {display:flex;align-items:center;gap:6px;}
  .mobile-v2 .m-server-heading h1 {min-width:0;flex:1;font-size:22px;line-height:1.25;font-weight:750;letter-spacing:-.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mobile-v2 .m-server-heading .icon-btn {width:30px;height:30px;}
  .mobile-v2 .m-server-heading .icon-btn svg {width:17px;height:17px;}
  .mobile-v2 .m-server-head p {display:flex;align-items:center;gap:5px;color:#8b98aa;font-size:11px;margin-top:10px;}
  .mobile-v2 .m-online-dot {width:5px;height:5px;border-radius:50%;background:#68c992;}
  .mobile-v2 .m-member-divider {margin:0 2px;}
  .mobile-v2 .m-server-tools {padding:13px 12px 5px;display:flex;gap:4px;align-items:center;}
  .mobile-v2 .m-server-tools .m-search {margin:0;flex:1;height:38px;border-radius:11px;padding:0 11px;}
  .mobile-v2 .m-server-tools .m-search input {font-size:13px;}
  .mobile-v2 .m-server-tools .icon-btn {width:35px;height:38px;}
  .mobile-v2 .m-channel-scroll {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 10px 24px;}
  .mobile-v2 .m-channel-category {margin:11px 0 16px;}
  .mobile-v2 .m-category-head {display:flex;align-items:center;gap:1px;min-height:39px;}
  .mobile-v2 .m-category-toggle {display:flex;align-items:center;gap:5px;text-align:left;flex:1;min-width:0;min-height:39px;font-size:10px;letter-spacing:.45px;text-transform:uppercase;font-weight:700;color:#8f9bae;}
  .mobile-v2 .m-category-toggle svg {width:12px;height:12px;}
  .mobile-v2 .m-category-toggle[aria-expanded=false] svg {transform:rotate(-90deg);}
  .mobile-v2 .m-category-head .icon-btn {width:32px;height:36px;}
  .mobile-v2 .m-category-head .icon-btn svg {width:16px;height:16px;}
  .mobile-v2 .m-text-channel {width:100%;display:flex;align-items:center;gap:9px;min-height:46px;padding:9px 9px;border-radius:9px;text-align:left;color:#99a6b9;}
  .mobile-v2 .m-text-channel .ic {width:21px;height:21px;color:#6f7c90;flex:none;}
  .mobile-v2 .m-channel-title {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;flex:1;}
  .mobile-v2 .m-text-channel.unread {font-weight:650;color:#ecf0f6;}
  .mobile-v2 .m-text-channel:active {background:#272f3e;}
  .mobile-v2 .m-channel-empty {padding:10px 9px;color:#69768c;font-size:12px;line-height:1.6;}
  .mobile-v2 .m-voice-room .chan {min-height:46px;margin:0;padding:9px 7px;border-radius:9px;font-size:14px;gap:7px;}
  .mobile-v2 .m-voice-room .chan .ic {width:20px;height:20px;color:#8e9caf;}
  .mobile-v2 .m-voice-room .chan .nm {min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-v2 .m-voice-room .voice-join-btn {min-width:42px;min-height:30px;padding:4px 7px;border-radius:8px;font-size:10px;}
  .mobile-v2 .m-voice-room .v-sitters {padding-left:28px;}
  .mobile-v2 .m-voice-room .v-sitter {min-height:33px;font-size:12px;}
  .mobile-v2 .m-voice-room .v-sitter .avatar {height:22px;width:22px;font-size:10px;}
  .mobile-v2 .m-call-strip {order:-1;display:flex;align-items:center;gap:5px;flex:none;min-height:48px;padding:3px 9px;background:#1a3028;border-bottom:1px solid #2a4a3a;}
  .mobile-v2 .m-call-open {flex:1;min-width:0;display:flex;align-items:center;text-align:left;gap:10px;color:#80d3a1;padding:4px 5px;}
  .mobile-v2 .m-call-open>span {display:flex;flex-direction:column;min-width:0;gap:2px;}
  .mobile-v2 .m-call-open strong {font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-v2 .m-call-open small {font-size:10px;color:#91aa9c;}
  .mobile-v2 .m-call-strip .icon-btn {width:36px;height:36px;color:#a9d4bb;}
  .mobile-v2 .m-call-strip .icon-btn svg {height:19px;width:19px;}
  .mobile-v2 .m-call-strip .muted,.mobile-v2 .m-call-strip .m-call-end {color:#e88d89;}
  .mobile-v2 .m-call-end svg {transform:rotate(135deg);}
  .mobile-v2 .chat-head {height:63px;min-height:63px;box-sizing:border-box;padding:5px 9px!important;gap:7px;background:#171d27;border-bottom:1px solid #29303b;}
  .mobile-v2 .chat-head .side-drawer-btn {display:none!important;}
  .mobile-v2 .chat-head .mobile-chat-back {display:grid!important;width:35px;height:42px;}
  .mobile-v2 .chat-head .avatar {width:36px;height:36px;font-size:13px;flex:none;}
  .mobile-v2 .chat-head .title {font-size:15px;min-width:0;line-height:1.35;}
  .mobile-v2 .chat-head .title .txt {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;}
  .mobile-v2 .chat-head .icon-btn {width:35px;height:40px;}
  .mobile-v2 .chat-head .icon-btn svg {width:21px;height:21px;}
  .mobile-v2 .chat-head .e2ee {font-size:0;border:0;background:none;padding:3px;width:18px;min-width:18px;}
  .mobile-v2 .chat-head .e2ee svg {width:13px;height:13px;}
  .mobile-v2 .m-direct-chat .chat-head>svg:first-of-type {display:none;}
  .mobile-v2 .m-chat-sub {display:block;font-size:10px;font-weight:400;letter-spacing:.1px;color:#8f9bac;margin-top:2px;}
  .mobile-v2 .m-direct-chat .msg .gutter {display:none;}
  .mobile-v2 .m-direct-chat .msgs {background:#10151e;background-image:radial-gradient(#ffffff05 .7px,transparent .7px);background-size:18px 18px;}
  .mobile-v2 .msgs-inner {padding:9px 9px 16px;}
  .mobile-v2 .msg {padding:1px 0;gap:7px;}
  .mobile-v2 .msg .bwrap {max-width:87%;}
  .mobile-v2 .bubble:not(.photo-bubble) {border-radius:16px;padding:9px 11px;box-shadow:0 1px 1px #0002;}
  .mobile-v2 .bubble .btxt {font-size:15px;line-height:1.45;}
  .mobile-v2 .msg.mine .bubble {border-color:#655134;}
  .mobile-v2 .msg .tm {font-family:var(--font);font-size:10px;}
  .mobile-v2 .day-sep {font-family:var(--font);font-size:11px;}
  .mobile-v2 .composer {background:#11151c;padding:6px 9px calc(7px + env(safe-area-inset-bottom,0px));}
  .mobile-v2 .composer-inner {background:#222934;box-shadow:none;border:1px solid #303846;border-radius:24px;min-height:49px;}
  .mobile-v2 .composer textarea {font-family:var(--font);font-size:15px;line-height:1.4;padding:13px 7px;}
  .mobile-v2 .composer .attach {width:39px;height:45px;}
  .mobile-v2 .composer .send {height:39px;width:39px;border-radius:50%;margin:4px;background:var(--amber);color:#241b0d;}
  .mobile-v2 .m-channel-chat .msgs {background:#151a23;}
  .mobile-v2 .m-channel-chat .chat-head .title {font-size:16px;}
  .mobile-v2 .settings-page {height:100%;background:#11151c;min-height:0;}
  .mobile-v2 .settings-content {padding:14px;min-width:0;overflow:auto;}
  .mobile-v2 .settings-content .page-inner {padding:0;max-width:none;}
  .mobile-v2 .settings-content .set-row {gap:12px;}
  .mobile-v2 .settings-content .set-card {padding:15px;border-radius:13px;background:#1b222d;}
  .mobile-v2 .settings-content select {max-width:100%;}
  .mobile-v2 .settings-nav {display:flex;overflow:auto;gap:6px;background:#161c25;border-bottom:1px solid #28313f;flex-wrap:nowrap;}
  .mobile-v2 .settings-nav-item {flex:none;font-size:12px;padding:9px 12px;border-radius:10px;}
  .mobile-v2 .settings-nav-item .ic-s {display:none;}
  .mobile-v2 .app-head {min-height:56px;padding:8px 12px;}
  .mobile-v2 .home-scroll {padding:20px 16px 24px;}
  .mobile-v2 .home-hello-txt {font-size:25px;letter-spacing:-.7px;}
  .mobile-v2 .home-grid {gap:11px;grid-template-columns:repeat(2,minmax(0,1fr));}
  .mobile-v2 .home-tile {border-radius:16px;min-height:121px;padding:17px;background:#1b222d;}
  .mobile-v2 .overlay {align-items:flex-end;padding:0;}
  .mobile-v2 .modal {width:100%;max-height:90dvh;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom,0px);}
  .mobile-v2 .modal .mh {min-height:59px;}
  .mobile-v2 .modal input {font-size:16px;}
  .mobile-v2 .ctx {max-width:calc(100vw - 24px);border-radius:15px;}
  .mobile-v2 #toasts {bottom:calc(var(--m-bottom) + 10px);}
  .mobile-v2[data-mobile-screen=conversation] #toasts {bottom:78px;}
}
@media (min-width:768px) {.m-call-strip {display:none;}}
@media (max-width:350px) {.mobile-v2 .m-groups{grid-template-columns:64px minmax(0,1fr)}.mobile-v2 .m-server-head{padding:18px 12px 13px}.mobile-v2 .m-server-heading h1{font-size:20px}.mobile-v2 .m-server-head p{font-size:10px}.mobile-v2 .chat-search-btn{display:none;}}
@media(prefers-reduced-motion:reduce){.m-server-image{transition:none!important}}
/* Profile uses a readable menu instead of squeezing eight desktop tabs into a row. */
.m-profile-detail-head,.m-profile-card,.m-setting-arrow {display:none;}
@media(max-width:767px){
  .mobile-v2 .solo-settings>.app-head {display:none;}
  .mobile-v2 .settings-page {display:flex;flex-direction:column;}
  .mobile-v2 .settings-nav {display:none;}
  .mobile-v2 .settings-content {flex:1;min-height:0;}
  .mobile-v2 .m-profile-detail-head {display:flex;align-items:center;gap:9px;min-height:60px;padding:4px 10px;background:#171d27;border-bottom:1px solid #28313f;font-size:16px;font-weight:650;}
  .mobile-v2 .m-profile-card {display:none;}
  .mobile-v2 .m-profile-overview {overflow:auto;padding:18px 16px;gap:20px;}
  .mobile-v2 .m-profile-overview .m-profile-detail-head {display:none;}
  .mobile-v2 .m-profile-overview .m-profile-card {display:flex;flex-direction:column;align-items:center;padding:17px 10px;gap:8px;}
  .mobile-v2 .m-profile-card .avatar {width:78px;height:78px;border-radius:50%;font-size:29px;margin-bottom:6px;}
  .mobile-v2 .m-profile-card h1 {font-size:24px;font-weight:750;letter-spacing:-.6px;}
  .mobile-v2 .m-profile-card p {font-size:13px;color:#8997a9;}
  .mobile-v2 .m-profile-overview .settings-content {display:none;}
  .mobile-v2 .m-profile-overview .settings-nav {display:flex;flex-direction:column;flex:none;gap:0;padding:0;overflow:visible;border:1px solid #293140;border-radius:17px;background:#1a212c;}
  .mobile-v2 .m-profile-overview .settings-nav-item {width:100%;min-height:55px;padding:12px 15px;display:flex;align-items:center;gap:13px;border-radius:0;border-bottom:1px solid #28303c;color:#d2d9e5;text-align:left;font-size:14px;font-weight:500;}
  .mobile-v2 .m-profile-overview .settings-nav-item:last-child {border:0;}
  .mobile-v2 .m-profile-overview .settings-nav-item.on {background:transparent;}
  .mobile-v2 .m-profile-overview .settings-nav-item>.ic-s {display:block;width:20px;height:20px;color:#91a0b4;}
  .mobile-v2 .m-profile-overview .settings-nav-item.danger {color:#e28e88;}
  .mobile-v2 .m-setting-arrow {display:flex;margin-left:auto;color:#6c7a8e;transform:rotate(180deg);}
  .mobile-v2 .m-setting-arrow .ic-s {display:block!important;width:14px;height:14px;}
  .mobile-v2 .chat-head .title {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;}
  .mobile-v2 .m-direct-chat .msg.other .bubble {border-left:0;}
  .mobile-v2 .msg.first {margin-top:8px;}
  .mobile-v2 .m-voice-room .voice-join-btn {background:#243d34;color:#87d5aa;border:1px solid #315943;}
  .mobile-v2 .m-voice-room .voice-join-btn.active {background:#315943;}
}
/* Attachments must fit their bubble; a 400px desktop image previously created blank horizontal space. */
@media(max-width:767px){
.mobile-v2 .chat-wrap,.mobile-v2 .chat-body{min-width:0;max-width:100%;overflow:hidden;}
.mobile-v2 .msgs{overflow-x:hidden;overscroll-behavior-x:none;touch-action:pan-y pinch-zoom;}
.mobile-v2 .msgs-inner{min-width:0;max-width:100%;}
.mobile-v2 .msg .media-img,.mobile-v2 .msg .file-card,.mobile-v2 .media-cap{min-width:0;max-width:100%;}
.mobile-v2 .msg .media-img img{display:block;max-width:100%;height:auto;object-fit:contain;}
.mobile-v2 .bubble .btxt,.mobile-v2 .bubble .btxt a{overflow-wrap:anywhere;}
.mobile-v2 .m-server-panel{touch-action:pan-y pinch-zoom;}
.mobile-v2 .m-groups,.mobile-v2 .m-channel-scroll{touch-action:pan-y pinch-zoom;}
.mobile-v2 .m-channel-chat{touch-action:pan-y pinch-zoom;}
.mobile-v2 .server-shell { position:relative;height:100%;min-height:0;overflow:hidden;background:var(--bg-rail);touch-action:pan-y pinch-zoom; }
.mobile-v2 .server-shell-channels { position:absolute;inset:0;min-width:0;overflow:hidden; }
.mobile-v2 .server-shell-chat { position:absolute;inset:0;width:100%;height:100%;background:#11151c;box-shadow:-8px 0 24px #0003;touch-action:pan-y pinch-zoom; }
.mobile-v2 .server-shell-chat.channels-open { border-radius:18px 0 0 18px;overflow:hidden; }
.mobile-v2 .server-shell .m-server-panel,.mobile-v2 .server-shell .m-channel-chat { animation:none!important; }
.mobile-v2 .server-shell-shield { position:absolute;inset:0;z-index:5;width:100%;height:100%;background:#00000018;touch-action:pan-y pinch-zoom; }
.mobile-v2 .server-shell-shield[hidden] { display:none; }
}
.mobile-v2 .msg.file-transferring .bubble { border-color: #ffffff18; }
:root[data-theme="light"].mobile-v2 .msg.file-transferring .bubble { border-color: #d3dbe5; }
@media(max-width:760px) {
  .mobile-v2 .chat-body .chat-head { background:var(--bg-main); border-bottom-color:var(--line-soft); gap:7px; }
  .mobile-v2 .chat-body .msgs { background:var(--bg-main); background-image:none; }
  .mobile-v2 .chat-body .composer { background:var(--bg-main); padding:8px 10px calc(9px + env(safe-area-inset-bottom,0px)); }
  .mobile-v2 .chat-body .composer-inner { background:var(--bg-card); border-color:var(--line); }
  .mobile-v2 .chat-body .composer-inner:focus-within { border-color:color-mix(in srgb,var(--amber) 50%,var(--line)); }
  .mobile-v2 .chat-body .msg.mine .bubble { border-color:transparent; }
  .mobile-v2 .chat-body .msg.first { margin-top:14px; }
  .mobile-v2 .chat-body .msgs-inner { padding-inline:10px; }
  .mobile-v2 .chat-body .day-sep { margin-block:16px; }
  .mobile-v2 .vstage-head .quality-control { min-width:48px; padding-inline:6px; }
}

/* Keep chat geometry constant while the channel drawer opens. */
@media(max-width:767px){
  html.mobile-v2[data-server-shell] .mobile-global-nav { position:fixed;left:0;right:0;bottom:0; }
  html.mobile-v2[data-server-shell] .server-shell-channels { padding-bottom:var(--m-bottom); }
}

/* Selection survives returning to channels or the personal chat list. */
.mobile-v2 .m-text-channel.on { background:var(--amber-dim);color:var(--text);box-shadow:inset 3px 0 var(--amber);font-weight:650; }
.mobile-v2 .m-text-channel.on .ic { color:var(--amber); }
.mobile-v2 .m-conversations .conv-row.selected { background:var(--amber-dim);box-shadow:inset 3px 0 var(--amber); }
