/* Match the existing smart-space workspace. Scope both surfaces to avoid legacy dark styles. */
.workspace-page .agent-gallery-page,
.workspace-page .agent-chat-page { color:#192844; background:#f3f5fa; background-image:none; }
.workspace-page .agent-gallery-page { padding:24px clamp(18px,3vw,42px) 42px; }
.workspace-page .agent-gallery-heading { display:block; padding:0; border:0; background:transparent; }
.skill-library-welcome { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:172px; padding:22px 32px; border-radius:16px; background:#ece9fa; overflow:hidden; }
.workspace-page .agent-gallery-heading h1 { margin:0 0 12px; color:#192844; font-size:clamp(28px,3vw,38px); letter-spacing:-.03em; }
.workspace-page .agent-gallery-heading p { max-width:55ch; color:#52607a; font-size:14px; line-height:1.8; }
.skill-library-note { display:block; margin-top:16px; color:#615385; font-size:12px; line-height:1.7; }
.skill-library-welcome img { align-self:flex-end; width:180px; height:150px; object-fit:cover; object-position:center 25%; border-radius:12px; }
.workspace-page .agent-gallery-controls { justify-content:space-between; margin:24px 0 0; }
.workspace-page .agent-gallery-tabs { gap:4px; border:1px solid #dddfea; background:#fff; }
.workspace-page .agent-gallery-tabs button { min-height:40px; padding:0 23px; color:#536078; font-size:14px; }
.workspace-page .agent-gallery-tabs button.active { color:#fff; background:#725de0; }
.workspace-page .agent-search { width:320px; min-height:46px; background:#fff; border-color:#dce0eb; color:#6551c8; }
.workspace-page .agent-search input { min-width:0; color:#24334c; background:transparent; font-size:14px; }
.workspace-page .agent-search input::placeholder { color:#64718a; }
.workspace-page .agent-gallery-body { grid-template-columns:180px minmax(0,1fr); gap:26px; padding-top:24px; }
.workspace-page .agent-categories { padding:16px 0; background:transparent; border:0; }
.workspace-page .agent-categories h2 { margin:0 8px 18px; color:#24334c; font-size:16px; }
.workspace-page .agent-categories h2 small { color:#645395; background:#e9e5f8; font-size:12px; }
.workspace-page .agent-category { min-height:44px; font-size:14px; color:#526078; }
.workspace-page .agent-category small { font-size:12px; color:#627088; }
.workspace-page .agent-category.active { color:#5e49c2; border-color:transparent; background:#e9e5fb; font-weight:650; }
.workspace-page .agent-category.active::before { display:none; }
.workspace-page .agent-category:hover { color:#5742bc; background:#ece9fa; }
.skill-source-note { margin:24px 10px 0; color:#64718a; font-size:12px; line-height:1.8; }
.workspace-page .agent-results-heading h2 { color:#24334c; font-size:20px; }
.workspace-page .agent-results-heading > span { color:#64718a; font-size:12px; }
.workspace-page .agent-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.workspace-page .agent-card,
.workspace-page .agent-card:nth-child(3n+2) { min-height:0; padding:0 18px 18px; overflow:hidden; border:1px solid #e0e4ee; border-radius:14px; background:#fff; box-shadow:none; color:#24334c; transition:transform .18s,border-color .18s; }
.workspace-page .agent-card:hover { transform:translateY(-2px); background:#fff; border-color:#a496df; }
.agent-card-image { display:block; width:calc(100% + 36px); max-width:none; height:142px; margin:0 -18px 16px; object-fit:contain; object-position:center; background:#eeedf5; }
.workspace-page .agent-card-top > small { color:#64518b; font-size:12px; }
.workspace-page .agent-card h3 { display:block; min-height:0; overflow:visible; margin:8px 0 10px; color:#24334c; font-size:18px; line-height:1.5; }
.workspace-page .agent-card > p { display:block; min-height:66px; overflow:visible; margin:0 0 16px; color:#58667e; font-size:13px; line-height:1.75; }
.workspace-page .agent-card-meta { margin-top:auto; gap:12px; border-color:#e8eaf1; }
.workspace-page .agent-card-meta small { color:#64718a; font-size:11px; }
.workspace-page .agent-card-meta strong { color:#384963; font-size:12px; font-weight:500; white-space:normal; line-height:1.6; }
.workspace-page .agent-card > .agent-card-scope { min-height:36px; margin:12px 0 0; color:#64518b; font-size:11px; line-height:1.7; }
.workspace-page .agent-card-actions { gap:10px; margin-top:14px; }
.workspace-page .agent-card-actions button { min-height:38px; padding:0 12px; border:1px solid #dcd6f4; border-radius:8px; color:#5c49bb; background:#fff; font-size:12px; }
.workspace-page .agent-card-actions .agent-open { color:#fff; background:#725de0; border-color:#725de0; }
.workspace-page .agent-card-actions button:hover { color:#4d39ae; border-color:#8e7bd9; background:#f0ecff; }
.workspace-page .agent-card-actions .agent-open:hover { color:#fff; background:#604acb; }
.workspace-page .agent-empty { color:#64718a; font-size:14px; }
.workspace-page .agent-chat-toolbar { background:#fff; border-color:#e1e5ef; }
.workspace-page .agent-back,
.workspace-page .agent-chat-page .studio-actions button { color:#5c49bb; background:#f6f4ff; border-color:#ded8f6; border-radius:8px; font-size:13px; }
.workspace-page .agent-chat-page .studio-model { background:#fff; border-color:#e2deef; }
.workspace-page .agent-chat-page .studio-model-icon { background:#eeeafa; border-color:#dcd4f7; color:#6551c8; }
.workspace-page .agent-chat-page .studio-model strong { color:#24334c; font-size:13px; }
.workspace-page .agent-chat-page .studio-model small { color:#64718a; font-size:11px; }
.workspace-page .agent-chat-canvas { width:min(100%,1060px); padding:28px; gap:0; }
.workspace-page .agent-chat-canvas .studio-intro { position:relative; min-height:170px; margin:12px 0 22px; padding:28px 200px 28px 28px; background:#ece9fa; border:0; border-radius:16px; box-shadow:none; }
#agent-detail-image { position:absolute; right:20px; bottom:16px; width:150px; height:140px; object-fit:cover; border-radius:12px; }
.workspace-page .agent-chat-page .studio-intro h1 { margin:0 0 12px; color:#24334c; font-size:clamp(26px,3vw,36px); letter-spacing:-.03em; }
.workspace-page .agent-chat-page .studio-intro p { color:#536078; font-size:14px; line-height:1.8; }
.workspace-page .agent-chat-page .studio-intro .agent-detail-scope { margin-top:12px; color:#5b4987; font-size:12px; }
.workspace-page .agent-guidance { gap:14px; }
.workspace-page .agent-guidance button { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:8px; min-height:110px; padding:18px; background:#fff; border:1px solid #e0e4ee; border-radius:12px; color:#24334c; text-align:left; }
.workspace-page .agent-guidance button:hover { background:#f5f2ff; border-color:#a496df; }
.workspace-page .agent-guidance strong { color:#354461; font-size:15px; }
.workspace-page .agent-guidance button span { display:-webkit-box; margin:0; color:#5d6b83; font-size:12px; line-height:1.65; -webkit-line-clamp:2; }
.workspace-page .agent-chat-page .studio-chat-log { min-height:110px; max-height:460px; }
.workspace-page .agent-chat-page .assistant-chat-empty { color:#64718a; font-size:14px; }
.workspace-page .agent-chat-page .assistant-chat-message { background:#fff; border-color:#e0e4ee; }
.workspace-page .agent-chat-page .assistant-chat-message.from-user { background:#ece8fc; border-color:#d8cff5; }
.workspace-page .agent-chat-page .assistant-chat-message p { color:#34435d; font-size:14px; line-height:1.8; }
.workspace-page .agent-chat-page .studio-composer { background:#fff; border:1px solid #c7bcea; border-radius:14px; box-shadow:0 10px 28px rgba(55,43,100,.06); }
.workspace-page .agent-chat-page .studio-composer textarea { min-height:90px; color:#24334c; background:#fff; font-size:15px; }
.workspace-page .agent-chat-page .studio-composer textarea::placeholder { color:#64718a; }
.workspace-page .agent-chat-page .studio-composer-tools { border-color:#e4e7ef; flex-wrap:wrap; }
.workspace-page .agent-chat-page .studio-tools-left { flex-wrap:wrap; }
.workspace-page .agent-chat-page .studio-tool-button { color:#604acb; background:#f5f2ff; border-color:#ded8f6; min-height:38px; }
.workspace-page .agent-chat-page .studio-tool-button span,
.workspace-page .agent-chat-page .studio-tools-right > small,
.workspace-page .agent-chat-page .agent-upload-note { color:#5e6b83; font-size:12px; }
.workspace-page .agent-chat-page .studio-submit { min-height:42px; color:#fff; background:#725de0; box-shadow:none; border-radius:9px; font-size:14px; }
.workspace-page .agent-chat-page .studio-capability-note { color:#64718a; font-size:12px; line-height:1.8; }
.workspace-page .agent-chat-page .studio-attachment { background:#f4f1fc; border-color:#dcd5f3; }
.workspace-page .agent-chat-page .studio-attachment > span { color:#45536b; }
.workspace-page :is(.agent-gallery-page,.agent-chat-page) :focus-visible { outline:3px solid #725de0; outline-offset:3px; }
.workspace-page :is(.agent-gallery-page,.agent-chat-page) ::selection { color:#fff; background:#725de0; }
.workspace-page :is(.agent-gallery-page,.agent-chat-page) { scrollbar-color:#b5a8de #f3f5fa; caret-color:#6551c8; }
.agent-chat-page .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media(min-width:1600px) { .workspace-page .agent-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1100px) { .workspace-page .agent-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .studio-active .workspace-header { padding:10px 14px; gap:10px; flex-wrap:wrap; }
  .studio-active .workspace-breadcrumb { min-width:0; font-size:12px; }
  .studio-active .header-user { min-width:0; gap:8px; white-space:nowrap; font-size:12px; }
  .studio-active #merchant-name { max-width:8em; overflow:hidden; text-overflow:ellipsis; }
  .workspace-page .agent-gallery-page { padding:16px 14px 30px; }
  .skill-library-welcome { min-height:0; padding:24px 20px; }
  .skill-library-welcome img { display:none; }
  .workspace-page .agent-gallery-controls { margin-top:16px; gap:12px; }
  .workspace-page .agent-search { width:100%; }
  .workspace-page .agent-gallery-body { grid-template-columns:1fr; gap:12px; padding-top:12px; }
  .workspace-page .agent-categories { padding:8px 0; min-width:0; }
  .workspace-page .agent-categories h2 { margin:0 0 12px; }
  .workspace-page .agent-categories #agent-category-list { padding-bottom:6px; }
  .workspace-page .agent-category { font-size:13px; min-height:40px; gap:8px; }
  .skill-source-note { display:none; }
  .workspace-page .agent-results-heading > span { display:none; }
  .workspace-page .agent-grid { grid-template-columns:1fr; gap:16px; }
  .agent-card-image { height:170px; }
  .workspace-page .agent-card > p { min-height:0; }
  .workspace-page .agent-card > .agent-card-scope { min-height:0; }
  .workspace-page .agent-chat-canvas { padding:16px 14px; }
  .workspace-page .agent-chat-canvas .studio-intro { padding:24px 20px; }
  #agent-detail-image { display:none; }
  .workspace-page .agent-guidance { grid-template-columns:1fr; gap:10px; }
  .workspace-page .agent-guidance button { min-height:0; padding:15px; }
  .workspace-page .agent-chat-page .studio-composer-tools { align-items:flex-start; }
  .workspace-page .agent-chat-page .studio-tools-right { width:100%; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
  .workspace-page .agent-chat-page .agent-upload-note { max-width:none; }
}
