/* XMARTS LAB · Mobile UI polish v2 · intentionally isolated from desktop. */
@media (max-width:700px){
 /* 1 — Personas: fixed panel with ONE independently scrollable employee list. */
 body.xm-mkt-ui #peopleRail:not(.rail-hidden){
   display:flex!important;flex-direction:column!important;
   top:calc(72px + env(safe-area-inset-top,0px))!important;
   bottom:calc(var(--xm-mobile-nav-height,67px) + 6px)!important;
   left:8px!important;right:8px!important;width:auto!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   overflow:hidden!important;padding:9px!important;
 }
 body.xm-mkt-ui #peopleRail>.xm-personas-header{
   position:relative!important;flex:0 0 auto!important;
   height:auto!important;min-height:83px!important;max-height:none!important;
 }
 body.xm-mkt-ui #peopleRail>.xm-personas-directory{
   display:flex!important;flex-direction:column!important;flex:1 1 0!important;
   height:auto!important;max-height:none!important;min-height:0!important;
   overflow:hidden!important;padding:0!important;margin-top:7px!important;
 }
 body.xm-mkt-ui #peopleRail .xm-personas-tools,
 body.xm-mkt-ui #peopleRail .xm-personas-summary,
 body.xm-mkt-ui #peopleRail .xm-personas-switch{flex:0 0 auto!important;}
 body.xm-mkt-ui #peopleRail #directoryList,
 body.xm-mkt-ui #peopleRail #directoryList[data-personas-view="list"],
 body.xm-mkt-ui #peopleRail #directoryList[data-personas-view="grid"]{
   display:flex!important;flex-direction:column!important;
   flex:1 1 0!important;height:100%!important;min-height:0!important;
   max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;
   overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
   padding:7px 3px 26px!important;align-items:stretch!important;gap:8px!important;
 }
 body.xm-mkt-ui #peopleRail #directoryList[data-personas-view="grid"]{
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   align-content:start!important;
 }
 body.xm-mkt-ui #peopleRail #directoryList .directory-item{flex:none!important;min-width:0!important;}

 /* 2 — All 4 footer tabs share the same grid geometry, Calendar is ALWAYS last. */
 body.xm-mkt-ui .app-header>.header-nav{
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
   align-content:stretch!important;place-items:stretch!important;
 }
 body.xm-mkt-ui .app-header .header-nav>[data-nav-target="office"]{grid-column:1!important}
 body.xm-mkt-ui .app-header .header-nav>[data-nav-target="people"]{grid-column:2!important}
 body.xm-mkt-ui .app-header .header-nav>[data-nav-target="chats"]{grid-column:3!important}
 body.xm-mkt-ui .app-header .header-nav>#calendarBtn{grid-column:4!important}
 body.xm-mkt-ui .app-header .header-nav>:is([data-nav-target="office"],[data-nav-target="people"],[data-nav-target="chats"],#calendarBtn){
   display:flex!important;flex-direction:column!important;
   align-self:stretch!important;justify-self:stretch!important;
   justify-content:center!important;align-items:center!important;
   position:relative!important;inset:auto!important;transform:none!important;
   float:none!important;min-width:0!important;width:100%!important;max-width:none!important;
   height:100%!important;margin:0!important;padding:3px 2px!important;gap:3px!important;
   font-size:0.6875rem!important;text-align:center!important;line-height:1.12!important;
 }
 body.xm-mkt-ui .app-header .header-nav>#calendarBtn[style*="display: none"]{display:none!important;}
 body.xm-mkt-ui .app-header .header-nav>.top-nav svg.nav-ico{
   display:block!important;width:22px!important;height:22px!important;flex:0 0 22px!important;
   margin:0 auto!important;
 }
 body.xm-mkt-ui .app-header .header-nav>.top-nav span{
   display:block!important;margin:0!important;font-size:0.6875rem!important;
 }

 /* 5 — Only one exit action. No two equal logout buttons side by side. */
 body.xm-mkt-ui .app-header>.brand-shell>button:not(#xmMktBrandExit){display:none!important}
 body.xm-mkt-ui .app-header>.brand-shell>#xmMktBrandExit.xm-mobile-duplicate-exit,
 body.xm-mkt-ui .app-header>.brand-shell>button.xm-mobile-duplicate-exit{display:none!important}

 /* 3 — The new mobile audio/video/effects/general settings screen. */
 body.xm-mkt-ui #app #mediaSettings:not([open]) .settings-popover{display:none!important}
 body.xm-mkt-ui #app #mediaSettings>summary{
   color:var(--vo-light-primary,#f0f4ed)!important;
 }
 body.xm-mkt-ui #xmMobileSettings{
   position:fixed!important;z-index:25000!important;inset:0!important;
   display:flex!important;flex-direction:column!important;
   width:100vw!important;height:100dvh!important;
   min-width:0!important;padding:0!important;margin:0!important;
   color:var(--fg,#f2f4ef)!important;background:var(--glass-solid,#1f2220)!important;
   box-sizing:border-box!important;overflow:hidden!important;
 }
 body.xm-mkt-ui #xmMobileSettings[hidden]{display:none!important}
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-head{
   flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
   padding:24px 19px 11px;gap:12px;background:var(--glass-solid,#1f2220);
 }
 body.xm-mkt-ui #xmMobileSettings h2{margin:0;color:var(--fg,#f6f7f4);font-size:1.6875rem;font-weight:850;letter-spacing:-.02em}
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-close{
   display:grid;place-items:center;width:40px;height:40px;flex:none;
   border:0;background:transparent;color:var(--fg,#eff3ec);font-size:1.9375rem;border-radius:10px;
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-tabs{
   display:flex;flex:0 0 auto;flex-wrap:wrap;gap:5px;white-space:normal;
   padding:8px 12px 3px;scrollbar-width:none;border-bottom:1px solid #ffffff16;
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-tabs::-webkit-scrollbar{display:none}
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-tab{
   display:flex;align-items:center;gap:7px;flex:1 1 auto;min-width:0;max-width:100%;
   min-height:44px;padding:8px 13px;
   background:transparent;border:0;border-radius:12px 12px 0 0;
   color:var(--muted,#aeb7af);font-size:0.8125rem;font-weight:750;
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-tab[aria-selected="true"]{
   color:var(--fg,#a7d777);background:var(--accent-soft,#2d392b);border-bottom:2px solid var(--accent,#9bcb60);
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-scroll{
   flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;
   padding:21px 14px calc(23px + env(safe-area-inset-bottom,0px));
   overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-pane[hidden]{display:none!important}
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-pane{
   display:flex;flex-direction:column;gap:15px;min-width:0;
 }
 body.xm-mkt-ui #xmMobileSettings .audio-pro-settings,
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-camera-card{
   display:block!important;position:static!important;visibility:visible!important;
   opacity:1!important;width:100%!important;min-width:0!important;
   height:auto!important;max-height:none!important;padding:18px!important;margin:0!important;
   background:var(--glass-solid,#292c2a)!important;border:1px solid var(--line,#454a46)!important;border-radius:21px!important;
   box-shadow:none!important;color:var(--fg,#f2f4ef)!important;box-sizing:border-box!important;
 }
 body.xm-mkt-ui #xmMobileSettings .audio-pro-title{
   display:flex!important;flex-direction:column!important;gap:3px!important;
   position:static!important;width:auto!important;padding:0!important;
   margin:0 0 15px!important;border:0!important;background:none!important;
 }
 body.xm-mkt-ui #xmMobileSettings .audio-pro-title>span{color:var(--fg,#f7f8f6)!important;font-size:1.1875rem!important;font-weight:800!important}
 body.xm-mkt-ui #xmMobileSettings .audio-pro-title>small{font-size:0.75rem!important;color:var(--muted,#a9b1aa)!important;font-weight:450!important}
 body.xm-mkt-ui #xmMobileSettings .media-device-grid{
   display:flex!important;flex-direction:column!important;gap:14px!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   padding:0!important;margin:0!important;
 }
 body.xm-mkt-ui #xmMobileSettings .media-device-grid>div{display:block;min-width:0!important;width:100%!important;box-sizing:border-box!important}
 body.xm-mkt-ui #xmMobileSettings label:not(.reduce-motion-choice){
   color:var(--fg,#f2f4ef)!important;font-size:0.875rem!important;font-weight:700!important;
 }
 body.xm-mkt-ui #xmMobileSettings select{
   width:100%!important;max-width:100%!important;min-width:0!important;
   min-height:51px!important;height:51px!important;
   margin:9px 0 0!important;padding:0 13px!important;box-sizing:border-box!important;
   background:var(--raise,#393d3a)!important;border:1px solid #ffffff13!important;
   border-radius:12px!important;color:var(--fg,#f5f7f4)!important;font-size:0.875rem!important;
 }
 body.xm-mkt-ui #xmMobileSettings .device-actions,
 body.xm-mkt-ui #xmMobileSettings .camera-background-actions,
 body.xm-mkt-ui #xmMobileSettings .audio-processing,
 body.xm-mkt-ui #xmMobileSettings .accessibility-theme{
   display:flex!important;flex-wrap:wrap!important;gap:8px!important;
 }
 body.xm-mkt-ui #xmMobileSettings button:not(.xm-mobile-settings-tab):not(.xm-mobile-settings-close):not([data-text-scale]),
 body.xm-mkt-ui #xmMobileSettings .camera-background-upload-label{
   min-height:40px;background:var(--raise,#383d39)!important;border:1px solid #525a51!important;
   border-radius:11px!important;padding:8px 11px!important;color:var(--fg,#f1f5ef)!important;
   font-size:0.8125rem!important;font-weight:700!important;box-shadow:none!important;
 }
 body.xm-mkt-ui #xmMobileSettings :is(.active,[aria-pressed="true"]):not(.xm-mobile-settings-tab):not([data-text-scale]){
   background:var(--vo-light-selection,#435c37)!important;border-color:var(--vo-light-outline,#9bcb60)!important;color:var(--vo-light-primary,#d8f2bf)!important;
 }
 body.xm-mkt-ui #xmMobileSettings .mic-meter{
   width:100%!important;height:13px!important;margin:12px 0!important;border-radius:9px!important;
   background:var(--vo-light-surface,#171d19)!important;overflow:hidden!important;
 }
 body.xm-mkt-ui #xmMobileSettings .mic-meter>span{display:block;height:100%;background:var(--vo-light-surface,#9bcb60)!important}
 body.xm-mkt-ui #xmMobileSettings .audio-processing label{
   min-height:44px;padding:11px!important;display:flex!important;align-items:center!important;
   border-radius:12px!important;background:var(--vo-light-surface,#343835)!important;gap:10px!important;
 }
 body.xm-mkt-ui #xmMobileSettings input[type="checkbox"]{accent-color:#9bcb60}
 body.xm-mkt-ui #xmMobileSettings :is(.accessibility-row,.camera-background-settings,.participant-audio-list){
   min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
 }
 body.xm-mkt-ui #xmMobileSettings .accessibility-grid{display:flex!important;flex-direction:column!important;gap:14px!important}
 body.xm-mkt-ui #xmMobileSettings .accessibility-row{
   padding:11px!important;border-radius:12px!important;background:var(--raise,#353936)!important;
 }
 body.xm-mkt-ui #xmMobileSettings .camera-background-presets{display:flex;flex-wrap:wrap;gap:8px}
 body.xm-mkt-ui #xmMobileSettings .camera-background-presets>*{max-width:44%!important}
 body.xm-mkt-ui #xmMobileSettings .camera-background-preview{max-width:100%!important}
 body.xm-mkt-ui #xmMobileSettings .camera-background-note,
 body.xm-mkt-ui #xmMobileSettings .accessibility-note,
 body.xm-mkt-ui #xmMobileSettings .participant-audio-empty{color:var(--muted,#aeb8af)!important;font-size:0.75rem!important}
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-hint{
   color:var(--vo-light-secondary,#aeb7af);font-size:0.8125rem;line-height:1.5;margin:0;padding:4px 2px 10px;
 }
 body.xm-mkt-ui #xmMobileSettings .xm-mobile-settings-video-test{
   display:block;width:100%;max-height:235px;aspect-ratio:16/9;object-fit:cover;
   border:1px solid #474c47;border-radius:14px;background:var(--vo-light-surface,#1d211e);margin:12px 0;
 }
 /* 4 — Compact bottom sheet for own avatar state, not nested desktop modals. */
 body.xm-mkt-ui #xmMobileStatusSheet{
   display:flex!important;position:fixed!important;inset:0!important;z-index:23000!important;
   flex-direction:column;justify-content:flex-end;color:var(--vo-light-primary,#f3f5f2);
 }
 body.xm-mkt-ui #xmMobileStatusSheet[hidden]{display:none!important}
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-scrim{
   position:absolute;inset:0;background:var(--vo-light-surface,#080b09a6);
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-content{
   position:relative;flex:0 1 auto;
   width:100%;max-height:calc(100dvh - 50px);
   padding:17px 21px calc(24px + env(safe-area-inset-bottom,0px));
   overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;
   border:1px solid #ffffff20;border-radius:28px 28px 0 0;
   background:var(--vo-light-surface,#202322);box-shadow:0 -18px 45px #000a;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-handle{
   display:block;width:55px;height:5px;background:var(--vo-light-surface,#606761);border-radius:6px;margin:0 auto 23px;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-user{
   display:flex;align-items:center;gap:15px;margin-bottom:22px;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-avatar{
   display:grid;place-items:center;flex:0 0 53px;width:53px;height:53px;
   border-radius:50%;background:var(--vo-light-surface,#374139);overflow:hidden;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-avatar img,
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-avatar canvas{max-width:100%;max-height:100%;object-fit:contain}
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-user strong{
   display:block;font-size:1.25rem;font-weight:800;line-height:1.15;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-user small{
   display:block;font-size:0.8125rem;color:var(--vo-light-secondary,#aab5ac);margin-top:4px;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-close{
   margin-left:auto;width:40px;height:40px;flex:0 0 40px;
   border:0;background:transparent;color:var(--vo-light-primary,#e1e5df);font-size:1.875rem;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-row{
   display:flex;align-items:center;gap:14px;width:100%;min-height:56px;
   padding:10px 1px;color:var(--vo-light-primary,#f3f6f1);background:transparent;border:0;text-align:left;
   font-size:1.0625rem;font-weight:600;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-row .dot{
   flex:0 0 12px;width:12px;height:12px;border-radius:50%;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-row .check{margin-left:auto;color:var(--vo-light-primary,#9bcb60);font-size:1.25rem}
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-row[aria-disabled="true"]{
   opacity:var(--vo-light-disabled-opacity,.56);pointer-events:none;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-auto{
   border:0;padding:12px 0 5px;color:var(--vo-light-primary,#949f96);font-size:0.75rem;letter-spacing:.07em;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-status-note{
   font-size:0.75rem;color:var(--vo-light-secondary,#9fa9a0);margin:2px 0 11px 26px;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sheet-divider{
   height:1px;background:var(--vo-light-surface,#ffffff1a);margin:11px 0;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sound{
   display:flex;align-items:center;justify-content:space-between;gap:15px;
   padding:12px 0;min-height:58px;background:none;border:0;color:var(--vo-light-primary,#f2f4ef);
   font-size:1.0625rem;text-align:left;width:100%;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sound small{
   display:block;font-size:0.75rem;color:var(--vo-light-secondary,#aab5ac);max-width:300px;margin-top:4px;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-toggle{
   position:relative;width:45px;height:27px;flex:0 0 45px;background:var(--vo-light-surface,#555b56);
   border-radius:20px;transition:background .15s;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-toggle::after{
   content:"";position:absolute;left:4px;top:4px;width:19px;height:19px;
   border-radius:50%;background:var(--vo-light-surface,#e8eee6);transition:transform .15s;
 }
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sound[aria-pressed="true"] .xm-mobile-toggle{background:var(--vo-light-selection,#719f48)}
 body.xm-mkt-ui #xmMobileStatusSheet .xm-mobile-sound[aria-pressed="true"] .xm-mobile-toggle::after{transform:translateX(18px)}
}
