/* ═══════════════════════════════════════════════════════════════
   AgencyOS — workspace-ide-v5.css
   V5 Blue skin for the Working Workspace (#viewWorkingWorkspace). Values come from the approved reference's `.ide*` / `.ww*` sheet
   (title bar 44px surface-2, 48px activity rail, 260px explorer, 36px tab strip, rounded chat bubbles, bordered composer,
   solid-primary 26px status bar). The workspace stylesheet (workspace-ui.css) is token-governed, so the skin first re-maps its tokens
   onto the V5 tokens and then adjusts the few components whose shape differs. No markup, id, handler or class is changed.
   ═══════════════════════════════════════════════════════════════ */
#viewWorkingWorkspace .wui-ide-root,
#viewWorkingWorkspace .wui-root {
  --ww-surf-canvas: var(--st-surface);
  --ww-surf-chrome: var(--st-surface-2);
  --ww-surf-panel: var(--st-surface);
  --ww-surf-input: var(--st-surface-2);
  --ww-surf-raised: color-mix(in srgb, var(--st-primary) 10%, var(--st-surface-2));
  --ww-line: var(--st-line);
  --ww-line-strong: var(--st-line);
  --ww-line-focus: var(--st-primary);
  --ww-accent-claude: var(--st-primary);
  --ww-success: var(--st-teal);
  --cyan: var(--st-primary);
  --cyan-dim: color-mix(in srgb, var(--st-primary) 12%, transparent);
  --text-primary: var(--st-ink);
  --text-secondary: var(--st-ink);
  --text-muted: var(--st-muted);
  --text-faint: var(--st-muted);
  --ww-fs-md: 13.5px;
  --ww-topbar-h: 44px;
  --ww-tab-h: 35px;
  font-family: var(--app-font, Inter, 'Outfit', system-ui, sans-serif);
  color: var(--st-ink);
}

/* ── title bar ── */
#viewWorkingWorkspace .wui-ide-topbar { min-height: 44px; padding: 0 14px 0 16px; background: var(--st-surface-2); border-bottom: 1px solid var(--st-line); gap: 16px; }
#viewWorkingWorkspace .wui-ide-title { align-items: baseline; gap: 12px; overflow: hidden; }
#viewWorkingWorkspace .wui-ide-title h2 { font-size: 15px; font-weight: 800; white-space: nowrap; color: var(--st-ink); }
#viewWorkingWorkspace .wui-ide-title .dcc-hint { color: var(--st-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#viewWorkingWorkspace .wui-ide-topbar-right { gap: 6px; }
#viewWorkingWorkspace .wui-ide-topbar-right .dcc-badge { padding: 0; margin-right: 6px; border: 0; background: none; color: var(--st-muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
#viewWorkingWorkspace .wui-ide-primary-cta-caption { display: none; }
#viewWorkingWorkspace .wui-ide-topbar .action-btn,
#viewWorkingWorkspace .wui-ide-topbar select { height: 30px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-surface); color: var(--st-ink); font-size: 12.5px; font-weight: 700; line-height: 1; transition: border-color .15s ease, color .15s ease; box-shadow: none; }
#viewWorkingWorkspace .wui-ide-topbar .action-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--st-primary) 50%, var(--st-line)); color: var(--st-primary); background: var(--st-surface); }
#viewWorkingWorkspace .wui-ide-topbar .action-btn.primary { background: var(--st-primary); border-color: var(--st-primary); color: #fff; }
#viewWorkingWorkspace .wui-ide-topbar .action-btn.primary:hover:not(:disabled) { color: #fff; filter: brightness(1.06); background: var(--st-primary); }

/* ── activity rail ── */
#viewWorkingWorkspace .wui-ide-activitybar { width: 48px; padding: 8px 0; background: var(--st-surface-2); border-right: 1px solid var(--st-line); gap: 2px; }
#viewWorkingWorkspace .wui-ide-activity-btn { width: 48px; height: 44px; border-radius: 0; color: var(--st-muted); }
#viewWorkingWorkspace .wui-ide-activity-btn svg { width: 21px; height: 21px; }
#viewWorkingWorkspace .wui-ide-activity-btn:hover:not(.disabled):not(:disabled) { color: var(--st-ink); background: transparent; }
#viewWorkingWorkspace .wui-ide-activity-btn.active { color: var(--st-primary); background: transparent; }
#viewWorkingWorkspace .wui-ide-activity-btn.active::before { left: 0; top: 8px; bottom: 8px; width: 2px; height: auto; background: var(--st-primary); }

