/* Shared conversation shell; colors continue to come from workbench themes. */
.community-app { padding: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .875rem; }
.community-app #main { min-width: 0; }
#community-shell { display: grid; grid-template-columns: 4.5rem minmax(0,1fr); height: 100dvh; min-height: 22rem; overflow: hidden; }
.community-app button { border-radius: .35rem; }
.community-app button svg { width: 1.25rem; height: 1.25rem; flex: none; }
.server-rail { display: flex; flex-direction: column; align-items: center; gap: .65rem; padding: .75rem .5rem; overflow-y: auto; background: var(--vscode-activityBar-background,var(--vscode-sideBar-background)); color: var(--vscode-activityBar-foreground,var(--vscode-foreground)); }
.rail-button { position: relative; width: 3rem; min-height: 3rem; padding: .4rem; border: 0; border-radius: 1rem !important; background: var(--vscode-sideBar-background); color: var(--vscode-sideBar-foreground,var(--vscode-foreground)); font-weight: 650; display: flex; align-items: center; justify-content: center; }
.community-app .rail-button:hover:enabled,.community-app .rail-button[aria-pressed=true] { color: var(--vscode-button-foreground); background: var(--vscode-button-background); }
.rail-button[data-unread=true]::after { content: ''; position: absolute; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; inset: .2rem .2rem auto auto; }
.rail-divider { width: 1.75rem; border-top: 1px solid var(--vscode-panel-border); }
#server-bookmarks { display: flex; flex-direction: column; gap: .65rem; }
.home-button img { display: block; }
.add-server { background: transparent; }
#community-workspace { display: grid; grid-template-columns: 17rem minmax(0,1fr); min-width: 0; min-height: 0; }
#community-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; color: var(--vscode-sideBar-foreground,var(--vscode-foreground)); background: var(--vscode-sideBar-background); border-right: 1px solid var(--vscode-panel-border); }
.community-heading,.conversation-heading { min-height: 3.75rem; border-bottom: 1px solid var(--vscode-panel-border); display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; }
.community-heading { flex-shrink: 0; }
#server-overview { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex: 1; min-width: 0; background: transparent; color: inherit; border-color: transparent; text-align: left; font-weight: 650; padding-inline: .15rem; }
#community-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; min-height: 2rem; padding: .35rem; border: 0; background: transparent; color: inherit; }
.icon-button:hover:enabled { background: var(--vscode-toolbar-hoverBackground); color: inherit; }
#channel-navigation { display: flex; flex: 1; flex-direction: column; min-height: 0; }
#channel-tree-host { display: flex; flex: 1; min-height: 0; }
.community-app .channel-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; border: 0; background: transparent; }
.community-app .server-tab { display: none; }
.community-app #server-tree { flex: 1; min-height: 0; height: 100%; max-height: none; padding: .35rem .4rem; }
.community-app .tree-row { min-height: 2rem; border-radius: .3rem; gap: .35rem; padding: .35rem .45rem .35rem calc(.15rem + min(var(--depth,0),8)*.65rem); }
.community-app .tree-label { flex: 1; }
.community-app .tree-count { font-size: .6875rem; padding-left: .15rem; }
.channel-unread { font-size: .6875rem; font-weight: 650; }
.community-app .tree-row[data-key^="person:"] { font-size: .8125rem; }
.community-app .tree-row[data-key="server"] { font-weight: 650; margin-bottom: .2rem; }
.community-app .tree-actions { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.5rem; min-height: 1.5rem; padding: 0; border: 0; background: transparent; color: inherit; visibility: hidden; }
.community-app .tree-actions svg { width: 1rem; height: 1rem; }
.tree-row:hover .tree-actions,.tree-row:focus-within .tree-actions { visibility: visible; }
.community-app .tree-row[data-current=true]:not([aria-selected=true]) { background: var(--vscode-list-inactiveSelectionBackground,var(--vscode-list-hoverBackground)); color: var(--vscode-list-inactiveSelectionForeground,inherit); }
.community-app .chat-tabs { display: flex; flex-direction: column; flex-shrink: 0; gap: .2rem; padding: .65rem .5rem; border: 0; overflow-x: hidden; background: transparent; }
.community-app .chat-tabs button { flex-shrink: 0; min-height: 2.25rem; border: 0; border-radius: .35rem; width: 100%; max-width: 100%; text-align: left; white-space: normal; color: inherit; background: transparent; }
.community-app .chat-tabs button[aria-pressed=true] { color: var(--vscode-list-activeSelectionForeground); background: var(--vscode-list-activeSelectionBackground); }
.community-app .chat-tabs button:hover:enabled:not([aria-pressed=true]) { color: var(--vscode-list-hoverForeground,inherit); background: var(--vscode-list-hoverBackground); }
#server-conversations { border-bottom: 1px solid var(--vscode-panel-border); }
.community-app #dm-navigation { flex: 1; overflow-y: auto; }
.navigation-heading h2 { font-size: .75rem; font-weight: 650; padding: .5rem; }
#dm-conversations,#private-chats { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
#private-chats button { display: flex; gap: .5rem; align-items: center; }
#dm-navigation #recipient-field { padding: .5rem; }
#voice-dock { flex-shrink: 0; background: var(--vscode-sideBarSectionHeader-background,var(--vscode-sideBar-background)); border-top: 1px solid var(--vscode-panel-border); }
#connection-dock { padding: .4rem .65rem; }
.voice-dock-actions { display: flex; align-items: center; gap: .25rem; }
.community-app .voice-actions { border: 0; padding: 0; }
.community-app .voice-actions #mute { margin-left: 0; }
.voice-dock-actions button { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 2rem; min-height: 2rem; border: 0; padding: .3rem; background: transparent; color: inherit; }
.voice-dock-actions #ptt,.voice-dock-actions #audio-resume { width: auto; font-size: .75rem; }
.community-app .level { margin: .2rem 0 0; font-size: .6875rem; gap: .5rem; }
.community-app .level meter { flex: 1; width: 3rem; max-width: 5rem; }
.community-app #speaking { min-width: 0; }
.community-app .connection-bar { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; padding: 0; background: transparent; color: inherit; border: 0; font-size: .6875rem; min-height: 0; }
.community-app #status { margin: .15rem 0; }
.community-app .install-status { display: flex; align-items: center; gap: .3rem; }
#profile-dock { display: flex; align-items: center; gap: .15rem; border-top: 1px solid var(--vscode-panel-border); padding: .45rem; }
#profile-menu { display: flex; gap: .5rem; align-items: center; min-width: 0; flex: 1; text-align: left; border: 0; padding: .3rem; color: inherit; background: transparent; }
#profile-menu>svg { flex: none; width: 1.75rem; height: 1.75rem; }
#profile-menu>span { min-width: 0; }
#profile-name { display: block; font-size: .8125rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#profile-presence { margin: 0; font-size: .6875rem; }
#profile-controls { display: flex; gap: .1rem; }
#profile-controls button { display: inline-flex; justify-content: center; align-items: center; width: 1.875rem; min-height: 2rem; border: 0; padding: .25rem; background: transparent; color: inherit; position: relative; }
#profile-controls button[aria-pressed=true] { color: var(--vscode-errorForeground); background: var(--vscode-toolbar-activeBackground); }
#conversation-view { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--vscode-editor-background); }
.conversation-heading { color: var(--vscode-editor-foreground); gap: .75rem; padding-inline: 1.25rem; flex-shrink: 0; }
.conversation-heading>div { min-width: 0; flex: 1; }
.conversation-heading h1 { font-size: 1rem; font-weight: 650; }
#conversation-icon { display: flex; flex-shrink: 0; color: var(--vscode-descriptionForeground); }
#conversation-icon svg { width: 1.5rem; height: 1.5rem; }
#conversation-topic { margin: .15rem 0 0; font-size: .75rem; color: var(--vscode-descriptionForeground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#conversation-description { flex-shrink: 0; max-height: min(7rem,20dvh); overflow: auto; margin: 0; padding: .75rem 1.25rem; border-bottom: 1px solid var(--vscode-panel-border); font-size: .875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
#toggle-navigation { display: none; }
#close-navigation { display: none; }
#conversation-alerts { flex-shrink: 0; max-height: 25dvh; overflow: auto; }
#conversation-alerts>p,#popup-alerts>p { margin: 0; padding: .35rem .75rem; font-size: .8125rem; }
#conversation-alerts>p:empty,#popup-alerts>p:empty { display: none; }
#chat-host { display: flex; flex: 1; min-height: 0; min-width: 0; }
.community-app .text-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; border: 0; }
#session-activity { flex-shrink: 0; max-height: 25dvh; overflow: auto; padding: .25rem 1.25rem; border-top: 1px solid var(--vscode-panel-border); font-size: .75rem; }
#session-activity>summary { cursor: pointer; }
#session-activity .connection-bar { padding: .5rem 0; }
#conversation-alerts>section,#popup-alerts>section,#settings-alerts>section { padding: .5rem .75rem; }
.community-app #messages-empty { margin: auto 0 0; padding: 1.25rem; font-size: .875rem; }
.community-app #messages { height: auto; flex: 1; min-height: 2rem; max-height: none; padding: .75rem 1.25rem; }
.community-app #messages:empty { flex: 0; }
.community-app #messages>p { display: block; padding: .6rem 0; margin: 0; white-space: normal; }
.community-app #messages>p:hover { background: var(--vscode-list-hoverBackground); }
.community-app #messages .message-meta { display: block; font-size: .75rem; line-height: 1.6; font-weight: 600; }
.community-app #messages .message-body { display: block; font-size: .9375rem; line-height: 1.55; max-width: 75ch; }
.message-body .markdown-line,.message-body .markdown-heading { display: block; white-space: pre-wrap; }
.message-body .markdown-heading { margin-top: .3rem; }
.message-body ul,.message-body ol { margin: .25rem 0; padding-inline-start: 1.5rem; }
.message-body blockquote { margin: .25rem 0; padding-left: .75rem; border-inline-start: 1px solid var(--vscode-panel-border); white-space: pre-wrap; }
.message-body code { font-family: ui-monospace, monospace; font-size: .85em; background: var(--vscode-textCodeBlock-background,var(--vscode-sideBar-background)); padding: .1rem .25rem; border-radius: .2rem; }
.message-body pre { padding: .75rem; margin: .25rem 0; background: var(--vscode-textCodeBlock-background,var(--vscode-sideBar-background)); white-space: pre-wrap; }
.message-body pre code { padding: 0; }
.message-body a { color: var(--vscode-textLink-foreground); text-underline-offset: .15em; }
.community-app #messages [data-notice] { font-size: .75rem; color: var(--vscode-descriptionForeground); white-space: pre-wrap; padding-block: .3rem; }
.community-app #chat { display: grid; grid-template-columns: minmax(0,1fr) auto auto; padding: .75rem 1.25rem 1rem; gap: .25rem .5rem; background: transparent; }
.community-app #message { grid-column: 1; min-height: 2.75rem; max-height: 10rem; resize: none; border-radius: .5rem; padding: .65rem .85rem; }
.community-app .composer-footer { display: contents; }
.community-app #emoji-open { grid-column: 2; grid-row: 1; }
.community-app #send { grid-column: 3; grid-row: 1; border-radius: .5rem; padding-inline: 1rem; }
.community-app #message-help { grid-column: 1/-1; font-size: .6875rem; margin: 0; }
.community-app .conversation-controls { padding: 0 1.25rem; }
.community-app #new-messages { margin-inline: 1.25rem; }
#settings-page { min-height: 0; min-width: 0; display: grid; grid-template-columns: 15rem minmax(0,1fr); background: var(--vscode-editor-background); }
#settings-navigation { padding: 2rem 1rem; display: flex; flex-direction: column; gap: .25rem; overflow-y: auto; background: var(--vscode-sideBar-background); }
#settings-navigation h2 { padding: .5rem .75rem; font-size: .875rem; font-weight: 650; }
#settings-navigation button { text-align: left; border: 0; background: transparent; color: var(--vscode-sideBar-foreground,var(--vscode-foreground)); padding: .65rem .75rem; }
#settings-navigation button[aria-current=page] { background: var(--vscode-list-activeSelectionBackground); color: var(--vscode-list-activeSelectionForeground); }
.settings-main { overflow-y: auto; padding: 2rem min(4vw,3rem); min-width: 0; }
.settings-main>header { display: flex; align-items: center; gap: 1rem; justify-content: space-between; max-width: 55rem; margin-bottom: 1.5rem; }
.settings-main h1 { font-size: 1.375rem; font-weight: 650; }
#settings-content { max-width: 55rem; }
.community-app #settings-content>details,.community-app #popup-content>details { display: block; margin: 0; border: 0; padding: 0; background: transparent; color: inherit; font-size: .875rem; }
#settings-content>[data-shell-panel]>summary,#popup-content>[data-shell-panel]>summary { display: none; }
#settings-content .appearance { display: block; }
#settings-content .appearance select { width: 100%; max-width: 100%; min-height: 2rem; }
#settings-content label,#popup-content label { margin-top: 1rem; }
#settings-content .actions,#popup-content .actions { margin-block: 1rem .25rem; }
.community-app input:not([type=checkbox]):not([type=range]),.community-app textarea,.community-app select { border-radius: .3rem; }
#client-popup { width: min(36rem,calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.25rem; border: 1px solid var(--vscode-panel-border); border-radius: .65rem; color: var(--vscode-editor-foreground); background: var(--vscode-editor-background); box-shadow: 0 8px 24px var(--vscode-widget-shadow); overflow-y: auto; }
#client-popup::backdrop { background: #0009; }
#client-popup>header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
#popup-title { font-size: 1.125rem; font-weight: 650; }
#client-popup .info-panel { border: 0; padding: 0; max-height: none; }
#client-popup #identity-note { display: none; }
#client-popup .join-controls { padding: 0; background: transparent; border: 0; }
#client-popup .connection-card section>h2 { display: none; }
.bookmark-address { color: var(--vscode-descriptionForeground); }
#bookmark-preview p { margin-bottom: 1rem; }
#client-context-menu,#application-popover { position: fixed; inset: auto; margin: 0; width: 15rem; max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: .4rem; overflow: auto; border: 1px solid var(--vscode-panel-border); border-radius: .4rem; background: var(--vscode-menu-background); color: var(--vscode-menu-foreground); box-shadow: 2px 4px 12px var(--vscode-widget-shadow); }
#client-context-menu button { width: 100%; display: block; text-align: left; border: 0; background: transparent; color: inherit; padding: .5rem .65rem; }
#client-context-menu button:hover:enabled,#client-context-menu button:focus-visible { background: var(--vscode-menu-selectionBackground); color: var(--vscode-menu-selectionForeground); }
#application-popover .menu-bar { display: block; }
#application-popover .app-menu>summary { font-weight: 600; padding: .5rem; }
#application-popover .menu-items { position: static; overflow: visible; width: auto; max-height: none !important; box-shadow: none; border: 0; padding-left: .35rem; background: transparent; }
.community-app .skip:focus { position: absolute; z-index: 20; background: var(--vscode-editor-background); }
@media (max-width: 65rem) {
 #community-workspace { grid-template-columns: 15rem minmax(0,1fr); }
 #profile-menu>svg { display: none; }
 #settings-page { grid-template-columns: 12rem minmax(0,1fr); }
}
@media (max-width: 48rem) {
 #community-shell { grid-template-columns: 3.5rem minmax(0,1fr); }
 .server-rail { padding-inline: .25rem; }
 .rail-button { width: 2.75rem; min-height: 2.75rem; }
 #community-workspace { display: flex; position: relative; }
 #community-sidebar { display: none; width: min(19rem,100%); flex: 1; }
 #conversation-view { flex: 1; }
 .navigation-open #community-sidebar { display: flex; }
 .navigation-open #conversation-view { display: none; }
 #toggle-navigation { display: inline-flex; }
 #close-navigation { display: inline-flex; }
 .community-heading,.conversation-heading { padding-inline: .65rem; }
 .community-app #chat { padding-inline: .65rem; }
 .community-app #messages { padding-inline: .75rem; }
 #conversation-icon { display: none; }
 #conversation-title { font-size: .9375rem; overflow-wrap: anywhere; }
 #settings-page { display: flex; flex-direction: column; }
 #settings-navigation { padding: .5rem; flex-direction: row; flex-wrap: wrap; overflow: visible; flex-shrink: 0; }
 #settings-navigation h2 { display: none; }
 #settings-navigation button { padding: .4rem; font-size: .75rem; }
 .settings-main { padding: 1rem; }
 #conversation-description { padding-inline: .75rem; }
 #session-activity { padding-inline: .75rem; }
}
@media (pointer: coarse) {
 .community-app .tree-actions { visibility: visible; width: 2.75rem; }
 .community-app .icon-button,.community-app #profile-controls button,.community-app .voice-dock-actions button { width: 2.75rem; min-height: 2.75rem; }
 #community-sidebar { width: min(22rem,100%); }
 #profile-dock { flex-wrap: wrap; }
 #profile-menu { flex-basis: 5rem; }
}
@media (forced-colors: active) {
 .rail-button[aria-pressed=true],#settings-navigation button[aria-current=page] { background: Highlight; color: HighlightText; }
}

/* Shared history follows the conversation typography inside the existing page surface. */
#shared-history-messages { max-height: 55dvh; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .9375rem; line-height: 1.55; }
#shared-history-messages p { margin-block: .75rem; }
#shared-history-messages .message-meta { color: var(--vscode-descriptionForeground); font-size: .75rem; }
