.dock-obsolete, .dock-enabled .pane-sash, .dock-enabled #sidebarExplorer { display: none !important; }
.dock-enabled .sidebar { display: block; position: relative; border:0; overflow:clip; overflow-clip-margin:3px; }
.dock-enabled, .dock-enabled .docked-workspace, .dock-enabled .dock-slot { background:var(--panel); }
.app-view:has(.dock-enabled) > .topbar { border-bottom:0; }
.app-view:has(.dock-enabled) > .statusbar { border-top:0; }
.dock-enabled .activity-bar, .dock-window.embedded-section { border:0; }
.dock-enabled.sidebar-collapsed .sidebar { display: none; }
.dock-slot { min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: auto; }
.dock-slot[hidden], .dock-window[hidden] { display: none !important; }
.dock-sidebar-slot { height: 100%; }
.dock-window { min-width: 0; min-height: 85px; position: relative; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.dock-window.is-collapsed { min-height: 27px; }
.dock-window.is-collapsed > .window-body, .dock-window.is-collapsed > .window-height-grip { display: none !important; }
.dock-enabled .window-head { height: 27px; min-height: 27px; flex: 0 0 27px; display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; padding: 0 5px; background: inherit; border-bottom:0; cursor: grab; touch-action: none; overflow: hidden; }
.dock-enabled .window-chat > .chat-head, .dock-enabled .file-meta { border-bottom:0; }
.dock-enabled .explorer-head { border-bottom:0; }
.window-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.dock-button { border: 0; border-radius: 3px; padding: 3px 5px; background: transparent; color: var(--muted); flex: 0 0 auto; }
.dock-button[aria-pressed="true"] { background: #37373d; color: #eee; }
@media (hover: hover) {
  .dock-button:hover { background: #37373d; color: #eee; }
}
.dock-enabled .window-head > button, .dock-enabled .window-head .title-action { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; padding: 0; border: 0; line-height: 1; font-size: 18px; position: relative; }
.dock-enabled .window-head > .mobile-only { display: none; }
.dock-enabled .window-head > .window-close { font-size: 22px; }
.dock-enabled .window-title { display: flex; align-items: center; height: 22px; line-height: 18px; font-size: 12px; color: #d8e8f5; }
.dock-enabled .chat-head .chat-title { display: flex; align-items: center; gap: 10px; height: 22px; }
.dock-enabled .chat-head .conversation-title-row { flex: 1; }
.dock-enabled .chat-head h2 { margin: 0; line-height: 18px; font-size: 13px; }
.dock-enabled .chat-head p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; max-width: 35%; }
.dock-enabled .chat-head .danger-button { font-size: 0; }
.dock-enabled .chat-head .danger-button::after { content: none; }
#deleteConversation svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.window-body { min-width: 0; min-height: 0; flex: 1 1 0; }
.dock-enabled .window-body.tab-panel { display: grid; grid-area: auto !important; }
.dock-enabled .window-body.chat-tab { grid-template-rows: minmax(0, 1fr) auto; border: 0; }
.conversation-browser { min-width: 0; min-height: 0; overflow: hidden; }
.conversation-browser > .conversation-window { width: 100%; min-height: 0; }
.dock-enabled .chat-tab.conversation-browser-open > #chatScroll { display: none; }
.dock-enabled .chat-tab.conversation-browser-open > .conversation-browser:not(.hidden) { display: flex; }
.dock-enabled .window-body.files-tab { grid-template-columns: minmax(0, 1fr); grid-template-rows: 30px minmax(0, 1fr); }
/* A docked Projects window owns its scroll, independently of active-tab state. */
.dock-enabled .window-body.projects-tab { display: block; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.dock-enabled .projects-page { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-content: start; }
.dock-enabled .project-list-card { grid-column: 1 / -1; }
.dock-enabled .managed-project-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.dock-enabled .managed-project { min-width: 0; overflow-wrap: anywhere; }
.dock-enabled .file-row .file-size { display: inline; flex: 0 0 auto; white-space: nowrap; }
#directoryDiskSize { color: var(--muted); font-size: 11px; white-space: nowrap; }
.explorer-storage-status { display:flex; align-items:center; gap:4px; flex:0 1 auto; max-width:100%; min-height:24px; }
.explorer-storage-status #directoryDiskSize { min-width:0; overflow:hidden; text-overflow:ellipsis; line-height:16px; }
.explorer-storage-status #filesRefresh { display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; width:24px; height:24px; min-height:0; padding:3px; line-height:1; }
.explorer-storage-status #filesRefresh svg { display:block; width:16px; height:16px; }
.dock-enabled .files-tab > .editor-tabbar { grid-area: auto; }
.dock-enabled .files-tab:not(.has-file) { grid-template-rows: minmax(0, 1fr); }
.dock-enabled .files-tab:not(.has-file) > .editor-tabbar { display: none; }
.file-preview { min-width: 0; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 16px; color: var(--muted); }
.file-preview img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.file-preview[hidden], .code-view[hidden] { display: none !important; }
.file-download { margin-left: 12px; color: #75beff; white-space: nowrap; }
.dock-enabled .files-tab .files-layout { min-height: 0; grid-area: auto; display: block; }
.dock-enabled .file-viewer { height: 100%; }
.dock-enabled .explorer-container { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-area: auto; }
.dock-enabled .conversation-list { display: block !important; min-height: 0; overflow: auto; flex: 1; }
.conversation-row { position: relative; display: flex; align-items: stretch; min-width: 0; }
.conversation-row .conversation-item { flex: 1 1 auto; min-width: 0; padding-right: 38px; }
.conversation-delete { position: absolute; top: 50%; right: 8px; width: 24px; height: 24px; margin: 0; padding: 4px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); opacity: 0; }
.conversation-delete:hover, .conversation-delete:focus-visible { background: #4b2528; color: #f48771; opacity: 1; }
.conversation-row:hover .conversation-delete, .conversation-row:focus-within .conversation-delete, .conversation-row .conversation-item.active + .conversation-delete { opacity: 1; }
.conversation-delete svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.conversation-window { display: flex; flex-direction: column; }
.conversation-window .sidebar-head { flex: 0 0 auto; }
.dock-enabled .conversation-window .sidebar-head { padding: 6px 8px; gap: 4px; }
.dock-enabled .conversation-window #projectSelect { height: 26px; min-height: 0; padding: 0 8px; line-height: 18px; }
.dock-enabled .conversation-window #newConversation { height: 28px; min-height: 0; padding: 0 8px; font-size: 12px; line-height: 18px; }
.dock-enabled .conversation-list > .empty-state { min-height: 0; }
@media(min-width:721px) {
  .dock-enabled .conversation-browser .sidebar-head { display: none; }
  .dock-enabled .conversation-browser .conversation-list { padding: 5px 0; }
  .dock-enabled .conversation-browser .conversation-item { padding: 9px 14px; }
  .dock-enabled .chat-head > #backButton:not(.hidden) { display: inline-flex; }
}
@media (pointer: coarse) {
  .conversation-delete { opacity: 1; }
  .dock-enabled .conversation-window #projectSelect,
  .dock-enabled .conversation-window #newConversation { min-height: 32px; }
}
.window-toggles { display: flex; align-items: center; gap: 3px; }
.window-toggles > .dock-button { display:grid; place-items:center; width:28px; height:28px; padding:0; }
.window-toggles .codex-icon { display:inline-flex; align-items:center; justify-content:center; }
.window-toggles > .dock-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
@media(max-width:360px) {
  .window-toggles { gap:1px; }
  .window-toggles > .dock-button { width:24px; }
}
.dock-menu { width: 280px; border-radius: 6px; }
.dock-menu > button { display: block; width: 100%; text-align: left; padding: 7px; }
.window-height-grip { flex: 0 0 4px; cursor: row-resize; touch-action: none; }
.window-height-grip:hover, .window-height-grip:focus-visible { background: #0078d4; }
.window-drop-overlay { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 80; }
.window-drop-overlay.visible { display: block; }
.window-drop-zone { position: absolute; display: grid; place-items: center; border: 2px dashed #888; background: #222c; color: #eee; }
.window-drop-zone.target { background: #0078d477; border-color: #75beff; }
.dock-enabled .docked-workspace { position: relative; display: grid !important; grid-template-columns: minmax(0,var(--dock-split,45%)) minmax(0,1fr) !important; grid-template-rows: minmax(0,1fr) !important; }
.dock-left-slot { grid-column: 1; grid-row: 1; }
.dock-right-slot { grid-column: 2; grid-row: 1; }
.dock-bottom-slot { grid-column: 1 / -1; grid-row: 2; }
.dock-enabled .docked-workspace[data-has-bottom="true"] { grid-template-rows: minmax(0,1fr) minmax(80px,var(--dock-bottom,34%)) !important; }
.dock-enabled .docked-workspace[data-has-left="false"], .dock-enabled .docked-workspace[data-has-right="false"] { grid-template-columns: minmax(0,1fr) !important; }
.docked-workspace[data-has-left="false"] > .dock-right-slot { grid-column: 1; }
.dock-split-grip { position: absolute; left: calc(var(--dock-split,45%) - 3px); top: 0; bottom: 0; width: 6px; z-index: 9; cursor: col-resize; touch-action: none; }
.dock-bottom-grip { display: none; position: absolute; left: 0; right: 0; bottom: calc(var(--dock-bottom,34%) - 3px); height: 6px; z-index: 10; cursor: row-resize; touch-action: none; }
.docked-workspace[data-has-left="false"] > .dock-split-grip, .docked-workspace[data-has-right="false"] > .dock-split-grip { display: none; }
.docked-workspace[data-has-bottom="true"] > .dock-bottom-grip { display: block; }
.docked-workspace[data-has-bottom="true"] > .dock-split-grip { bottom: var(--dock-bottom,34%); }
.dock-split-grip:hover, .dock-bottom-grip:hover, .dock-split-grip:focus-visible, .dock-bottom-grip:focus-visible { background: #0078d4; }
/* Separate pane frames leave a six-pixel gutter for the resize handles. */
@media(min-width:721px) {
  .dock-slot { padding:3px; }
  .dock-slot > .dock-window:not(.embedded-section), .dock-bottom-slot > .workbench-panel { border:1px solid #343434; border-radius:8px; }
  .window-height-grip[hidden] { display:none; }
}
.dock-split-grip::after,.sidebar-sash::after { content:'';position:absolute;left:calc(50% - 2px);top:calc(50% - 9px);width:4px;height:18px;background:radial-gradient(circle,#999 1px,transparent 1.6px) center/4px 6px repeat-y; }
.dock-bottom-grip::after,.window-height-grip::after { content:'';position:absolute;left:calc(50% - 9px);top:calc(50% - 2px);width:18px;height:4px;background:radial-gradient(circle,#999 1px,transparent 1.6px) center/6px 4px repeat-x; }
.window-height-grip { position:relative; }
.dock-joint-grip { position:absolute;left:calc(var(--dock-split,45%) - 7px);bottom:calc(var(--dock-bottom,34%) - 7px);width:14px;height:14px;z-index:12;cursor:move;touch-action:none;background:transparent; }
.dock-joint-grip[hidden] { display:none; }
.dock-sidebar-joint { bottom:auto;z-index:13; }
.dock-joint-grip:focus-visible { outline:1px solid #75beff;outline-offset:-3px; }
.resizing-two-axis,.resizing-two-axis * { cursor:move !important; }
.dock-enabled .window-body.git-tab { display: flex; flex-direction: column; overflow: auto; }
.git-section { border-bottom: 1px solid var(--line); flex: 0 0 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.section-summary { height: 22px; flex: 0 0 22px; display: flex; align-items: center; background: transparent; user-select: none; gap: 4px; padding-right: 5px; }
.section-toggle { flex: 1; min-width: 0; text-align: left; font-size: 13px; font-weight: 600; padding: 0 8px; gap: 6px; }
.section-toggle::before { content: ''; display: block; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.section-toggle[aria-expanded="true"]::before { transform: translateY(-2px) rotate(45deg); }
.section-summary > .dock-button { height: 20px; display: inline-flex; align-items: center; line-height: 18px; padding-top: 0; padding-bottom: 0; }
.section-summary > .dock-button:not(.section-toggle) { padding: 0; width: 26px; justify-content: center; font-size: 18px; }
.embedded-section > .section-repository > .section-summary { display: none; }
/* Geometric icons avoid font-baseline offsets, especially the old low chevron. */
.dock-enabled .window-head > .window-fold,
.dock-enabled .window-head > .window-close,
.dock-enabled .window-head > [aria-label^="Переместить:"] { font-size: 0; }
.window-fold::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.window-fold[aria-expanded="true"]::before { transform: translateY(-2px) rotate(45deg); }
.window-close::before, .window-close::after { content: ''; position: absolute; width: 13px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.window-close::after { transform: rotate(-45deg); }
.window-head > [aria-label^="Переместить:"]::before { content: ''; width: 2px; height: 2px; border-radius: 50%; background: currentColor; box-shadow: -5px 0 currentColor, 5px 0 currentColor; }
.dock-enabled .dock-window.embedded-section:not([hidden]) { display: contents; }
.embedded-section > .window-head, .embedded-section > .window-height-grip { display: none; }
.embedded-section > .window-body { flex: 0 0 auto; }
.embedded-section > .section-history[open] { flex: 0 0 auto; min-height: 0; max-height: min(440px, 50dvh); }
.dock-window:not(.embedded-section) > .git-section { flex: 1 1 0; }
.dock-window:not(.embedded-section) > .git-section > .section-summary { display: none; }
.git-section-body { min-height: 0; overflow: auto; }
.git-section-body[hidden] { display: none !important; }
.section-history[open] > .git-section-body { flex: 1 1 0; overflow: auto; }
.embedded-section > .section-history[open] > .git-section-body { flex: 0 1 auto; }
.section-history .commit-list { overflow: visible; padding: 0 4px 4px 10px; }
.section-changes .git-list { max-height: 180px; }
.embedded-section > .section-diff[open] { flex: 0 0 250px; }
.section-diff > .git-section-body { flex: 1; overflow: hidden; }
.section-diff .diff-view { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); }
.section-diff .diff-view pre { white-space: pre; overflow: auto; }
.dock-enabled .git-toolbar { flex-wrap: wrap; gap: 5px; }
.dock-enabled .git-commit-bar { grid-template-columns: repeat(3,minmax(0,1fr)); }
.dock-enabled .git-commit-bar button { font-size: 10px; overflow-wrap: anywhere; }
.dock-enabled .git-message { padding: 6px 8px; margin: 0; flex: 0 0 auto; }
.dock-enabled .git-remote { overflow-wrap: anywhere; }
.commit-row { cursor: pointer; }
.commit-row[aria-expanded="true"] { background: #37373d; }
.commit-row[aria-expanded="true"]::before { background: #c586c0; }
.commit-files { margin-left: 10px; padding: 3px 2px 7px 8px; border-left: 1px solid #555; font-size: 11px; }
.commit-file { display: block; width: 100%; background: transparent; border: 0; color: #d7ba7d; text-align: left; font-size: 11px; padding: 5px; overflow-wrap: anywhere; }
.commit-file.status-A { color: #89d185; }
.commit-file.status-D { color: #f48771; }
.commit-file.status-R { color: #75beff; }
/* Every close control uses the same 13px cross inside a 22px target. */
:is(.window-close, #closeToolsButton, [data-close-panel], .attachment-remove) { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; padding: 0; border: 0; font-size: 0 !important; }
#closeToolsButton, [data-close-panel] { position: relative; }
:is(.window-close, #closeToolsButton, [data-close-panel], .attachment-remove)::before,
:is(.window-close, #closeToolsButton, [data-close-panel], .attachment-remove)::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
:is(.window-close, #closeToolsButton, [data-close-panel], .attachment-remove)::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media(max-width:720px) {
  .topbar { gap: 4px; padding: 0 5px; }
  .topbar .brand strong, .topbar .remote-label, .topbar .workspace-title { display: none; }
  .topbar .brand { flex: 0 0 auto; }
  .window-toggles { margin-left: auto; }
  .window-toggles > [data-layout-toggle]:not([data-layout-toggle="bottom"]),
  .window-toggles > .desktop-layout-control { display: none; }
  .dock-enabled .sidebar { display: block !important; grid-column: 2; grid-row: 1; }
  .dock-enabled .docked-workspace { grid-column: 2; grid-row: 1; display: block !important; }
  .dock-enabled { grid-template-columns: 44px minmax(0,1fr) !important; }
  .dock-enabled .dock-slot { display: contents; }
  .dock-enabled .dock-window { display: none; }
  .dock-enabled .dock-window.mobile-selected:not([hidden]) { display: flex; height: 100%; }
  .dock-enabled:has(.dock-sidebar-slot > .mobile-selected:not([hidden])) .docked-workspace { display: none !important; }
  .dock-enabled:not(:has(.dock-sidebar-slot > .mobile-selected:not([hidden]))) .sidebar { display: none !important; }
  .dock-enabled .window-head { cursor: default; touch-action: auto; }
  .dock-enabled .window-head > .mobile-only { display: inline-flex; }
  .window-height-grip, .dock-split-grip, .dock-bottom-grip { display: none !important; }
}
