/* IUAI product system. Single owner of workspace geometry, including responsive states.
   Business DOM, active/hidden states and feature styles remain in their original modules. */
body.workspace-flow-active {
  --flow-bg:#080d13; --flow-side:#0b1119; --flow-surface:#101923; --flow-surface-2:#0c141e;
  --flow-text:#e7edf5; --flow-muted:#97a9bc; --flow-line:#233242; --flow-hover:#172330;
  --flow-cyan:#31c4e0; --flow-violet:#8066f4;
  --ui-side:240px; --ui-bar:72px; --ui-gutter:clamp(24px,2.5vw,48px);
  --ui-radius:14px; --ui-gap:20px; --ui-read:1040px; --ui-wide:1800px;
  font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px; line-height:1.6;
}
body.workspace-flow-active[data-theme="light"] {
  --flow-bg:#f5f7fb; --flow-side:#fff; --flow-surface:#fff; --flow-surface-2:#f0f4fa;
  --flow-text:#17263b; --flow-muted:#586d84; --flow-line:#dce4ee; --flow-hover:#eaf0f8;
}
body.workspace-flow-active #workspace {
  --bg:var(--flow-bg); --card:var(--flow-surface); --card2:var(--flow-surface-2);
  --ink:var(--flow-text); --muted:var(--flow-muted); --line:var(--flow-line);
  --grad:linear-gradient(110deg,#169fc3,#6d59e9);
  background:var(--flow-bg); color:var(--flow-text); min-height:100dvh;
}
#workspace [hidden] {display:none!important}
body.workspace-flow-active #workspace *,body.workspace-flow-active #workspace *::before,body.workspace-flow-active #workspace *::after {box-sizing:border-box}
body.workspace-flow-active #workspace :is(button,a,input,select,textarea):focus-visible {outline:2px solid var(--flow-cyan);outline-offset:3px}
body.workspace-flow-active #workspace :is(button,.btn) {font-family:inherit}
body.workspace-flow-active #workspace .btn {min-height:44px;border-radius:10px;white-space:nowrap;box-shadow:none;font-size:13px}
body.workspace-flow-active #workspace :is(.card,.table-card,.project-card) {border:1px solid var(--flow-line);border-radius:var(--ui-radius);background:var(--flow-surface);box-shadow:none;min-width:0}
body.workspace-flow-active #workspace .sidebar {
  position:fixed;inset:0 auto 0 0;width:var(--ui-side);height:100dvh;z-index:100;
  display:flex;flex-direction:column;gap:0;padding:24px 16px 16px;overflow-y:auto;
  background:var(--flow-side);border-right:1px solid var(--flow-line);scrollbar-width:thin;
}
body.workspace-flow-active #workspace .sidebar-brand {display:flex;align-items:center;min-height:50px;padding:0 8px 16px;border-bottom:1px solid var(--flow-line)}
body.workspace-flow-active #workspace .sidebar-brand img {width:128px;height:38px;object-fit:contain;object-position:left center}
body.workspace-flow-active #workspace .sidebar-brand>div {display:none}
.flow-workspace-label {font:9px/1.5 ui-monospace,monospace;letter-spacing:.16em;color:var(--flow-muted);margin:16px 8px 18px}
body.workspace-flow-active #workspace .side-nav {margin-top:0;gap:4px}
body.workspace-flow-active #workspace .side-nav button {min-height:44px;font-size:13px;gap:12px;padding:10px 12px;border-radius:9px;color:var(--flow-muted)}
body.workspace-flow-active #workspace .side-nav button.active {background:var(--flow-hover);color:var(--flow-text);box-shadow:inset 2px 0 var(--flow-cyan)}
body.workspace-flow-active #workspace .sidebar-bottom {margin-top:auto;padding-top:16px}
body.workspace-flow-active #workspace .workspace-shell {width:calc(100% - var(--ui-side));min-width:0;margin-left:var(--ui-side);min-height:100dvh;background:var(--flow-bg)}
body.workspace-flow-active #workspace .app-topbar {position:sticky;top:0;z-index:90;display:flex;align-items:center;flex-wrap:nowrap;gap:16px;height:var(--ui-bar);padding:0 var(--ui-gutter);width:100%;background:var(--flow-bg);border-bottom:1px solid var(--flow-line)}
body.workspace-flow-active #workspace .app-search {display:flex;align-items:center;gap:8px;flex:1 1 360px;min-width:100px;max-width:560px;width:auto;height:44px;margin:0;padding:0 14px;border:1px solid var(--flow-line);border-radius:10px;background:var(--flow-surface-2)}
body.workspace-flow-active #workspace .app-search input {width:100%;min-width:0;height:40px;padding:0;border:0;box-shadow:none;background:transparent;line-height:normal}
body.workspace-flow-active #workspace .topbar-actions {display:flex;align-items:center;flex:0 0 auto;gap:8px;margin-left:auto;height:44px;white-space:nowrap}
body.workspace-flow-active #workspace .topbar-actions>* {flex-shrink:0}
body.workspace-flow-active #workspace :is(.system-chip,.lang-toggle,#top-new-research,#theme-toggle,#top-avatar,#chat-share-top) {height:44px;min-height:44px;white-space:nowrap;word-break:normal;flex-shrink:0;border-radius:10px}
body.workspace-flow-active #workspace .system-chip {display:flex;align-items:center;gap:7px;padding:0 12px;color:#79d7b1;background:#113027;border:1px solid #225244;font-size:12px}
body.workspace-flow-active #workspace .app-lang .lang-toggle {display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:116px;padding:0 12px}
body.workspace-flow-active #workspace :is(#theme-toggle,#top-avatar) {width:44px;min-width:44px;padding:0;display:grid;place-items:center}
body.workspace-flow-active #workspace #top-new-research {display:inline-flex;align-items:center;gap:8px;padding:0 16px;min-width:max-content}
body.workspace-flow-active #workspace svg {width:20px;height:20px;flex-shrink:0}
body.workspace-flow-active #workspace .sidebar-toggle {display:none;width:44px;height:44px;flex:0 0 44px;place-items:center;padding:10px;border:1px solid var(--flow-line);border-radius:10px;background:var(--flow-surface);color:var(--flow-text)}
body.workspace-flow-active #workspace .mobile-workspace-brand {display:none}
body.workspace-flow-active #workspace .app-main {width:100%;max-width:var(--ui-wide);min-width:0;margin:0 auto;padding:32px var(--ui-gutter) 48px;overflow:visible}
body.workspace-flow-active #workspace .app-view {min-width:0;width:100%}
body.workspace-flow-active #workspace .page-head {margin:0 0 24px;gap:20px;align-items:center;flex-wrap:wrap}
body.workspace-flow-active #workspace .page-head h1 {font-size:clamp(26px,2vw,32px);line-height:1.3;letter-spacing:-.035em;margin:8px 0}
body.workspace-flow-active #workspace .page-head p {font-size:14px;line-height:1.7;color:var(--flow-muted)}
body.workspace-flow-active #workspace .page-kicker {font-size:10px;letter-spacing:.14em;color:var(--flow-muted)}
/* Dashboard: fill the canvas; keep title space before metadata. */
body.workspace-flow-active #workspace .home-head {position:relative;display:flex;align-items:center;min-height:150px;height:auto;max-height:none;padding:8px 250px 24px 0;margin-bottom:12px;overflow:visible}
body.workspace-flow-active #workspace .home-head>div:first-child {min-width:0;height:auto;display:block}
body.workspace-flow-active #workspace .quota-pill {position:absolute;right:0;bottom:12px;padding:0;font-size:12px;background:transparent;color:var(--flow-muted)}
.flow-core-wrap {position:absolute;right:0;top:6px;width:220px;height:116px;pointer-events:none}
.flow-core-wrap canvas {width:100%;height:100%}
.flow-core-label {position:absolute;right:32px;bottom:0;font:8px monospace;color:var(--flow-muted);letter-spacing:.15em}
.flow-core-motion {position:absolute;bottom:0;right:0;width:24px;height:24px;border:1px solid var(--flow-line);border-radius:50%;background:var(--flow-surface);color:var(--flow-muted);pointer-events:auto}
body.workspace-flow-active #workspace .home-entry-grid {gap:var(--ui-gap)}
body.workspace-flow-active #workspace .home-entry-card {padding:24px;min-height:146px;border-radius:var(--ui-radius);background:var(--flow-surface);border-color:var(--flow-line)}
body.workspace-flow-active #workspace .home-entry-card h2 {font-size:22px;line-height:1.4}
body.workspace-flow-active #workspace .home-entry-card p {font-size:14px;line-height:1.7;color:var(--flow-muted)}
body.workspace-flow-active #workspace .connected-today {margin:28px 0}
body.workspace-flow-active #workspace .connected-today-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
body.workspace-flow-active #workspace .connected-mini-card {padding:18px;min-height:88px;background:var(--flow-surface);border-radius:12px}
body.workspace-flow-active #workspace .dashboard-grid {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:var(--ui-gap)}
body.workspace-flow-active #workspace .research-row {display:grid;grid-template-columns:minmax(0,1fr) 84px 90px 66px;gap:12px;width:100%;padding:16px 0;align-items:center}
body.workspace-flow-active #workspace .research-row>div {min-width:0}
body.workspace-flow-active #workspace .research-row :is(.title,.sub) {display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body.workspace-flow-active #workspace .research-layout {grid-template-columns:minmax(0,1fr) 340px;gap:24px}
body.workspace-flow-active #workspace :is(.research-form,.research-side) {padding:24px}
/* AI conversation: one reading column shared by header, messages and composer. */
body.workspace-flow-active #workspace .chat-workspace-shell {display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:var(--ui-read);min-height:calc(100dvh - var(--ui-bar) - 64px);height:auto;margin:0 auto;gap:0}
body.workspace-flow-active #workspace .chat-page-head {width:100%;max-width:none;margin:0;padding:0 0 20px;display:flex;align-items:center;gap:16px}
body.workspace-flow-active #workspace .chat-workspace-shell.has-messages .chat-page-head {min-height:52px;padding:0 0 12px}
body.workspace-flow-active #workspace .chat-thread {width:100%;flex:1;min-height:300px;overflow:visible;padding:8px 0 24px}
body.workspace-flow-active #workspace .chat-messages {width:100%;max-width:none;margin:0;padding:0;max-height:none;overflow:visible;gap:28px}
body.workspace-flow-active #workspace .chat-workspace-shell .assistant-message {display:flex;width:100%;max-width:none;margin:0;gap:14px;min-width:0;align-items:flex-start}
body.workspace-flow-active #workspace .chat-workspace-shell .assistant-message.assistant .assistant-bubble {width:100%;max-width:calc(100% - 42px);margin:0;padding:2px 0;border:0;background:transparent}
body.workspace-flow-active #workspace .chat-workspace-shell .assistant-message.user .assistant-bubble {width:auto;max-width:min(78%,760px);margin:0;padding:14px 18px;background:color-mix(in srgb,var(--flow-surface) 80%,#8066f4 20%);border:1px solid var(--flow-line)}
body.workspace-flow-active #workspace .assistant-bubble .rich-text {font-size:15px;line-height:1.85;overflow-wrap:anywhere}
body.workspace-flow-active #workspace .chat-empty-state {width:100%;max-width:none;min-height:360px;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px}
body.workspace-flow-active #workspace .chat-composer {position:sticky;bottom:max(16px,env(safe-area-inset-bottom));width:100%;max-width:none;margin:16px 0 0;padding:14px 16px;z-index:30;background:var(--flow-surface);border:1px solid var(--flow-line);border-radius:18px;box-shadow:0 8px 32px #0002}
body.workspace-flow-active #workspace .chat-input-row {grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}
body.workspace-flow-active #workspace #chat-send {width:auto;min-width:80px;height:44px;border-radius:11px;padding:0 16px}
body.workspace-flow-active #workspace .chat-toolbar {flex-wrap:wrap;gap:8px}
body.workspace-flow-active #workspace .chat-tool {min-height:36px}
/* IUAI messaging: bounded viewport with independently scrolling panels. */
body.workspace-flow-active #workspace .iuai-chat-layout-v563 {display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;width:100%;height:calc(100dvh - var(--ui-bar) - 64px);min-height:500px}
body.workspace-flow-active #workspace :is(.iuai-chat-rail-v563,.iuai-chat-main-v563) {background:var(--flow-surface);border:1px solid var(--flow-line);border-radius:var(--ui-radius);min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}
body.workspace-flow-active #workspace .iuai-chat-rail-v563 {padding:16px;gap:12px;overflow-y:auto}
body.workspace-flow-active #workspace .iuai-chat-main-head-v563 {padding:20px 24px;background:var(--flow-surface);border-color:var(--flow-line)}
body.workspace-flow-active #workspace .iuai-chat-content-v563 {flex:1;min-height:0;min-width:0;overflow:auto;padding:24px;color:var(--flow-text)}
body.workspace-flow-active #workspace .iuai-chat-content-v563.iuai-private-active-v574,
body.workspace-flow-active #workspace .iuai-chat-content-v563.iuai-group-active-v576 {display:flex;padding:0;overflow:hidden}
body.workspace-flow-active #workspace :is(.iuai-private-v574,.iuai-group-chat-v576) {background:var(--flow-surface-2);min-height:0;width:100%}
body.workspace-flow-active #workspace :is(.iuai-private-head-v574,.iuai-group-head-v576) {display:flex;align-items:center;gap:12px;padding:14px 20px;min-height:68px;flex:none;background:var(--flow-surface);border-color:var(--flow-line)}
body.workspace-flow-active #workspace :is(.iuai-private-messages-v574,.iuai-group-messages-v576) {flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;padding:24px;overflow-y:auto;overscroll-behavior:contain}
body.workspace-flow-active #workspace :is(.iuai-msg-bubble-v574,.iuai-group-bubble-v576) {max-width:min(78%,760px);padding:12px 16px;border-radius:14px;background:var(--flow-surface);color:var(--flow-text);border-color:var(--flow-line);font-size:14px;line-height:1.75;overflow-wrap:anywhere}
body.workspace-flow-active #workspace :is(.iuai-private-compose-v574,.iuai-group-compose-v576) {display:flex;align-items:flex-end;flex:none;gap:8px;padding:14px 16px max(14px,env(safe-area-inset-bottom));background:var(--flow-surface);border-top:1px solid var(--flow-line)}
body.workspace-flow-active #workspace :is(.iuai-private-compose-main-v577,.iuai-group-compose-main-v5771) {min-width:0;flex:1}
body.workspace-flow-active #workspace :is(.iuai-private-compose-v574,.iuai-group-compose-v576) textarea {width:100%;min-height:44px;max-height:140px;border-radius:10px;background:var(--flow-surface-2);font-size:15px;color:var(--flow-text)}
body.workspace-flow-active #workspace :is(.iuai-private-attach-v577,.iuai-private-mention-v575,.iuai-private-send-v574,.iuai-group-attach-v5771,.iuai-group-mention-v576,.iuai-group-send-v576) {height:44px;min-height:44px;flex-shrink:0;border-radius:10px}
body.workspace-flow-active #workspace :is(.iuai-private-mention-v575,.iuai-group-mention-v576) {min-width:76px;padding:0 10px;display:flex;align-items:center;justify-content:center;gap:6px}
body.workspace-flow-active #workspace .iuai-mention-star-v5771 {display:none}
body.workspace-flow-active #workspace :is(.iuai-private-mention-v575,.iuai-group-mention-v576)::before {content:'';width:20px;height:20px;background:url('/workspace-flow/assets/mark-color.svg') center/contain no-repeat}
body.workspace-flow-active #workspace :is(.iuai-private-attach-v577,.iuai-group-attach-v5771) {width:44px;padding:10px;display:grid;place-items:center;border:1px solid var(--flow-line);background:var(--flow-surface-2);color:var(--flow-text);cursor:pointer}
body.workspace-flow-active #workspace :is(.iuai-private-attach-v577,.iuai-group-attach-v5771) svg {stroke:currentColor}
body.workspace-flow-active #workspace .iuai-drafts-v577 {display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
body.workspace-flow-active #workspace .iuai-drafts-v577:empty {display:none}
body.workspace-flow-active #workspace .iuai-draft-img-v577 {position:relative;width:64px;height:64px}
body.workspace-flow-active #workspace .iuai-draft-img-v577 img {width:100%;height:100%;object-fit:cover;border-radius:8px}
body.workspace-flow-active #workspace .iuai-draft-del-v577 {position:absolute;right:0;top:0;width:24px;height:24px;border-radius:50%;background:var(--flow-side);color:var(--flow-text);border:1px solid var(--flow-line)}
body.workspace-flow-active #workspace .iuai-msg-images-v577 {display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
body.workspace-flow-active #workspace .iuai-msg-images-v577 img {max-width:min(100%,360px);max-height:280px;object-fit:contain;border-radius:10px;cursor:pointer}
body.workspace-flow-active #workspace :is(.iuai-private-reply-v577,.iuai-msg-quote-v577) {padding:8px 12px;margin-bottom:8px;border-left:2px solid var(--flow-cyan);background:var(--flow-hover);font-size:12px;border-radius:6px;overflow-wrap:anywhere}
.iuai-select-toolbar-v5771 {position:fixed;z-index:10050;display:flex;gap:4px;transform:translateX(-50%);padding:6px;background:var(--flow-surface,#101923);border:1px solid var(--flow-line,#233242);border-radius:10px;box-shadow:0 8px 24px #0004}
.iuai-select-toolbar-v5771[hidden] {display:none!important}
.iuai-select-toolbar-v5771 button {min-height:36px;border:0;padding:0 12px;border-radius:6px;color:var(--flow-text,#e7edf5);background:transparent;cursor:pointer}
/* Connectors and data views. */
body.workspace-flow-active #workspace .connector-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ui-gap)}
body.workspace-flow-active #workspace .connector-card {display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:14px;padding:22px;min-height:220px;border-radius:var(--ui-radius);background:var(--flow-surface);align-items:start}
body.workspace-flow-active #workspace .connector-card-main {display:contents}
body.workspace-flow-active #workspace .connector-card-title {display:flex;flex-direction:column;align-items:flex-start;gap:6px;grid-column:2}
body.workspace-flow-active #workspace .connector-card-title b {font-size:16px;line-height:1.4}
body.workspace-flow-active #workspace .connector-card-main p {grid-column:1/-1;font-size:13px;line-height:1.7;margin:0;min-height:44px}
body.workspace-flow-active #workspace .connector-capabilities {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}
body.workspace-flow-active #workspace .connector-card-action {grid-column:1/-1;width:100%;align-self:end;margin-top:4px}
body.workspace-flow-active #workspace .connector-card-action .btn {width:100%}
body.workspace-flow-active #workspace .table-card {padding:20px;overflow:visible}
body.workspace-flow-active #workspace :is(.library-table,.history-table) {overflow:visible;min-width:0;width:100%}
body.workspace-flow-active #workspace :is(.library-header,.library-item) {display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) 104px minmax(0,1.5fr) 44px;align-items:start;gap:16px;padding:16px 8px;width:100%;min-width:0;border-color:var(--flow-line)}
body.workspace-flow-active #workspace .library-item>* {display:block;min-width:0;overflow-wrap:anywhere;color:var(--flow-text)}
body.workspace-flow-active #workspace .library-item .main small {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;margin-top:4px;color:var(--flow-muted)}
body.workspace-flow-active #workspace .library-item details summary {cursor:pointer;color:var(--flow-text);list-style:none}
body.workspace-flow-active #workspace .library-item details summary span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.65}
body.workspace-flow-active #workspace .library-item details summary::after {content:'＋';color:var(--flow-cyan);font-size:12px;margin-top:4px;display:block}
body.workspace-flow-active #workspace .library-item details[open] summary span {display:none}
body.workspace-flow-active #workspace .library-item details[open] summary::after {content:'−'}
body.workspace-flow-active #workspace .library-item details p {margin:8px 0 0;white-space:pre-wrap;line-height:1.8;font-size:14px}
body.workspace-flow-active #workspace .library-item button {width:44px;height:44px;color:var(--flow-cyan);background:var(--flow-hover)}
body.workspace-flow-active #workspace :is(.history-header,.history-item) {grid-template-columns:minmax(0,1fr) 140px 110px 90px 110px;gap:16px}
body.workspace-flow-active #workspace .project-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
@media(min-width:1700px) {body.workspace-flow-active #workspace .connector-grid {grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1279px) {
  body.workspace-flow-active {--ui-side:220px;--ui-gutter:24px;--ui-gap:16px}
  body.workspace-flow-active #workspace .app-topbar {gap:12px}
  body.workspace-flow-active #workspace .system-chip {display:none}
  body.workspace-flow-active #workspace .connector-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  body.workspace-flow-active #workspace .dashboard-grid {grid-template-columns:1fr}
  body.workspace-flow-active #workspace .iuai-chat-layout-v563 {grid-template-columns:240px minmax(0,1fr)}
}
@media(max-width:1023px) {
  body.workspace-flow-active {--ui-side:0px;--ui-gutter:24px}
  body.workspace-flow-active #workspace .sidebar {width:280px;max-width:86vw;transform:translateX(-105%);transition:transform .2s ease;z-index:140}
  body.workspace-flow-active #workspace .sidebar:not(.open) {visibility:hidden;pointer-events:none;box-shadow:none}
  body.workspace-flow-active #workspace .sidebar.open {transform:translateX(0);visibility:visible;pointer-events:auto}
  .iuai-mobile-sidebar-backdrop {pointer-events:none}
  .iuai-mobile-sidebar-backdrop.open {pointer-events:auto}
  body.workspace-flow-active #workspace .sidebar-toggle {display:grid}
  body.workspace-flow-active #workspace .workspace-shell {width:100%;margin-left:0}
  body.workspace-flow-active #workspace .research-layout {grid-template-columns:1fr}
  body.workspace-flow-active #workspace .research-side {position:static}
  body.workspace-flow-active #workspace .project-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  body.workspace-flow-active #workspace :is(.history-header,.history-item) {grid-template-columns:minmax(0,1fr) 90px 96px 70px 80px;gap:8px}
  body.workspace-flow-active #workspace :is(.library-header,.library-item) {grid-template-columns:minmax(0,1fr) minmax(0,.65fr) 92px minmax(0,1.2fr) 44px;gap:12px}
}
@media(max-width:767px) {
  body.workspace-flow-active {--ui-bar:calc(64px + env(safe-area-inset-top));--ui-gutter:16px;--ui-gap:14px}
  body.workspace-flow-active #workspace .app-topbar {padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:8px}
  body.workspace-flow-active #workspace .app-search {display:none}
  body.workspace-flow-active #workspace .mobile-workspace-brand {display:flex;align-items:center;gap:6px;order:0;margin-right:auto;text-decoration:none;color:var(--flow-text)}
  body.workspace-flow-active #workspace .mobile-workspace-brand img {width:26px;height:26px}
  body.workspace-flow-active #workspace .mobile-workspace-brand b {font-size:14px;letter-spacing:.12em}
  body.workspace-flow-active #workspace .topbar-actions {display:contents}
  body.workspace-flow-active #workspace :is(.system-chip,.app-lang,#theme-toggle,#chat-share-top,#iuai-share-top-btn) {display:none}
  body.workspace-flow-active #workspace #top-new-research {min-width:44px;width:44px;padding:0;justify-content:center;order:1}
  body.workspace-flow-active #workspace #top-new-research span {display:none}
  body.workspace-flow-active #workspace #top-avatar {display:grid;order:2}
  body.workspace-flow-active #workspace .sidebar-toggle {order:3}
  body.workspace-flow-active #workspace .app-main {padding:20px max(16px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
  body.workspace-flow-active #workspace .home-head {padding:0;min-height:130px;display:block;margin-bottom:16px}
  body.workspace-flow-active #workspace .home-head>div:first-child {height:auto}
  .flow-core-wrap {display:none}
  body.workspace-flow-active #workspace .quota-pill {position:static;display:inline-flex;margin:12px 0 0;font-size:12px}
  body.workspace-flow-active #workspace :is(.home-entry-grid,.connected-today-grid,.connector-grid,.project-grid) {grid-template-columns:1fr}
  body.workspace-flow-active #workspace .home-entry-card {padding:18px;min-height:120px}
  body.workspace-flow-active #workspace .research-row {grid-template-columns:minmax(0,1fr) 74px;gap:8px;padding:14px 0}
  body.workspace-flow-active #workspace .research-row>div:nth-child(n+3) {display:none}
  body.workspace-flow-active #workspace .chat-workspace-shell {min-height:calc(var(--iuai-visual-height,100dvh) - var(--ui-bar) - 40px)}
  body.workspace-flow-active #workspace .chat-page-head {flex-wrap:wrap;gap:12px;padding-bottom:16px}
  body.workspace-flow-active #workspace .chat-thread {min-height:180px}
  body.workspace-flow-active #workspace .chat-empty-state {min-height:260px;padding:24px 0}
  body.workspace-flow-active #workspace .chat-composer {bottom:env(safe-area-inset-bottom);padding:12px;width:100%;border-radius:16px;margin-top:12px}
  body.workspace-flow-active #workspace #chat-send {width:44px;min-width:44px;padding:0}
  body.workspace-flow-active #workspace #chat-send span {display:none}
  body.workspace-flow-active #workspace .chat-workspace-shell .assistant-message.user .assistant-bubble {max-width:90%}
  body.workspace-flow-active #workspace .iuai-chat-layout-v563 {grid-template-columns:1fr;height:auto;min-height:0;gap:12px}
  body.workspace-flow-active #workspace .iuai-chat-rail-v563 {padding:12px;gap:10px;max-height:260px}
  body.workspace-flow-active #workspace .iuai-chat-main-v563 {height:calc(var(--iuai-visual-height,100dvh) - var(--ui-bar) - 32px);min-height:400px}
  body.workspace-flow-active #workspace .iuai-chat-main-head-v563 {padding:16px}
  body.workspace-flow-active #workspace :is(.iuai-private-messages-v574,.iuai-group-messages-v576) {padding:16px;gap:10px}
  body.workspace-flow-active #workspace :is(.iuai-msg-bubble-v574,.iuai-group-bubble-v576) {max-width:90%;padding:10px 12px}
  body.workspace-flow-active #workspace :is(.iuai-private-compose-v574,.iuai-group-compose-v576) {flex-wrap:wrap;padding:12px;gap:8px}
  body.workspace-flow-active #workspace :is(.iuai-private-compose-main-v577,.iuai-group-compose-main-v5771) {order:0;flex:1 1 100%}
  body.workspace-flow-active #workspace :is(.iuai-private-compose-v574,.iuai-group-compose-v576) textarea {font-size:16px}
  body.workspace-flow-active #workspace :is(.iuai-private-send-v574,.iuai-group-send-v576) {margin-left:auto}
  body.workspace-flow-active #workspace .table-card {padding:12px}
  body.workspace-flow-active #workspace .table-toolbar {flex-wrap:wrap;gap:10px}
  body.workspace-flow-active #workspace .filter-search {min-width:0;flex:1;width:auto}
  body.workspace-flow-active #workspace .library-header {display:none}
  body.workspace-flow-active #workspace .library-item {grid-template-columns:minmax(0,1fr) 44px;gap:10px;padding:18px 4px}
  body.workspace-flow-active #workspace .library-item>div {display:block}
  body.workspace-flow-active #workspace .library-item>.main {grid-column:1;grid-row:1}
  body.workspace-flow-active #workspace .library-item>div:nth-child(2) {grid-column:1;grid-row:2;font-size:12px;color:var(--flow-muted)}
  body.workspace-flow-active #workspace .library-item>div:nth-child(3) {grid-column:1;grid-row:3;font-size:12px;color:var(--flow-muted)}
  body.workspace-flow-active #workspace .library-item>.library-question {grid-column:1/-1;grid-row:4}
  body.workspace-flow-active #workspace .library-item>div:last-child {grid-column:2;grid-row:1}
  body.workspace-flow-active #workspace .history-header {display:none}
  body.workspace-flow-active #workspace .history-item {grid-template-columns:minmax(0,1fr) auto;width:100%;min-width:0;gap:10px;padding:16px 4px;border-color:var(--flow-line)}
  body.workspace-flow-active #workspace .history-item .main {grid-column:1/-1}
  body.workspace-flow-active #workspace .history-item .main b {white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body.workspace-flow-active #workspace .history-item>.history-actions {grid-column:2;display:flex;gap:6px}
  body.workspace-flow-active #workspace .history-item .history-actions button {min-height:44px;min-width:44px}
  body.workspace-flow-active #workspace .history-item .main small {overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce) {#workspace * {scroll-behavior:auto;animation:none;transition:none}}
