/* A안 4차 셸: 창 바닥 위에 떠 있는 사이드바 카드 한 열, 본문 시트, 투명 상태바.
   타이틀바 줄은 따로 두지 않는다. 신호등·MOI·뒤로/앞으로·사이드바 접기는 사이드바 카드 첫 줄(창 위 8~40px)에,
   작업 화면의 탭은 같은 줄에 둔다. 탭이 없는 화면은 본문 시트가 창 위 8px 에서 시작한다. */
html[data-ui="workbench"] .shell.native-workspace {
  --side-w: calc(var(--project-sidebar-width, 232px) + 20px);
  --sheet-top: 8px;
  --status-h: 30px;
  --side-edge: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .45), 0 0 0 .5px rgba(0, 0, 0, .12);
  --side-rule: color-mix(in srgb, var(--ink) 9%, transparent);
  display: block;
  padding: 0;
}
html[data-ui="workbench"][data-theme="dark"] .shell.native-workspace { --side-edge: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 0 0 .5px rgba(0, 0, 0, .8); }
html[data-ui="workbench"][data-glass="off"] .shell.native-workspace,
html[data-ui="workbench"][data-glass-strength="0"] .shell.native-workspace { --side-edge: 0 0 0 1px var(--line-float); }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-ui="workbench"] .shell.native-workspace { --side-edge: 0 0 0 1px var(--line-float); }
}
/* Windows 창 조작 버튼(titleBarOverlay 40px)이 오른쪽 위를 차지하므로 시트는 그 아래에서 시작한다. */
html[data-ui="workbench"] .shell.native-workspace.native-win { --sheet-top: 40px; }

