/* Mobile presentation of the existing window/focus model, not a second navigator. */
@media (max-width:680px) {
  :root { --mobile-bar:48px; --mobile-nav:64px; }
  .window-shell .topbar.desktop-menubar { height:var(--mobile-bar); min-height:var(--mobile-bar); padding:0 12px; background:#192332; }
  .desktop-menubar .brand strong { display:block; font-size:14px; }
  .desktop-menus .desktop-menu:not(:last-child) { display:none; }
  .desktop-menus .menu-trigger { min-height:44px; min-width:76px; font-size:0; }
  .desktop-menus .menu-trigger::after { content:'Sessions ▾'; font-size:13px; }
  .desktop-menu-popover { max-height:60dvh; max-width:calc(100vw - 24px); overflow:auto; }
  .desktop-menu-popover button,.running-menu-item { min-height:44px; font-size:14px; }
  .fullscreen-toggle { display:none; }
  .top-activity { min-width:44px; min-height:44px; }
  .window-workbench { inset:var(--mobile-bar) 0 0; }
  .window-canvas { inset:0 0 calc(var(--mobile-nav) + env(safe-area-inset-bottom)); }
  .window-dock { left:0; right:0; bottom:0; width:100%; height:calc(var(--mobile-nav) + env(safe-area-inset-bottom)); padding:4px 6px calc(4px + env(safe-area-inset-bottom)); gap:2px; border:0; border-top:1px solid var(--app-glass-edge); border-radius:0; background:#192332; box-shadow:none; overflow:visible; }
  .window-dock .dock-item,.window-dock .dock-separator,.window-dock .dock-empty { display:none; }
  .window-dock .dock-launcher { display:flex; flex-direction:column; justify-content:center; gap:4px; flex:1 1 0; width:auto; min-width:0; height:52px; border:0; border-radius:9px; background:transparent; box-shadow:none; }
  .window-dock .dock-launcher>span:not(.dock-glyph) { position:static; width:auto; max-width:100%; padding:0; transform:none; border:0; background:transparent; color:inherit; font-size:10px; opacity:1; }
  .window-dock .dock-launcher[aria-current=page] { background:var(--app-glass-selected); color:#c7e0ff; }
  /* Full-screen mobile surfaces must not expose another screen's text through glass. */
  .window-canvas>:is(.chat-window,.terminal-window,.extension-app-window):not(.focused) { visibility:hidden; pointer-events:none; }
  .window-sidebar,.utility-panel,.settings-utility-layer .settings-dialog { border:0; border-radius:0; background:#202c3e; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .window-sidebar,.utility-panel { inset:0!important; width:auto!important; height:auto!important; }
  .window-shell>.preview-utility { inset:var(--mobile-bar) 0 calc(var(--mobile-nav) + env(safe-area-inset-bottom))!important; }
  .settings-utility-layer { inset:var(--mobile-bar) 0 calc(var(--mobile-nav) + env(safe-area-inset-bottom)); }
  .settings-utility-layer .settings-dialog { inset:0!important; width:auto!important; height:auto!important; }
  .chat-glass-prototype { background:#202c3e; }
  .chat-glass-prototype::before { display:none; }
  .window-titlebar,.sidebar-top.window-titlebar,.utility-window-heading.window-titlebar,.settings-dialog>header.window-titlebar { height:52px; min-height:52px; flex-basis:52px; padding:0 12px; background:var(--app-glass-chrome); }
  .window-controls,.utility-controls { width:44px; flex:0 0 44px; }
  .window-controls .traffic-control:not(.close) { display:none; }
  .window-controls .traffic-control.close { width:44px; height:44px; flex-basis:44px; border-radius:8px; }
  .window-controls .traffic-control.close::before { content:'‹'; position:static; display:grid; place-items:center; width:44px; height:44px; transform:none; border-radius:8px; background:transparent; color:var(--desk-text); font-size:32px; }
  .window-controls .traffic-control.close::after { display:none; }
  .chat-glass-prototype .window-titlebar>.window-controls { left:8px; }
  .chat-glass-prototype .window-titlebar>.window-identity,.terminal-window>.window-titlebar .window-identity,.extension-app-window>.window-titlebar .window-identity { left:64px; right:12px; top:50%; width:auto; max-width:none; transform:translateY(-50%); justify-content:flex-start; font-size:14px; }
  .chat-glass-prototype .window-titlebar>.window-identity .window-project-prefix { display:none; }
  .chat-glass-prototype .window-titlebar>.window-state:not(.connection-control) { display:none; }
  .chat-glass-prototype .window-titlebar>.window-state.connection-control,
  .chat-glass-prototype .window-titlebar>.reconnect-button {
    display: inline-flex;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(233,189,117,.5);
    background: rgba(233,189,117,.16);
    color: #ffe7b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    z-index: 5;
    cursor: pointer;
    white-space: nowrap;
  }
  .chat-glass-prototype .window-titlebar>.window-state.connection-control:disabled,
  .chat-glass-prototype .window-titlebar>.reconnect-button:disabled {
    opacity: .6;
    border-color: rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: #aebbd0;
    cursor: default;
  }
  .chat-glass-prototype .window-titlebar:has(.connection-control) > .window-identity,
  .chat-glass-prototype .window-titlebar:has(.reconnect-button) > .window-identity {
    right: 104px;
  }
  .chat-glass-prototype .window-titlebar>.window-identity strong { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; }
  .sidebar-top>strong,.utility-window-heading>strong,.settings-dialog>header>div.settings-title { left:64px; right:12px; justify-content:flex-start; text-align:left; font-size:15px; }
  .settings-dialog>header>.settings-title h2 { font-size:15px; }
  .chat-glass-prototype .window-model { min-height:48px; padding:4px 12px; gap:8px; }
  .chat-glass-prototype .window-model>.engine-badge { display:none; }
  .chat-glass-prototype .window-model button { min-height:40px; font-size:12px; }
  .chat-glass-prototype .window-model select { min-height:40px; font-size:16px; }
  .chat-glass-prototype .window-model-picker { max-height:50%; padding:12px; }
  .chat-glass-prototype .window-model-picker :is(select,button) { min-height:44px; font-size:16px; }
  .chat-glass-prototype .transcript { padding:12px; background:transparent; }
  .chat-glass-prototype .message { max-width:96%; font-size:15px; line-height:1.6; }
  .chat-glass-prototype .agent-activity { min-height:28px; margin:0; padding:4px 12px; border:0; background:transparent; }
  .chat-glass-prototype .agent-activity:not(.busy):not(.offline) { display:none; }
  .chat-glass-prototype .prompt-form { padding:8px 10px; background:#202c3e; }
  .chat-glass-prototype .composer textarea { min-height:44px; max-height:24dvh; font-size:16px; resize:none; }
  .chat-glass-prototype .composer-hint { display:none; }
  .chat-glass-prototype .composer-foot { padding:0 4px 4px; }
  .chat-glass-prototype .composer-actions { width:100%; justify-content:space-between; }
  .chat-glass-prototype :is(.attach-button,.send-button,.stop-button) { min-width:44px; min-height:44px; font-size:14px; }
  .preview-content { display:flex; flex-direction:column; justify-content:flex-start; gap:16px; }
  .preview-form { flex:0 0 auto; align-content:start; gap:10px; padding:14px; }
  .preview-form input,.preview-form button { min-height:44px; }
  .projects-content,.preview-content { padding:16px; }
  .projects-content .current-project-card { display:none; }
  .projects-content .project-switcher { padding:10px; }
  .projects-content .project-switcher .workspace-list { max-height:120px; }
  .projects-content .project-session-item { min-height:64px; }
  .projects-content .scope-navigation button { min-height:44px; font-size:13px; }
  .settings-dialog .settings-nav { padding:6px 12px; background:#192332; }
  .settings-dialog .settings-nav .button { min-height:44px; height:auto; font-size:14px; }
  .settings-dialog #settings-content { padding:16px; background:transparent; }
  .settings-dialog .runtime-heading { display:none; }
  .settings-dialog .runtime-nav { margin:0 0 16px; }
  .settings-dialog .runtime-nav .button { min-height:44px; min-width:0; flex:1 1 0; padding-inline:6px; gap:4px; font-size:12px; }
  .settings-dialog .runtime-nav .button .ui-icon { width:14px; flex-basis:14px; }
  .settings-dialog .runtime-engine-details { margin-bottom:10px; }
  .skill-manager:has(.skill-detail-open) { margin-top:0; padding:10px; }
  .settings-dialog :is(input:not([type=checkbox]),select,textarea) { font-size:16px; }
  .settings-dialog .button,.projects-content .button,.folder-picker .button { min-height:44px; }
  .settings-dialog .manager-row { padding:14px; }
  .settings-dialog .connection-list { max-height:none; }
  .settings-dialog .connection-list .manager-row { flex-wrap:wrap; gap:12px; }
  .connection-row-actions { width:100%; justify-content:flex-end; }
  .settings-dialog .settings-modal-backdrop { inset:52px 0 0; padding:0; background:#202c3e; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .settings-modal-dialog,.settings-modal-dialog.extension-modal { width:100%; max-height:100%; height:100%; border:0; border-radius:0; box-shadow:none; background:#202c3e; }
  .settings-modal-header .close-modal-btn { min-width:44px; min-height:44px; }
  .settings-modal-body { padding:16px; }
  .settings-modal-footer { padding:8px 16px; }
  .extension-settings-host>.stack { padding:0; border:0; background:transparent; box-shadow:none; }
  .subagent-settings .sa-notice { font-size:13px; padding:10px; }
  .subagent-settings .sa-editor { padding:10px; }
  .skill-manager:has(.skill-detail-open)>.manager-title,.skill-manager:has(.skill-detail-open)>.hint,.skill-manager:has(.skill-detail-open)>.resource-toolbar { display:none; }
  .skill-layout.skill-detail-open .skill-detail { padding:0; border:0; background:transparent; }
  .runtime-templates:has(.template-list-hidden) .template-manager>.manager-title,.runtime-templates:has(.template-list-hidden) .template-manager>.runtime-search,.runtime-templates:has(.template-list-hidden) .template-manager>.hint { display:none; }
  .skill-toolbar { flex-direction:column; align-items:stretch; }
  .skill-toolbar>label:first-child { min-width:0; }
  .template-editor textarea,.skill-editor textarea { font-size:16px; min-height:220px; }
}
