:root{--mobile-header:54px;--mobile-nav:68px;--mobile-safe-bottom:env(safe-area-inset-bottom,0px)}
.mobile-bottom-nav,.mobile-quick-sheet,.mobile-ui-backdrop{display:none}
.mobile-work-mode{display:none}
.login-screen:not(.hidden)~.mobile-bottom-nav,.login-screen:not(.hidden)~.mobile-quick-sheet,.login-screen:not(.hidden)~.mobile-ui-backdrop{display:none!important}
body:has(#loginScreen:not(.hidden)) .mobile-bottom-nav,body:has(#loginScreen:not(.hidden)) .mobile-quick-sheet,body:has(#loginScreen:not(.hidden)) .mobile-ui-backdrop{display:none!important}
@media(max-width:820px){
  html,body{height:100%;overflow:hidden;overscroll-behavior:none}.app{height:100dvh;min-height:0}.app-header{height:var(--mobile-header);min-height:var(--mobile-header);padding:6px 10px;border-bottom-color:rgba(116,255,186,.12);backdrop-filter:blur(20px);background:rgba(8,16,18,.9)}
  .mobile-menu-btn{display:grid;width:42px;height:42px;place-items:center;border-radius:13px}.header-left{gap:8px;min-width:0}.header-logo{width:27px;height:27px}.header-title{font-size:15px;white-space:nowrap}.header-right{margin-left:auto;gap:6px}.header-right>*{display:none!important}.header-right #btnGitPublish,.header-right .connection-status{display:flex!important}.header-right #btnGitPublish{width:42px;height:42px;padding:0;justify-content:center;border-radius:13px}.header-right #btnGitPublish span:nth-child(2){display:none}.header-right .connection-status{width:10px;overflow:hidden;padding:0;border:0}.header-right .connection-status #statusText{display:none}
  .app-body{position:relative;height:calc(100dvh - var(--mobile-header));min-height:0;padding-bottom:calc(var(--mobile-nav) + var(--mobile-safe-bottom));display:block;overflow:hidden}.chat-panel{width:100%;height:100%;min-width:0;display:flex;flex-direction:column}.workspace-toolbar{flex:0 0 auto;padding:7px 10px;gap:7px;background:rgba(10,18,20,.94)}
  .agent-live-dock,.workspace-toolbar-primary{display:none!important}.workspace-controls{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end;gap:7px!important;padding:0!important}.control-cluster{min-width:0!important}.control-cluster label{font-size:9px}.control-cluster select,.control-cluster button{min-height:40px}.workspace-controls>.control-cluster:not(.session-control),.model-control,.capability-shortcuts{display:none!important}.session-control{display:grid!important;grid-template-columns:minmax(0,1fr) 40px;gap:5px}.session-control label{grid-column:1/-1}.session-control select{width:100%;min-width:0}.session-control .icon-action-btn{width:40px}.mobile-work-mode{display:flex;flex-direction:column;gap:3px;min-width:142px}.mobile-work-mode>span{font-size:9px;font-weight:700;color:var(--text-muted);letter-spacing:.6px;text-transform:uppercase}.mobile-work-mode>div{height:40px;display:grid;grid-template-columns:1fr 1fr;padding:3px;border:1px solid var(--border-color);border-radius:12px;background:rgba(0,0,0,.18)}.mobile-work-mode button{min-width:0;border:0;border-radius:9px;padding:0 8px;background:transparent;color:var(--text-muted);font-size:10px;font-weight:700;text-transform:uppercase}.mobile-work-mode button.active{color:#fff;background:linear-gradient(135deg,#10883e,#16a34a);box-shadow:0 3px 12px rgba(22,163,74,.22)}.session-identity{display:none!important}
  .execution-bar{flex:0 0 36px;min-height:36px;padding:0 10px;font-size:11px}.execution-bar>*{min-width:0}.execution-bar .execution-model,.execution-bar .execution-timer{display:none}.tasks-panel{max-height:86px}.tasks-header{min-height:34px}.chat-messages{flex:1;min-height:0;padding:12px 10px 8px;overscroll-behavior:contain;scroll-padding-bottom:96px}.message{max-width:100%;gap:8px}.msg-avatar{width:27px;height:27px}.msg-bubble{font-size:14px;line-height:1.5;max-width:calc(100vw - 58px)}
  .chat-input-area{position:absolute!important;left:0;right:0;bottom:calc(var(--mobile-nav) + var(--mobile-safe-bottom));z-index:25;padding:7px 9px!important;background:linear-gradient(180deg,transparent,rgba(7,14,16,.96) 22%);border:0}.chat-input-wrapper{min-height:52px;border-radius:17px!important;padding:5px 6px!important;gap:4px;background:rgba(25,37,40,.96)!important;box-shadow:0 10px 35px rgba(0,0,0,.35)}.chat-input-wrapper textarea{min-height:40px;max-height:112px;padding:10px 5px;font-size:16px}.attach-btn,.chat-run-controls button,.send-btn,.poli-record-btn{min-width:40px!important;width:40px!important;height:40px!important;border-radius:12px!important}.chat-run-controls{display:flex;gap:3px;overflow-x:auto;max-width:88px}.chat-input-footer{display:none!important}
  .sidebar{display:flex!important;position:fixed!important;z-index:90;top:var(--mobile-header);bottom:calc(var(--mobile-nav) + var(--mobile-safe-bottom));left:0;width:min(88vw,360px)!important;height:auto!important;max-height:none!important;transform:translate3d(-105%,0,0);transition:transform .26s cubic-bezier(.2,.8,.2,1);background:rgba(9,17,19,.97)!important;backdrop-filter:blur(24px);border-right:1px solid rgba(116,255,186,.15);border-radius:0 20px 20px 0;box-shadow:20px 0 55px rgba(0,0,0,.45);overflow:hidden}.sidebar.mobile-open{transform:translate3d(0,0,0)}.sidebar-section-header{min-height:50px;padding:10px 14px}.project-actions{padding:4px 10px 8px}.project-action-btn{min-height:42px;border-radius:11px}.project-search-controls{padding:8px 10px}.project-search-controls input,.project-search-controls select{min-height:42px}.project-list{overscroll-behavior:contain}.project-item{min-height:58px;padding:9px 12px}.workspace-context{padding:10px 12px}
  .monitoring-panel{display:block!important;position:fixed!important;z-index:92;left:6px!important;right:6px!important;top:auto!important;bottom:calc(var(--mobile-nav) + var(--mobile-safe-bottom) + 6px)!important;width:auto!important;height:min(76dvh,720px)!important;max-height:none!important;transform:translate3d(0,110%,0);transition:transform .28s cubic-bezier(.2,.8,.2,1);border:1px solid rgba(116,255,186,.14);border-radius:22px 22px 16px 16px;background:rgba(8,15,18,.97)!important;box-shadow:0 -20px 60px rgba(0,0,0,.5);overflow:auto;overscroll-behavior:contain}.monitoring-panel.mobile-open{transform:translate3d(0,0,0)}.monitoring-panel::before{content:"";display:block;position:sticky;top:0;z-index:3;width:42px;height:4px;margin:8px auto;border-radius:5px;background:rgba(255,255,255,.25)}#monitoringBackdrop{display:none!important}
  .frontend-preview-panel{position:fixed!important;z-index:94!important;inset:var(--mobile-header) 0 calc(var(--mobile-nav) + var(--mobile-safe-bottom)) 0!important;width:100%!important;height:auto!important;max-width:none!important;border:0!important;border-radius:0!important;transform:none!important}.frontend-preview-panel.hidden{display:none!important}.frontend-preview-header{min-height:48px;padding:7px 10px}.frontend-preview-location{padding:7px 10px}.frontend-preview-location input{min-height:40px;font-size:14px}.frontend-preview-resize{display:none!important}.frontend-preview-frame{height:100%!important}
  .mobile-bottom-nav{display:grid;position:fixed;z-index:100;left:0;right:0;bottom:0;height:calc(var(--mobile-nav) + var(--mobile-safe-bottom));padding:6px 8px var(--mobile-safe-bottom);grid-template-columns:repeat(5,1fr);gap:3px;background:rgba(8,16,18,.94);border-top:1px solid rgba(116,255,186,.12);backdrop-filter:blur(24px);box-shadow:0 -10px 35px rgba(0,0,0,.28)}.mobile-bottom-nav button{min-width:0;min-height:54px;border:0;border-radius:14px;background:transparent;color:#789094;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;touch-action:manipulation}.mobile-bottom-nav button span{font-size:20px;line-height:20px}.mobile-bottom-nav button small{font-size:10px;font-weight:700}.mobile-bottom-nav button.active{color:#39dc8b;background:rgba(40,209,124,.1)}
  .mobile-ui-backdrop{display:block;position:fixed;z-index:80;inset:var(--mobile-header) 0 calc(var(--mobile-nav) + var(--mobile-safe-bottom));border:0;background:rgba(0,0,0,.48);backdrop-filter:blur(2px)}.mobile-ui-backdrop.hidden{display:none}.mobile-quick-sheet{display:block;position:fixed;z-index:95;left:6px;right:6px;bottom:calc(var(--mobile-nav) + var(--mobile-safe-bottom) + 6px);padding:8px 12px 16px;border:1px solid rgba(116,255,186,.14);border-radius:22px;background:rgba(10,19,21,.98);box-shadow:0 -18px 55px rgba(0,0,0,.45);transform:translate3d(0,120%,0);transition:transform .26s cubic-bezier(.2,.8,.2,1)}.mobile-quick-sheet.open{transform:translate3d(0,0,0)}.mobile-sheet-handle{width:42px;height:4px;margin:0 auto 8px;border-radius:5px;background:rgba(255,255,255,.25)}.mobile-quick-sheet header{display:flex;align-items:center;justify-content:space-between;padding:2px 3px 10px}.mobile-quick-sheet header strong{font-size:17px}.mobile-quick-sheet header button{width:40px;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.06);color:#fff;font-size:24px}.mobile-quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mobile-quick-grid button{min-height:88px;padding:9px 5px;border:1px solid rgba(255,255,255,.07);border-radius:15px;background:rgba(255,255,255,.035);color:#dfeaec;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;touch-action:manipulation}.mobile-quick-grid button span{color:#39dc8b;font-size:23px}.mobile-quick-grid button strong{font-size:12px}.mobile-quick-grid button small{color:#789094;font-size:9px}
  dialog,.app-dialog,.poli-complement-dialog{margin:auto 6px 6px!important;width:calc(100vw - 12px)!important;max-width:none!important;max-height:calc(100dvh - var(--mobile-header) - 12px)!important;border-radius:22px 22px 14px 14px!important}.dialog-body{padding:14px!important}.poli-complement-grid{max-height:58dvh!important}.poli-complement-toolbar{padding:12px 12px 6px}.poli-complement-tabs{padding-inline:12px}
  button,a,select,input,textarea{touch-action:manipulation}.hidden{pointer-events:none}
}
@media(max-width:390px){.header-title{max-width:128px;overflow:hidden;text-overflow:ellipsis}.workspace-controls{grid-template-columns:minmax(0,1fr) 126px!important}.mobile-work-mode{min-width:126px}.mobile-work-mode button{font-size:9px;padding-inline:4px}.mobile-quick-grid{grid-template-columns:repeat(2,1fr)}.msg-bubble{font-size:13.5px}}
@media(hover:none) and (pointer:coarse){button,.project-item,.agent-card{min-touch-target:44px;-webkit-tap-highlight-color:transparent}}
@media(prefers-reduced-motion:reduce){.sidebar,.monitoring-panel,.mobile-quick-sheet{transition-duration:.01ms!important}}