/* 창 조작 줄 */
html[data-ui="workbench"] .shell.native-workspace .native-titlebar {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 31;
  width: var(--side-w);
  height: 32px;
  gap: 2px;
  padding: 0 6px 0 12px;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  -webkit-app-region: drag;
}
html[data-ui="workbench"] .shell.native-workspace.native-mac .native-titlebar { padding-left: calc(var(--moi-titlebar-mac-inset, 86px) - 8px); }
html[data-ui="workbench"] .shell.native-workspace .native-titlebar :is(button, a, input) { -webkit-app-region: no-drag; }
html[data-ui="workbench"] .shell.native-workspace .titlebar-wordmark { margin-right: 8px; line-height: 1; }
html[data-ui="workbench"] .shell.native-workspace .native-titlebar :is(.moi-history-button, .titlebar-sidebar-toggle) {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace .native-titlebar :is(.moi-history-button, .titlebar-sidebar-toggle):hover:not(:disabled) { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace .native-titlebar :is(.moi-history-button, .titlebar-sidebar-toggle) svg { width: 16px; height: 16px; }
html[data-ui="workbench"] .shell.native-workspace .native-titlebar .moi-workspace-history { gap: 2px; }
html[data-ui="workbench"] .shell.native-workspace:not(.project-open) .native-titlebar { width: auto; }

/* 사이드바 카드(0단계 유리) */
html[data-ui="workbench"] .shell.native-workspace.has-projects > .sidebar {
  position: fixed;
  inset: 8px auto var(--status-h) 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: var(--side-w);
  height: auto;
  padding: 32px 10px 10px;
  overflow: hidden;
  transform: none;
  border: 0;
  border-radius: 18px;
  background: var(--glass);
  box-shadow: var(--side-edge);
  color: var(--ink-2);
  transition: width var(--t3) var(--m-ease), padding var(--t3) var(--m-ease), opacity var(--t2) var(--m-ease-out), transform var(--t3) var(--m-ease), visibility 0s;
}
/* 사이드바 접기: 폭이 줄며 내용이 흐려진다(A안 4차 모션). 내용 폭을 고정해 접히는 동안 글이 다시 흐르지 않는다. */
html[data-ui="workbench"] .shell.native-workspace.has-projects > .sidebar > * { min-width: calc(var(--side-w) - 20px); }
html[data-ui="workbench"] .shell.native-workspace.has-projects:not(.project-open) > .sidebar { width: 0; padding-inline: 0; opacity: 0; transform: translateX(-12px); visibility: hidden; transition: width var(--t3) var(--m-ease), padding var(--t3) var(--m-ease), opacity var(--t1) var(--m-ease-out), transform var(--t3) var(--m-ease), visibility 0s var(--t3); }

/* 회사 선택 */
html[data-ui="workbench"] .shell.native-workspace .sidebar-company { flex: none; }
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .moi-company-switch { display: block; width: auto; max-width: none; }
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .moi-company-switch .moi-company-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 12.5px 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .moi-company-trigger:hover { background: var(--hover); }
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .moi-company-current { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .moi-company-mark :is(img, svg) { width: 16px; height: 16px; }
html[data-ui="workbench"] .shell.native-workspace .sidebar-company .company-caret { margin: 0; color: var(--muted); }

/* 메뉴: 아이콘 + 글자 한 줄 행 */
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav {
  display: grid;
  flex: none;
  gap: 1px;
  min-height: 0;
  margin: 0 0 6px;
  padding: 0 0 10px;
  overflow: visible;
  border-bottom: 1px solid var(--side-rule);
}
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav-admin { display: contents; }
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav button,
html[data-ui="workbench"][data-theme="dark"] .shell.native-workspace.has-projects .sidebar .nav button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  box-shadow: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav button svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav button:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav button.active,
html[data-ui="workbench"][data-theme="dark"] .shell.native-workspace.has-projects .sidebar .nav button.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar .nav button.active svg { color: var(--brand); }
html[data-ui="workbench"][data-theme] .shell.native-workspace.has-projects .sidebar .nav-label { font-size: 14px; font-weight: inherit; line-height: 1.2; }

/* 작업 트리 */
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-sidebar {
  position: static;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: auto;
  min-height: 0;
  padding: 4px 0 0;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-sidebar-head {
  display: flex;
  align-items: center;
  height: 32px;
  min-height: 32px;
  padding: 0 4px 0 10px;
  border: 0;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-sidebar-head h2 { flex: 1; margin: 0; }
html[data-ui="workbench"] .shell.native-workspace .moi-project-panel-title {
  padding: 2px 6px;
  margin-left: -6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
html[data-ui="workbench"] .shell.native-workspace .moi-project-panel-title:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace .sidebar .moi-project-header-actions { gap: 0; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .moi-project-header-button { width: 28px; height: 28px; border-radius: 8px; color: var(--muted); }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-list { flex: 1; min-height: 0; padding: 0 0 4px; overflow-y: auto; scrollbar-width: auto; scrollbar-color: auto; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-group { padding: 0; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-tree { margin: 0; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-entry { min-height: 32px; border-radius: 8px; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-entry:hover { background: var(--hover); }
/* 시안: 작업 행의 채팅 추가·메뉴는 행에 올리거나 포커스가 있을 때만 보인다. */
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-entry:not(:hover, :focus-within) .project-rename { visibility: hidden; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-item {
  gap: 11px;
  min-height: 32px;
  padding: 0 6.5px 0 12px;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-item > svg:first-child { width: 14px; height: 14px; color: var(--muted); }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-session-list { margin: 0; padding: 0; border: 0; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-session {
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 0 10px 0 51px;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-session:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-session.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-session-list .project-status { margin: 0; padding: 4px 10px 8px 51px; color: var(--ink-2); font-size: 12.5px; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-list > .project-status { padding: 4px 10px; color: var(--ink-2); font-size: 12.5px; }
html[data-ui="workbench"] .shell.native-workspace .sidebar .project-sidebar-resize { position: absolute; top: 0; right: -4px; bottom: 0; left: auto; width: 8px; z-index: 2; }

/* 가이드·설정: 맨 아래 작은 아이콘 */
html[data-ui="workbench"] .shell.native-workspace.has-projects .sidebar-bottom {
  display: flex;
  flex: none;
  justify-content: flex-start;
  margin-top: auto;
  padding: 8px 0 0 3px;
  border-top: 1px solid var(--side-rule);
}
html[data-ui="workbench"] .shell.native-workspace.has-projects .moi-rail-utilities { display: flex; flex-direction: row; gap: 2px; }
html[data-ui="workbench"] .shell.native-workspace.has-projects .moi-rail-utilities .btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace.has-projects .moi-rail-utilities .btn svg { width: 18px; height: 18px; }
html[data-ui="workbench"] .shell.native-workspace.has-projects .moi-rail-utilities .btn:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace.has-projects .moi-rail-utilities .btn[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

/* 본문: 사이드바 오른쪽, 상태바 위 */
html[data-ui="workbench"] .shell.native-workspace.has-projects > .workspace {
  position: fixed;
  inset: var(--sheet-top) 8px var(--status-h) calc(var(--side-w) + 16px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  transition: left var(--t3) var(--m-ease), top var(--t3) var(--m-ease);
  background: none;
}
html[data-ui="workbench"] .shell.native-workspace.has-projects:not(.project-open) > .workspace { left: 8px; --sheet-top: 40px; top: 40px; }
/* 1단계 본문 시트: 탭 없는 화면 */
html[data-ui="workbench"] .shell.native-workspace.has-projects:not(.project-context) > .workspace > .content {
  flex: 1;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow: auto;
  padding: 40px clamp(24px, 4vw, 56px) 64px;
  scrollbar-gutter: stable;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
}
/* 작업 화면: 맨 위 32px 줄은 탭(배경 투명), 그 아래가 본문 시트. 분할은 시트 한 장 안에서 나뉜다. */
html[data-ui="workbench"] .shell.native-workspace.project-context > .workspace > .content { flex: 1; min-height: 0; margin: 0; padding: 0; background: none; box-shadow: none; overflow: visible; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split { position: relative; height: 100%; background: none; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split::before {
  content: "";
  position: absolute;
  inset: 32px 0 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
  pointer-events: none;
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split > * { position: relative; }
html[data-ui="workbench"] .shell.native-workspace.project-context :is(.moi-workspace-pane, .moi-split-node, .moi-split-child) { background: none; border: 0; box-shadow: none; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-pane > :not(.moi-pane-tabbar) { background: transparent; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split > .moi-split-node.is-horizontal > .moi-split-handle { margin-top: 32px; }
html[data-ui="workbench"] .shell.native-workspace.project-context:not(.project-open) .moi-workspace-split > .moi-workspace-pane > .moi-pane-tabbar,
html[data-ui="workbench"] .shell.native-workspace.project-context:not(.project-open) .moi-workspace-split > .moi-split-node > .moi-split-child:first-child .moi-pane-tabbar { padding-left: 214px; }
html[data-ui="workbench"] .shell.native-workspace.native-win.project-context:not(.project-open) .moi-workspace-split .moi-pane-tabbar { padding-left: 160px; }
html[data-ui="workbench"] .shell.native-workspace.project-context:not(.project-open) > .workspace { top: 8px; }
html[data-ui="workbench"] .shell.native-workspace.native-win.project-context > .workspace { top: 8px; }
html[data-ui="workbench"] .shell.native-workspace.native-win.project-context .moi-workspace-split .moi-pane-tabbar { padding-right: 140px; }

/* 탭 줄: 선택 탭만 아래 시트와 이어지는 위쪽 둥근 사각, 아래 경계선은 그 자리에서 끊긴다. */
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px 0 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  -webkit-app-region: drag;
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar :is(button, a, input, select, [role="tab"], .conversation-tab) { -webkit-app-region: no-drag; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tabs-list { flex: 0 1 auto; align-items: flex-end; gap: 2px; height: 32px; padding: 0; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tab {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 220px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tab:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tab.active {
  background: var(--surface);
  box-shadow: -1px 0 var(--line), 1px 0 var(--line), 0 -1px var(--line);
  color: var(--ink);
}
/* 첫 탭은 시트 왼쪽 모서리에 붙는다. 그 탭이 선택되면 시트 왼쪽 위를 각지게 해 탭과 한 면으로 잇는다(계단 없음). */
html[data-ui="workbench"] .shell.native-workspace.project-open.project-context .moi-workspace-split:is(:has(> .moi-workspace-pane > .moi-pane-tabbar .conversation-tab:first-child.active), :has(> .moi-split-node > .moi-split-child:first-child .moi-pane-tabbar .conversation-tab:first-child.active))::before { border-top-left-radius: 0; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 12.5px;
  font-weight: 500;
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-select,
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tab.active .conversation-select { flex: 0 1 auto; width: auto; max-width: 200px; font-weight: 500; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-name { flex: 0 1 auto; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-close {
  display: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0 4px 0 -6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-tab:is(.active, :hover, :focus-within) .conversation-close { display: inline-grid; place-items: center; opacity: 1; pointer-events: auto; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar .conversation-close:hover { background: var(--hover); color: var(--ink); }
/* 화면이 둘 이상이면 입력 중인 화면의 선택 탭만 본문 글자색·굵기, 다른 화면의 선택 탭은 회색 글자 (한쪽 면 강조선·띠 없음) */
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split:has(.moi-split-handle) .moi-workspace-pane.is-focused .conversation-tab.active .conversation-select { color: var(--ink); font-weight: 600; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split:has(.moi-split-handle) .moi-workspace-pane:not(.is-focused) .conversation-tab.active { color: var(--ink-2); }
/* 아래쪽 분할 화면의 탭 바는 시트 안(2단계)에 같은 모양으로 놓이고 자기 아래 선을 덮는다. 뒤에 띠 배경을 깔지 않는다. */
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-split-node.is-vertical > .moi-split-child:not(:first-child) .moi-pane-tabbar {
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  -webkit-app-region: no-drag;
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-split-node.is-vertical > .moi-split-child:not(:first-child) .moi-pane-tabbar .conversation-tab { height: 30px; margin-bottom: -1px; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-split-node.is-vertical > .moi-split-child:not(:first-child) .moi-pane-tabbar .conversation-select { height: 30px; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-new,
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-scroll:not([hidden]) {
  align-self: center;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-new svg { width: 14px; height: 14px; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-new:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-pane-tabbar-actions { align-self: flex-start; display: flex; align-items: center; gap: 6px; height: 26px; margin-left: auto; padding: 0; border: 0; background: none; }
/* 탭 줄 오른쪽 도구 아이콘은 회색 캡슐 하나로 묶는다. */
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-tools { display: inline-flex; align-items: center; padding: 1px; border-radius: 999px; background: var(--surface-2); }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-tools > button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
}
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-tools > button svg { width: 15px; height: 15px; }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-tools > button:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace.project-context .moi-tab-tools > button:disabled { opacity: .4; }
/* 보기 전환 대화 / 흐름: 세그먼트(알약) */
html[data-ui="workbench"] .shell.native-workspace .work-surface-switch { display: inline-flex; flex: none; gap: 0; padding: 2px; border: 0; border-radius: 999px; background: var(--surface-2); }
html[data-ui="workbench"] .shell.native-workspace .work-surface-tab {
  display: inline-flex;
  align-items: center;
  height: 22px;
  min-height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
html[data-ui="workbench"] .shell.native-workspace .work-surface-tab:hover { background: var(--hover); color: var(--ink); }
html[data-ui="workbench"] .shell.native-workspace .work-surface-tab[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink); }

/* 하단 상태바: 시트 아래 끝부터 창 아래 끝까지 한 줄, 배경 없이 바닥이 비친다. */
html[data-ui="workbench"] .shell.native-workspace .ai-dock {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--status-h);
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-ui="workbench"] .shell.native-workspace .ai-statusbar {
  height: var(--status-h);
  min-height: var(--status-h);
  padding: 0 9px;
  border: 0;
  background: none;
  color: var(--ink-2);
  -webkit-app-region: drag;
}
html[data-ui="workbench"] .shell.native-workspace .ai-statusbar :is(button, a) { -webkit-app-region: no-drag; }

/* 탭 없는 화면의 머리 줄도 창을 끌 수 있다(안의 버튼·입력 제외). */
html[data-ui="workbench"] .shell.native-workspace:not(.project-context) .content :is(.page-heading, .section-head:first-child, .moi-opportunity-header) { -webkit-app-region: drag; }
html[data-ui="workbench"] .shell.native-workspace:not(.project-context) .content :is(.page-heading, .section-head:first-child, .moi-opportunity-header) :is(button, a, input, select, textarea, label, [tabindex]) { -webkit-app-region: no-drag; }

/* 좁은 창(720px 이하, 확대 배율 포함): 사이드바는 본문 위 떠 있는 층으로 열리고 닫힌다. */
@media (max-width: 720px) {
  html[data-ui="workbench"] .shell.native-workspace.has-projects > .sidebar { z-index: 40; box-shadow: var(--side-edge), var(--shadow-2); }
  html[data-ui="workbench"] .shell.native-workspace.has-projects > .workspace,
  html[data-ui="workbench"] .shell.native-workspace.has-projects:not(.project-open) > .workspace { left: 8px; top: 40px; }
  html[data-ui="workbench"] .shell.native-workspace.has-projects.project-open .project-panel-backdrop { display: block; position: fixed; inset: 0; z-index: 39; border: 0; padding: 0; background: var(--scrim); opacity: 1; pointer-events: auto; }
  html[data-ui="workbench"] .shell.native-workspace.project-context .moi-workspace-split .moi-pane-tabbar { padding-left: 14px; }
}
@media (min-width: 721px) {
  html[data-ui="workbench"] .shell.native-workspace .project-panel-backdrop { display: none; }
}

/* macOS 겹침 스크롤바: 트랙 없이 캡슐 손잡이만, 마우스를 올린 영역에서만 보인다.
   scrollbar-width·color 를 쓰면 Chromium 이 아래 규칙을 무시하므로 쓰지 않는다. */
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar { width: 11px; height: 11px; background: transparent; }
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar-track,
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar-corner { background: transparent; }
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: transparent padding-box; }
html[data-ui="workbench"] .shell.native-workspace :hover::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--ink) 24%, transparent); }
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--ink) 40%, transparent); }
html[data-ui="workbench"] .shell.native-workspace ::-webkit-scrollbar-thumb:active { background-color: color-mix(in srgb, var(--ink) 52%, transparent); }

/* 반응: 배경 전환 120ms, 누를 때 97% 축소. 동작 줄이기 설정에서 끈다. */
html[data-ui="workbench"] .shell.native-workspace :is(button, .conversation-tab, .project-entry) { transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }
html[data-ui="workbench"] .shell.native-workspace :is(.btn, .moi-tab-tools > button, .work-surface-tab, .titlebar-sidebar-toggle, .moi-history-button):active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  html[data-ui="workbench"] .shell.native-workspace :is(button, .conversation-tab, .project-entry) { transition: none; }
  html[data-ui="workbench"] .shell.native-workspace :is(.btn, .moi-tab-tools > button, .work-surface-tab, .titlebar-sidebar-toggle, .moi-history-button):active { transform: none; }
}

/* 4단계 떠 있는 층: 메뉴·드롭다운·토스트는 --glass-strong 유리, 1px --line-float, --shadow-2 */
html[data-ui="workbench"] :is(.project-context-menu, .company-menu, .choice-menu, .t-dropdown) { border: 1px solid var(--line-float); border-radius: 12px; background: var(--glass-raised, var(--float)); box-shadow: var(--shadow-2); }
html[data-ui="workbench"] :is(.project-context-menu, .company-menu, .choice-menu, .t-dropdown) :is(button, [role="menuitem"], [role="menuitemradio"]) { border-radius: 7px; }
html[data-ui="workbench"] #toast { border-color: var(--line-float); border-radius: 16px; background: var(--glass-raised, var(--float)); color: var(--ink); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(var(--glass-blur, 0px)) saturate(170%); backdrop-filter: blur(var(--glass-blur, 0px)) saturate(170%); }