/* ── explorer / sidebar ── */
#viewWorkingWorkspace .wui-ide-sidebar { background: var(--st-surface); border-right: 1px solid var(--st-line); }
#viewWorkingWorkspace .wui-ide-sidebar-header { min-height: 38px; padding: 0 12px 0 16px; background: transparent; border-bottom: 0; }
#viewWorkingWorkspace .wui-ide-sidebar-header-title, #viewWorkingWorkspace .wui-ide-sidebar-header > :first-child { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--st-muted); }
#viewWorkingWorkspace .wui-ide-iconbtn { width: 24px; height: 24px; border-radius: 6px; color: var(--st-muted); }
#viewWorkingWorkspace .wui-ide-iconbtn:hover { background: var(--st-surface-2); color: var(--st-ink); }
#viewWorkingWorkspace .wui-explorer-row { border-radius: 5px; color: var(--st-ink); font-size: 13px; }
#viewWorkingWorkspace .wui-explorer-row:hover { background: var(--st-surface-2); }
#viewWorkingWorkspace .wui-explorer-row.active, #viewWorkingWorkspace .wui-explorer-row.selected { background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); color: var(--st-primary); }
#viewWorkingWorkspace .wui-ide-resizer { background: transparent; }
#viewWorkingWorkspace .wui-ide-resizer:hover, #viewWorkingWorkspace .wui-ide-resizer.dragging { background: var(--st-primary); }

/* ── tab strip ── */
#viewWorkingWorkspace .wui-ide-tabbar { min-height: 36px; background: var(--st-surface-2); border-bottom: 1px solid var(--st-line); }
#viewWorkingWorkspace .wui-ide-tab { height: 35px; padding: 0 10px 0 14px; gap: 8px; border-right: 1px solid var(--st-line); background: var(--st-surface-2); color: var(--st-muted); font-size: 13px; }
#viewWorkingWorkspace .wui-ide-tab:hover { background: var(--st-surface-2); color: var(--st-ink); }
#viewWorkingWorkspace .wui-ide-tab.active { background: var(--st-bg); color: var(--st-ink); box-shadow: inset 0 2px 0 var(--st-primary); }
#viewWorkingWorkspace .wui-ide-tab.active::after { display: none; }
#viewWorkingWorkspace .wui-ide-tab-close { width: 20px; height: 20px; border-radius: 5px; color: var(--st-muted); }
#viewWorkingWorkspace .wui-ide-tab-close:hover { background: var(--st-surface); color: var(--st-ink); }
#viewWorkingWorkspace .wui-ide-editorarea { background: var(--st-bg); }
#viewWorkingWorkspace .wui-ide-editorarea:has(.wui-claude-panel) { background: var(--st-surface); }

/* ── Claude panel ── */
#viewWorkingWorkspace .wui-claude-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 16px; background: var(--st-surface-2); border-bottom: 1px solid var(--st-line); font-size: 12px; color: var(--st-muted); }
#viewWorkingWorkspace .wui-claude-status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: var(--st-surface); border: 1px solid var(--st-line); color: var(--st-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
#viewWorkingWorkspace .wui-claude-meta-item code, #viewWorkingWorkspace .wui-claude-meta select { height: 24px; padding: 0 9px; border: 1px solid var(--st-line); border-radius: 999px; background: var(--st-surface); color: var(--st-ink); font: 12px var(--app-font, Inter, system-ui, sans-serif); }
#viewWorkingWorkspace .wui-claude-meta-item > .ww-meta-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--st-muted); }
#viewWorkingWorkspace .wui-claude-transcript { padding: 14px 20px; gap: 12px; }
#viewWorkingWorkspace .wui-chat-msg { font-size: 14px; line-height: 1.55; }
#viewWorkingWorkspace .wui-chat-user { margin-left: auto; max-width: min(760px, 88%); padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); border: 1px solid color-mix(in srgb, var(--st-primary) 26%, var(--st-line)); color: var(--st-ink); }
#viewWorkingWorkspace .wui-chat-assistant { max-width: min(760px, 88%); padding: 9px 12px; border-radius: 10px; background: var(--st-surface-2); border: 1px solid var(--st-line); color: var(--st-ink); }
#viewWorkingWorkspace .wui-exec-row, #viewWorkingWorkspace .wui-hist-event { border-color: var(--st-line); }

