/* Phone controls keep their real viewport size, including after an input is focused. */
.mobile-model-cortex{display:none}
.mobile-model-dialog{box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:min(75dvh,620px);padding:18px;background:var(--b1x-solid,#0a1928);color:var(--b1x-text,#e8f1fa);border:1px solid var(--b1x-border,#244256);border-radius:16px;box-shadow:0 24px 80px #0009}
.mobile-model-dialog::backdrop{background:#020811c9;backdrop-filter:blur(4px)}
.mobile-model-dialog h2{font-size:18px;line-height:1.3;margin:0 0 14px}
.mobile-model-choices{display:grid;gap:6px;max-height:50dvh;overflow:auto}
.mobile-model-dialog button{font:inherit;text-align:left;color:inherit;border:0;border-radius:9px;background:transparent;padding:10px 12px;min-height:44px;cursor:pointer}
.mobile-model-dialog button:hover,.mobile-model-dialog button[aria-pressed=true]{background:var(--b1x-control,#102536)}
.mobile-model-dialog button[aria-pressed=true]::after{content:'✓';float:right;color:var(--b1x-accent,#00d9ef)}
.mobile-model-dialog .mobile-model-close{display:block;margin:14px 0 0 auto;color:var(--b1x-accent,#00d9ef)}
.mobile-model-dialog button:focus-visible{outline:2px solid var(--b1x-accent,#00d9ef);outline-offset:2px}
@media(max-width:600px){
  html,body{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  #shell.unified-shell{max-width:100vw;overflow-x:clip}
  #shell.unified-shell .topbar{min-width:0;justify-content:space-between;gap:4px}
  #shell.unified-shell .topbar .workspace-panel-controls,
  #shell.unified-shell .topbar #theme-toggle{display:none}
  #shell.unified-shell .topbar .launch-signin{display:inline-flex;align-items:center;justify-content:center;max-width:66px;min-width:54px;height:40px;padding:4px 6px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #shell.unified-shell .topbar .launch-signin svg{display:none}
  #shell.unified-shell .topbar .workspace-project-picker{max-width:80px;min-width:0;padding:5px 3px}
  #shell.unified-shell .topbar .workspace-mode-control{max-width:84px;margin:0;min-width:0}
  #shell.unified-shell .topbar #workspace-mode{box-sizing:border-box;width:84px;max-width:84px;font-size:16px!important;min-height:40px;padding:5px 2px}
  #shell.unified-shell .topbar .mobile-model-cortex{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;padding:1px;border:0;border-radius:50%;background:#053044;box-shadow:inset 0 0 0 1px #00d9ef77,0 0 10px #00d9ef55;cursor:pointer}
  .mobile-model-cortex img{display:block;width:38px;height:38px;object-fit:contain;filter:brightness(1.35) drop-shadow(0 0 7px #00d9efaa)}
  #shell.unified-shell .topbar #workspace-open{flex:0 0 40px;width:40px;min-width:40px;height:40px;min-height:40px;color:var(--b1x-accent,#00d9ef);background:var(--b1x-control,#102536);border-radius:10px}
  #shell.unified-shell :is(input,textarea,select){font-size:16px!important}
  #shell.unified-shell #composer #prompt,
  #shell.unified-shell.dock-open #composer.dock-compact #prompt,
  #shell.unified-shell #composer #profile,
  #shell.unified-shell .dock-panel :is(input,textarea,select){font-size:16px!important}
  #shell.unified-shell .workspace-dock.dock-fullscreen{inset:0!important;width:100vw!important;height:100dvh;max-width:none;border-radius:0;z-index:100!important}
  #shell.unified-shell .workspace-dock.dock-fullscreen .dock-head{position:relative;z-index:2;border-radius:0;padding:8px;gap:3px}
  #shell.unified-shell .workspace-dock.dock-fullscreen .dock-head>button{min-width:40px;min-height:40px!important;padding:7px}
  #shell.unified-shell .workspace-dock.dock-fullscreen .dock-tabs{min-width:0;scrollbar-width:none}
  #shell.unified-shell .workspace-dock.dock-fullscreen .dock-tabs::-webkit-scrollbar{display:none}
  #shell.unified-shell .workspace-dock.dock-fullscreen .dock-panel{padding:16px 14px calc(18px + env(safe-area-inset-bottom,0px))}
  #shell.unified-shell.dock-maximized .composer-area{display:none!important}
}
@media(max-width:360px){
  #shell.unified-shell .topbar .workspace-project-picker{display:none}
  #shell.unified-shell .topbar .workspace-mode-control,#shell.unified-shell .topbar #workspace-mode{max-width:74px;width:74px}
  #shell.unified-shell .topbar .launch-signin{max-width:54px;min-width:44px}
  #shell.unified-shell .topbar #workspace-open{flex-basis:38px;width:38px;min-width:38px}
}
