.mobile-workspace-nav,.mobile-column-tabs,.mobile-menu-scrim{display:none}
@media(max-width:760px), (max-width:950px) and (max-height:500px){
 html{height:100%;overscroll-behavior:none}body{height:var(--phone-height,100dvh);min-width:0;overflow:hidden;--phone-keyboard-inset:max(0px,calc(100dvh - var(--phone-height,100dvh)))}
 body #app{height:100%;min-height:0}
 body:not(:has(.app-shell)){height:auto;min-height:100dvh;overflow:auto}
 body:not(:has(.app-shell)) #app{height:auto;min-height:100dvh}
 body .app-shell,body.nav-collapsed .app-shell{display:block;width:100%;height:100%;min-height:0;min-width:0}
 body .app-shell>.workspace{width:100%;height:100%;min-width:0;padding:0}
 body .sidebar,body.nav-collapsed .sidebar{position:fixed;inset:0 auto 0 0;z-index:110;width:min(300px,84vw);height:100dvh;max-height:100dvh;padding:20px 16px;background:var(--panel);border-right:1px solid var(--line);transform:translateX(-105%);transition:transform .22s ease;overflow:auto;visibility:hidden}
 body.mobile-menu-open .sidebar{transform:translateX(0);visibility:visible}
 body.mobile-menu-open .mobile-workspace-nav{visibility:hidden}
 body .sidebar .nav-label,body .sidebar .brand,body .sidebar .account,body .sidebar .eyebrow{display:revert!important}
 body .sidebar button{width:100%;justify-content:flex-start;min-height:46px;padding:10px 12px;font-size:15px;gap:12px}
 body .sidebar .sidebar-bottom{gap:8px}body .sidebar .brand{font-size:22px;margin-bottom:18px}
 body .mobile-menu-scrim:not([hidden]){display:block;position:fixed;inset:0;z-index:105;border:0;background:#0006;backdrop-filter:blur(3px);border-radius:0}
 body .page-head.app-topbar{height:60px;min-height:60px;flex-basis:60px;padding:8px 12px;grid-template-columns:44px minmax(0,1fr);gap:6px;padding-top:max(8px,env(safe-area-inset-top))}
 body .app-topbar>.workspace-views{display:none!important}
 body .app-topbar>.topbar-start{grid-column:1;grid-row:1}
 body .app-topbar>.topbar-actions{grid-column:2;grid-row:1;gap:2px}
 body .app-topbar .topbar-actions>.icon-button,body .app-topbar .topbar-start>.icon-button{width:42px;min-width:42px;height:42px;min-height:42px;padding:10px}
 body .app-topbar .topbar-account{height:42px;min-height:42px;padding:5px}.app-topbar .topbar-account-text{display:none!important}
 body .app-topbar .topbar-account>.avatar{width:30px;height:30px}
 body .workspace>#content{padding:12px;min-height:0;overflow:auto;overscroll-behavior:contain;flex:1}
 body[data-page=tasks] .workspace>#content{display:flex;flex-direction:column;overflow:hidden;padding-bottom:calc(74px + env(safe-area-inset-bottom))}
 body .mobile-workspace-nav:not([hidden]){position:fixed;inset:auto 0 0;display:flex;gap:6px;align-items:stretch;padding:7px 12px calc(7px + env(safe-area-inset-bottom));height:calc(66px + env(safe-area-inset-bottom));box-sizing:border-box;z-index:60;background:var(--panel);border-top:1px solid var(--line);box-shadow:0 -3px 20px #0000000a}
 body .mobile-workspace-nav:not([hidden]){bottom:var(--phone-keyboard-inset)}
 .mobile-workspace-nav>button{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:46px;min-width:0;border:0;border-radius:9px;background:transparent;color:var(--muted);font:550 12px/1.2 system-ui}
 .mobile-workspace-nav>button[aria-pressed=true]{background:var(--field);color:var(--text)}.mobile-workspace-nav>button:disabled{opacity:.35}
 .mobile-workspace-nav svg{width:21px;height:21px}
 body .workspace-auxiliary-row,body .staff-main>.task-splitter,body .employee-space>.task-rail,body .mobile-tree-launch{display:none!important}
 body[data-page=tasks] .task-search-row{width:100%;margin:0 0 10px;display:flex;flex-wrap:wrap!important;gap:8px!important;flex:none}
 body[data-page=tasks]:not([data-role=client]) .task-search-row #task-search{width:0;flex:1;max-width:none;font-size:16px;min-height:44px;padding:10px 12px}
 body .task-search-row>.search-create-task{font-size:0;width:44px!important;min-width:44px!important;padding:0!important;min-height:44px}
 body .task-search-row>.search-create-task::after{content:'+';font:400 28px/1 system-ui}
 body .task-search-row>.search-create-task::before{content:none!important}
 body .task-search-row>.done-filter-button{width:44px;height:44px;min-height:44px}
 body .task-search-row>.mobile-column-tabs{display:flex;flex:0 0 100%;gap:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface-two);box-sizing:border-box}
 .mobile-column-tabs>button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:40px;padding:7px 3px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
 .mobile-column-tabs>button>span{font-size:11px;opacity:.75}.mobile-column-tabs>button[aria-pressed=true]{background:var(--field);color:var(--text);box-shadow:0 1px 3px #0001}
 .mobile-column-tabs [data-mobile-column=new][aria-pressed=true]{color:var(--blue)}.mobile-column-tabs [data-mobile-column=in_progress][aria-pressed=true]{color:var(--yellow)}.mobile-column-tabs [data-mobile-column=done][aria-pressed=true]{color:var(--green)}
 body .employee-space,body .staff-main{width:100%;max-width:none;height:100%;min-height:0;flex:1;overflow:hidden;margin:0;padding:0}
 body[data-page=tasks] .staff-main>#task-list{flex:1!important;height:100%;opacity:1!important;transform:none!important;overflow:hidden;transition:none!important}
 body #task-list .board{display:flex!important;gap:0;height:100%;width:100%;overflow:hidden;min-width:0}
 body #task-list .column{display:none!important;width:100%;flex:1;min-width:0;border-radius:12px}
 body[data-mobile-column=new] #task-list .column-new,body[data-mobile-column=in_progress] #task-list .column-progress,body[data-mobile-column=done] #task-list .column-done{display:flex!important}
 body #task-list .column-heading{display:none!important}body #task-list .done-search-row{padding:10px;gap:8px}
 body #task-list .column-search{height:42px;font-size:16px}body #task-list .done-filter-button{height:42px;width:42px;min-height:42px}
 body #task-list .cards{padding:0 10px 12px!important;gap:10px!important;overscroll-behavior:contain}
 body .task-card{width:100%;min-width:0}body .task-card .task-open h3{font-size:16px;line-height:1.35}body .task-card .task-open small{font-size:12px}
 body .task-card .card-actions>button{min-height:44px;font-size:13px!important}
 body[data-mobile-pane=list] .staff-main>#task-stage,body:not([data-mobile-pane=list]) .staff-main>#task-list{display:none!important}
 body:not([data-mobile-pane=list]) .task-search-row{display:none!important}
 body[data-page=tasks][data-mobile-pane=task] .staff-main>#task-stage{display:flex!important;flex:1!important;width:100%;height:100%!important;min-height:0!important;padding:0!important;opacity:1!important;transform:none!important;pointer-events:auto!important;border-radius:12px;transition:none!important}
 body[data-mobile-pane=tree] .staff-main{display:none!important}
 body .employee-space>.structure-rail{display:none!important}
 body[data-mobile-pane=tree] .employee-space>.structure-rail:not([hidden]){display:flex!important;position:relative!important;inset:auto!important;width:100%!important;height:100%;max-height:100%;pointer-events:auto;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface-two)}
 body[data-mobile-pane=tree] .employee-space>.structure-rail>#structure-map{height:auto!important;flex:1;width:100%!important;max-height:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;margin:0!important;padding:24px 28px!important;overflow:auto}
 body .trash-launch{bottom:calc(78px + env(safe-area-inset-bottom));right:18px;width:42px;height:42px;z-index:24}
 body[data-mobile-pane=task] .trash-launch,body[data-mobile-pane=tree] .trash-launch{display:none}
 /* Client list, request and conversation are full-height screens sharing the same draft. */
 body.client-surface .client-space{display:flex!important;flex-direction:column;gap:0!important;width:100%;height:100%;min-height:0}
 body.client-surface .client-space>.task-rail{position:static;width:100%!important;max-width:none;max-height:none!important;height:100%;min-height:0;flex:1;overflow:hidden}
 body.client-surface .task-rail .rail-body{display:flex!important;flex-direction:column;max-height:none!important;height:auto!important;min-height:0;flex:1!important;padding:10px!important;visibility:visible!important;opacity:1!important}
 body.client-surface .client-rail-header .rail-title{display:none!important}
 body.client-surface .client-rail-header .client-request-tabs{display:flex!important;max-height:none!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
 body.client-surface .rail-search input{font-size:16px;min-height:44px}body.client-surface .rail-search .icon-button{width:44px;height:44px}
 body.client-surface [data-new-request]{min-height:44px;font-size:15px}
 body.client-surface .rail-cards{flex:1;min-height:0;overflow:auto;padding-top:12px!important}
 body.client-surface .client-center{height:100%;width:100%;max-width:none;min-height:0;overflow:hidden;display:flex;flex:1}
 body.client-surface .client-center>.client-splitter{display:none!important}
 body.client-surface .client-center>.client-request-sheet{flex:1!important;width:100%!important;max-width:none!important;max-height:100%!important;height:100%!important;min-height:0!important;overflow:auto;padding:16px!important;margin:0;align-self:stretch}
 body.client-surface .client-request-columns{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
 body.client-surface .client-center>.client-process{flex:1!important;height:100%!important;width:100%;min-height:0;max-height:100%;padding:10px!important;overflow:hidden}
 body.client-surface[data-mobile-pane=list] .client-center,body.client-surface:not([data-mobile-pane=list]) .client-space>.task-rail,body.client-surface[data-mobile-pane=task] .client-process,body.client-surface[data-mobile-pane=chat] .client-request-sheet{display:none!important}
 body.client-surface .client-request-sheet h1{font-size:22px;line-height:1.3}
 body .client-process .chat-box{min-height:0;flex:1;overflow:hidden}body .client-process .messages{min-height:0;flex:1;overflow:auto}
 body input:not([type=checkbox]):not([type=radio]):not([type=range]),body textarea,body [contenteditable=true]{font-size:16px!important}
 body :is(button,.file-drop,.entity-picker-trigger){touch-action:manipulation}
 body .client-create-footer button{min-height:48px;width:100%;padding:13px 20px;font-size:16px}
 body .client-process .note-form,body .client-process .composer{flex:none;margin-top:auto}
 body .files,body .file-list{min-width:0}body .file-row{flex-wrap:wrap;gap:8px}body .file-row>span{overflow-wrap:anywhere;min-width:0}
 body dialog:not(.image-preview):not(.aspektor-image-viewer){max-width:calc(100vw - 20px)!important;max-height:calc(var(--phone-height,100dvh) - 24px)!important;box-sizing:border-box}
 body dialog form.stack,body .filter-date-pair{min-width:0}body .filter-date-pair{grid-template-columns:1fr 1fr}
 body .work-tool-modal{width:calc(100vw - 20px);max-height:calc(var(--phone-height,100dvh) - 24px)}
 body .form-page-editor,body .form-builder-dialog{width:100%!important;max-width:100%!important;padding:12px!important;box-sizing:border-box}
 body .form-builder-dialog .form-builder-main,body .form-create-layout{grid-template-columns:minmax(0,1fr)!important}
 body .form-builder-inspector{position:static!important;max-height:none!important;width:100%}
 body .forms-page-heading,body .form-page-editor>header{flex-wrap:wrap;gap:10px}body .form-page-editor>header>*{min-width:0}
 body .form-builder-dialog .form-builder-preview{padding:10px;max-height:60dvh}body .form-flex{flex-wrap:wrap!important}
 body .form-flex>.form-block{min-width:0!important;flex-basis:100%!important}
 body .form-table-wrap,body .table-wrap{max-width:100%;overflow:auto}
 body .admin-layout,body .admin-users-layout{grid-template-columns:minmax(0,1fr)!important}
 body .task-statistics-dialog{width:calc(100vw - 20px)!important;padding:12px!important}
 body #toast{bottom:calc(80px + env(safe-area-inset-bottom))}
 @media(prefers-reduced-motion:reduce){body .sidebar{transition:none}}
}