/* ── composer ── */
#viewWorkingWorkspace .wui-claude-composer { padding: 12px 16px; background: var(--st-surface); border-top: 1px solid var(--st-line); }
#viewWorkingWorkspace .wui-claude-composer-box { border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-surface-2); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
#viewWorkingWorkspace .wui-claude-composer-box:focus-within { border-color: var(--st-primary); background: var(--st-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-primary) 12%, transparent); }
#viewWorkingWorkspace .wui-claude-textarea { padding: 10px 12px; background: transparent; color: var(--st-ink); font: 14px/1.55 var(--app-font, Inter, system-ui, sans-serif); }
#viewWorkingWorkspace .wui-claude-composer-actions { padding: 6px 8px; gap: 6px; background: transparent; border-top: 0; }
#viewWorkingWorkspace .wui-claude-hint-inline, #viewWorkingWorkspace .wui-claude-queue-count { color: var(--st-muted); font-size: 11.5px; }
#viewWorkingWorkspace .wui-claude-plus-wrap > button, #viewWorkingWorkspace .wui-claude-mic-btn { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid var(--st-line); border-radius: 7px; background: var(--st-surface); color: var(--st-muted); }
#viewWorkingWorkspace .wui-claude-plus-wrap > button:hover, #viewWorkingWorkspace .wui-claude-mic-btn:hover { border-color: color-mix(in srgb, var(--st-primary) 50%, var(--st-line)); color: var(--st-primary); }
#viewWorkingWorkspace #wwSendBtn { height: 28px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--st-primary); color: #fff; font-size: 12.5px; font-weight: 800; box-shadow: none; }
#viewWorkingWorkspace #wwSendBtn:disabled { opacity: .45; }
#viewWorkingWorkspace #wwCancelClaudeBtn { height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--st-muted); font-size: 12px; font-weight: 600; }
#viewWorkingWorkspace #wwCancelClaudeBtn:hover:not(:disabled) { background: var(--st-surface); color: var(--st-ink); }

/* ── bottom dock + status bar ── */
#viewWorkingWorkspace .wui-ide-bottompanel { background: var(--st-surface); border-top: 1px solid var(--st-line); }
#viewWorkingWorkspace .wui-ide-bottom-tabs { padding: 0 8px; background: var(--st-surface-2); border-bottom: 1px solid var(--st-line); gap: 2px; }
#viewWorkingWorkspace .wui-ide-bottom-tab { height: 32px; padding: 0 12px; background: transparent; color: var(--st-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
#viewWorkingWorkspace .wui-ide-bottom-tab:hover:not(.wui-ide-bottom-tab-disabled):not(:disabled) { color: var(--st-ink); background: transparent; }
#viewWorkingWorkspace .wui-ide-bottom-tab.active { color: var(--st-ink); background: transparent; }
#viewWorkingWorkspace .wui-ide-bottom-tab.active::after { background: var(--st-primary); }
#viewWorkingWorkspace .wui-ide-bottom-content { background: var(--st-surface); }
#viewWorkingWorkspace .wui-ide-statusbar { height: 26px; padding: 0 12px; background: var(--st-primary); color: #fff; font-size: 12px; }
#viewWorkingWorkspace .wui-ide-statusbar .wui-statusbar-item, #viewWorkingWorkspace .wui-ide-statusbar a { color: #fff; opacity: .95; }

/* thin scrollbars on the workspace panes */
#viewWorkingWorkspace .wui-ide-root * { scrollbar-width: thin; scrollbar-color: var(--st-line) transparent; }

/* ── transcript details ── */
#viewWorkingWorkspace .wui-chat-role { margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--st-muted); }
#viewWorkingWorkspace .wui-chat-user .wui-chat-role { color: var(--st-primary); }
#viewWorkingWorkspace .wui-chat-body, #viewWorkingWorkspace .wui-chat-body p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--st-ink); overflow-wrap: anywhere; }
#viewWorkingWorkspace .wui-claude-log-empty { color: var(--st-muted); font-size: 13.5px; }
#viewWorkingWorkspace .wui-turn-tech summary { color: var(--st-muted); font-size: 12px; cursor: pointer; }

