/* Stable App Shell geometry from v497; content remains visually card-free. */
:root{--im-subpage-bg:color-mix(in srgb,var(--accent,#4f7df3) 7%,var(--bg,#f4f7fb));--im-subpage-head:color-mix(in srgb,var(--accent,#4f7df3) 4%,var(--bg,#f4f7fb));--im-main-nav-height:40px;--im-main-nav-safe:env(safe-area-inset-bottom,0px);--im-main-nav-total:calc(var(--im-main-nav-height) + var(--im-main-nav-safe));--im-shell-gap:10px;--im-shell-inset:18px;--im-page-header-height:56px;--im-page-header-button-size:38px;--im-page-header-radius:17px;--im-page-top-safe:var(--im-pwa-status-top,env(safe-area-inset-top,0px));--im-card-radius:22px;--im-glass:rgba(255,255,255,.48);--im-glass-strong:rgba(255,255,255,.64);--im-glass-soft:rgba(255,255,255,.34);--im-glass-border:rgba(255,255,255,.62);--im-glass-shadow:0 10px 28px rgba(37,50,78,.08);--im-glass-blur:blur(20px) saturate(145%)}
:root[data-theme="dark"]{--bg:#172033;--panel:#202b40;--panel2:#29364d;--line:rgba(255,255,255,.20);--text:#f8fbff;--muted:#c3ccdc;--rail:rgba(23,32,51,.96);--sidebar:rgba(29,40,59,.96);--main:#172033;--topbar:rgba(32,43,64,.96);--composer:rgba(32,43,64,.96);--input:#2a374f;--card:#243149;--hover:#31415e;--bubble:#2a3852;--tool:#2b3a54;--avatar1:#50688f;--avatar2:#334765;--im-glass:rgba(45,58,82,.72);--im-glass-strong:rgba(53,68,95,.82);--im-glass-soft:rgba(40,53,76,.62);--im-glass-border:rgba(235,241,250,.28);--im-glass-shadow:0 10px 28px rgba(0,0,0,.20)}
html,body{height:100%;overflow:hidden;overscroll-behavior:none;margin:0!important;padding:0!important}
/* Canonical navigation header. Every viewport owns its safe inset; children only consume these shared dimensions. */
.im-app-page-head{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:var(--im-page-header-button-size) minmax(0,1fr) var(--im-page-header-button-size);align-items:center;gap:8px;min-height:var(--im-page-header-height);width:100%;margin:0 0 12px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--im-page-header-radius);background:var(--panel);color:var(--text);box-sizing:border-box;isolation:isolate}
.im-app-page-head>h2,.im-app-page-head>h3{min-width:0;margin:0;text-align:center;font-size:17px;font-weight:800;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.im-app-page-head>.im-head-spacer:first-child{grid-column:1;width:var(--im-page-header-button-size);height:var(--im-page-header-button-size)}
.im-app-page-head>.im-head-spacer:last-child{grid-column:3;width:var(--im-page-header-button-size);height:var(--im-page-header-button-size)}
.im-app-page-head>button:first-child,.im-app-page-head>button:last-child{display:grid;place-items:center;justify-self:center;min-width:var(--im-page-header-button-size);width:var(--im-page-header-button-size);height:var(--im-page-header-button-size);padding:0}
.group-settings-topbar.im-app-page-head .group-settings-x{position:static;grid-column:3;justify-self:end;width:var(--im-page-header-button-size);height:var(--im-page-header-button-size);min-height:var(--im-page-header-button-size);border-radius:12px}
#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay>.group-settings-modal{padding-top:0}
#imAppShell{--im-pwa-page-top:0px;position:fixed;inset:0;width:100vw;height:var(--im-shell-vh,100dvh);min-height:0;max-height:var(--im-shell-vh,100dvh);display:grid;grid-template-columns:74px minmax(0,1fr);grid-template-rows:minmax(0,1fr) var(--im-main-nav-total);padding:var(--im-page-top-safe) 0 0;overflow:clip;background:var(--im-surface-bg,var(--im-page-backdrop,var(--bg)));box-sizing:border-box}
@media (display-mode:browser){:root{--im-main-nav-safe:0px}}
@media (display-mode:standalone) and (max-width:850px){
  /* Only the installed mobile navigation owns this inset. Safari browser keeps its original geometry. */
  :root{--im-main-nav-safe:max(4px,calc(env(safe-area-inset-bottom,0px) - 30px))}
  /* iOS installed web apps can report a zero top inset after a resumed display.
     Keep one notch/status-bar clearance at the viewport owner, never at each child. */
  @supports (-webkit-touch-callout:none){
    :root{--im-pwa-status-top:max(52px,env(safe-area-inset-top,0px))}
    #imAppShell{padding-top:var(--im-page-top-safe)}
  }
  /* Installed iOS PWA: the sole native nav must not depend on the shell grid's
     measured height. Keep its grid row reserved for page content. */
  #imAppShell:not([data-desktop="1"]):not([data-input-keyboard="1"]) #mobileTabs{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    inset-block-start:auto;
    width:100%;
    grid-row:auto;
  }
}

html.has-chat-wallpaper #imAppShell:not([data-surface="live"]){background:var(--im-chat-wallpaper);background-position:center;background-repeat:no-repeat}
#imAppShell>.rail{grid-column:1;grid-row:1/3;min-height:0}
#imPageHost{position:relative;grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:clip;display:flex;background:transparent}
#imPageHost>.sidebar,#imPageHost>.main{position:relative;inset:auto;transform:none;transition:none;flex:1 1 0;width:100%;height:100%;min-height:0;max-height:100%;margin:0;border:0;overflow:clip;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
#imPageHost>.sidebar{display:flex;flex-direction:column}
#imPageHost>.main{display:flex;flex-direction:column}
#imAppShell #imMessagesPage[hidden],#imAppShell #main[hidden],#imAppShell #chatView[hidden],#imAppShell #panelView[hidden]{display:none!important}
#imAppShell #panelView:not([data-owner="shared-media"]){position:relative;inset:auto;flex:1 1 auto;width:100%;height:100%;min-height:0;max-height:100%;padding:0 var(--im-shell-inset) var(--im-shell-inset);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background:transparent;box-sizing:border-box}
#imAppShell #chatView{min-width:0;min-height:0;flex:1 1 auto;background:transparent}
#imAppShell #chatView>.topbar{height:var(--im-page-header-height);min-height:var(--im-page-header-height);flex:0 0 var(--im-page-header-height);padding:0 12px;border:1px solid var(--line);border-radius:var(--im-page-header-radius);background:var(--panel)}
#imAppShell #panelView.im-primary-page{display:block;padding:0 var(--im-shell-inset) var(--im-shell-inset);background:transparent}
#imAppShell #panelView:not(.im-primary-page)>.im-secondary-heading,#imAppShell #panelView:not(.im-primary-page)>.im-file-head{position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:10px;min-height:var(--im-page-header-height);margin:0 0 14px;padding:8px 10px;border:1px solid var(--line);border-radius:17px;background:var(--panel);box-sizing:border-box;isolation:isolate}
#imAppShell #panelView:not(.im-primary-page)>.im-secondary-heading{display:grid;grid-template-columns:var(--im-page-header-button-size) minmax(0,1fr) var(--im-page-header-button-size)}
#imAppShell #panelView:not(.im-primary-page)>.im-file-head.im-app-page-head{display:grid;grid-template-columns:var(--im-page-header-button-size) minmax(0,1fr) var(--im-page-header-button-size)}
#imAppShell #panelView:not(.im-primary-page)>.im-secondary-heading h2{min-width:0;text-align:center;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imAppShell #panelView[data-owner="devices"]>.im-secondary-heading{z-index:8;display:grid;grid-template-columns:var(--im-page-header-button-size) minmax(0,1fr) var(--im-page-header-button-size);gap:8px;width:100%;min-height:var(--im-page-header-height);margin:0 0 14px;padding:8px 10px;border:1px solid var(--line);border-radius:17px;background:var(--panel);box-sizing:border-box;isolation:isolate}
#imAppShell #panelView[data-owner="devices"]>.im-secondary-heading,#imAppShell #panelView[data-owner="settings"]>.im-file-head{display:grid;grid-template-columns:38px minmax(0,1fr) 38px;gap:8px;width:100%;min-height:56px}
#imAppShell #panelView[data-owner="devices"]>.im-secondary-heading h2,#imAppShell #panelView[data-owner="settings"]>.im-file-head h2{min-width:0;margin:0;font-size:17px;font-weight:800;line-height:1.25;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#imAppShell #panelView[data-owner="devices"]>.im-secondary-heading>.ghost,#imAppShell #panelView[data-owner="settings"]>.im-file-head>.ghost{width:38px;height:38px;min-width:38px;margin:0;padding:0;border:0;border-radius:12px;background:var(--panel2)}
#imAppShell #panelView[data-owner="settings"]>.im-file-head{position:sticky;top:0;z-index:8;margin:0 0 14px;padding:8px 10px;border:1px solid var(--line);border-radius:17px;background:var(--panel);isolation:isolate;box-sizing:border-box}
#imAppShell #panelView[data-owner="settings"]>.im-file-head>.im-head-spacer{width:38px;height:38px}
#imAppShell #panelView[data-owner="settings"] #settingsMenu{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0;text-align:left}
#imAppShell #panelView[data-owner="settings"] .im-settings-section{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}
#imAppShell #panelView[data-owner="settings"] .im-settings-section>h3{margin:0;padding:0 8px;font-size:13px;line-height:1.5;font-weight:700;color:var(--muted);text-align:left}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-item{min-width:0;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--panel);overflow:hidden}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-row{display:grid;grid-template-columns:42px minmax(0,1fr) 16px;align-items:center;gap:12px;width:100%;max-width:100%;min-height:66px;padding:10px 14px;border:0;text-align:left;white-space:normal;box-sizing:border-box;background:transparent;color:inherit}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-row>.mi{width:42px;height:42px;display:grid;place-items:center}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-settings-copy{display:grid;gap:3px;min-width:0;justify-items:start;align-content:center;text-align:left}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-settings-copy>.mt{display:block;width:100%;min-width:0;text-align:left;font-weight:650;white-space:normal;overflow-wrap:break-word}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-settings-copy>.small{display:block;width:100%;min-width:0;text-align:left;line-height:1.4;overflow-wrap:anywhere}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .arrow{justify-self:end}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-item.open>.im-menu-row .arrow{transform:rotate(90deg)}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-panel{margin:0;padding:14px;border-top:1px solid var(--line);background:var(--panel);text-align:left}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-panel .im-act-row{justify-content:flex-start;text-align:left}
#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-panel label,#imAppShell #panelView[data-owner="settings"] #settingsMenu .im-menu-panel p{text-align:left}
#imAppShell #panelView[data-owner="settings"] #settingsMenu [data-settings-action="devices"]{margin-top:8px}
#imAppShell .sidehead{flex:0 0 auto;margin:0 var(--im-shell-inset) 6px;padding:0 0 6px;min-height:0;background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#imAppShell .sidehead .search,#imAppShell .sidehead #search{background:rgba(255,255,255,.24);border:0;box-shadow:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#imAppShell #list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:4px var(--im-shell-inset) var(--im-shell-inset);display:grid;grid-auto-rows:max-content;gap:var(--im-shell-gap);align-content:start;overscroll-behavior:contain;background:transparent}
#imAppShell #list .chat{width:100%;min-height:72px;margin:0;padding:11px 14px;display:grid;grid-template-columns:50px minmax(0,1fr) 112px;gap:10px;align-items:center;background:transparent!important;border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--text)}
#imAppShell #list .chat>.avatar{width:50px;height:50px;min-width:50px;max-width:50px;min-height:50px;max-height:50px;flex:0 0 50px;border-radius:15px;overflow:hidden;display:grid;place-items:center;box-sizing:border-box;line-height:1}
#imAppShell #list .chat .avatar img,#imAppShell .avatar img{width:100%;height:100%;object-fit:contain;display:block}
#imAppShell #list .chat .name{font-weight:820;color:var(--text)}
#imAppShell #list .chat .preview{margin-top:2px;color:var(--muted)}
#imAppShell #list .chat:hover,#imAppShell #list .chat.active,#imAppShell #list .chat.pinned{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important}
#imAppShell #list .chat.pinned .im-chat-last-time::before{content:'🔝 ';}
:root[data-theme="dark"].has-chat-wallpaper #imAppShell #sideTitle,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #list .chat,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #list .chat .name,html.chat-wallpaper-dark #imAppShell #sideTitle,html.chat-wallpaper-dark #imAppShell #list .chat,html.chat-wallpaper-dark #imAppShell #list .chat .name,html.has-chat-wallpaper[style*="url("] #imAppShell #sideTitle,html.has-chat-wallpaper[style*="url("] #imAppShell #list .chat,html.has-chat-wallpaper[style*="url("] #imAppShell #list .chat .name{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 1px rgba(0,0,0,.95)}
:root[data-theme="dark"].has-chat-wallpaper #imAppShell #list .chat .preview,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #list .chat .im-chat-last-time,html.chat-wallpaper-dark #imAppShell #list .chat .preview,html.chat-wallpaper-dark #imAppShell #list .chat .im-chat-last-time,html.has-chat-wallpaper[style*="url("] #imAppShell #list .chat .preview,html.has-chat-wallpaper[style*="url("] #imAppShell #list .chat .im-chat-last-time{color:#f1f5f9!important;text-shadow:0 1px 2px rgba(0,0,0,.92),0 0 1px rgba(0,0,0,.95)}
:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView #chatName,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView .name,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView .bubble,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView #messageInput,html.chat-wallpaper-dark #imAppShell #chatView #chatName,html.chat-wallpaper-dark #imAppShell #chatView .name,html.chat-wallpaper-dark #imAppShell #chatView .bubble,html.chat-wallpaper-dark #imAppShell #chatView #messageInput,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView #chatName,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView .name,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView #messageInput{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 1px rgba(0,0,0,.95)}
:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView #chatStatus,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView .msgtime,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView .small,:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView .muted,html.chat-wallpaper-dark #imAppShell #chatView #chatStatus,html.chat-wallpaper-dark #imAppShell #chatView .msgtime,html.chat-wallpaper-dark #imAppShell #chatView .small,html.chat-wallpaper-dark #imAppShell #chatView .muted,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView #chatStatus,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView .msgtime{color:#f1f5f9!important;text-shadow:0 1px 2px rgba(0,0,0,.92),0 0 1px rgba(0,0,0,.95)}
:root[data-theme="dark"].has-chat-wallpaper #imAppShell #chatView #messageInput::placeholder,html.chat-wallpaper-dark #imAppShell #chatView #messageInput::placeholder,html.has-chat-wallpaper[style*="url("] #imAppShell #chatView #messageInput::placeholder{color:#e2e8f0!important;opacity:1!important;text-shadow:0 1px 2px rgba(0,0,0,.92),0 0 1px rgba(0,0,0,.95)}
#imFoldedConversationsToggle{width:28px;min-width:28px;max-width:100%;margin:0 auto -6px;padding:0;border:0;outline:0;background:transparent;box-shadow:none;color:var(--muted)}
#imFoldedConversationsToggle[open]{width:100%;margin:0 0 -6px}
#imFoldedConversationsToggle>.im-folded-summary{list-style:none;width:28px;height:18px;margin:0 auto;padding:0;display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
#imFoldedConversationsToggle>.im-folded-summary::-webkit-details-marker{display:none}
#imFoldedConversationsToggle>.im-folded-summary::marker{content:''}
#imFoldedConversationsToggle .arrow{display:block;font-size:16px;line-height:1;font-weight:700;transform:rotate(90deg);background:transparent;border:0;box-shadow:none}
#imFoldedConversationsToggle[open] .arrow{transform:rotate(-90deg)}
#imFoldedConversationsToggle .im-folded-content{display:grid;gap:2px;max-height:min(42vh,300px);overflow-y:auto;margin:3px 0 0;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-sizing:border-box}
#imFoldedConversationsToggle .im-folded-row{display:flex;align-items:center;gap:8px;min-width:0;width:100%;min-height:36px;margin:0;padding:4px 9px;border:0;border-radius:8px;box-shadow:none;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
#imFoldedConversationsToggle .im-folded-row:active{background:var(--hover)}
#imFoldedConversationsToggle .im-folded-row:disabled{opacity:.55;cursor:default}
#imFoldedConversationsToggle .im-folded-avatar{width:32px;min-width:32px;max-width:32px;height:32px;min-height:32px;max-height:32px;flex:0 0 32px;border-radius:10px;overflow:hidden}
#imFoldedConversationsToggle .im-folded-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
#imFoldedConversationsToggle .im-folded-undo{flex:none;color:var(--muted);font-size:12px;white-space:nowrap}
:root[data-theme="dark"].has-chat-wallpaper #imFoldedConversationsToggle,html.chat-wallpaper-dark #imFoldedConversationsToggle,html.has-chat-wallpaper[style*="url("] #imFoldedConversationsToggle{color:#f1f5f9;text-shadow:0 1px 2px rgba(0,0,0,.92),0 0 1px rgba(0,0,0,.95)}

.im-qr-viewer{position:fixed;inset:0;z-index:60080;display:grid;place-items:center;padding:calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px);background:rgba(8,16,30,.58);box-sizing:border-box}
.im-qr-sheet{width:min(94vw,440px);max-height:90dvh;overflow-y:auto;border-radius:20px;padding:15px;background:var(--panel,#fff);color:var(--text,#172033);box-sizing:border-box}
.im-qr-head{display:flex;align-items:center;justify-content:space-between;font-size:17px;margin-bottom:10px}
.im-qr-head button{border:0;background:transparent;color:inherit;font-size:24px;min-width:34px;min-height:34px;cursor:pointer}
.im-qr-content{display:grid;justify-items:center;gap:12px}
.im-qr-paint{width:min(100%,312px);aspect-ratio:1;display:grid;place-items:center;border-radius:16px;overflow:hidden;background:#fff;font-size:13px;color:#52627a}
.im-qr-paint canvas{width:100%;height:100%;object-fit:contain}
.im-qr-modes{display:flex;width:100%;justify-content:center;gap:7px;flex-wrap:wrap}
.im-qr-modes button{border:1px solid var(--line,#dde3ec);border-radius:12px;background:transparent;color:inherit;font-size:11px;padding:8px;cursor:pointer}
.im-qr-modes button[aria-pressed="true"]{border-color:var(--accent,#4f7df3);color:var(--accent,#4f7df3)}
.im-qr-subtitle{font-size:12px;color:var(--muted,#6b7280);text-align:center}
.im-qr-actions{display:flex;justify-content:space-evenly;width:100%;padding:5px 0}
.im-qr-actions button{border:0;background:transparent;font-size:12px;color:var(--text,#172033);min-height:36px;min-width:65px;cursor:pointer}

#imAppShell #panelView[data-owner="me"].im-primary-page{display:block;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
#imAppShell #panelView[data-owner="me"].im-primary-page::-webkit-scrollbar{display:none;width:0;height:0}
/* The iOS native viewport indicator ignores scrollbar-width:none. Keep a single scroll owner, but clip its right-edge indicator outside the existing page host. Maintain exactly the same visible content width. */
@media(pointer:coarse){
  #imAppShell:not([data-desktop="1"]) #panelView[data-owner="me"].im-primary-page{
    --im-scroll-indicator-clip:16px;
    width:calc(100% + var(--im-scroll-indicator-clip));
    padding-right:calc(var(--im-shell-inset) + var(--im-scroll-indicator-clip));
  }
}
#imAppShell #panelView[data-owner="me"].im-primary-page>#meMenu{min-height:0;overflow:visible;align-content:start}
#imAppShell #panelView[data-owner="me"].im-primary-page>.im-own-profile{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:112px minmax(0,1fr) 30px;gap:12px;align-items:stretch;min-height:112px;margin-bottom:0;padding:4px 0 var(--im-shell-gap);margin-inline:calc(-1 * var(--im-shell-inset));padding:6px var(--im-shell-inset) var(--im-shell-gap);background:color-mix(in srgb,var(--bg) 47%,transparent)!important;backdrop-filter:blur(13px);-webkit-backdrop-filter:blur(13px);isolation:isolate}
#imAppShell .im-own-avatar-button{align-self:stretch;display:block;width:112px;height:112px;min-height:112px;padding:0;border:0;background:transparent;cursor:pointer}
#imAppShell .im-own-profile-avatar{display:grid;place-items:center;width:112px!important;height:112px!important;min-width:112px!important;max-width:112px!important;min-height:112px!important;max-height:112px!important;border-radius:18px!important;overflow:hidden}
#imAppShell .im-own-profile-avatar img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;display:block!important}
#imAppShell .im-own-details{display:grid;grid-template-rows:minmax(24px,auto) minmax(19px,auto) minmax(22px,auto) minmax(18px,auto);align-content:space-between;min-height:112px;gap:1px;min-width:0}
#imAppShell .im-own-details button,#imAppShell .im-own-qr{border:0;padding:0;background:transparent;color:var(--text);text-align:left;cursor:pointer;font:inherit;min-width:0}
#imAppShell .im-own-details [data-im-own-field]{display:block;width:fit-content;max-width:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;outline:0;color:var(--text);font-family:inherit;line-height:1.35;box-sizing:border-box;caret-color:var(--accent);cursor:text;user-select:text;-webkit-user-select:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imAppShell .im-own-details [data-im-own-field]:focus{border:0;outline:0;background:none;box-shadow:none}
#imAppShell .im-own-details [data-im-own-field]:empty::before{content:attr(data-placeholder);color:var(--muted);opacity:.8}
#imAppShell .im-own-name{font-size:18px!important;font-weight:850!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imAppShell .im-own-levels{position:relative;display:flex;align-items:center;gap:8px;min-height:19px}
#imAppShell .im-level-info{position:absolute;top:calc(100% + 5px);left:0;z-index:8;width:max-content;max-width:min(260px,75vw);padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);font-size:11px;line-height:1.4;white-space:normal;box-shadow:0 6px 18px rgba(0,0,0,.13)}
#imAppShell .im-level-info[hidden]{display:none}
#imAppShell .im-own-level{font-size:12px!important;font-weight:800!important;color:var(--accent)!important;line-height:18px;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;touch-action:manipulation}
#imAppShell .im-own-id{font-size:16px!important;font-weight:800!important;letter-spacing:2px;touch-action:manipulation}
#imAppShell .im-own-details .im-own-signature{display:inline-block;width:fit-content;max-width:min(100%,14em);font-size:12px!important;color:var(--muted)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#imAccountCenter .acct-inline-basics{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:7px 0}
#imAccountCenter .acct-inline-basics input.acct-inline-basic{display:inline-block;align-self:flex-start;width:fit-content;max-width:100%;min-width:6ch;field-sizing:content;margin:0;padding:3px 0;border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent;color:var(--text);box-shadow:none;outline:0;font-size:14px;line-height:1.35}
#imAccountCenter .acct-inline-basics input.acct-inline-basic:focus{border-bottom-color:var(--accent)}
#imAppShell .im-own-right{align-self:stretch;justify-self:end;display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:30px;min-height:112px}
#imAppShell .im-own-qr{align-self:center;justify-self:center;width:30px;height:34px;display:grid;place-items:center;color:var(--muted)}
#imAppShell .im-own-switch{width:30px;height:30px;min-height:30px;display:grid;place-items:center;box-sizing:border-box;padding:0;border:3px solid transparent;border-radius:50%;background:linear-gradient(var(--panel),var(--panel)) padding-box,conic-gradient(#e63b48,#ffb44b,#66d471,#49aaff,#8355e8,#e94ab6,#e63b48) border-box;color:var(--accent);font-size:21px;font-weight:850;line-height:1;cursor:pointer}
#imAppShell .im-own-followers{width:30px;min-height:30px;border:0;background:transparent;color:var(--text);display:grid;gap:0;justify-items:center;align-content:center;padding:0;cursor:pointer;font-size:10px;line-height:1.1}
#imAppShell .im-own-followers b{font-size:11px;max-width:32px;overflow:hidden;text-overflow:ellipsis}
#imAppShell .im-own-followers small{font-size:10px;color:var(--muted)}
#imAppShell .im-own-qr svg{display:block}
#imAppShell .im-primary-page .primarymenu,#imAppShell .im-primary-page #meMenu{display:grid;grid-template-columns:1fr;gap:var(--im-shell-gap);margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:visible}
#imAppShell .im-primary-page .primarymenu>button,#imAppShell .im-primary-page .im-menu-row{width:100%;min-height:72px;max-height:none;margin:0;padding:11px 14px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;overflow:hidden;font:inherit;cursor:pointer;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--text)}
#imAppShell .im-primary-page .im-menu-item{width:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
#imAppShell .im-primary-page .im-menu-panel{margin:7px 0 0;padding:12px 13px;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#imAppShell .im-primary-page .mi{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:transparent;font-size:22px;border:0;box-shadow:none}
:root[data-theme="dark"] #imAppShell .im-primary-page .mi{background:transparent}
#imAppShell .im-primary-page .mt{min-width:0;font-size:16px;font-weight:820;color:var(--text)}
#imAppShell #panelView[data-owner="me"] #meMenu>button[data-im-logout]{min-height:60px}
#imAppShell #panelView[data-owner="me"] #meMenu>button[data-im-logout] .mt{color:var(--danger,#c6283c)}
#imAppShell .im-primary-page .arrow{margin-left:auto;font-size:22px;line-height:1;color:var(--muted);font-weight:800;transition:transform .16s;background:transparent;border:0;box-shadow:none}
#imAppShell .im-primary-page .im-menu-item.open>.im-menu-row .arrow{transform:rotate(90deg)}
:root[data-theme="dark"] #imAppShell .im-primary-page .primarymenu>button,:root[data-theme="dark"] #imAppShell .im-primary-page .im-menu-row,:root[data-theme="dark"] #imAppShell .im-primary-page .mt{color:#f8fbff!important}
:root[data-theme="dark"] #imAppShell .im-primary-page .arrow,:root[data-theme="dark"] #imAppShell .im-primary-page .muted,:root[data-theme="dark"] #imAppShell .im-primary-page small,:root[data-theme="dark"] #imAppShell .im-primary-page .im-menu-panel{color:#cbd5e1!important}
#imAppShell .im-primary-page>.card,#imAppShell .im-primary-page .card{margin-bottom:var(--im-shell-gap);background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--text)}
#imAppShell #panelView input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([data-im-own-field]):not(.acct-inline-basic),#imAppShell #panelView textarea,#imAppShell #panelView select{background:rgba(255,255,255,.24);border:0;color:var(--text);box-shadow:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#imAppShell #mobileTabs{grid-column:2;grid-row:2;position:relative;inset:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;height:var(--im-main-nav-total);min-height:0;max-height:var(--im-main-nav-total);margin:0;padding:1px 8px var(--im-main-nav-safe);border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;z-index:50000;overflow:hidden;box-sizing:border-box;box-shadow:none}
#imAppShell #mobileTabs .mobiletab{position:relative;height:38px;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;text-decoration:none;color:var(--text);font-size:10px;line-height:1;cursor:pointer;opacity:.76}
#imAppShell #mobileTabs .tabicon{display:grid;place-items:center;width:21px;height:21px}
#imAppShell #mobileTabs .tabicon img{width:20px;height:20px;display:block;object-fit:contain}
#imAppShell #mobileTabs .mobiletab>span:last-child{font-size:10px;line-height:1;font-weight:500}
#imAppShell #mobileTabs .mobiletab.active{opacity:1;background:transparent!important}
#imAppShell #mobileTabs .mobiletab.active>span:last-child{font-weight:700}
#imAppShell #mobileTabs .mobiletab::after{display:none;content:''}
#imAppShell #mobileTabs .mobiletab.active::after{display:block;position:absolute;left:50%;bottom:0;width:22px;height:2px;border-radius:999px;background:var(--accent,#4f7df3);transform:translateX(-50%);pointer-events:none}
nav.mobiletabs:not(#mobileTabs),body:not(.im-role-page) nav.im-main-nav:not(#mobileTabs),.im-main-nav-root:not(#mobileTabs){display:none!important}
/* Modal navigation is owned by the App Shell. Derive blocking state from active
   surfaces; closing them restores the nav without separate event flags. */
body:has(> .im-fullpage:not([hidden])) #imAppShell #mobileTabs,
body:has(.screen.show) #imAppShell #mobileTabs,
body:has(> .im-conv-inline-menu) #imAppShell #mobileTabs,
body:has(.sm-comment-sheet[data-open="1"]:not([hidden])) #imAppShell #mobileTabs,
body:has(.sm-share-sheet[data-open="1"]:not([hidden])) #imAppShell #mobileTabs,
body:has(dialog[open]) #imAppShell #mobileTabs,
body:has(> #imAlbumViewer) #imAppShell #mobileTabs,
body:has(> #imChannelImageViewer) #imAppShell #mobileTabs,
body:has(> #imMomentMediaViewer) #imAppShell #mobileTabs,
body:has(> #imPlatformPopup) #imAppShell #mobileTabs{visibility:hidden!important;pointer-events:none!important}

body.imcall-active #imAppShell{grid-template-rows:minmax(0,1fr) 0}
body.imcall-active #imAppShell #mobileTabs{display:none!important}
body.chat-detail #imPageHost>.sidebar{flex:0 0 330px;border-right:1px solid var(--line)}
body.chat-detail #imPageHost>.main{flex:1 1 0}
@media(max-width:850px),(orientation:landscape) and (max-height:600px) and (pointer:coarse){
  #imAppShell{grid-template-columns:minmax(0,1fr)}
  #imAppShell>.rail{display:none}
  #imPageHost,#imAppShell #mobileTabs{grid-column:1}
  body.chat-detail #imPageHost>.sidebar{display:none}
  #imAppShell #chatView>.topbar{height:var(--im-page-header-height);min-height:var(--im-page-header-height);flex:0 0 var(--im-page-header-height);padding:0 10px}
  /* The root owns safe-area-inset-top. Child headers only receive content spacing. */
  #imAppShell:not([data-desktop="1"]) .sidehead{margin-top:var(--im-pwa-page-top);padding-top:0}
  #imAppShell:not([data-desktop="1"]) #panelView:not([data-owner="shared-media"]){padding-top:var(--im-pwa-page-top)}
  #imAppShell:not([data-desktop="1"]) #panelView.im-primary-page{padding-top:var(--im-pwa-page-top)}
  #imAppShell[data-input-keyboard="1"]:not([data-desktop="1"]){grid-template-rows:minmax(0,1fr) 0}
  #imAppShell[data-input-keyboard="1"] #mobileTabs{display:none!important}
  /* Preserve the original single wallpaper canvas. The chat occupies the
     visual viewport via grid padding rather than a transformed compositor layer;
     Safari should measure the focused composer at its actual layout position. */
  html.has-chat-wallpaper #imAppShell[data-chat-keyboard="1"]:not([data-desktop="1"]){
    height:var(--im-wallpaper-vh,100dvh);
    max-height:var(--im-wallpaper-vh,100dvh);
    padding-top:calc(var(--im-pwa-status-top,env(safe-area-inset-top,0px)) + var(--im-keyboard-top,0px));
    grid-template-rows:minmax(0,calc(var(--im-shell-vh) - var(--im-pwa-status-top,env(safe-area-inset-top,0px)))) 0;
  }

}
#imAppShell #imPageHost [hidden]{display:none!important}
html body #imAppShell[data-viewport-lock]{height:var(--im-locked-vh);max-height:var(--im-locked-vh);grid-template-rows:minmax(0,1fr) var(--im-main-nav-total)}


/* Secondary surfaces inherit the selected app theme; primary wallpaper UI above is untouched. */
#imAppShell #panelView:not(.im-primary-page),#imAppShell #panelView:not(.im-primary-page) .modal,#imAppShell #panelView:not(.im-primary-page) .sheet,#imAppShell #panelView:not(.im-primary-page) .panel{color:var(--text)!important;background-color:var(--im-subpage-bg)!important}
#imAppShell #panelView:not(.im-primary-page) .card,#imAppShell #panelView:not(.im-primary-page) .field,#imAppShell #panelView:not(.im-primary-page) input:not(.acct-inline-basic),#imAppShell #panelView:not(.im-primary-page) textarea,#imAppShell #panelView:not(.im-primary-page) select{color:var(--text)!important;background-color:var(--panel)!important;border-color:var(--line)!important}
/* Device page: full-width rounded sections; compact actions inside. */
#imAppShell #panelView[data-owner="devices"] .im-device-center{display:flex;flex-direction:column;gap:12px;width:100%;max-width:none;margin:0;padding:0}
#imAppShell #panelView[data-owner="devices"] .im-device-section{width:100%;max-width:none;margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:var(--panel);box-sizing:border-box;overflow:hidden}
#imAppShell #panelView[data-owner="devices"] .im-device-row{width:100%;padding:8px 0;border-bottom:1px solid var(--line);box-sizing:border-box}
#imAppShell #panelView[data-owner="devices"] .im-device-row:last-of-type{border-bottom:0}
#imAppShell #panelView[data-owner="devices"] .im-device-section,#imAppShell #panelView[data-owner="devices"] #acctDevices,#imAppShell #panelView[data-owner="devices"] .im-device-row{text-align:center}
#imAppShell #panelView[data-owner="devices"] .im-device-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
#imAppShell #panelView[data-owner="devices"] .im-device-row [data-device-expand]{margin-inline:auto;justify-content:center!important;text-align:center!important;width:fit-content!important;max-width:100%;flex-wrap:wrap}
#imAppShell #panelView[data-owner="devices"] .im-device-row [data-device-detail]{width:100%;text-align:center}
#imAppShell #panelView[data-owner="devices"] #acctKeepDevice,#imAppShell #panelView[data-owner="devices"] #acctDeviceStorageClear,#imAppShell #panelView[data-owner="devices"] [data-del-device]{display:inline-flex!important;align-items:center;justify-content:center;width:fit-content!important;max-width:100%;margin-inline:auto;text-align:center}
#imAppShell #panelView[data-owner="devices"] #acctDeviceStorageUsage,#imAppShell #panelView[data-owner="devices"] #acctDeviceStorageNote{text-align:center}

#imAppShell #panelView[data-owner="devices"] .im-device-row [data-device-expand]{max-width:240px}
#imAppShell #panelView[data-owner="devices"] #acctKeepDevice,#imAppShell #panelView[data-owner="devices"] #acctDeviceStorageClear{max-width:180px}

#imAppShell #panelView:not(.im-primary-page) button:not(.danger):not(.primary){color:var(--text)}

/* One avatar shape/crop everywhere; each surface may keep its own semantic size. */
#imAppShell .avatar:not(.im-own-profile-avatar),#imAppShell .sm-ava,#imAppShell .member-avatar,#imAppShell .memberAvatar,#imAppShell [data-member-avatar]{width:50px!important;height:50px!important;min-width:50px;flex:0 0 50px;border-radius:15px!important;overflow:hidden!important}
#imAppShell .avatar:not(.im-own-profile-avatar) img,#imAppShell .sm-ava img,#imAppShell .member-avatar img,#imAppShell .memberAvatar img,#imAppShell [data-member-avatar] img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;display:block!important}

/* Logout is text-only, centered, and never rendered as a card/button box. */
#imAccountInlineLogout,.im-account-actions{text-align:center!important;background:transparent!important;border:0!important;box-shadow:none!important}
#imAccountInlineLogout,.im-account-actions [data-im-logout]{display:inline-block!important;width:auto!important;min-height:0!important;max-width:none!important;margin:18px auto 8px!important;padding:8px 12px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--danger)!important;text-align:center!important;font-weight:850!important}

/* Media tabs stay tactile while their single owner refreshes cached/network data. */
#imAppShell .sm-tab,#imAppShell .sm-feed-modes button{transition:transform .12s ease,opacity .12s ease,color .12s ease,border-color .12s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation;will-change:transform}
#imAppShell .sm-tab:active,#imAppShell .sm-feed-modes button:active{transform:scale(.94);opacity:1!important}
#imAppShell .sm-tab.on,#imAppShell .sm-feed-modes button.on{transform:translateZ(0);opacity:1}

/* Conversation avatar invariant: one size, one crop, one corner radius. */

/* Nearby surface: loaded before the first navigation frame. */
#panelView[data-owner="nearby"]{padding:0!important;overflow:hidden!important}.im-nearby-map-page{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--main)}.im-nearby-map-head{display:flex;align-items:center;gap:8px;padding:var(--im-pwa-page-top,10px) 10px 8px;flex:0 0 auto}.im-nearby-map-head b{flex:1;font-size:17px}.im-nearby-map-head button{height:34px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font-size:12px;font-weight:700}.im-nearby-map-wrap{position:relative;flex:1;min-height:300px;margin:0 8px 8px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:#111}.im-nearby-tiles{position:absolute;inset:0;overflow:hidden;background:#111}.im-nearby-tiles img{position:absolute;width:256px;height:256px;max-width:none;border:0;border-radius:0;pointer-events:none;user-select:none}.im-nearby-marker{position:absolute;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;border:3px solid #fff;background:#4f7df3;box-shadow:0 5px 18px rgba(0,0,0,.32);overflow:hidden;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:900;z-index:4}.im-nearby-marker.me{border-color:#53c26b}.im-nearby-marker.on{box-shadow:0 0 0 4px rgba(255,79,135,.35),0 5px 18px rgba(0,0,0,.32)}.im-nearby-marker img{width:100%;height:100%;object-fit:cover}.im-nearby-bottom{display:flex;align-items:center;gap:8px;padding:8px 10px 2px;flex:0 0 auto}.im-nearby-distance{min-width:0;flex:1;font-size:13px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-nearby-bottom button{height:34px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font-size:12px;font-weight:750}.im-nearby-credit{font-size:8px;color:var(--muted);opacity:.45;text-align:right;padding:0 10px 6px}

/* Attendance remains one native group settings page. */
#imAppShell .group-work-return{display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;margin-bottom:6px;font-size:12px}
#imAppShell .group-work-tabs{display:flex;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:8px 0;margin:6px 0 8px}
#imAppShell .group-work-tabs::-webkit-scrollbar{display:none}
#imAppShell .group-work-tabs>button{flex:0 0 auto;min-width:0;min-height:34px;padding:7px 11px;border:1px solid var(--line);border-radius:9px;background:var(--panel);white-space:nowrap;font-size:12px}
#imAppShell .group-work-tabs>button.on{color:var(--accent);border-color:var(--accent);font-weight:800}
/* Group settings remain inside the existing chat surface; never cover the App Shell's single navigation row. */
#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay{position:absolute;inset:0;z-index:120;display:block;max-height:100%;margin:0;padding:0 max(12px,env(safe-area-inset-right)) 18px max(12px,env(safe-area-inset-left));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--im-subpage-bg);color:var(--text);box-sizing:border-box}
#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay>.modal,#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay>.im-group-settings-subpage>.modal{width:min(100%,540px);max-width:540px;max-height:none;margin:0 auto;box-sizing:border-box}
#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay>.group-settings-modal[hidden]{display:none!important}
#imAppShell #imPageHost #imGroupModal.im-group-chat-overlay>.im-group-settings-subpage{min-height:0}
#imAppShell #imPageHost #imBotCenter.im-bot-group-inline{position:absolute;inset:0;z-index:121;overflow-y:auto;max-height:100%;-webkit-overflow-scrolling:touch}
#imAppShell #imPageHost #imBotCenter.im-bot-group-inline .bc-sheet{min-height:100%;height:auto;padding-bottom:18px}


/* Desktop window layout. Mobile App Shell rules and original chat DOM are unchanged. */
#imAppShell[data-desktop="1"]{max-width:1920px!important;width:100%!important;left:0!important;right:0!important;margin-inline:auto!important;grid-template-columns:64px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;padding:0!important;--im-desktop-list-width:330px;--im-shell-inset:12px;background:var(--bg)}
#imAppShell .rail .im-desktop-only{display:none}
#imAppShell[data-desktop="1"]>.rail{display:flex!important;grid-column:1!important;grid-row:1!important;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;gap:clamp(0px,.45vh,4px);padding:8px 6px;background:var(--rail);border-right:1px solid var(--line);overscroll-behavior:contain}
#imAppShell[data-desktop="1"]>.rail .im-desktop-only{display:grid!important;place-items:center}
#imAppShell[data-desktop="1"]>.rail .navbtn[hidden]{display:none!important}
#imAppShell[data-desktop="1"] #momentShotBtn{display:none!important}
#imAppShell[data-desktop="1"]>.rail .brand{width:42px;height:42px;flex:0 0 auto;margin:2px 0 5px}
#imAppShell[data-desktop="1"]>.rail .navbtn{width:44px;height:clamp(30px,4.8vh,42px);min-height:30px;flex:0 0 auto;border-radius:12px}
#imAppShell[data-desktop="1"]>.rail .navbtn.active{background:var(--hover)}
#imAppShell[data-desktop="1"] #mobileTabs{display:none!important}
#imAppShell[data-desktop="1"] #imPageHost{display:grid!important;grid-column:2!important;grid-row:1!important;grid-template-columns:var(--im-desktop-list-width,330px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-width:0;height:100%;overflow:hidden}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar{grid-column:1;grid-row:1;width:auto!important;min-width:0;max-width:none;flex:none!important;display:flex!important;background:var(--sidebar);border-right:1px solid var(--line);overflow:hidden}
#imAppShell[data-desktop="1"] #imPageHost>.main{grid-column:2;grid-row:1;width:auto!important;min-width:0;max-width:none;flex:none!important;background:var(--main);overflow:hidden}
#imAppShell[data-desktop="1"] #imPageHost[data-surface="panel"],#imAppShell[data-desktop="1"] #imPageHost[data-surface="moments"],#imAppShell[data-desktop="1"] #imPageHost[data-surface="favorites"],#imAppShell[data-desktop="1"] #imPageHost[data-surface="live"]{grid-template-columns:minmax(0,1fr)}
#imAppShell[data-desktop="1"] #imPageHost[data-surface="panel"]>.main,#imAppShell[data-desktop="1"] #imPageHost[data-surface="moments"]>.main,#imAppShell[data-desktop="1"] #imPageHost[data-surface="favorites"]>.main{grid-column:1}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar .sidehead{margin:0;padding:17px 16px 11px;border-bottom:1px solid var(--line)}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar .sidehead .title{font-size:18px;min-height:32px;gap:6px}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar .sidehead .groupQuick{height:30px;min-height:30px;padding:0 8px;font-size:12px}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar .sidehead .add{width:30px;height:30px;flex:0 0 30px}
#imAppShell[data-desktop="1"] #imPageHost>.sidebar #search{height:38px;margin-top:12px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:var(--input);backdrop-filter:none;-webkit-backdrop-filter:none;font-size:13px}
#imAppShell[data-desktop="1"] #imPageHost #list{display:block!important;overflow-y:auto;overflow-x:hidden;min-height:0;padding:4px 0 12px;scrollbar-width:thin;overscroll-behavior:contain}
#imAppShell[data-desktop="1"] #imPageHost #list .chat{min-height:72px;padding:9px 14px;grid-template-columns:50px minmax(0,1fr) 120px;gap:10px;border-radius:0!important;margin:0;background:transparent!important}
#imAppShell[data-desktop="1"] #imPageHost #list .chat>.avatar{width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;max-width:50px;border-radius:15px!important;flex-basis:50px!important}
#imAppShell[data-desktop="1"] #imPageHost #list .chat:hover{background:var(--hover)!important}
#imAppShell[data-desktop="1"] #imPageHost #list .chat.active{background:color-mix(in srgb,var(--accent) 12%,var(--sidebar))!important}
#imAppShell[data-desktop="1"] #imPageHost #list .chat .name{font-size:14px;font-weight:700}
#imAppShell[data-desktop="1"] #imPageHost #list .chat .preview{font-size:12px;margin-top:3px}
#imAppShell[data-desktop="1"] #chatView{height:100%!important;max-height:100%;background:var(--main)}
#imAppShell[data-desktop="1"] #chatView>.topbar{height:60px;min-height:60px;flex:0 0 60px;padding:0 20px;border-bottom:1px solid var(--line);background:var(--topbar);gap:12px}
#imAppShell[data-desktop="1"] #chatView .topbar .pname{font-size:15px}
#imAppShell[data-desktop="1"] #chatView .topbar .status{font-size:11px}
#imAppShell[data-desktop="1"] #chatView .topbar .iconbtn{width:34px;height:34px;border:0;border-radius:8px;background:transparent;box-shadow:none}
#imAppShell[data-desktop="1"] #chatView .topbar .iconbtn:hover{background:var(--hover)}
#imAppShell[data-desktop="1"] #chatView #messages{padding:20px clamp(16px,4vw,58px);gap:10px;overscroll-behavior:contain}
#imAppShell[data-desktop="1"] #chatView .msg{max-width:min(730px,82%)}
#imAppShell[data-desktop="1"] #chatView .bubble{border-radius:11px 11px 11px 3px;box-shadow:none;font-size:14px;line-height:1.5}
#imAppShell[data-desktop="1"] #chatView .me .bubble{border-radius:11px 11px 3px 11px}
#imAppShell[data-desktop="1"] #chatView .composer{border-top:1px solid var(--line);background:var(--composer);padding:12px 18px 14px;flex:0 0 auto;min-height:78px}
#imAppShell[data-desktop="1"] #chatView .inputrow{max-width:1100px;margin:0 auto}
#imAppShell[data-desktop="1"] #chatView #messageInput{font-size:14px;line-height:1.5;min-height:38px}
#imAppShell[data-desktop="1"] #chatView[data-desktop-empty]>.topbar,#imAppShell[data-desktop="1"] #chatView[data-desktop-empty]>.composer,#imAppShell[data-desktop="1"] #chatView[data-desktop-empty]>#imChatBottom{display:none!important}
#imAppShell[data-desktop="1"] #chatView[data-desktop-empty] #messages{align-items:center;justify-content:center}
#imAppShell[data-desktop="1"] #chatView [data-im-desktop-empty]{font-size:14px;color:var(--muted);letter-spacing:.03em}
#imAppShell[data-desktop="1"] #imDesktopBack{display:none;align-items:center;justify-content:center;width:34px;height:34px;padding:0;flex:0 0 34px;font-size:29px;line-height:1;border-radius:9px}
@media(max-width:767px){
 #imAppShell[data-desktop="1"] #imPageHost{grid-template-columns:minmax(0,1fr)}
 #imAppShell[data-desktop="1"] #imPageHost[data-surface="chat"]>.sidebar{display:none!important}
 #imAppShell[data-desktop="1"] #imPageHost[data-surface="messages"]>.main{display:none!important}
 #imAppShell[data-desktop="1"] #imPageHost[data-surface="messages"]>.sidebar{display:flex!important;grid-column:1}
 #imAppShell[data-desktop="1"] #imPageHost[data-surface="chat"]>.main{grid-column:1}
 #imAppShell[data-desktop="1"] #chatView #imDesktopBack{display:flex}
 #imAppShell[data-desktop="1"] #chatView>.topbar{padding:0 10px;height:56px;min-height:56px;flex-basis:56px}
 #imAppShell[data-desktop="1"] #chatView>.topbar .actions{gap:2px}
}
@media(max-height:580px){
 #imAppShell[data-desktop="1"]>.rail{gap:0;padding:5px 4px}
 #imAppShell[data-desktop="1"]>.rail .navbtn{height:37px}
 #imAppShell[data-desktop="1"] #chatView>.topbar{height:52px;min-height:52px;flex-basis:52px}
}

#imAppShell[data-desktop="1"]>.rail .navbtn{color:var(--muted)!important}
#imAppShell[data-desktop="1"]>.rail .navbtn.active{color:var(--accent)!important}
#imAppShell[data-desktop="1"]>.rail .navbtn:hover{color:var(--text)!important}
#imAppShell[data-desktop="1"]>.rail .navglyph,#imAppShell[data-desktop="1"]>.rail .navglyph svg{display:grid;place-items:center;width:22px;height:22px}


#imMessagesPage #list[hidden],#imMessagesPage #imSiteSearchResults[hidden]{display:none!important}
#imMessagesPage #imSiteSearchResults{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px var(--im-shell-inset,12px) 24px;display:grid;align-content:start;gap:4px}
#imMessagesPage .im-site-search-row{display:flex;align-items:center;gap:12px;min-height:62px;padding:8px 7px;min-width:0;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--text);text-align:left;cursor:pointer}
#imMessagesPage .im-site-search-cover{width:50px;height:50px;flex:0 0 50px;display:grid;place-items:center;overflow:hidden;border-radius:15px;background:var(--panel2);color:var(--accent);font-size:21px}
#imMessagesPage .im-site-search-cover img,#imMessagesPage .im-site-search-cover .avatar{width:100%;height:100%;object-fit:contain;object-position:center;border-radius:inherit}
#imMessagesPage .im-site-search-detail{display:flex;flex-direction:column;min-width:0;gap:4px}
#imMessagesPage .im-site-search-detail strong{font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#imMessagesPage .im-site-search-detail small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imMessagesPage .im-site-search-empty{padding:18px 4px;color:var(--muted);font-size:13px}

/* Files own their own sticky album header and decoded media nodes. */
#imAppShell #panelView[data-owner="files"]{padding:0}
.im-developer-app-row{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;align-items:center;gap:10px!important;min-width:0}
.im-developer-app-row .im-developer-app-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;min-width:0}
.im-developer-app-row .im-developer-app-actions>.im-act{min-width:0;padding:7px 4px;white-space:nowrap}
@media(max-width:850px){#imAppShell:not([data-desktop="1"]) #panelView[data-owner="files"]{padding:0}}


/* Canonical bot-center styles: loaded with the App Shell, never inserted at runtime. */
/* Canonical Bot Center: one responsive surface, theme-native, original data/actions. */
#imBotCenter{position:fixed;inset:0;z-index:50040;height:100dvh;box-sizing:border-box;padding-top:var(--im-page-top-safe);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--im-subpage-bg,var(--bg));color:var(--text)}
#imBotCenter .bc-sheet{width:min(850px,100%);min-height:100%;margin:0 auto;padding:0 clamp(12px,3vw,28px) max(22px,env(safe-area-inset-bottom));box-sizing:border-box}
#imBotCenter .bc-head{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:var(--im-page-header-button-size) minmax(0,1fr) var(--im-page-header-button-size);align-items:center;gap:8px;min-height:var(--im-page-header-height);padding:8px 10px;border:1px solid var(--line);border-radius:var(--im-page-header-radius);background:var(--panel)}
#imBotCenter.im-bot-group-inline{height:100%;padding-top:0}
#imBotCenter .bc-head h2{margin:0;font-size:17px;font-weight:800;text-align:center;letter-spacing:.1px;color:var(--text)}
#imBotCenter .bc-head button{display:grid;place-items:center;width:var(--im-page-header-button-size);height:var(--im-page-header-button-size);min-height:var(--im-page-header-button-size);margin:0;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font-size:24px}
#imBotCenter #bcBody{width:100%;max-width:100%;min-width:0;padding:9px 0 26px}
#imBotCenter .bc-card{min-width:0;margin:10px 0;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 3px 14px rgba(19,34,68,.035)}
#imBotCenter .bc-row{display:flex;align-items:center;gap:10px;min-width:0}
#imBotCenter .bc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#imBotCenter .bc-stack{display:grid;gap:13px}
#imBotCenter .bc-stack>label{min-width:0;display:grid;gap:7px;font-size:13px;font-weight:700;color:var(--text)}
#imBotCenter .bc-stack>label>input,#imBotCenter .bc-stack>label>select,#imBotCenter .bc-stack>label>textarea{font-weight:450}
#imBotCenter input:not([type="checkbox"]):not([type="file"]),#imBotCenter textarea,#imBotCenter select{width:100%;min-width:0;max-width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--panel2);color:var(--text);font:inherit;font-size:14px;outline-offset:2px}
#imBotCenter input:not([type="checkbox"]):not([type="file"]),#imBotCenter select{min-height:43px}
#imBotCenter textarea{min-height:92px;resize:vertical;line-height:1.55}
#imBotCenter input:focus-visible,#imBotCenter select:focus-visible,#imBotCenter textarea:focus-visible,#imBotCenter button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#imBotCenter button{min-height:38px;border:0;border-radius:11px;padding:8px 13px;background:var(--panel2);color:var(--text);font:inherit;font-size:13px;font-weight:750;cursor:pointer}
#imBotCenter button:disabled{opacity:.55;cursor:not-allowed}
#imBotCenter .bc-primary{background:var(--accent);color:#fff}
#imBotCenter .bc-ghost{background:color-mix(in srgb,var(--accent) 7%,var(--panel2));color:var(--text)}
#imBotCenter .bc-danger{background:color-mix(in srgb,var(--danger,#e94f64) 9%,var(--panel));color:var(--danger,#e94f64);border:1px solid color-mix(in srgb,var(--danger,#e94f64) 24%,var(--line))}
#imBotCenter .bc-title{margin:0 0 12px;font-size:15px;font-weight:800;color:var(--text)}
#imBotCenter .bc-small{font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
#imBotCenter .bc-bots{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0 0 2px;align-items:center}
#imBotCenter .bc-bots::-webkit-scrollbar{display:none}
#imBotCenter .bc-bot-chip{flex:0 0 auto;min-height:38px;border:1px solid var(--line);border-radius:999px;padding:7px 14px;white-space:nowrap;background:var(--panel2);color:var(--text)}
#imBotCenter .bc-bot-chip.on{background:var(--accent);color:#fff;border-color:var(--accent)}
#imBotCenter #bcNewBot{white-space:nowrap;flex:0 0 auto;min-height:38px}
#imBotCenter .bc-avatar{width:66px;height:66px;min-width:66px;flex:0 0 66px;border-radius:19px;background:var(--panel2);display:grid;place-items:center;overflow:hidden;font-weight:800;color:var(--accent)}
#imBotCenter .bc-avatar img{width:100%;height:100%;display:block;object-fit:contain;object-position:center}
#imBotCenter .bc-profile-copy{flex:1;min-width:0}
#imBotCenter .bc-profile-name{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#imBotCenter .bc-profile-name>b{font-size:19px;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imBotCenter .bc-status{display:inline-flex;align-items:center;gap:4px;min-height:22px;padding:3px 9px;border-radius:999px;background:color-mix(in srgb,var(--ok,#1fa968) 11%,var(--panel));color:var(--ok,#1fa968);font-size:11px;font-weight:750}
#imBotCenter .bc-status[data-state="busy"]{background:color-mix(in srgb,#bf8519 12%,var(--panel));color:#b17b1b}
#imBotCenter .bc-status[data-state="error"]{background:color-mix(in srgb,var(--danger,#e94f64) 12%,var(--panel));color:var(--danger,#e94f64)}
#imBotCenter .bc-profile-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:11px}
#imBotCenter .bc-profile-actions label{display:inline-flex;align-items:center;justify-content:center;min-height:38px;border:1px solid var(--line);border-radius:11px;padding:8px 12px;background:var(--panel2);color:var(--text);font-size:13px;font-weight:750;cursor:pointer}
#imBotCenter .bc-tabs{display:flex;align-items:center;gap:8px;margin:14px 0 12px;padding:1px 0 7px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
#imBotCenter .bc-tabs::-webkit-scrollbar{display:none}
#imBotCenter .bc-tabs [data-bc-tab]{flex:0 0 auto;min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted);font-size:13px}
#imBotCenter .bc-tabs [data-bc-tab][aria-selected="true"]{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 19%,transparent)}
#imBotCenter .bc-section{margin:0 0 12px;padding:0;border:1px solid var(--line);border-radius:18px;background:var(--panel);overflow:hidden}
#imBotCenter .bc-section[hidden]{display:none!important}
#imBotCenter .bc-section>summary{position:relative;display:block;cursor:pointer;list-style:none;min-height:48px;padding:15px 46px 12px 16px;font-weight:800;color:var(--text);font-size:15px}
#imBotCenter .bc-section>summary::-webkit-details-marker{display:none}
#imBotCenter .bc-section>summary::after{content:'⌄';position:absolute;right:17px;top:12px;font-size:20px;color:var(--muted)}
#imBotCenter .bc-section[open]>summary::after{content:'⌃'}
#imBotCenter .bc-section>.bc-card{margin:0;padding:12px 16px 18px;border:0;border-radius:0;background:transparent;box-shadow:none}
#imBotCenter .bc-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:53px;padding:11px 0;border-bottom:1px solid var(--line);color:var(--text)}
#imBotCenter .bc-toggle:last-child{border-bottom:0}
#imBotCenter .bc-toggle>b{flex:1;min-width:0;font-size:14px;line-height:1.45;font-weight:650}
#imBotCenter .bc-toggle input[type="checkbox"]{width:20px;height:20px;flex:0 0 20px;accent-color:var(--accent)}
#imBotCenter .bc-rule,#imBotCenter .bc-chat{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);min-width:0}
#imBotCenter .bc-rule>div,#imBotCenter .bc-chat>div{flex:1;min-width:0;overflow-wrap:anywhere}
#imBotCenter .bc-rule-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto;align-items:center;gap:8px}
#imBotCenter .bc-rule-editor input{min-width:0}
#imBotCenter .bc-rule-editor button{min-height:43px}
#imBotCenter .bc-music-search{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px}
#imBotCenter .bc-music-search button{min-height:43px}
#imBotCenter .bc-music-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}
#imBotCenter .bc-music-row img{width:48px;height:48px;border-radius:12px;object-fit:cover;background:var(--panel2)}
#imBotCenter .bc-music-row>div{min-width:0}
#imBotCenter .bc-music-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imBotCenter #bcMusicPlayer{width:100%;height:44px;margin-top:12px}
#imBotCenter .bc-checkin-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#imBotCenter .bc-checkin-actions button{min-width:0;min-height:43px}
#imBotCenter .bc-actions{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:9px;margin:18px 0 0;background:var(--panel);border:1px solid var(--line)}
#imBotCenter .bc-actions button{min-width:0;min-height:44px}
#imBotCenter .bc-empty{text-align:center;padding:clamp(24px,6vw,40px)}
#imBotCenter .bc-empty-graphic{display:grid;place-items:center;margin:0 auto 15px;width:64px;height:64px;border-radius:19px;background:color-mix(in srgb,var(--accent) 12%,var(--panel2));color:var(--accent);font-size:35px}
#imBotCenter .bc-empty h3{margin:0 0 8px;font-size:20px}
#imBotCenter .bc-empty p{margin:0 0 20px;font-size:13px;line-height:1.6;color:var(--muted)}
#imBotCenter .bc-create-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;max-width:440px;margin:0 auto;text-align:left;align-items:end}
#imBotCenter .bc-create-row label{grid-column:1/-1;font-size:13px;font-weight:650}
#imBotCenter .bc-create-row button{min-height:43px;white-space:nowrap}
#imBotCenter .bc-loading{padding:30px 16px;text-align:center;color:var(--muted)}
@media(min-width:720px){#imBotCenter [data-bc-pane="base"] .bc-stack{grid-template-columns:repeat(2,minmax(0,1fr))}#imBotCenter [data-bc-pane="base"] .bc-stack>label:nth-of-type(n+3){grid-column:1/-1}#imBotCenter .bc-profile-name>b{font-size:21px}}
@media(max-width:420px){#imBotCenter .bc-card{padding:13px;margin:9px 0}#imBotCenter .bc-avatar{width:58px;height:58px;min-width:58px;flex-basis:58px}#imBotCenter .bc-profile-name>b{font-size:16px}#imBotCenter .bc-profile-actions{gap:6px}#imBotCenter .bc-profile-actions label,#imBotCenter .bc-profile-actions button{font-size:12px;padding:7px 9px}#imBotCenter .bc-rule-editor{grid-template-columns:minmax(0,1fr) auto}#imBotCenter .bc-rule-editor input:nth-child(2){grid-column:1/-1;grid-row:2}#imBotCenter .bc-rule-editor button{grid-column:2;grid-row:1}#imBotCenter .bc-create-row{grid-template-columns:minmax(0,1fr)}#imBotCenter .bc-create-row label{grid-column:1}}

/* Canonical channel layout: static App Shell stylesheet, never runtime injected. */

#imChannels,#imChannelDetail,#imChannelCreate,#imChannelJoin,#imChannelManage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden!important;box-sizing:border-box!important;background:var(--im-subpage-bg)!important;color:var(--text);z-index:50040}
.im-channel-shell{position:relative;width:min(860px,100%);height:100%;min-height:0;margin:auto;display:flex;flex-direction:column;background:var(--im-subpage-bg);overflow:hidden;box-sizing:border-box}
.im-channel-head{display:grid;grid-template-columns:72px minmax(0,1fr) 72px;align-items:center;gap:8px;flex:0 0 auto;min-height:var(--im-page-header-height);margin:0 0 12px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--im-page-header-radius);background:var(--panel);box-sizing:border-box}
.im-channel-head-copy{align-self:center;min-width:0;padding-bottom:0;text-align:center}.im-channel-head-copy h2{margin:0;font-size:18px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-head-copy span{display:block;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.im-channel-head>h2{align-self:center;margin:0;padding-bottom:0;text-align:center;font-size:19px;color:var(--accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-head>button{align-self:center;width:40px;height:40px;padding:0;margin-top:0}.im-channel-head>button:first-child{justify-self:start}.im-channel-head>button:last-child{justify-self:end}
.im-channel-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:10px 14px 14px;box-sizing:border-box}
.im-channel-list{display:grid;gap:10px}.im-channel-card{width:100%;max-width:100%;min-width:0;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);text-align:left;box-sizing:border-box;overflow:hidden}
.im-channel-avatar{width:50px;height:50px;border-radius:15px;overflow:hidden;display:grid;place-items:center;background:var(--panel2);color:#fff;font-weight:900;font-size:20px;box-sizing:border-box}.im-channel-avatar img{width:100%;height:100%;object-fit:contain;display:block}
.im-channel-copy{min-width:0}.im-channel-copy b,.im-channel-copy span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-copy span{margin-top:4px;color:var(--muted);font-size:12px}.im-channel-pill{font-size:11px;color:var(--muted);white-space:nowrap}
.im-channel-unread{position:absolute;right:-3px;top:-3px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:var(--danger,#e94f64);color:#fff;border:2px solid var(--sidebar,#fff);font-size:10px;font-weight:850;box-sizing:border-box}

/* Official channel palette owned by the existing channel view, not a global overlay. */
#imChannelDetail[data-channel-id="channel_official_8888888888"],
#imChannelManage[data-channel-id="channel_official_8888888888"]{color:var(--text);background:var(--im-subpage-bg)!important}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-shell,
#imChannelManage[data-channel-id="channel_official_8888888888"] .im-channel-shell{
  background:var(--im-subpage-bg);color:var(--text)}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-head,
#imChannelManage[data-channel-id="channel_official_8888888888"] .im-channel-head{
  background:var(--panel);border:1px solid var(--line);backdrop-filter:none}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-cover{
  background:linear-gradient(120deg,#d8f5ff,#e2edff 50%,#efe1ff);border:1px solid rgba(108,141,227,.16);border-radius:21px}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-profile{
  background:linear-gradient(140deg,rgba(255,255,255,.97),rgba(236,247,255,.93),rgba(247,239,255,.96));
  border-color:rgba(108,141,227,.17);border-radius:23px;box-shadow:0 14px 35px rgba(68,89,154,.075)}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-profile h3,
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-post-title{color:#263657;font-weight:800}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-post,
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-info-card,
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-admin-card,
#imChannelManage[data-channel-id="channel_official_8888888888"] [data-pane]{
  background:rgba(255,255,255,.95);border-color:rgba(109,142,229,.15);
  border-radius:19px;box-shadow:0 9px 24px rgba(68,89,154,.052)}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-post-text{
  color:#394968;font-size:14px;line-height:1.83;letter-spacing:.008em}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-tabs{
  background:rgba(255,255,255,.88);border-color:rgba(109,142,229,.14)}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-quick-action{
  background:rgba(255,255,255,.9)!important;border-color:rgba(109,142,229,.16)!important;color:#34456f!important}
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-post-time,
#imChannelDetail[data-channel-id="channel_official_8888888888"] .im-channel-view{color:#70809f}
#imChannelManage[data-channel-id="channel_official_8888888888"] .im-channel-form label,
#imChannelManage[data-channel-id="channel_official_8888888888"] .im-channel-admin-row{color:#2e4265}
.im-channel-empty{padding:42px 12px;text-align:center;color:var(--muted)}.im-channel-empty-actions,.im-channel-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.im-channel-empty-actions{justify-content:center;margin-top:12px}.im-channel-toolbar{padding:0 14px 10px}
.im-channel-form:not([hidden]){display:grid;gap:12px}.im-channel-form label{display:grid;gap:6px;font-size:12px;font-weight:750;color:var(--muted)}.im-channel-form input,.im-channel-form textarea,.im-channel-form select,.im-channel-publisher input,.im-channel-publisher textarea{width:100%;box-sizing:border-box;margin:0;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--input,var(--panel2));color:var(--text);font:inherit}.im-channel-form textarea{min-height:100px;resize:vertical}.im-channel-form button{min-height:44px}
.im-channel-progress{min-height:20px;color:var(--muted);font-size:12px;line-height:1.5}.im-channel-progress[data-state="error"]{color:var(--danger,#e94f64)}.im-channel-progress[data-state="working"]{color:var(--accent)}.im-channel-conversation{box-sizing:border-box!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
.im-channel-cover{width:100%;aspect-ratio:16/7;margin:0 0 14px;border-radius:18px;overflow:hidden;background:var(--panel2);border:1px solid var(--line);display:grid;place-items:center}.im-channel-cover a{display:block;width:100%;height:100%}.im-channel-cover img{display:block;width:100%;height:100%;object-fit:contain;background:var(--panel2)}
.im-channel-profile{display:grid;justify-items:center;gap:8px;padding:18px 14px 14px;border:1px solid var(--line);border-radius:20px;background:var(--panel);box-shadow:0 10px 30px rgba(0,0,0,.06);overflow:hidden}.im-channel-profile-avatar{width:50px;height:50px;border-radius:15px;overflow:hidden;display:grid;place-items:center;background:var(--panel2);color:#fff;font-size:20px;font-weight:900;box-sizing:border-box}.im-channel-profile-avatar a{display:block;width:100%;height:100%}.im-channel-profile-avatar img{width:100%;height:100%;object-fit:contain;display:block}.im-channel-profile h3{margin:2px 0 0;font-size:25px;line-height:1.2;text-align:center;overflow-wrap:anywhere}.im-channel-profile-sub{color:var(--muted);font-size:14px;font-weight:700}.im-channel-profile-role{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--accent) 13%,transparent);color:var(--accent);font-size:11px;font-weight:800}
.im-channel-quick-actions{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:9px;margin-top:8px}.im-channel-quick-action{min-height:58px!important;display:grid;place-items:center;align-content:center;gap:4px;padding:8px!important;border:1px solid var(--line)!important;border-radius:15px!important;background:var(--panel2)!important;color:var(--text)!important;font-weight:800}.im-channel-quick-action small{display:block;color:var(--muted);font-size:10px;font-weight:700}.im-channel-quick-action.primary{background:color-mix(in srgb,var(--accent) 14%,var(--panel2))!important;color:var(--accent)!important}
.im-channel-info-card,.im-channel-admin-card{margin-top:12px;padding:14px 15px;border:1px solid var(--line);border-radius:18px;background:var(--panel);overflow:hidden}.im-channel-info-row{padding:9px 0;border-bottom:1px solid var(--line)}.im-channel-info-row:last-child{border-bottom:0}.im-channel-info-label{display:block;margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:750}.im-channel-info-value{display:block;line-height:1.55;overflow-wrap:anywhere}.im-channel-share-link{color:var(--accent)!important;text-decoration:none!important;word-break:break-all}.im-channel-info-meta{display:flex;gap:8px 12px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.im-channel-admin-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:46px;padding:5px 0;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);text-align:left}.im-channel-admin-row:last-child{border-bottom:0}.im-channel-admin-row b{font-size:14px}.im-channel-admin-row span{color:var(--muted);font-size:13px}.im-channel-admin-row[data-action]{cursor:pointer}.im-channel-saved-warning{margin-top:10px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--danger,#e94f64) 10%,transparent);color:var(--muted);font-size:12px}
.im-channel-search-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:12px}.im-channel-search-panel[hidden]{display:none}.im-channel-search-panel input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--input,var(--panel2));color:var(--text);font:inherit}.im-channel-search-panel button{min-width:64px}
.im-channel-tabs{position:sticky;top:-14px;z-index:8;display:flex;gap:4px;width:max-content;max-width:100%;margin:14px auto 0;padding:4px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--panel) 95%,transparent);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.im-channel-tabs::-webkit-scrollbar{display:none}.im-channel-tab{flex:0 0 auto;min-width:72px;height:36px;padding:0 10px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-weight:800;white-space:nowrap}.im-channel-tab span{margin-left:4px;font-size:10px;font-weight:700;opacity:.78}.im-channel-tab.on{background:var(--panel2);color:var(--text)}
.im-channel-manage-media{display:grid;gap:12px}.im-channel-manage-media-card{display:grid;gap:9px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}.im-channel-manage-media-card>b{font-size:15px;color:var(--text)}
.im-channel-manage-media-preview{width:100%;border-radius:14px;overflow:hidden;background:var(--panel2);display:grid;place-items:center;color:var(--muted);font-size:13px;font-weight:700;box-sizing:border-box}
.im-channel-manage-media-preview--avatar{width:50px;height:50px;aspect-ratio:1/1;border-radius:15px;justify-self:start}.im-channel-manage-media-preview--avatar img{width:100%;height:100%;display:block;object-fit:contain}
.im-channel-manage-media-preview--background{width:100%;aspect-ratio:16/7;min-height:0;position:relative}.im-channel-manage-media-preview--background.is-cropping{aspect-ratio:auto;display:grid;gap:8px}
.im-channel-cover-crop-frame{position:relative;width:100%;aspect-ratio:16/7;overflow:hidden;background:var(--panel2);touch-action:none;user-select:none;cursor:grab;border-radius:9px}
.im-channel-cover-crop-frame img{position:absolute;display:block;max-width:none;pointer-events:none;user-select:none}
.im-channel-cover-crop-actions{display:flex;justify-content:center;align-items:center;gap:8px}
.im-channel-cover-crop-actions button{min-height:36px!important;min-width:60px;padding:7px 12px!important;border:0!important;border-radius:10px!important;background:rgba(0,0,0,.76)!important;color:#fff!important;font-size:13px;font-weight:750}
.im-channel-cover-crop-actions button:disabled{opacity:.45}.im-channel-manage-media-preview--background img{width:100%;height:100%;display:block;object-fit:contain;background:var(--panel2)}
.im-channel-cover-crop-tip{display:block;max-width:100%;color:var(--muted);padding:0 3px;font-size:12px;line-height:1.4;text-align:center}
.im-channel-manage-media-actions{display:flex;gap:8px}.im-channel-manage-media-actions button{flex:0 1 132px;min-width:0;min-height:38px!important;padding:6px 12px}.im-channel-media-state{min-height:18px;color:var(--muted);font-size:12px}
.im-channel-manage-menu:not([hidden]){display:grid;gap:0}.im-channel-manage-menu .im-channel-admin-row{min-height:66px;padding:9px 8px;grid-template-columns:32px minmax(0,1fr) 18px;gap:10px;align-items:center}.im-channel-menu-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--accent) 11%,var(--panel));color:var(--accent)}.im-channel-menu-icon svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}.im-channel-menu-copy{display:grid;gap:3px;min-width:0}.im-channel-menu-copy b{font-size:14px;color:var(--text);line-height:1.2}.im-channel-menu-copy small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-menu-next{font-size:19px;color:var(--muted);text-align:center}#imChannelManage [data-pane]:not([hidden]){align-content:start;padding:12px 7px}#imChannelManage [data-pane]>button{justify-self:start;width:min(100%,200px)}#imChannelManage [data-pane="content"]{grid-template-columns:repeat(2,minmax(0,1fr))}#imChannelManage [data-pane="content"]>button{width:100%;min-width:0}.im-channel-number-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px}.im-channel-qr-image:not([hidden]){display:block;width:min(220px,100%);height:auto;object-fit:contain;margin:10px auto}.im-channel-number-inline{display:inline-flex;align-items:center;gap:7px}.im-channel-qr-toggle{min-height:34px;min-width:34px;padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--text);font-size:20px}.im-channel-number-row input{font-variant-numeric:tabular-nums;letter-spacing:.05em}.im-channel-number-note{font-size:11px;color:var(--muted);font-weight:500}
.im-channel-publisher{margin-top:14px;padding:15px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:18px;background:var(--panel);box-shadow:0 9px 28px rgba(0,0,0,.07);overflow:hidden}.im-channel-publisher-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.im-channel-publisher-head b{font-size:16px}.im-channel-publisher-head span{font-size:11px;color:var(--muted)}.im-channel-publisher textarea{min-height:128px;max-height:300px;resize:vertical;line-height:1.55}.im-channel-publisher input{margin-bottom:8px}
.im-channel-publisher-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:9px}.im-channel-publisher-tools button{min-width:0;min-height:40px;padding:7px 5px;font-size:12px}.im-channel-publish-row{display:flex;align-items:center;gap:10px;margin-top:10px}.im-channel-publish-row .primary{margin-left:auto;min-width:112px;min-height:42px}.im-channel-upload-state{min-width:0;flex:1;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.im-channel-upload-track{height:4px;margin-top:8px;border-radius:999px;background:var(--line);overflow:hidden}.im-channel-upload-track i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--accent),#7f6cff);transition:width .12s linear}
.im-channel-attachments{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:9px}.im-channel-attachment{position:relative;min-width:0;aspect-ratio:1;border:1px solid var(--line);border-radius:12px;background:var(--panel2);overflow:hidden}.im-channel-attachment img,.im-channel-attachment video{width:100%;height:100%;object-fit:contain;display:block;background:var(--panel2)}.im-channel-attachment-file{height:100%;padding:9px;display:flex;flex-direction:column;justify-content:center;gap:4px;font-size:11px;overflow:hidden}.im-channel-attachment-file b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-attachment-file small{color:var(--muted)}
.im-channel-attachment-remove{position:absolute;right:4px;top:4px;width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(0,0,0,.72)!important;color:#fff!important}
.im-channel-feed-head{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 9px}.im-channel-feed-head b{font-size:17px}.im-channel-feed-head span{font-size:11px;color:var(--muted)}.im-channel-posts{display:grid;gap:12px;padding:0 0 18px}.im-channel-post[hidden]{display:none!important}.im-channel-more{width:100%;height:1px;min-height:1px;margin:0;padding:0;border:0;background:transparent;pointer-events:none}.im-channel-top{position:absolute;right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:12;width:28px;height:28px;padding:0;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--accent);box-shadow:0 3px 10px #0002;font-size:14px;line-height:1;font-weight:800;cursor:pointer;pointer-events:none;touch-action:manipulation;opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .16s ease,transform .16s ease,visibility .16s}.im-channel-top.is-visible{pointer-events:auto;opacity:1;visibility:visible;transform:none}.im-channel-post{padding:15px;border:1px solid var(--line);border-radius:18px;background:var(--panel);overflow:hidden;box-shadow:0 7px 22px rgba(0,0,0,.05)}.im-channel-post.pinned{border-color:color-mix(in srgb,var(--accent) 50%,var(--line))}
.im-channel-post-head{display:flex;align-items:center;gap:8px;margin-bottom:9px}.im-channel-post-head b{font-size:12px}.im-channel-post-time{margin-left:auto;color:var(--muted);font-size:11px}.im-channel-post-title{margin:0 0 8px;font-size:18px;line-height:1.4}.im-channel-post-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.62}.im-channel-post-link{display:block;margin-top:9px;overflow-wrap:anywhere;color:var(--accent);font-size:13px}
.im-channel-media{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}.im-channel-media.one{grid-template-columns:1fr}.im-channel-media a{min-width:0}.im-channel-media img{display:block;width:100%;height:auto;max-height:min(68dvh,650px);object-fit:contain;border-radius:11px;background:var(--panel2)}.im-channel-media video{display:block;width:100%;max-height:440px;border-radius:11px;background:var(--panel2)}
.im-channel-file{display:flex!important;align-items:center;gap:8px;min-height:56px;padding:9px 10px;border:1px solid var(--line);border-radius:11px;background:var(--panel2);text-decoration:none!important;color:var(--text)!important;overflow:hidden}.im-channel-file-copy{min-width:0}.im-channel-file-copy b,.im-channel-file-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.im-channel-file-copy small{margin-top:3px;color:var(--muted)}
.im-channel-engagement{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:13px;padding-top:11px;border-top:1px solid var(--line)}.im-channel-reaction{min-height:32px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--text);font-size:12px}.im-channel-reaction.on{border-color:color-mix(in srgb,var(--accent) 65%,var(--line));background:color-mix(in srgb,var(--accent) 13%,transparent);color:var(--accent)}.im-channel-reaction:disabled{opacity:.55}
.im-channel-view{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}.im-channel-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:8px}.im-channel-actions button{min-height:32px;padding:5px 9px;font-size:12px}.im-channel-manager-actions{margin-left:auto;display:flex;gap:6px}
.im-channel-comments{margin-top:11px;padding-top:10px;border-top:1px solid var(--line)}.im-channel-comment{padding:7px 0;line-height:1.48;overflow-wrap:anywhere}.im-channel-comment b{font-size:12px}.im-channel-comment-actions{display:inline-flex;margin-left:6px}.im-channel-comment-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:9px}.im-channel-comment-form textarea{width:100%;min-height:42px;max-height:100px;resize:vertical;box-sizing:border-box;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--input,var(--panel2));color:var(--text);font:inherit}
@media(max-width:520px){.im-channel-scroll{padding-left:10px;padding-right:10px}.im-channel-tabs{top:-10px;max-width:calc(100vw - 20px)}.im-channel-cover{aspect-ratio:16/7;border-radius:14px}.im-channel-profile{padding:16px 11px 12px}.im-channel-profile-avatar{width:50px;height:50px;border-radius:15px}.im-channel-profile h3{font-size:23px}.im-channel-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.im-channel-manage-media-preview--avatar{width:50px;height:50px;border-radius:15px}.im-channel-manage-media-actions button{flex:1}.im-channel-publisher{padding:12px}.im-channel-publisher-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.im-channel-attachments{grid-template-columns:repeat(3,minmax(0,1fr))}.im-channel-post{border-left:0;border-right:0;border-radius:0;margin-left:-10px;margin-right:-10px;padding-left:12px;padding-right:12px}.im-channel-media{grid-template-columns:repeat(2,minmax(0,1fr))}.im-channel-media.one{grid-template-columns:1fr}.im-channel-view{margin-left:0;width:100%}.im-channel-manager-actions{margin-left:0}.im-channel-head{padding-left:6px;padding-right:6px}}

/* The original role page is embedded in the Discover secondary panel, not reopened as a new top-level document. */
#imAppShell #panelView[data-owner="discover-role"]{display:flex;flex-direction:column;overflow:hidden;padding:0;background:var(--im-subpage-bg,var(--bg))}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading{position:relative;top:0;flex:0 0 var(--im-page-header-height);height:var(--im-page-header-height);min-height:var(--im-page-header-height);margin:0;padding:0 12px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--im-subpage-bg,var(--bg))}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-identity{min-width:0;display:flex;align-items:center;gap:9px;overflow:hidden}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-avatar{width:40px;height:40px;min-width:40px;border-radius:50%;object-fit:cover;background:var(--panel2);border:1px solid var(--line)}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-avatar[hidden]{display:none}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-copy{display:flex;flex-direction:column;min-width:0;overflow:hidden;gap:2px}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-copy strong{font-size:16px;font-weight:750;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-copy small{font-size:11px;color:var(--muted);line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#imAppShell #panelView[data-owner="discover-role"]>.im-secondary-heading .im-role-header-settings{border:0;border-radius:11px;background:var(--panel2);font-size:12px;font-weight:700;color:var(--text)}
#imAppShell #panelView[data-owner="discover-role"]>#imRoleWorldFrame{display:block;flex:1 1 auto;width:100%;height:100%;min-height:0;border:0;border-radius:0;background:var(--im-subpage-bg,var(--bg))}

/* Hidden conversations: existing single overlay and authoritative conversation rows. */
#imHiddenConversations .im-hidden-sheet{max-width:760px;min-height:0;height:100%;display:flex;flex-direction:column;gap:12px;border-radius:18px 18px 0 0;background:var(--im-subpage-bg,var(--panel));overflow:hidden}
#imHiddenConversations .im-hidden-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 6px 7px;border-bottom:1px solid var(--line)}
#imHiddenConversations .im-hidden-head h2{font-size:18px;margin:0;color:var(--text)}
#imHiddenConversations .im-hidden-head span{font-size:12px;color:var(--muted)}
#imHiddenConversations .im-hidden-list{flex:1;min-height:0;overflow-y:auto;display:grid;gap:9px;align-content:start;padding:0 2px;-webkit-overflow-scrolling:touch}
#imHiddenConversations .im-hidden-row{display:grid;gap:0;padding:8px 10px;border:1px solid var(--line);border-radius:15px;background:var(--panel);box-sizing:border-box}
#imHiddenConversations .im-hidden-open{display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:2px 0;border:0;background:transparent;color:var(--text);text-align:left;min-width:0}
#imHiddenConversations .im-hidden-avatar{width:50px;height:50px;flex:0 0 50px;overflow:hidden;border-radius:15px}
#imHiddenConversations .im-hidden-avatar img{width:100%;height:100%;display:block;object-fit:contain}
#imHiddenConversations .im-hidden-info{display:grid;min-width:0;gap:5px}
#imHiddenConversations .im-hidden-title{display:flex;align-items:center;gap:6px;min-width:0}
#imHiddenConversations .im-hidden-title b{font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imHiddenConversations .im-hidden-type{flex:0 0 auto;color:var(--accent);font-size:11px}
#imHiddenConversations .im-hidden-preview{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#imHiddenConversations .im-hidden-meta{display:grid;gap:7px;justify-items:end;color:var(--muted);font-size:10px}
#imHiddenConversations .im-hidden-unread{display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:var(--danger,#db5360);color:#fff;font-size:10px}
#imHiddenConversations .im-hidden-restore{justify-self:end;min-height:30px;padding:3px 10px;border:0;background:transparent;color:var(--accent);font-size:12px}
#imHiddenConversations .im-hidden-footer{flex:0 0 auto;display:flex;justify-content:center;padding:8px 0 max(10px,env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
#imHiddenConversations #hiddenClose{width:auto;min-width:108px;min-height:38px;border-radius:12px}
#imHiddenConversations .im-hidden-empty{text-align:center;padding:32px 0}

/* Real account picker: fixed above the unchanged Me menu, without a second background card. */
#imOwnAccountSwitchLayer{position:fixed;inset:0;z-index:65000;pointer-events:none}
#imOwnAccountSwitchLayer .im-own-switch-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;margin:0;padding:0;background:rgba(15,24,40,.15);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);pointer-events:auto}
#imOwnAccountSwitchLayer .im-own-switch-dialog{position:absolute;left:50%;transform:translateX(-50%);width:min(350px,calc(100% - 24px));max-width:calc(100% - 24px);margin-inline:0;box-sizing:border-box;max-height:min(440px,calc(100dvh - 24px));overflow-y:auto;overscroll-behavior:contain;padding:9px 10px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 55px rgba(0,0,0,.19);pointer-events:auto;-webkit-overflow-scrolling:touch}
#imOwnAccountSwitchLayer .im-own-switch-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 4px 10px;border-bottom:1px solid var(--line)}
#imOwnAccountSwitchLayer .im-own-switch-head strong{font-size:16px;font-weight:800}
#imOwnAccountSwitchLayer .im-own-switch-head button{width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:50%;background:var(--panel2);color:var(--text);font-size:22px}
#imOwnAccountSwitchLayer .im-own-switch-accounts{display:grid;gap:4px;padding:8px 0}
#imOwnAccountSwitchLayer .im-own-switch-account{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:54px;padding:5px 7px;text-align:left;border:0;border-radius:12px;background:transparent;color:var(--text);cursor:pointer}
#imOwnAccountSwitchLayer .im-own-switch-account[data-active="1"]{background:var(--panel2);opacity:1}
#imOwnAccountSwitchLayer .im-own-switch-account-avatar{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:var(--panel2);font-size:18px;font-weight:750}
#imOwnAccountSwitchLayer .im-own-switch-account-copy{min-width:0;display:grid;gap:3px}
#imOwnAccountSwitchLayer .im-own-switch-account-copy b,#imOwnAccountSwitchLayer .im-own-switch-account-copy small{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#imOwnAccountSwitchLayer .im-own-switch-account-copy b{font-size:14px}
#imOwnAccountSwitchLayer .im-own-switch-account-copy small{font-size:11px;color:var(--muted)}
#imOwnAccountSwitchLayer .im-own-switch-account-status{font-size:11px;color:var(--accent)}
#imOwnAccountSwitchLayer .im-own-switch-add{display:block;width:100%;min-height:42px;padding:8px 12px;border:0;border-radius:12px;background:var(--panel2);color:var(--accent);font-size:13px;font-weight:800}
#imOwnAccountSwitchLayer :is(button,a):focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Channel uses one source-owned container; media/files/links have independent presentations. */
#imChannelDetail .im-channel-collection[hidden]{display:none!important}
#imChannelDetail .im-channel-collection{min-width:0;padding:8px 0 18px}
#imChannelDetail .im-channel-collection[data-channel-collection="media"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
#imChannelDetail .im-channel-media-tile{position:relative;display:block;width:100%;min-width:0;aspect-ratio:1/1;padding:0;margin:0;border:0;border-radius:5px;background:var(--panel2);color:#fff;overflow:hidden;cursor:pointer}
#imChannelDetail .im-channel-media-tile img,#imChannelDetail .im-channel-media-tile video{display:block;width:100%;height:100%;object-fit:cover;object-position:center top;background:var(--panel2)}
#imChannelDetail .im-channel-video-mark{position:absolute;right:7px;bottom:7px;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#141a23c4;color:#fff;font-size:13px;pointer-events:none}
#imChannelDetail .im-channel-collection[data-channel-collection="files"],#imChannelDetail .im-channel-collection[data-channel-collection="links"]{display:grid;align-content:start;gap:8px}
#imChannelDetail .im-channel-file-row,#imChannelDetail .im-channel-link-row{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--text);text-decoration:none;min-width:0}
#imChannelDetail .im-channel-file-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:var(--panel2);font-size:23px}
#imChannelDetail .im-channel-file-meta{display:grid;gap:4px;min-width:0}
#imChannelDetail .im-channel-file-meta b,#imChannelDetail .im-channel-file-meta small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imChannelDetail .im-channel-file-meta b{font-size:14px}
#imChannelDetail .im-channel-file-meta small{font-size:12px;color:var(--muted)}
#imChannelDetail .im-channel-link-row{grid-template-columns:1fr;align-items:start;gap:5px;overflow:hidden}
#imChannelDetail .im-channel-link-row b{color:var(--accent);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imChannelDetail .im-channel-link-row span{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imChannelDetail .im-channel-link-row small{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imChannelDetail .im-channel-collection-empty{grid-column:1/-1;padding:26px 8px;text-align:center;color:var(--muted)}
#imChannelDetail .im-channel-collection-more{grid-column:1/-1;width:100%;height:1px;min-height:1px;margin:0;padding:0;border:0;background:transparent;pointer-events:none}.im-channel-page-sentinel{display:block;width:100%;height:1px;min-height:1px;border:0;overflow:hidden;opacity:0;pointer-events:none}

/* Home uses consistent filled SVG pictograms; no second navigation layer. */
#imAppShell #panelView[data-owner="home"] .im-home-entries .im-home-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:color-mix(in srgb,var(--home-icon) 12%,var(--panel));color:var(--home-icon);font-size:inherit}
#imAppShell #panelView[data-owner="home"] .im-home-icon svg{width:25px;height:25px;display:block;fill:currentColor}
#imAppShell #panelView[data-owner="calls"]{padding:var(--im-shell-inset);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
#imAppShell #panelView[data-owner="calls"] .im-secondary-heading{max-width:540px;min-height:48px;margin:0 auto 12px;display:grid;grid-template-columns:40px 1fr 40px;gap:8px;align-items:center}
#imAppShell #panelView[data-owner="calls"] .im-secondary-heading h2{text-align:center;font-size:19px}
#imAppShell #panelView[data-owner="calls"] .im-secondary-heading button{width:36px;height:36px;border:0;border-radius:11px;background:var(--panel2);color:var(--text);font-size:23px}
#imAppShell .im-call-center{width:100%;max-width:540px;margin:auto;padding-bottom:16px}
#imAppShell .im-call-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;margin:0 0 12px;border-radius:14px;background:color-mix(in srgb,var(--accent) 8%,var(--panel2))}
#imAppShell .im-call-tabs button{min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:700;font-size:14px}
#imAppShell .im-call-tabs button[aria-selected="true"]{background:var(--panel);color:var(--text);box-shadow:0 2px 8px rgba(0,0,0,.06)}
#imAppShell .im-call-number{min-height:62px;display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:6px;align-items:center;padding:0 9px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
#imAppShell #panelView[data-owner="calls"] #imCallNumber{height:52px;width:100%;margin:0;min-height:0;padding:0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;color:var(--text);font-size:25px;font-weight:720;letter-spacing:2px;text-align:center;font-variant-numeric:tabular-nums}
#imAppShell #imCallNumber::placeholder{font-size:15px;font-weight:500;letter-spacing:0;color:var(--muted)}
#imAppShell .im-call-number>button{width:36px;height:36px;border:0;background:transparent;color:var(--muted);font-size:25px}
#imAppShell .im-call-peer{min-height:78px;margin:9px 0 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
#imAppShell .im-call-peer-tip{font-size:13px;color:var(--muted);text-align:center}
#imAppShell .im-call-peer-result{display:flex;align-items:center;gap:11px;width:100%;min-height:72px;padding:9px 11px;border-radius:16px;box-sizing:border-box;background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
#imAppShell .im-call-peer-avatar{width:52px;height:52px;min-width:52px;display:grid;place-items:center;border-radius:15px;background:var(--panel2);overflow:hidden;font-weight:750}
#imAppShell .im-call-peer-avatar img{width:100%;height:100%;object-fit:contain;display:block}
#imAppShell .im-call-peer-text{min-width:0;flex:1;display:grid;gap:4px}
#imAppShell .im-call-peer-text b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#imAppShell .im-call-peer-text small{font-size:12px;color:var(--muted)}
#imAppShell #imCallAddFriend,#imAppShell #imCallRetry{padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--accent);font-size:12px;white-space:nowrap}
#imAppShell .im-call-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px clamp(7px,3vw,18px);justify-items:center}
#imAppShell .im-call-keys button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:min(100%,92px);height:60px;border:0;border-radius:18px;background:color-mix(in srgb,var(--accent) 5%,var(--panel));color:var(--text);font-size:27px;font-weight:550;font-variant-numeric:tabular-nums;cursor:pointer}
#imAppShell .im-call-keys button small{font-size:9px;font-weight:650;letter-spacing:.7px;color:var(--muted)}
#imAppShell .im-call-keys [data-call-contact]{font-size:13px;font-weight:650;color:var(--accent)}
#imAppShell .im-call-keys [data-call-delete]{font-size:25px;color:var(--muted)}
#imAppShell .im-call-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:17px}
#imAppShell .im-call-actions button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:50px;border:0;border-radius:14px;padding:8px;background:var(--accent);color:white;font-size:14px;font-weight:750;cursor:pointer}
#imAppShell .im-call-actions button:nth-child(2){background:color-mix(in srgb,var(--accent) 15%,var(--panel));color:var(--accent)}
#imAppShell .im-call-actions button:disabled{opacity:.4;cursor:default}
#imAppShell .im-call-actions svg{width:20px;height:20px;fill:currentColor}
#imAppShell .im-call-history-head{display:flex;justify-content:space-between;align-items:center;margin:8px 0 10px}
#imAppShell .im-call-history-head b{font-size:16px}
#imAppShell .im-call-history-head button{background:var(--panel2);color:var(--text);border:0;border-radius:9px;padding:8px 12px;font-size:12px}
#imAppShell .im-call-history-list{display:grid;gap:2px}
#imAppShell .im-call-history-row{display:flex;align-items:center;gap:10px;min-height:65px;padding:10px 2px;border-bottom:1px solid var(--line)}
#imAppShell .im-call-history-avatar{width:44px;height:44px;min-width:44px;border-radius:14px;display:grid;place-items:center;background:var(--panel2);overflow:hidden;font-weight:750}
#imAppShell .im-call-history-avatar img{width:100%;height:100%;object-fit:contain}
#imAppShell .im-call-history-details{min-width:0;flex:1;display:grid;gap:5px}
#imAppShell .im-call-history-details b{font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#imAppShell .im-call-history-details small{font-size:11px;color:var(--muted)}
#imAppShell .im-call-history-details small.missed{color:var(--danger,#d54b59)}
#imAppShell .im-call-history-row time{font-size:11px;color:var(--muted);white-space:nowrap}
#imAppShell .im-call-redial{width:30px;height:30px;border:0;border-radius:9px;background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent);display:grid;place-items:center}
#imAppShell .im-call-redial svg{width:17px;height:17px;fill:currentColor}
#imAppShell .im-call-peer-result[hidden],#imAppShell .im-call-peer-tip[hidden],#imAppShell [data-call-pane][hidden],#imAppShell #imCallAddFriend[hidden],#imAppShell #imCallRetry[hidden]{display:none!important}
@media(max-width:420px){#imAppShell .im-call-keys button{height:56px}#imAppShell .im-call-peer{min-height:67px}#imAppShell .im-call-actions{margin-top:12px}}

/* Native Contacts list: the search controls live in the original list surface. */
#imAppShell #list .im-contact-tools{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:8px;padding:9px 8px 11px;background:var(--sidebar,var(--panel));border-bottom:1px solid var(--line);box-sizing:border-box}
#imAppShell #list .im-contact-tools input,#imAppShell #list .im-contact-tools select{min-width:0;width:100%;height:38px;padding:0 10px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font-size:13px;box-sizing:border-box}
#imAppShell #list .chat[data-friend-uid]{display:flex;align-items:center;gap:10px;min-height:62px}
#imAppShell #list .chat[data-friend-uid]>[data-friend-main]{min-width:0;flex:1}
#imAppShell #list .chat[data-friend-uid] .preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
#imAppShell #list .im-contact-pin{flex:0 0 auto;width:auto;min-width:45px;max-width:63px;min-height:30px;padding:4px 7px;border-radius:10px;border:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:11px;cursor:pointer}
#imAppShell #list .im-contact-pin[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
#imAppShell #list .im-contact-pin:disabled{opacity:.45}
/* One original wallet surface: palette comes from the current theme. */

/* My Wallet is a native full-width page, not a centered nested modal. */
#imAccountCenter.im-wallet-host{
  position:fixed;inset:0;width:100%;height:100dvh;max-width:none;overflow:hidden;
  display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;
  padding:var(--im-page-top-safe) 0 0;
  background:var(--panel);color:var(--text)
}
#imAccountCenter.im-wallet-host>.im-wallet-sheet{
  --wallet-accent:#e8a42b;--wallet-border:var(--line);
  flex:1 1 auto;min-height:0;width:100%;max-width:740px;height:100%;max-height:none;
  margin:0 auto;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;padding:0 16px max(24px,env(safe-area-inset-bottom));
  box-sizing:border-box;border:0;border-radius:0;background:var(--panel);
  color:var(--text);box-shadow:none
}
#imAccountCenter.im-wallet-host .im-finance-head{
  position:sticky;top:0;z-index:9;display:grid;grid-template-columns:46px minmax(0,1fr) 40px;
  align-items:center;gap:11px;min-height:var(--im-page-header-height);margin:0 0 12px;padding:5px 10px;
  box-sizing:border-box;border:1px solid var(--wallet-border);
  border-radius:var(--im-page-header-radius);background:var(--panel);box-shadow:none
}
#imAccountCenter.im-wallet-host .im-wallet-avatar{
  width:46px;height:46px;min-width:46px;max-width:46px;display:grid;place-items:center;
  border-radius:50%;overflow:hidden;background:var(--panel2)
}
#imAccountCenter.im-wallet-host .im-wallet-avatar img{
  display:block;width:100%;height:100%;object-fit:contain;object-position:center;border-radius:inherit
}
#imAccountCenter.im-wallet-host .im-wallet-heading{min-width:0;display:grid;gap:4px;text-align:left}
#imAccountCenter.im-wallet-host .im-finance-head h2{
  margin:0!important;padding:0;font-size:19px!important;font-weight:850;
  line-height:1.25;text-align:left!important;letter-spacing:.2px
}
#imAccountCenter.im-wallet-host .im-wallet-owner{
  min-width:0;display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px
}
#imAccountCenter.im-wallet-host .im-wallet-owner span{min-width:0;max-width:50%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#imAccountCenter.im-wallet-host .im-finance-head #acctFinanceClose{
  grid-column:3;justify-self:end;width:36px;height:36px;min-height:36px;margin:0;
  padding:0;border:0;border-radius:50%;background:var(--panel2);color:var(--text);
  font-size:23px;line-height:1;box-shadow:none
}
#imAccountCenter .im-wallet-summary{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
  width:100%;margin:0 0 17px
}
#imAccountCenter .im-wallet-balance{
  min-width:0;min-height:120px;display:flex;flex-direction:column;justify-content:space-between;
  gap:9px;padding:16px 14px;box-sizing:border-box;border:1px solid var(--wallet-border);
  border-radius:17px;background:color-mix(in srgb,var(--wallet-accent) 7%,var(--panel))
}
#imAccountCenter .im-wallet-balance:nth-child(2){background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
#imAccountCenter .im-wallet-balance small{color:var(--muted);font-size:12px;line-height:1.4}
#imAccountCenter .im-wallet-amount{display:flex;align-items:baseline;gap:5px;min-width:0}
#imAccountCenter .im-wallet-amount strong{
  display:block;min-width:0;max-width:100%;font-size:clamp(19px,5.5vw,30px);
  line-height:1.15;font-weight:840;font-variant-numeric:tabular-nums;
  letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
#imAccountCenter .im-wallet-amount span{
  flex:0 0 auto;color:var(--muted);font-size:10px;white-space:nowrap
}
#imAccountCenter .im-wallet-tabs{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;
  margin:0 0 16px;border-radius:14px;background:var(--panel2)
}
#imAccountCenter .im-wallet-tabs button{
  display:grid;place-items:center;min-width:0;min-height:44px;margin:0;padding:9px 3px;
  border:0;border-radius:10px;background:transparent;color:var(--muted);
  font-size:13px;font-weight:730;line-height:1.25;box-shadow:none
}
#imAccountCenter .im-wallet-tabs button[aria-selected="true"]{
  background:var(--wallet-accent);color:#23180b;font-weight:820;
  box-shadow:0 2px 7px rgba(158,105,23,.1)
}
#imAccountCenter .im-wallet-pane{min-height:90px}
#imAccountCenter .im-wallet-card{
  width:100%;min-width:0;margin:0;padding:15px 14px 17px;
  border:1px solid var(--wallet-border);border-radius:16px;
  background:color-mix(in srgb,var(--text) 2%,var(--panel));box-sizing:border-box
}
#imAccountCenter .im-wallet-card h3{font-size:15px;margin:0 0 14px}
#imAccountCenter .im-wallet-card-head{
  display:flex;flex-wrap:wrap;gap:5px;align-items:baseline;justify-content:space-between;margin-bottom:12px
}
#imAccountCenter .im-wallet-card-head b{font-size:14px}
#imAccountCenter .im-wallet-card-head span{font-size:12px;color:var(--wallet-accent);font-weight:700}
#imAccountCenter .im-wallet-card .im-finance-recharge-row{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:stretch
}
#imAccountCenter .im-wallet-card .im-finance-recharge-row .field{
  width:100%;min-width:0;max-width:100%;min-height:47px;margin:0;border-radius:12px
}
#imAccountCenter .im-wallet-card #acctRechargeCreate{
  min-height:47px;max-width:124px;padding:8px 11px;border-radius:12px;
  border-color:var(--wallet-accent);background:var(--wallet-accent);
  color:#211608;font-size:12px;font-weight:800;white-space:normal
}
#imAccountCenter .im-wallet-quick{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:13px 0 0
}
#imAccountCenter .im-wallet-quick button{
  min-width:0;min-height:44px;padding:4px 2px;border:1px solid var(--wallet-border);
  border-radius:10px;background:var(--panel);color:var(--muted);font-size:10px
}
#imAccountCenter .im-wallet-quick button[aria-pressed="true"]{
  border-color:var(--wallet-accent);color:var(--text);font-weight:750;
  background:color-mix(in srgb,var(--wallet-accent) 11%,var(--panel))
}
#imAccountCenter .im-wallet-filters{display:flex;gap:7px;overflow-x:auto;padding:0 0 12px}
#imAccountCenter .im-wallet-filters button{
  flex:0 0 auto;min-height:34px;padding:6px 11px;border:1px solid var(--wallet-border);
  border-radius:10px;background:var(--panel);color:var(--muted);font-size:12px
}
#imAccountCenter .im-wallet-filters button[aria-pressed="true"]{
  border-color:var(--wallet-accent);color:var(--wallet-accent);font-weight:750
}
#imAccountCenter .im-wallet-history-group{
  width:100%;min-width:0;margin:0 0 14px;padding:0;
  border:0;border-radius:0;background:transparent;box-sizing:border-box
}
#imAccountCenter .im-wallet-history-group h3{
  margin:0;padding:13px 0 8px;font-size:14px;font-weight:800;color:var(--text)
}
#imAccountCenter .im-wallet-txn{
  display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:10px;
  align-items:start;min-width:0;margin:0;padding:13px 0 14px;
  border-bottom:1px solid var(--wallet-border)
}
#imAccountCenter .im-wallet-txn:last-child{border-bottom:0}
#imAccountCenter .im-wallet-txn-main{
  display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0
}
#imAccountCenter .im-wallet-txn-title{font-size:14px;font-weight:780;color:var(--text);line-height:1.25}
#imAccountCenter .im-wallet-txn-time{color:var(--muted);font-size:12px;line-height:1.35;font-variant-numeric:tabular-nums}
#imAccountCenter .im-wallet-txn-reference{
  display:flex;align-items:center;gap:7px;min-width:0;max-width:100%;font-size:11px;color:var(--muted)
}
#imAccountCenter .im-wallet-txn-reference span{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
#imAccountCenter .im-wallet-copy{
  flex:0 0 auto;padding:3px 5px;border:0;border-radius:5px;background:transparent;
  color:var(--accent);font-size:11px;white-space:nowrap
}
#imAccountCenter .im-wallet-txn-detail,#imAccountCenter .im-wallet-txn-status{
  max-width:100%;font-size:11px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere
}
#imAccountCenter .im-wallet-txn-value{
  display:flex;flex-wrap:nowrap;align-items:baseline;justify-content:flex-end;
  gap:4px;min-width:0;padding-top:1px;white-space:nowrap;font-variant-numeric:tabular-nums
}
#imAccountCenter .im-wallet-txn-value strong{
  white-space:nowrap;font-size:15px;font-weight:790;letter-spacing:-.2px
}
#imAccountCenter .im-wallet-txn-value span{font-size:11px;color:var(--muted);white-space:nowrap}
#imAccountCenter .im-wallet-txn-value.is-positive strong{color:var(--ok,#269869)}
#imAccountCenter [data-wallet-pane][hidden],#imAccountCenter [data-wallet-group][hidden]{display:none!important}
#imAccountCenter .im-wallet-loading{text-align:center;padding:46px 0;color:var(--muted)}
@media(min-width:760px){
  #imAccountCenter.im-wallet-host{background:var(--bg);padding-top:24px;padding-bottom:24px}
  #imAccountCenter.im-wallet-host>.im-wallet-sheet{
    width:min(100% - 40px,740px);height:100%;border:1px solid var(--wallet-border);
    border-radius:19px;box-shadow:0 14px 40px rgba(0,0,0,.10)
  }
}
@media(max-width:390px){
  #imAccountCenter.im-wallet-host>.im-wallet-sheet{padding-left:12px;padding-right:12px}
  #imAccountCenter.im-wallet-host .im-finance-head{margin-left:0;margin-right:0;padding-left:10px;padding-right:10px}
  #imAccountCenter .im-wallet-summary{gap:8px}
  #imAccountCenter .im-wallet-balance{padding:13px 11px;min-height:112px}
  #imAccountCenter .im-wallet-amount strong{font-size:clamp(18px,5.1vw,26px)}
  #imAccountCenter .im-wallet-amount span{font-size:9px}
  #imAccountCenter .im-wallet-tabs button{font-size:11px}
  #imAccountCenter .im-wallet-quick{gap:4px}
}
