/* Mobile-only workspace. Desktop dock layout is intentionally untouched. */
.mobile-workspace-tabs{display:none}
.mobile-stream-fallback{display:none}
.mobile-team-panel{display:none}
.mobile-more-action{display:none!important}
.portrait-customize-button{display:none}
/* Legal links belong in More on every layout; the old fixed footer could
   overlap the Activity Feed and other panels in compact workspaces. */
#legalLinks{display:none!important}
.top-more-menu .mobile-legal-link{display:flex!important;min-height:38px;align-items:center;padding:8px 11px;color:var(--muted);font-size:12px}
@media (max-width:700px), (orientation:portrait) and (min-width:701px) and (max-width:1200px){
  body.mobile-workspace{overflow:hidden}
  body.mobile-workspace #app:not([hidden]){display:flex;flex-direction:column;height:var(--mobile-visible-height,100dvh);min-height:0;overflow:hidden}
  body.mobile-workspace .topbar{flex:none;padding:8px 12px;gap:6px;min-height:0}
  body.mobile-workspace .topbar{display:flex;flex-wrap:wrap;align-items:center;row-gap:6px}
  body.mobile-workspace .brand{flex:0 0 180px;min-width:180px}
  body.mobile-workspace .workspace-view-actions{margin-left:auto}
  body.mobile-workspace .top-actions{flex:0 0 auto;margin-left:0}
  body.mobile-workspace .connection-strip{order:3;flex:0 0 100%;min-width:0}
  body.mobile-workspace .brand{min-width:0}
  body.mobile-workspace .brand strong{font-size:18px}
  body.mobile-workspace .connection-strip{order:3;flex-basis:100%;min-height:25px;gap:10px}
  body.mobile-workspace .workspace-view-actions{margin-left:auto}
  body.mobile-workspace .top-icon-button{width:44px;height:44px}
  body.mobile-workspace .top-actions{margin-left:0}
  body.mobile-workspace .top-primary-actions{display:none}
  body.mobile-workspace .raid-action-slot{display:none}
  body.mobile-workspace .top-more-menu{max-height:calc(var(--mobile-visible-height,100dvh) - 100px);overflow-y:auto}
  body.mobile-workspace .top-more-menu .mobile-more-action{display:flex!important}
  body.mobile-workspace .top-more-menu .mobile-legal-link{min-height:38px;align-items:center;padding:8px 11px;color:var(--muted);font-size:12px}
  body.mobile-workspace .mobile-notes-unread:not([hidden]){color:var(--pink);margin-left:4px}
  body.mobile-workspace .desk{display:grid!important;flex:1;min-height:0;height:auto;overflow:hidden!important;padding:6px 8px max(8px,env(safe-area-inset-bottom));gap:6px;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto 92px 48px minmax(0,1fr)}
  body.mobile-workspace .desk .column,body.mobile-workspace .desk .column[hidden]{display:contents!important}
  body.mobile-workspace .desk .layout-splitter,body.mobile-workspace .desk .widget-splitter{display:none!important}
  body.mobile-workspace .desk .column > [data-widget]{display:none!important;min-height:0!important;min-width:0;max-height:none;height:auto;flex:none!important;margin:0;grid-column:1}
  body.mobile-workspace .desk .column > [data-widget="activity"],body.mobile-workspace .desk .column > [data-widget="activity"][hidden]{display:flex!important;grid-row:2;min-height:0!important;overflow:hidden}
  body.mobile-workspace .desk [data-widget="activity"] header{min-height:27px;height:27px;padding:2px 8px}
  body.mobile-workspace .desk [data-widget="activity"] header h2{font-size:10px;white-space:nowrap}
  body.mobile-workspace .desk [data-widget="activity"] .header-controls{gap:2px;min-width:0}
  body.mobile-workspace .desk [data-widget="activity"] .header-controls select{max-width:94px;padding:2px;font-size:10px}
  body.mobile-workspace .desk [data-widget="activity"] .filter{padding:1px 3px}
  body.mobile-workspace .desk [data-widget="activity"] .feed-clear-button{display:none}
  body.mobile-workspace .desk [data-widget="activity"] .scroll-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 7px}
  body.mobile-workspace .desk [data-widget="activity"] .activity-row{display:flex;align-items:center;gap:5px;min-height:24px;margin:0;padding:1px 2px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent}
  body.mobile-workspace .desk [data-widget="activity"] .activity-row-top{display:contents}
  body.mobile-workspace .desk [data-widget="activity"] .activity-row-identity{display:flex;flex:0 1 auto;gap:4px;min-width:0;overflow:hidden}
  body.mobile-workspace .desk [data-widget="activity"] .activity-row-top time{margin:0;font-size:9px}
  body.mobile-workspace .desk [data-widget="activity"] .activity-user,body.mobile-workspace .desk [data-widget="activity"] .activity-user-name{max-width:120px;min-height:0!important;padding:0!important;font-size:10px!important}
  body.mobile-workspace .desk [data-widget="activity"] .activity-kind{font-size:8px}
  body.mobile-workspace .desk [data-widget="activity"] .activity-platform-icon{flex-basis:12px;width:12px;height:12px}
  body.mobile-workspace .desk [data-widget="activity"] .activity-platform-icon svg{width:11px;height:11px}
  body.mobile-workspace .desk [data-widget="activity"] .activity-row-detail{flex:1;min-width:0;overflow:hidden;margin:0;white-space:nowrap;text-overflow:ellipsis;font-size:10px}
  body.mobile-workspace:not(.mobile-stream-collapsed) .desk .column > [data-widget="stream"],body.mobile-workspace:not(.mobile-stream-collapsed) .desk .column > [data-widget="stream"][hidden]{display:flex!important;grid-row:1;min-height:0!important;overflow:hidden}
  body.mobile-workspace.mobile-stream-collapsed .desk{grid-template-rows:0 92px 48px minmax(0,1fr)}
  body.mobile-workspace.mobile-stream-collapsed .desk .column > [data-widget="stream"],body.mobile-workspace.mobile-stream-collapsed .desk .column > [data-widget="stream"][hidden]{display:none!important}
  body.mobile-workspace .desk [data-widget="stream"] header{height:36px}
  body.mobile-workspace .desk [data-widget="stream"] .stream-frame{width:100%;height:auto;min-height:300px;aspect-ratio:16/9;flex:none;overflow:hidden}
  body.mobile-workspace .desk [data-widget="stream"] iframe{min-height:0;width:100%;height:100%}
  body.mobile-workspace.mobile-keyboard .desk [data-widget="stream"] .stream-frame{display:none!important}
  body.mobile-workspace .desk .column > [data-widget].mobile-active,body.mobile-workspace .desk .column > [data-widget].mobile-active[hidden],body.mobile-workspace .desk .mobile-team-panel.mobile-active{display:flex!important;grid-row:4;min-height:0!important;overflow:hidden}
  body.mobile-workspace .desk .mobile-team-body{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;padding:6px 9px}
  body.mobile-workspace .desk .mobile-team-panel header{justify-content:flex-end;gap:8px;padding:3px 9px;min-height:54px;height:54px}
  body.mobile-workspace .desk .mobile-team-panel header h2{margin-right:auto}
  body.mobile-workspace .desk .mobile-team-panel header .team-color-button{min-width:44px;width:44px;height:44px}
  body.mobile-workspace .desk .mobile-team-panel .team-color-popover{position:fixed;top:auto;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:auto;max-height:50vh;overflow:auto}
  body.mobile-workspace .desk .mobile-team-body .team-chat-messages{flex:1;min-height:0;max-height:none;overflow:auto}
  body.mobile-workspace .desk .mobile-team-body .team-chat-form{position:relative;flex:none}
  body.mobile-workspace .desk .mobile-team-body textarea{font-size:16px;resize:none}
  body.mobile-workspace .desk [data-widget].mobile-active .scroll-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
  body.mobile-workspace .desk [data-widget].mobile-active header{min-height:48px;height:auto;flex-wrap:wrap;padding:6px 10px}
  body.mobile-workspace .desk [data-widget].mobile-active header h2{font-size:12px;letter-spacing:.07em}
  body.mobile-workspace .desk [data-widget].mobile-active .chat-header-tools{min-width:0;flex-wrap:wrap;justify-content:flex-end}
  body.mobile-workspace .desk [data-widget].mobile-active .queue-header-actions{min-width:0;flex-wrap:wrap;justify-content:flex-end}
  body.mobile-workspace .desk [data-widget].mobile-active .composer{flex:none;padding:8px 9px}
  body.mobile-workspace .desk [data-widget].mobile-active .composer input{font-size:16px}
  body.mobile-workspace .chat-panel[data-chat-size="0"]{--chat-msg:14px;--chat-user:12px;--chat-icon:18px}
  body.mobile-workspace .chat-panel[data-chat-size="1"]{--chat-msg:16px;--chat-user:13px;--chat-icon:19px}
  body.mobile-workspace .chat-panel[data-chat-size="2"]{--chat-msg:18px;--chat-user:14px;--chat-icon:20px}
  body.mobile-workspace .chat-panel[data-chat-size="3"]{--chat-msg:21px;--chat-user:17px;--chat-icon:22px}
  body.mobile-workspace .chat-card{padding:8px 3px;gap:4px 8px}
  body.mobile-workspace .chat-hover-actions{position:static;grid-column:2;justify-self:end;display:flex!important;box-shadow:none;background:transparent;border:0;padding:0;gap:5px}
  body.mobile-workspace .chat-action{min-width:44px;min-height:44px;height:44px;border:1px solid var(--border);border-radius:8px;background:var(--panel2);font-size:19px}
  body.mobile-workspace .chat-read-only{min-height:44px}
  body.mobile-workspace .mobile-workspace-tabs{display:flex;grid-column:1;grid-row:3;min-height:47px;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap}
  body.mobile-workspace .mobile-workspace-tabs[hidden]{display:none}
  body.mobile-workspace .mobile-workspace-tabs button{flex:none;min-height:44px;padding:6px 11px;border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:var(--muted);font-weight:750}
  body.mobile-workspace .mobile-workspace-tabs button[aria-current="page"]{color:var(--cyan);border-color:#3b6570;background:#12303b}
  body.mobile-workspace .mobile-attention-count:not(:empty),body.mobile-workspace .mobile-team-unread:not([hidden]){display:inline-block;min-width:18px;border-radius:9px;background:#663471;color:#fff;text-align:center;font-size:11px}
  body.mobile-workspace .mobile-chat-updated:not([hidden]){display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;margin-left:3px;border-radius:9px;background:var(--pink);color:#fff;font-size:10px;font-weight:850;line-height:1}
  body.mobile-workspace .legal-links{display:none}
  body.mobile-workspace .drawer{height:var(--mobile-visible-height,100dvh);bottom:auto;padding-bottom:env(safe-area-inset-bottom)}
  body.mobile-workspace.mobile-keyboard .connection-strip{display:none}
  body.mobile-workspace.mobile-keyboard .topbar{min-height:0}
}
@media (max-width:549px){
  body.mobile-workspace .desk [data-widget="stream"] .stream-frame{min-height:0;aspect-ratio:auto}
  body.mobile-workspace .desk [data-widget="stream"] iframe{display:none!important}
  body.mobile-workspace .desk [data-widget="stream"] .mobile-stream-fallback{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:66px;padding:10px;color:var(--muted);font-size:12px}
  body.mobile-workspace .mobile-stream-fallback a{flex:none;color:var(--cyan);font-weight:750}
}


/* Portrait work panel fills the available row instead of inheriting the tablet height cap. */
@media (orientation:portrait) and (min-width:701px) and (max-width:1200px) {
  /* Keep the existing desktop topbar on one row; the wrapped connection strip
     otherwise overflows the fixed 68px header and gets covered by the panels. */
  body.mobile-workspace .topbar { height:68px; min-height:68px; flex-wrap:nowrap; align-items:center; gap:10px; padding:0 12px; overflow:visible; }
  body.mobile-workspace .brand { flex:0 0 150px; min-width:150px; }
  body.mobile-workspace .brand strong { font-size:18px; white-space:nowrap; }
  body.mobile-workspace .connection-strip { order:0; flex:1 1 auto; flex-basis:auto; min-width:100px; max-width:none; gap:6px; overflow:hidden; }
  body.mobile-workspace .workspace-view-actions { flex:0 0 auto; margin-left:0; }
  body.mobile-workspace .top-icon-button { width:36px; height:36px; }
  body.mobile-workspace .top-actions { flex:0 0 auto; margin-left:0; gap:6px; }
  body.mobile-workspace .account { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.mobile-workspace .desk .chat-panel.mobile-active { height:auto!important; max-height:none!important; }
}

/* Vertical desktop monitors use the desktop chat row density and hover toolbar. */
@media (orientation:portrait) and (min-width:701px) and (max-width:1200px) and (hover:hover) and (pointer:fine) {
  body.mobile-workspace .chat-panel[data-chat-size="0"] { --chat-msg:16px; --chat-user:12px; --chat-icon:19px; }
  body.mobile-workspace .chat-panel[data-chat-size="1"] { --chat-msg:20px; --chat-user:14px; --chat-icon:22px; }
  body.mobile-workspace .chat-panel[data-chat-size="2"] { --chat-msg:24px; --chat-user:17px; --chat-icon:24px; }
  body.mobile-workspace .chat-panel[data-chat-size="3"] { --chat-msg:28px; --chat-user:20px; --chat-icon:28px; }
  body.mobile-workspace .chat-card { padding:calc(var(--chat-msg) * .5) 42px calc(var(--chat-msg) * .5) 3px; gap:2px 9px; }
  body.mobile-workspace .chat-hover-actions {
    position:absolute; right:7px; top:7px; display:none!important; align-items:center; gap:3px;
    padding:2px; border:1px solid rgba(255,255,255,.09); border-radius:7px;
    background:#0b111c; box-shadow:0 5px 16px #0006;
  }
  body.mobile-workspace .chat-card:hover .chat-hover-actions,
  body.mobile-workspace .chat-card:focus-within .chat-hover-actions { display:flex!important; }
  body.mobile-workspace .chat-action { min-width:28px; min-height:26px; width:28px; height:26px; border:0; border-radius:5px; background:transparent; font-size:14px; }
}

/* Wide portrait monitors get a customizable two-column moderator workspace. */
@media (orientation:portrait) and (min-width:900px) and (max-width:1200px) and (pointer:fine) {
  /* Keep the same header widths and control order as the landscape desktop. */
  body.portrait-workspace .topbar { gap:12px; padding:0 18px; }
  body.portrait-workspace .brand { flex:0 0 180px; min-width:180px; }
  body.portrait-workspace .brand strong { font-size:20px; }
  body.portrait-workspace .connection-strip { gap:10px; }
  body.portrait-workspace .workspace-view-actions { margin-left:auto; }
  body.portrait-workspace .top-actions { gap:9px; }
  body.portrait-workspace .account { display:inline-flex; max-width:150px; }
  body.portrait-workspace .desk { position:relative; display:flex!important; flex-direction:column; gap:8px; padding:6px 8px 8px; }
  body.portrait-workspace .desk>.column,body.portrait-workspace .desk>.layout-splitter { display:none!important; }
  body.portrait-workspace .mobile-workspace-tabs { display:none!important; }
  body.portrait-workspace .mobile-workspace-tabs>[data-mobile-tab="chat"],
  body.portrait-workspace .mobile-workspace-tabs>[data-mobile-tab="attention"],
  body.portrait-workspace .mobile-workspace-tabs>[data-mobile-tab="queue"] { display:none!important; }
  body.portrait-workspace .mobile-workspace-tabs>[data-mobile-tab="team"] { min-height:38px; height:38px; padding:5px 12px; }
  body.portrait-workspace .portrait-customize-button { display:inline-flex; align-items:center; margin-left:auto; min-height:38px; height:38px; padding:5px 12px; border:1px solid var(--border); border-radius:8px; background:var(--panel2); color:var(--text); font-weight:750; }
  body.portrait-workspace .portrait-board { display:grid; flex:1 1 0; min-height:0; grid-template-rows:minmax(350px,var(--portrait-preview-height,390px)) 10px minmax(0,1fr); gap:0; }
  body.portrait-workspace .portrait-stream-slot { min-height:0; overflow:hidden; }
  body.portrait-workspace .portrait-stream-slot>[data-widget="stream"] { display:flex!important; width:100%; height:100%!important; min-height:0!important; max-height:none!important; flex:1 1 auto!important; }
  body.portrait-workspace .portrait-stream-slot .stream-frame { min-height:0; flex:1 1 auto; display:flex; align-items:center; justify-content:center; container-type:size; }
  body.portrait-workspace .portrait-stream-slot .stream-frame iframe { width:min(100cqw,177.7778cqh)!important; height:min(100cqh,56.25cqw)!important; min-width:0!important; min-height:0!important; max-width:100%!important; max-height:100%!important; aspect-ratio:16/9; }
  body.portrait-workspace.mobile-stream-collapsed .portrait-stream-slot { display:none; }
  body.portrait-workspace.portrait-preview-hidden .portrait-board { grid-template-rows:minmax(0,1fr); }
  body.portrait-workspace.portrait-preview-hidden .portrait-stream-slot,
  body.portrait-workspace.portrait-preview-hidden .portrait-split-preview { display:none!important; }
  body.portrait-workspace .portrait-main { display:grid; min-height:0; grid-template-columns:minmax(420px,var(--portrait-main-share,64fr)) 10px minmax(300px,var(--portrait-side-share,36fr)); }
  body.portrait-workspace .portrait-main.portrait-main-no-side { grid-template-columns:minmax(0,1fr) 0 minmax(0,0fr); }
  body.portrait-workspace .portrait-main.portrait-main-no-side>.portrait-split-columns { display:none; }
  body.portrait-workspace .portrait-primary { display:flex; min-height:0; overflow:hidden; }
  body.portrait-workspace .portrait-primary>[data-widget="chat"] { display:flex!important; width:100%; height:auto!important; min-height:0!important; max-height:none!important; flex:1 1 auto!important; }
  body.portrait-workspace .portrait-primary .chat-messages { flex:1 1 0; min-height:0; overflow-y:auto; }
  body.portrait-workspace .portrait-primary .composer { flex:0 0 auto; }
  body.portrait-workspace .portrait-side-stack { display:flex; flex-direction:column; min-height:0; overflow:hidden; gap:0; }
  body.portrait-workspace .portrait-side-stack>[data-widget] { display:flex!important; flex:var(--portrait-weight,1) 1 0!important; min-height:90px!important; max-height:none!important; height:auto!important; overflow:hidden; }
  body.portrait-workspace .portrait-side-stack>[data-widget].portrait-panel-hidden { display:none!important; }
  body.portrait-workspace .portrait-side-stack .scroll-body { flex:1 1 0; min-height:0; overflow:auto; }
  body.portrait-workspace .portrait-side-stack .portrait-layout-splitter { flex:0 0 9px; }
  body.portrait-workspace .portrait-layout-splitter { position:relative; z-index:4; touch-action:none; cursor:row-resize; user-select:none; }
  body.portrait-workspace .portrait-split-columns { cursor:col-resize; }
  body.portrait-workspace .portrait-layout-splitter::after { content:""; position:absolute; background:#526178; border-radius:3px; opacity:.5; transition:opacity .12s,background .12s; }
  body.portrait-workspace .portrait-layout-splitter:hover::after,body.portrait-workspace .portrait-layout-splitter:focus-visible::after { opacity:1; background:var(--cyan); }
  body.portrait-workspace .portrait-split-preview::after,body.portrait-workspace .portrait-split-side::after { left:calc(50% - 26px); top:3px; width:52px; height:3px; }
  body.portrait-workspace .portrait-split-columns::after { top:calc(50% - 26px); left:3px; width:3px; height:52px; }
  body.portrait-workspace .portrait-layout-popover { position:absolute; z-index:20; top:46px; right:8px; display:grid; gap:9px; width:min(310px,calc(100% - 16px)); padding:14px; border:1px solid var(--border); border-radius:10px; background:#101522; box-shadow:0 14px 36px #000b; }
  body.portrait-workspace .portrait-layout-popover[hidden] { display:none; }
  body.portrait-workspace .portrait-layout-popover p { margin:0; color:var(--muted); font-size:11px; }
  body.portrait-workspace .portrait-layout-popover label { display:flex; align-items:center; gap:8px; min-height:30px; }
  body.portrait-workspace .portrait-layout-popover .button { justify-self:end; }
  body.portrait-workspace .mobile-team-panel.mobile-active { flex:1 1 0; min-height:0; grid-row:auto; }
  body.portrait-workspace .portrait-board[hidden] { display:none!important; }
  body.portrait-workspace.portrait-team-open .portrait-board { display:none!important; }
  body.portrait-workspace.portrait-layout-resizing,body.portrait-workspace.portrait-layout-resizing * { cursor:inherit; user-select:none; }
}

/* Wide portrait: both chat types live inside the same resizable chat panel. */
@media (orientation:portrait) and (min-width:900px) and (max-width:1200px) and (pointer:fine) {
  body.portrait-workspace .mobile-workspace-tabs>[data-mobile-tab="team"] { display:none!important; }
  body.portrait-workspace .top-more-menu .portrait-customize-button { display:flex!important; width:100%; justify-content:flex-start; }
  body.portrait-workspace .chat-mode-tabs { display:flex; align-items:center; gap:6px; min-height:39px; padding:4px 9px; border-bottom:1px solid var(--border); background:var(--panel); position:relative; flex:none; }
  body.portrait-workspace .chat-mode-tabs>[role="tab"] { min-height:30px; padding:4px 12px; border:1px solid var(--border); border-radius:7px; background:var(--panel2); color:var(--muted); font-weight:750; }
  body.portrait-workspace .chat-mode-tabs>[role="tab"][aria-selected="true"] { color:var(--cyan); border-color:#3b6570; background:#12303b; }
  body.portrait-workspace .chat-team-unread:not([hidden]),body.portrait-workspace .chat-live-unread:not([hidden]) { display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px; padding:0 4px; margin-left:4px; border-radius:9px; background:var(--pink); color:white; font-size:10px; font-weight:850; text-align:center; }
  body.portrait-workspace .chat-mode-tabs .team-color-button { margin-left:auto; min-width:32px; width:32px; height:30px; }
  body.portrait-workspace .chat-mode-tabs .team-color-popover { position:absolute; z-index:10; top:36px; right:8px; }
  body.portrait-workspace .chat-team-view { display:flex; flex:1 1 0; flex-direction:column; min-height:0; overflow:hidden; padding:6px 9px; }
  body.portrait-workspace .chat-team-view[hidden] { display:none!important; }
  body.portrait-workspace .chat-team-view .team-chat-messages { flex:1; min-height:0; max-height:none; overflow-y:auto; }
  body.portrait-workspace .chat-team-view .team-chat-form { position:relative; flex:none; }
  body.portrait-workspace .chat-panel.chat-team-active #chatMessages,
  body.portrait-workspace .chat-panel.chat-team-active #chatForm,
  body.portrait-workspace .chat-panel.chat-team-active>.chat-appearance-popover,
  body.portrait-workspace .chat-panel.chat-team-active .chat-header-tools { display:none!important; }
  body.portrait-workspace .portrait-stream-slot .stream-frame.stream-player-too-small>iframe { display:none!important; }
  body.portrait-workspace .portrait-stream-slot .stream-frame.stream-player-too-small>.mobile-stream-fallback { display:flex!important; align-items:center; justify-content:center; gap:8px; width:100%; min-height:66px; padding:10px; color:var(--muted); }
}

/* Stream Notes remains a topbar shortcut beside Tools, including compact views. */
@media (max-width:1200px) {
  .top-actions>.notes-trigger { display:inline-flex!important; }
}

/* Use one Chat window and the same chat-mode tabs in landscape and portrait. */
.chat-mode-tabs{display:none;align-items:center;gap:6px;min-height:39px;padding:4px 9px;border-bottom:1px solid var(--border);background:var(--panel);position:relative;flex:none}
.chat-mode-tabs>[role="tab"]{min-height:30px;padding:4px 12px;border:1px solid var(--border);border-radius:7px;background:var(--panel2);color:var(--muted);font-weight:750}
.chat-mode-tabs>[role="tab"][aria-selected="true"]{color:var(--cyan);border-color:#3b6570;background:#12303b}
.chat-team-unread:not([hidden]),.chat-live-unread:not([hidden]){display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;margin-left:4px;border-radius:9px;background:var(--pink);color:#fff;font-size:10px;font-weight:850;text-align:center}
.chat-mode-tabs .team-color-button{margin-left:auto;min-width:32px;width:32px;height:30px}
.chat-mode-tabs .team-color-popover{position:absolute;z-index:20;top:36px;right:8px}
.chat-team-view{display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden;padding:6px 9px}
.chat-team-view[hidden]{display:none!important}
.chat-team-view .team-chat-messages{flex:1;min-height:0;max-height:none;overflow-y:auto}
.chat-team-view .team-chat-form{position:relative;flex:none}
body:not(.mobile-workspace) .chat-mode-tabs{display:flex}
body:not(.mobile-workspace) .chat-team-active #chatMessages,
body:not(.mobile-workspace) .chat-team-active #chatForm,
body:not(.mobile-workspace) .chat-team-active>.chat-appearance-popover,
body:not(.mobile-workspace) .chat-team-active .chat-header-tools{display:none!important}
@media (orientation:portrait) and (min-width:900px) and (max-width:1200px) and (pointer:fine){
  body.portrait-workspace .chat-mode-tabs{display:flex}
  body.portrait-workspace .chat-team-active #chatMessages,
  body.portrait-workspace .chat-team-active #chatForm,
  body.portrait-workspace .chat-team-active>.chat-appearance-popover,
  body.portrait-workspace .chat-team-active .chat-header-tools{display:none!important}
}

/* Event family colors remain on the label and metric at every viewport size. */
body.mobile-workspace .desk [data-widget="activity"] .activity-metric{color:var(--activity-accent)}