/* ── sticky workflow action (Ready to Convert …) ── */
#viewWorkingWorkspace .wui-sticky-action { background: var(--st-surface-2); border: 0; border-bottom: 1px solid var(--st-line); color: var(--st-ink); }
#viewWorkingWorkspace .wui-sticky-action.is-ready_to_convert, #viewWorkingWorkspace .wui-sticky-action.is-ready { box-shadow: inset 3px 0 0 var(--st-teal); }
#viewWorkingWorkspace .wui-sticky-platform { color: var(--st-muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#viewWorkingWorkspace .wui-sticky-label { color: var(--st-ink); font-weight: 800; }
#viewWorkingWorkspace .wui-sticky-detail { color: var(--st-muted); }
#viewWorkingWorkspace .wui-sticky-action button, #viewWorkingWorkspace .wui-claude-panel .action-btn:not(.primary) { height: 28px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-surface); color: var(--st-ink); font-size: 12px; font-weight: 700; }
#viewWorkingWorkspace .wui-sticky-action button:hover, #viewWorkingWorkspace .wui-claude-panel .action-btn:not(.primary):hover { border-color: color-mix(in srgb, var(--st-primary) 50%, var(--st-line)); color: var(--st-primary); }
#viewWorkingWorkspace .wui-usage-strip, #viewWorkingWorkspace .wui-claude-usage { background: transparent; border-bottom: 1px solid var(--st-line); color: var(--st-muted); }
#viewWorkingWorkspace .wui-claude-panel .dcc-badge { border-radius: 999px; }

/* ── narrow screens: the title row wraps, the explorer narrows so the editor / chat keeps room ── */
@media (max-width: 900px) {
  #viewWorkingWorkspace .wui-ide-topbar { flex-wrap: wrap; row-gap: 6px; padding: 6px 10px; }
  #viewWorkingWorkspace .wui-ide-title .dcc-hint { display: none; }
  #viewWorkingWorkspace .wui-ide-topbar-right { flex-wrap: wrap; }
  #viewWorkingWorkspace .wui-ide-sidebar { width: 150px !important; min-width: 150px; }
  #viewWorkingWorkspace .wui-claude-composer { padding: 8px 10px; }
  #viewWorkingWorkspace .wui-claude-hint-inline { display: none; }
}

/* ── full-bleed: square corners, no strip under the status bar ── */
#viewWorkingWorkspace #wwRoot .wui-ide-root, #viewWorkingWorkspace #wwRoot .wui-ide-fullscreen { height: 100vh; border-radius: 0; border: 0; }
#viewWorkingWorkspace .wui-ide-body, #viewWorkingWorkspace .wui-ide-main { border-radius: 0; }

/* ── Back to project = the same round-corner arrow button the project header uses ── */
#viewWorkingWorkspace #wwBackToProjectBtn, #viewWorkingWorkspace #wwBackToLaneBtn {
  position: relative; width: 34px; height: 34px; min-width: 34px; padding: 0; font-size: 0; line-height: 0; color: transparent; overflow: hidden;
  border: 1px solid var(--st-line); border-radius: 10px; background: color-mix(in srgb, var(--st-primary) 9%, var(--st-surface));
}
#viewWorkingWorkspace #wwBackToProjectBtn::before, #viewWorkingWorkspace #wwBackToLaneBtn::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: var(--st-primary); transition: transform .15s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m7-7-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m7-7-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
#viewWorkingWorkspace #wwBackToProjectBtn:hover, #viewWorkingWorkspace #wwBackToLaneBtn:hover { border-color: color-mix(in srgb, var(--st-primary) 50%, var(--st-line)); box-shadow: 0 6px 16px color-mix(in srgb, var(--st-primary) 16%, transparent); }
#viewWorkingWorkspace #wwBackToProjectBtn:hover::before, #viewWorkingWorkspace #wwBackToLaneBtn:hover::before { transform: translateX(-2px); }
#viewWorkingWorkspace #wwBackToProjectBtn:active { transform: scale(.95); }

/* ── sidebar collapse / expand controls (chevron icons instead of « »), and the sidebar slides ── */
#viewWorkingWorkspace #wwSidebarCollapseBtn, #viewWorkingWorkspace #wwSidebarExpandBtn { position: relative; font-size: 0; line-height: 0; color: transparent; }
#viewWorkingWorkspace #wwSidebarCollapseBtn { width: 24px; height: 24px; }
#viewWorkingWorkspace #wwSidebarCollapseBtn::before, #viewWorkingWorkspace #wwSidebarExpandBtn::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px; background: var(--st-muted); transition: background-color .15s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m11 17-5-5 5-5m7 10-5-5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m11 17-5-5 5-5m7 10-5-5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
#viewWorkingWorkspace #wwSidebarExpandBtn::before { transform: scaleX(-1); }
#viewWorkingWorkspace #wwSidebarCollapseBtn:hover::before, #viewWorkingWorkspace #wwSidebarExpandBtn:hover::before { background: var(--st-primary); }
#viewWorkingWorkspace .wui-ide-expand-sidebar { left: calc(48px + 6px); top: 50px; width: 26px; height: 26px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); z-index: 5; }
#viewWorkingWorkspace .wui-ide-expand-sidebar:hover { border-color: color-mix(in srgb, var(--st-primary) 50%, var(--st-line)); }
#viewWorkingWorkspace .wui-ide-sidebar.wwv5-sliding { min-width: 0 !important; overflow: hidden; transition: width .22s cubic-bezier(.4, 0, .2, 1); }
#viewWorkingWorkspace #wwRoot.wwv5-sb-opening .wui-ide-sidebar { width: 0 !important; overflow: hidden; min-width: 0; }
#viewWorkingWorkspace #wwRoot.wwv5-sb-opening .wui-ide-resizer-v { display: none; }
#viewWorkingWorkspace .wui-ide-body { position: relative; }
#viewWorkingWorkspace #wwSidebarExpandBtn.wui-ide-expand-sidebar { position: absolute; left: 54px; top: 5px; }
#viewWorkingWorkspace .wui-ide-body:has(#wwSidebarExpandBtn) .wui-ide-main { margin-left: 36px; }

/* ── title bar: back arrow first (left), no Open in IDE / Deploy shortcuts (hidden, handlers stay in the DOM) ── */
#viewWorkingWorkspace .wui-ide-topbar-right { display: contents; }
#viewWorkingWorkspace .wui-ide-topbar #wwBackToProjectBtn, #viewWorkingWorkspace .wui-ide-topbar #wwBackToLaneBtn { order: -1; flex: 0 0 34px; }
#viewWorkingWorkspace .wui-ide-topbar .wui-ide-title { order: 0; flex: 1 1 auto; }
#viewWorkingWorkspace .wui-ide-topbar .wui-ide-topbar-right > :not(#wwBackToProjectBtn):not(#wwBackToLaneBtn) { order: 1; }
#viewWorkingWorkspace .wui-ide-topbar .dcc-badge { margin-left: auto; }
#viewWorkingWorkspace .wui-ide-primary-cta, #viewWorkingWorkspace #wwOpenIdeBtn, #viewWorkingWorkspace #wwDeployHandoffBtn { display: none !important; }
#viewWorkingWorkspace .wui-ide-topbar { justify-content: flex-start; padding-left: 12px; }

/* ── sidebar: collapse chevron lives in the open sidebar; collapsed sidebar is reopened from the rail's explorer icon, so no floating chip, no Claude rail icon ── */
#viewWorkingWorkspace #wwSidebarExpandBtn { display: none !important; }
#viewWorkingWorkspace .wui-ide-body:has(#wwSidebarExpandBtn) .wui-ide-main { margin-left: 0; }
#viewWorkingWorkspace .wui-ide-activity-btn[data-activity="claude"] { display: none; }

/* Composer "+" menu must escape the box's overflow clip */
#viewWorkingWorkspace .wui-claude-composer-box.wui-composer-menu-open { overflow: visible !important; }
#viewWorkingWorkspace .wui-claude-plus-menu { background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.28); z-index: 1000; }
#viewWorkingWorkspace .wui-claude-plus-item { color: var(--st-ink); border-radius: 6px; }
#viewWorkingWorkspace .wui-claude-plus-item:hover:not(:disabled) { background: var(--st-soft); }

/* ── Preview panel fills the editor height ───────────────────────────── */
#viewWorkingWorkspace .wui-ide-scroll-pane:has(> .wui-preview-frame-wrap) { display: flex; flex-direction: column; min-height: 0; overflow: hidden; height: calc(100% - 36px); }
#viewWorkingWorkspace .wui-ide-scroll-pane:has(> .wui-preview-frame-wrap) > .wui-preview-frame-wrap { flex: 1 1 auto; min-height: 0; display: flex; margin-top: 10px; padding: 0; background: var(--st-surface-2); border-color: var(--st-line); border-radius: 10px; overflow: hidden; }
#viewWorkingWorkspace .wui-preview-frame { flex: 1 1 auto; height: 100% !important; min-height: 0; border: 0; border-radius: 0; margin: 0; }
#viewWorkingWorkspace .wui-ide-scroll-pane > .wui-row { flex: 0 0 auto; }

/* ── Buttons / dropdowns inside the IDE (Preview, Skills & MCP, sidebar) ─ */
#viewWorkingWorkspace .action-btn, #viewWorkingWorkspace .wc-btn, #viewWorkingWorkspace .cm-btn {
  height: 30px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-surface-2); color: var(--st-ink);
  font: 500 12px/1 inherit; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
#viewWorkingWorkspace .action-btn:hover:not(:disabled), #viewWorkingWorkspace .wc-btn:hover:not(:disabled), #viewWorkingWorkspace .cm-btn:hover:not(:disabled) { background: var(--st-soft); border-color: var(--st-muted); color: var(--st-ink); }
#viewWorkingWorkspace .wc-btn-primary, #viewWorkingWorkspace .cm-btn-primary, #viewWorkingWorkspace .action-btn.primary {
  background: var(--st-primary); border-color: var(--st-primary); color: #fff;
}
#viewWorkingWorkspace .wc-btn-primary:hover:not(:disabled), #viewWorkingWorkspace .cm-btn-primary:hover:not(:disabled), #viewWorkingWorkspace .action-btn.primary:hover:not(:disabled) { background: var(--st-primary); filter: brightness(1.1); color: #fff; }
#viewWorkingWorkspace .action-btn.small { height: 28px; padding: 0 10px; }
#viewWorkingWorkspace .wc-toggle, #viewWorkingWorkspace select, #viewWorkingWorkspace .cm-input, #viewWorkingWorkspace .wc-block input[type="text"] {
  background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: 8px; color: var(--st-ink); font-family: inherit;
}
#viewWorkingWorkspace select { height: 30px; padding: 0 28px 0 10px; font-size: 12px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a93a6' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
#viewWorkingWorkspace .wc-toggle { padding: 9px 12px; }
#viewWorkingWorkspace .wc-toggle:hover, #viewWorkingWorkspace select:hover { border-color: var(--st-muted); }
#viewWorkingWorkspace .wc-summary-line { font-family: inherit; font-size: 12px; color: var(--st-ink); }
#viewWorkingWorkspace .wc-caret { color: var(--st-muted); }
#viewWorkingWorkspace .wc-pill, #viewWorkingWorkspace .cm-pill { border-radius: 999px; font-family: inherit; }
#viewWorkingWorkspace .wc-note, #viewWorkingWorkspace .wc-state { background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: 8px; }
#viewWorkingWorkspace .wc-check input { accent-color: var(--st-primary); }

/* Mic icon centred in its button and on the Send button's centre line */
#viewWorkingWorkspace .wui-claude-send-cluster { display: flex; align-items: center; gap: 8px; }
#viewWorkingWorkspace .wui-claude-mic-btn { display: inline-flex !important; align-items: center; justify-content: center; margin: 0; line-height: 0; }
#viewWorkingWorkspace .wui-claude-mic-btn svg, #viewWorkingWorkspace .wui-claude-mic-btn > * { display: block; margin: 0; flex: none; }
#viewWorkingWorkspace .wui-claude-mic-btn { position: relative; }
#viewWorkingWorkspace .wui-claude-mic-btn .wui-voice-activity { position: absolute !important; inset: 0; margin: 0; pointer-events: none; }

/* ── Title bar = project header look: soft back tile + project name + client ── */
#viewWorkingWorkspace .wui-ide-title-legacy, #viewWorkingWorkspace .wui-ide-topbar .dcc-badge { display: none !important; }
#viewWorkingWorkspace .wui-ide-topbar { min-height: 64px; padding: 10px 18px 10px 16px; gap: 14px; background: linear-gradient(180deg, var(--st-surface), var(--st-surface-2)); }
#viewWorkingWorkspace .wui-ide-topbar .wui-ide-title { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
#viewWorkingWorkspace .wui-ide-title h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
#viewWorkingWorkspace .wui-ide-title .dcc-hint { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
#viewWorkingWorkspace .wui-ide-title .dcc-hint:empty { display: none; }
#viewWorkingWorkspace .wui-ide-topbar #wwBackToProjectBtn, #viewWorkingWorkspace .wui-ide-topbar #wwBackToLaneBtn {
  flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--st-soft); box-shadow: none;
}
#viewWorkingWorkspace .wui-ide-topbar #wwBackToProjectBtn:hover, #viewWorkingWorkspace .wui-ide-topbar #wwBackToLaneBtn:hover { background: color-mix(in srgb, var(--st-primary) 16%, var(--st-soft)); box-shadow: none; }

/* ── Your message vs Claude: solid blue bubble for you, neutral for Claude ── */
#viewWorkingWorkspace .wui-chat-user { background: #0f6a8c; border: 1px solid #0f6a8c; color: #fff; box-shadow: 0 6px 16px rgba(15,106,140,.22); }
:root[data-theme="dark"] #viewWorkingWorkspace .wui-chat-user, :root:not([data-theme="light"]) #viewWorkingWorkspace .wui-chat-user { background: #2a5fb8; border-color: #2a5fb8; box-shadow: 0 6px 16px rgba(42,95,184,.3); }
#viewWorkingWorkspace .wui-chat-user, #viewWorkingWorkspace .wui-chat-user * { color: #fff; }
#viewWorkingWorkspace .wui-chat-user .wui-chat-role { color: rgba(255,255,255,.75); }
#viewWorkingWorkspace .wui-chat-user a { color: #fff; text-decoration: underline; }
#viewWorkingWorkspace .wui-chat-user code, #viewWorkingWorkspace .wui-chat-user pre { background: rgba(0,0,0,.22); color: #fff; }

/* ── Refined: soft tinted bubble for you (replaces the solid blocks above) ── */
#viewWorkingWorkspace .wui-chat-user { background: #dcedf9; border: 1px solid #b7d6ee; box-shadow: none; color: #12303f; }
:root[data-theme="dark"] #viewWorkingWorkspace .wui-chat-user, :root:not([data-theme="light"]) #viewWorkingWorkspace .wui-chat-user { background: #15293f; border-color: #25507a; box-shadow: none; color: #e6f0fa; }
#viewWorkingWorkspace .wui-chat-user, #viewWorkingWorkspace .wui-chat-user * { color: inherit; }
#viewWorkingWorkspace .wui-chat-user .wui-chat-role { color: #1d78b5; font-weight: 800; }
:root[data-theme="dark"] #viewWorkingWorkspace .wui-chat-user .wui-chat-role, :root:not([data-theme="light"]) #viewWorkingWorkspace .wui-chat-user .wui-chat-role { color: #6fb2f2; }
#viewWorkingWorkspace .wui-chat-user a { color: #1d78b5; }
#viewWorkingWorkspace .wui-chat-user code, #viewWorkingWorkspace .wui-chat-user pre { background: rgba(0,0,0,.08); color: inherit; }

/* Phone (<=640px): an opened explorer / panel slides over the chat instead of squeezing it (reference mobile layout gives the chat the width) */
@media (max-width: 640px) {
  #viewWorkingWorkspace .wui-ide-body { position: relative; }
  #viewWorkingWorkspace #wwSidebar { position: absolute; left: 48px; top: 0; bottom: 0; z-index: 30; width: min(260px, calc(100vw - 72px)) !important; box-shadow: 8px 0 28px rgba(0, 0, 0, .28); }
  #viewWorkingWorkspace .wui-ide-sidebar-resizer, #viewWorkingWorkspace [id*="Resizer"] { display: none; }
}
