#xh-canvas-agent-root {
  position: fixed;
  inset: 0;
  /* Normal canvas chrome tops out below 200; the full-screen media viewer is
     z-index 220 and must remain above Agent so its download/close controls work. */
  z-index: 200;
  pointer-events: none;
  color: #f5f7fa;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

#xh-canvas-agent-root *,
#xh-canvas-agent-root *::before,
#xh-canvas-agent-root *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.xh-agent-launch {
  position: fixed;
  right: 10px;
  top: var(--xh-agent-top, 14px);
  display: flex;
  width: 86px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: #292b30;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 140ms ease, transform 140ms ease, background 140ms ease;
}

.xh-agent-launch:hover { background: #23262b; }
.xh-agent-launch strong { font-size: 13px; font-weight: 700; }
.xh-agent-launch.is-hidden { opacity: 0; transform: translateX(18px); pointer-events: none; }

.xh-agent-brand-mark {
  display: inline-flex;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #21e6be;
  color: #07251f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.xh-agent-launch-icon {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 18px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  border-radius: 5px;
  color: #f5f5f5;
}
.xh-agent-launch > .xh-agent-launch-icon { transform: scale(.72); }

/* Keep the canvas full width while Agent is closed. Only the native top action
   group moves left so Agent shares the same row and background. */
.xh-agent-host-actions {
  margin-right: 96px !important;
  transform: none !important;
  transition: margin-right 160ms ease !important;
}

html.xh-agent-panel-open body > #root {
  width: calc(100% - 420px) !important;
  max-width: calc(100% - 420px) !important;
  overflow: hidden !important;
  transition: width 190ms ease, max-width 190ms ease;
}
.xh-agent-launch-icon::before,
.xh-agent-launch-icon::after,
.xh-agent-launch-icon i { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.xh-agent-launch-icon::before { left: 4px; }
.xh-agent-launch-icon i { left: 8px; }
.xh-agent-launch-icon::after { left: 12px; }

.xh-agent-panel {
  position: fixed;
  inset: 0 0 0 auto;
  display: flex;
  width: min(420px, 100vw);
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #30343b;
  background: #202122;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 160ms ease, transform 190ms ease;
}

.xh-agent-panel.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }

.xh-agent-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #34373d;
  padding: 0 15px;
  background: #202122;
}

.xh-agent-brand { display: flex; min-width: 0; align-items: center; gap: 10px; }
.xh-agent-brand strong { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-header-actions { display: flex; gap: 4px; }
.xh-agent-header-actions button,
.xh-agent-icon-button {
  display: inline-flex;
  width: 31px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b8bdc6;
  cursor: pointer;
  font-size: 16px;
}
.xh-agent-header-actions .xh-agent-cli-button { width: 40px; height: 40px; border-radius: 10px; background: #3a3b3d; color: #fff; }
.xh-agent-header-actions .xh-agent-cli-button .xh-agent-launch-icon { transform: scale(.76); }

.xh-agent-header-actions button:hover,
.xh-agent-icon-button:hover { background: #292c31; color: #fff; }

.xh-agent-error {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #6b3035;
  background: #321d20;
  padding: 10px 14px;
  color: #ffb9bd;
  font-size: 12px;
  line-height: 1.5;
}

.xh-agent-error button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 17px; }
.xh-agent-body { min-height: 0; flex: 1; overflow: hidden; }

.xh-agent-home {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 0 10px 12px;
}

.xh-agent-home-space { min-height: 210px; flex: 1; }
.xh-agent-starter { flex: 0 0 auto; padding: 0 2px 14px; }
.xh-agent-starter-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; }
.xh-agent-starter-head strong { color: #f0f1f2; font-size: 16px; font-weight: 650; }
.xh-agent-starter-head button { border: 0; background: transparent; color: #9299a1; cursor: pointer; font-size: 12px; }
.xh-agent-starter-robot { margin-right: 8px; color: #fff; }
.xh-agent-home-composer { position: relative; flex: 0 0 auto; border: 1px solid #46494d; border-radius: 14px; background: #262728; padding: 0 8px 8px; }
.xh-agent-home-composer .xh-agent-composer { border: 0; background: transparent; padding: 8px 0 0; }
.xh-agent-home-composer .xh-agent-composer:focus-within { border-color: transparent; }
.xh-agent-home-composer .xh-agent-composer textarea { min-height: 60px; resize: none; }
.xh-agent-bottom-tools { position: relative; display: grid; min-height: 45px; grid-template-columns: repeat(4, minmax(54px, 1fr)); align-items: center; gap: 4px; padding-top: 4px; color: #93999f; }
.xh-agent-bottom-tools > button { display: inline-grid; height: 39px; grid-template-columns: 20px auto; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 7px; background: transparent; color: #a3a9b1; cursor: pointer; }
.xh-agent-bottom-tools > button i { font-size: 18px; font-style: normal; line-height: 1; }
.xh-agent-bottom-tools > button small { font-size: 10px; white-space: nowrap; }
.xh-agent-bottom-tools > button:hover,
.xh-agent-bottom-tools > button.is-active { background: #3b3d40; color: #fff; }
.xh-agent-reference-count,
.xh-agent-model-label { display: none; }

.xh-agent-greeting { display: flex; flex-direction: column; gap: 4px; padding: 0 7px 20px; }
.xh-agent-greeting span { color: #25e0bd; font-size: 13px; font-weight: 700; }
.xh-agent-greeting strong { color: #fff; font-size: 22px; line-height: 1.3; }
.xh-agent-section-label { padding: 0 3px 9px; color: #c4c8cf; font-size: 12px; }
.xh-agent-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.xh-agent-skill,
.xh-agent-free-chat {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #565b64;
  border-radius: 14px;
  background: #242526;
  padding: 9px 12px;
  color: #f4f5f6;
  cursor: pointer;
  text-align: left;
}

.xh-agent-skill:hover,
.xh-agent-free-chat:hover { border-color: #23d9b7; background: #202524; }
.xh-agent-skill-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: #343638; color: #d8dadd; font-size: 18px; text-align: center; }
.xh-agent-skill-thumb { display: block; width: 48px; height: 42px; border-radius: 9px; background-image: url('/assets/agent-skill-recommendations-v1.webp?v=1'); background-repeat: no-repeat; background-size: 200% 200%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.xh-agent-skill-thumb.is-one-line { background-position: 0 0; }
.xh-agent-skill-thumb.is-general-video { background-position: 100% 0; }
.xh-agent-skill-thumb.is-script-storyboard { background-position: 0 100%; }
.xh-agent-skill-thumb.is-video-clone { background-position: 100% 100%; }
.xh-agent-skill:has(.xh-agent-skill-thumb) { grid-template-columns: 48px minmax(0,1fr); }
.xh-agent-skill-copy { min-width: 0; }
.xh-agent-skill-copy strong,
.xh-agent-free-chat strong { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.xh-agent-skill-copy small,
.xh-agent-free-chat small { display: block; overflow: hidden; color: #9ca2ad; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-skill-copy em { display: none; }
.xh-agent-chevron,
.xh-agent-free-chat b { color: #bec3ca; font-size: 22px; font-weight: 400; }
.xh-agent-free-chat { margin-top: 8px; }
.xh-agent-free-chat > span { color: #25e0bd; font-size: 23px; text-align: center; }

.xh-agent-loading,
.xh-agent-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9299a3;
  font-size: 13px;
  text-align: center;
}

.xh-agent-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #24dfbb;
  border-radius: 50%;
  animation: xh-agent-spin 800ms linear infinite;
}

@keyframes xh-agent-spin { to { transform: rotate(360deg); } }

.xh-agent-conversation { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.xh-agent-conversation-toolbar {
  display: grid;
  min-height: 52px;
  grid-template-columns: 72px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #30343a;
  padding: 7px 10px;
}

.xh-agent-text-button {
  border: 0;
  background: transparent;
  color: #aeb4bd;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.xh-agent-text-button:hover { color: #fff; }
.xh-agent-current-skill { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 8px; }
.xh-agent-current-skill strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-direction { min-width: 0; max-width: 128px; border: 1px solid #42474f; border-radius: 5px; background: #202328; padding: 4px 22px 4px 7px; color: #dbe0e5; font-size: 11px; }

.xh-agent-chat { min-height: 0; flex: 1; overflow-y: auto; padding: 14px 15px 18px; scroll-behavior: smooth; }
.xh-agent-chat-empty { min-height: 100%; padding: 34px; line-height: 1.7; }
.xh-agent-message { margin-bottom: 15px; }
.xh-agent-message-meta { display: flex; justify-content: space-between; margin-bottom: 5px; color: #7f8792; font-size: 10px; }
.xh-agent-message-content { border: 1px solid #343840; border-radius: 7px; background: #1b1e21; padding: 10px 12px; color: #e8eaed; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.xh-agent-message.is-user .xh-agent-message-content { border-color: #2d6459; background: #18302b; }
.xh-agent-message.is-user { margin-left: 38px; }
.xh-agent-message.is-agent { margin-right: 22px; }

.xh-agent-run,
.xh-agent-command {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
  border: 1px solid #3a3f47;
  border-radius: 7px;
  background: #1c1f23;
  padding: 9px 11px;
  color: #bfc4cc;
  font-size: 12px;
}

.xh-agent-run button,
.xh-agent-command button { margin-left: auto; border: 0; background: transparent; color: #29dab8; cursor: pointer; }
.xh-agent-approval { margin: 12px 0; border: 1px solid #3c6e64; border-radius: 7px; background: #192824; padding: 12px; }
.xh-agent-approval-title { color: #f3f6f5; font-size: 13px; font-weight: 700; }
.xh-agent-approval p { margin: 7px 0; color: #b9c0c5; font-size: 12px; line-height: 1.55; }
.xh-agent-points { color: #f2c26d; font-size: 11px; }
.xh-agent-approval-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px; }
.xh-agent-approval-actions button { height: 31px; border: 1px solid #555c65; border-radius: 6px; background: transparent; padding: 0 13px; color: #e5e8eb; cursor: pointer; }
.xh-agent-approval-actions button.is-primary { border-color: #25dbb7; background: #25dbb7; color: #0b231e; font-weight: 700; }

.xh-agent-composer-wrap { position: relative; border-top: 1px solid #34383f; background: #181a1d; padding: 9px 11px 12px; }
.xh-agent-composer-tools { display: flex; min-height: 28px; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.xh-agent-composer-tools button { border: 0; border-radius: 5px; background: transparent; padding: 5px 7px; color: #aeb5be; cursor: pointer; font-size: 12px; }
.xh-agent-composer-tools button:hover,
.xh-agent-composer-tools button.has-selection { background: #24342f; color: #2ce0bc; }
.xh-agent-composer-tools span { overflow: hidden; max-width: 185px; color: #737b87; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-composer { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: end; gap: 8px; border: 1px solid #4a5059; border-radius: 7px; background: #202327; padding: 7px; }
.xh-agent-composer:focus-within { border-color: #25d9b6; }
.xh-agent-composer textarea { width: 100%; min-height: 50px; max-height: 150px; resize: vertical; border: 0; outline: 0; background: transparent; color: #f3f4f6; font: inherit; font-size: 13px; line-height: 1.55; }
.xh-agent-composer textarea::placeholder { color: #777f8a; }
.xh-agent-composer > button { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: #25dfba; color: #09251f; cursor: pointer; font-size: 21px; font-weight: 800; }
.xh-agent-composer > button:disabled { background: #3a3e44; color: #777d85; cursor: default; }

.xh-agent-material-popover { position: absolute; right: 10px; bottom: calc(100% - 4px); left: 10px; overflow: hidden; border: 1px solid #484e57; border-radius: 7px; background: #1c1f22; box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35); }
.xh-agent-material-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #343940; padding: 10px 11px; color: #e6e8eb; font-size: 12px; }
.xh-agent-material-head button { border: 0; background: transparent; color: #8c949e; cursor: pointer; }
.xh-agent-material-list { max-height: 280px; overflow-y: auto; padding: 5px; }
.xh-agent-material-row { display: grid; min-height: 50px; grid-template-columns: 18px 42px minmax(0, 1fr); align-items: center; gap: 9px; border-radius: 5px; padding: 5px; cursor: pointer; }
.xh-agent-material-row:hover { background: #292d31; }
.xh-agent-material-row input { accent-color: #26dfba; }
.xh-agent-material-row img,
.xh-agent-material-placeholder { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 4px; background: #33373d; color: #a9b0ba; object-fit: cover; }
.xh-agent-material-row span:last-child { min-width: 0; }
.xh-agent-material-row strong { display: block; overflow: hidden; color: #e3e6ea; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-material-row small { color: #7f8791; font-size: 10px; }

.xh-agent-skill-drawer,
.xh-agent-library {
  position: absolute;
  right: 9px;
  bottom: 55px;
  left: 9px;
  z-index: 12;
  display: flex;
  max-height: min(470px, calc(100dvh - 130px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #45484e;
  border-radius: 14px;
  background: #191a1c;
  box-shadow: 0 -18px 70px rgba(0,0,0,.55);
  pointer-events: auto;
}
.xh-agent-drawer-head { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 13px; }
.xh-agent-drawer-head strong { color: #f5f5f6; font-size: 15px; }
.xh-agent-drawer-head > div { display: flex; gap: 8px; }
.xh-agent-drawer-head button { border: 1px solid #3d4147; border-radius: 8px; background: #202225; padding: 6px 10px; color: #e1e3e6; cursor: pointer; }
.xh-agent-drawer-tabs { display: flex; gap: 17px; padding: 0 13px 10px; color: #727983; font-size: 12px; }
.xh-agent-drawer-tabs b { color: #fff; }
.xh-agent-skill-search { display: flex; width: min(215px, calc(100% - 24px)); height: 34px; align-items: center; align-self: flex-end; gap: 7px; margin: 0 12px 8px; border-radius: 8px; background: #26282b; padding: 0 10px; color: #8e959e; }
.xh-agent-skill-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #f2f3f4; }
.xh-agent-all-skills { min-height: 0; overflow-y: auto; padding: 3px 9px 12px; }
.xh-agent-all-skill { display: grid; width: 100%; min-height: 68px; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; border: 0; border-radius: 9px; background: transparent; padding: 7px 9px; color: #fff; cursor: pointer; text-align: left; }
.xh-agent-all-skill:hover { background: #282a2d; }
.xh-agent-all-skill .xh-agent-skill-icon { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
.xh-agent-all-skill .xh-agent-skill-copy strong { display: inline; margin-right: 7px; font-size: 13px; }
.xh-agent-all-skill .xh-agent-skill-copy small { display: inline; max-width: 190px; border-radius: 4px; background: #303236; padding: 3px 6px; color: #a5abb2; }
.xh-agent-all-skill .xh-agent-skill-copy em { display: block; overflow: hidden; margin-top: 5px; color: #858c96; font-size: 11px; font-style: normal; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.xh-agent-mini-menu,
.xh-agent-add-menu { position: absolute; z-index: 15; overflow: hidden; border: 1px solid #44484f; border-radius: 12px; background: #191b1e; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.xh-agent-add-menu { bottom: 51px; left: 7px; width: 154px; padding: 6px; }
.xh-agent-add-menu button { display: block; width: 100%; height: 39px; border: 0; border-radius: 7px; background: transparent; padding: 0 10px; color: #e9ebee; cursor: pointer; text-align: left; }
.xh-agent-add-menu button:hover { background: #2b2e33; }
.xh-agent-model-menu { bottom: 51px; left: 42px; width: 330px; max-height: 380px; overflow-y: auto; padding: 8px; }
.xh-agent-model-menu > strong { display: block; padding: 6px 8px 9px; font-size: 13px; }
.xh-agent-model-menu button { position: relative; display: block; width: 100%; min-height: 50px; border: 0; border-radius: 8px; background: transparent; padding: 7px 34px 7px 9px; color: #e7e9ec; cursor: pointer; text-align: left; }
.xh-agent-model-menu button:hover,
.xh-agent-model-menu button.is-active { background: #292c30; }
.xh-agent-model-menu button span,
.xh-agent-model-menu button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-model-menu button span { font-size: 12px; font-weight: 700; }
.xh-agent-model-menu button small { margin-top: 4px; color: #7f8791; font-size: 10px; }
.xh-agent-model-menu button b { position: absolute; top: 17px; right: 12px; color: #23dfb9; }
.xh-agent-run-mode-menu { right: 7px; bottom: 51px; left: auto; width: 285px; padding: 6px; }
.xh-agent-run-mode-menu button { display: flex; width: 100%; min-height: 68px; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; background: transparent; padding: 8px 12px; color: #e7e9ec; cursor: pointer; text-align: left; }
.xh-agent-run-mode-menu button:hover,
.xh-agent-run-mode-menu button.is-active { background: #26292d; }
.xh-agent-run-mode-menu button span { display: grid; grid-template-columns: 26px 1fr; align-items: center; }
.xh-agent-run-mode-menu button b { font-size: 13px; }
.xh-agent-run-mode-menu button small { grid-column: 2; margin-top: 5px; color: #8b929c; font-size: 11px; }
.xh-agent-run-mode-menu button i { color: #fff; font-style: normal; }
.xh-agent-library { padding-bottom: 10px; }
.xh-agent-library > .xh-agent-loading { min-height: 180px; }
.xh-agent-library-item { display: grid; min-height: 62px; grid-template-columns: 46px minmax(0,1fr) 24px; align-items: center; gap: 10px; margin: 2px 9px; border: 0; border-radius: 8px; background: transparent; padding: 7px; color: #fff; cursor: pointer; text-align: left; }
.xh-agent-library-item:hover { background: #292c30; }
.xh-agent-library-item img,
.xh-agent-library-item > span { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 6px; background: #33373c; object-fit: cover; }
.xh-agent-library-item strong,
.xh-agent-library-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-agent-library-item small { margin-top: 4px; color: #818993; font-size: 10px; }
.xh-agent-library-item > b { color: #2ce1bc; font-size: 18px; }

@media (max-width: 560px) {
  .xh-agent-panel { width: 100vw; }
  .xh-agent-launch { right: 8px; top: 12px; width: 82px; }
  html.xh-agent-panel-open body > #root { width: 100% !important; max-width: 100% !important; }
  .xh-agent-host-actions { transform: none !important; }
  .xh-agent-message.is-user { margin-left: 20px; }
}

@media (max-height: 680px) {
  .xh-agent-home-space { min-height: 80px; }
}

/* Scoped studio skin: no canvas node, account, or billing styles are changed. */
#xh-canvas-agent-root {--xh-agent-width:460px;--studio-bg:#17181c;--studio-card:#222329;--studio-line:#36373f;--studio-muted:#afb0bd;--studio-accent:#c8c2ff;color:#f3f3f7;font-size:14px}
html.xh-agent-wide #xh-canvas-agent-root{--xh-agent-width:640px}
html.xh-agent-panel-open body>#root{width:calc(100% - 460px)!important;max-width:calc(100% - 460px)!important}
html.xh-agent-panel-open.xh-agent-wide body>#root{width:calc(100% - 640px)!important;max-width:calc(100% - 640px)!important}
#xh-canvas-agent-root svg{width:19px;height:19px;flex-shrink:0;display:block}
#xh-canvas-agent-root button,#xh-canvas-agent-root textarea,#xh-canvas-agent-root select{font-family:inherit;color:inherit}
#xh-canvas-agent-root button{cursor:pointer}
#xh-canvas-agent-root button:disabled{cursor:not-allowed;opacity:.45}
#xh-canvas-agent-root button:focus-visible,#xh-canvas-agent-root summary:focus-visible{outline:2px solid #c8c2ff;outline-offset:3px}
#xh-canvas-agent-root .xh-agent-panel{width:min(var(--xh-agent-width),100vw);background:var(--studio-bg);border-left:1px solid var(--studio-line);box-shadow:-16px 0 48px #0005}
#xh-canvas-agent-root .xh-agent-header{height:82px;min-height:82px;background:var(--studio-bg);padding:18px 20px;border-bottom:0}
#xh-canvas-agent-root .xh-agent-brand{gap:11px}
#xh-canvas-agent-root .xh-studio-logo{width:38px;height:38px;border:1px solid #7a739866;background:linear-gradient(145deg,#403a5b,#272832);border-radius:12px;display:grid;place-items:center;color:#ddd7ff}
#xh-canvas-agent-root .xh-studio-logo svg{width:24px;height:24px}
#xh-canvas-agent-root .xh-agent-brand strong{font-size:16px;letter-spacing:.5px;font-weight:650;line-height:22px}
#xh-canvas-agent-root .xh-agent-brand small{display:block;color:#b6b5c2;font-size:12px;margin-top:2px}
#xh-canvas-agent-root .xh-agent-brand small span{font-size:10px;margin-left:5px;border:1px solid #49454e;border-radius:4px;padding:1px 4px;color:#d3cbef}
#xh-canvas-agent-root .xh-agent-header-actions{gap:4px}
#xh-canvas-agent-root .xh-agent-header-actions button{width:32px;height:32px;background:transparent;color:#bab9c8;border-radius:8px}
#xh-canvas-agent-root .xh-agent-header-actions button:hover{background:#303139;color:#fff}
#xh-canvas-agent-root .xh-studio-nav{height:45px;min-height:45px;display:flex;align-items:center;gap:6px;margin:0 18px;border-bottom:1px solid var(--studio-line);padding-bottom:9px}
#xh-canvas-agent-root .xh-studio-nav button{border:0;background:#25262d;border-radius:7px;display:grid;place-items:center;width:30px;height:30px;color:#c8c6d6}
#xh-canvas-agent-root .xh-studio-nav span{flex:1;font-size:12px;color:var(--studio-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:4px}
#xh-canvas-agent-root .xh-agent-body{position:relative}
#xh-canvas-agent-root .xh-agent-home{padding:0 18px 16px;gap:10px}
#xh-canvas-agent-root .xh-studio-home-scroll{overflow-y:auto;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#4a4a55 transparent}
#xh-canvas-agent-root .xh-studio-hero{padding:28px 5px 27px;background:radial-gradient(ellipse at 50% 10%,#7266ba14,transparent 70%);text-align:center}
#xh-canvas-agent-root .xh-studio-orbit{display:grid;place-items:center;width:66px;height:66px;border:1px solid #7a719752;border-radius:22px;margin:0 auto 18px;background:linear-gradient(145deg,#423b5c,#26262f);color:#ded8ff;box-shadow:0 0 38px #9880fa15}
#xh-canvas-agent-root .xh-studio-orbit svg{width:34px;height:34px}
#xh-canvas-agent-root .xh-studio-hero>small{color:#9f98b9;font-size:10px;letter-spacing:1.7px}
#xh-canvas-agent-root .xh-studio-hero h2{font-size:26px;line-height:1.45;font-weight:600;letter-spacing:-.4px;margin:12px 0;color:#f4f3f8}
#xh-canvas-agent-root .xh-studio-hero p{font-size:13px;line-height:1.9;margin:0;color:#b8b6c7}
#xh-canvas-agent-root .xh-agent-starter{padding:0 0 8px}
#xh-canvas-agent-root .xh-agent-starter-head{padding:0 0 12px}
#xh-canvas-agent-root .xh-agent-starter-head strong{font-size:13px;color:#cac9d4;font-weight:500}
#xh-canvas-agent-root .xh-agent-starter-head button{color:#bfb6f6;font-size:12px}
#xh-canvas-agent-root .xh-agent-skills{gap:9px}
#xh-canvas-agent-root .xh-agent-skill{border:1px solid #383943;background:#222329;border-radius:12px;min-height:88px;padding:12px;grid-template-columns:30px minmax(0,1fr);gap:9px}
#xh-canvas-agent-root .xh-agent-skill:has(.xh-agent-skill-thumb){grid-template-columns:30px minmax(0,1fr)}
#xh-canvas-agent-root .xh-agent-skill-thumb{width:30px;height:32px;border-radius:8px;filter:saturate(.5)}
#xh-canvas-agent-root .xh-agent-skill:hover{background:#2c2b35;border-color:#82749b}
#xh-canvas-agent-root .xh-agent-skill-copy strong{font-size:13px;font-weight:550;line-height:1.4;margin-bottom:4px}
#xh-canvas-agent-root .xh-agent-skill-copy small{display:none}
#xh-canvas-agent-root .xh-agent-skill-copy em{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-style:normal;font-size:11px;line-height:1.6;color:#aaa8ba}
#xh-canvas-agent-root .xh-studio-chat-entry{display:flex;align-items:center;gap:10px;width:100%;margin-top:9px;padding:11px 12px;border:1px solid var(--studio-line);border-radius:10px;background:#202127;color:#dedce7;font-size:13px}
#xh-canvas-agent-root .xh-studio-chat-entry span{margin-left:auto;color:#a5a1b6;font-size:11px}
#xh-canvas-agent-root .xh-studio-safety{font-size:11px;color:#a5a2b4;line-height:1.6;margin:8px 2px 16px}
#xh-canvas-agent-root .xh-studio-quick{display:grid;gap:5px;margin:0 0 23px}
#xh-canvas-agent-root .xh-studio-quick button{display:flex;align-items:center;gap:10px;border:0;border-radius:8px;padding:11px 10px;background:transparent;text-align:left;font-size:13px;color:#c9c5d5}
#xh-canvas-agent-root .xh-studio-quick button:hover{background:#292631;color:#f2ecff}
#xh-canvas-agent-root .xh-studio-quick button>svg{width:17px;height:17px;color:#afa1ce}
#xh-canvas-agent-root .xh-studio-quick button>span{margin-left:auto;color:#82768f}
#xh-canvas-agent-root .xh-agent-home-composer,#xh-canvas-agent-root .xh-agent-composer-wrap{border:1px solid #41414d;background:#222329;border-radius:15px;padding:11px 12px 9px;position:relative;margin:0 18px 16px;box-shadow:0 8px 20px #0002}
#xh-canvas-agent-root .xh-agent-home-composer{margin:0;flex-shrink:0}
#xh-canvas-agent-root .xh-agent-composer{background:transparent;border:0;box-shadow:none;padding:0;gap:8px;align-items:flex-end}
#xh-canvas-agent-root .xh-agent-composer textarea{background:transparent!important;color:#f4f3f8!important;border:0!important;font-size:14px!important;line-height:1.7;padding:5px 0;min-height:76px;max-height:160px;resize:vertical;box-shadow:none!important;outline:0!important}
#xh-canvas-agent-root .xh-agent-composer textarea::placeholder{color:#a6a3b5;opacity:1}
#xh-canvas-agent-root .xh-agent-composer>button{width:34px;height:34px;background:#ddd7ff;border:0;border-radius:10px;color:#262033;margin-bottom:5px;display:grid;place-items:center;flex-shrink:0}
#xh-canvas-agent-root .xh-agent-composer-wrap:focus-within,#xh-canvas-agent-root .xh-agent-home-composer:focus-within{border-color:#a39aca}
#xh-canvas-agent-root .xh-agent-bottom-tools{display:flex;flex-wrap:wrap;gap:4px;border-top:1px solid #363640;min-height:38px;padding-top:6px;margin-top:6px}
#xh-canvas-agent-root .xh-agent-bottom-tools>button{height:29px;padding:4px 7px;border-radius:6px;color:#c1bccf;gap:5px;font-size:12px}
#xh-canvas-agent-root .xh-agent-bottom-tools>button small{font-size:11px}
#xh-canvas-agent-root .xh-agent-bottom-tools>button:hover,#xh-canvas-agent-root .xh-agent-bottom-tools>button.is-active{background:#37343f;color:#ede8ff}
#xh-canvas-agent-root .xh-agent-model-label{display:block;flex:1;min-width:80px;color:#aaa5bf;font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:right;padding:5px}
#xh-canvas-agent-root .xh-studio-input-hint{display:block;font-size:10px;color:#a6a1b5;padding-top:3px}
#xh-canvas-agent-root .xh-agent-conversation-toolbar{min-height:54px;background:transparent;border-bottom:1px solid #303038;padding:9px 18px;gap:10px}
#xh-canvas-agent-root .xh-agent-current-skill strong{font-size:12px;font-weight:550;color:#ded9ec}
#xh-canvas-agent-root .xh-agent-direction{background:#25262e;color:#e1dce9;border:1px solid #45434f;border-radius:7px;font-size:12px;padding:6px;max-width:115px}
#xh-canvas-agent-root .xh-agent-text-button{font-size:12px;color:#bbb4d1}
#xh-canvas-agent-root .xh-agent-chat{padding:20px 18px 12px;scrollbar-width:thin;scrollbar-color:#4a4a55 transparent}
#xh-canvas-agent-root .xh-agent-message{padding:0;margin:0 0 22px;border:0;background:transparent;box-shadow:none}
#xh-canvas-agent-root .xh-agent-message-meta{font-size:12px;color:#c5c0d5;margin-bottom:9px;display:flex;align-items:center;justify-content:space-between}
#xh-canvas-agent-root .xh-agent-message-meta>span{display:flex;align-items:center;gap:7px}
#xh-canvas-agent-root .xh-studio-avatar{width:23px;height:23px;border-radius:7px;background:#37303e;display:grid;place-items:center;color:#c9bdf0}
#xh-canvas-agent-root .xh-studio-avatar svg{width:15px;height:15px}
#xh-canvas-agent-root .xh-studio-state{font-size:10px;color:#b1abba}
#xh-canvas-agent-root .xh-studio-state.is-failed{color:#f2a4a4}
#xh-canvas-agent-root .xh-agent-message-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.85;color:#eceaf2;padding:2px 0}
#xh-canvas-agent-root .is-user .xh-agent-message-content{background:#2b2a34;border:1px solid #403b4e;border-radius:12px 12px 3px 12px;padding:12px 14px;color:#efeaf8}
#xh-canvas-agent-root .xh-studio-message-actions{display:flex;justify-content:flex-end;margin-top:6px}
#xh-canvas-agent-root .xh-studio-message-actions button{border:0;background:transparent;color:#b0a8c3;border-radius:6px;padding:5px}
#xh-canvas-agent-root .xh-studio-message-actions svg{width:15px;height:15px}
#xh-canvas-agent-root .xh-studio-details{margin-top:8px;border:1px solid #39353f;border-radius:8px;font-size:11px;color:#bcb3cc;padding:8px 10px}
#xh-canvas-agent-root .xh-studio-details summary{cursor:pointer}
#xh-canvas-agent-root .xh-studio-details div{white-space:pre-wrap;line-height:1.7;padding-top:8px}
#xh-canvas-agent-root .xh-script-config-button{display:inline-flex!important;width:auto!important;align-items:center;background:#302b3e!important;border:1px solid #5c506e!important;font-size:12px!important;color:#e1d7f5!important;padding:6px 10px!important;border-radius:8px!important}
#xh-canvas-agent-root .xh-script-config-summary{font-size:11px!important;color:#bbb3cd!important;margin:5px 0!important}
#xh-canvas-agent-root .xh-agent-composer-tools{padding:5px 0!important;font-size:11px;color:#b9b0ca}
#xh-canvas-agent-root .xh-agent-composer-tools button{color:#d3c9e1;background:transparent;border:0;font-size:12px}
#xh-canvas-agent-root .xh-agent-command,#xh-canvas-agent-root .xh-agent-run{background:#23242c;border:1px solid #41404c;border-radius:9px;padding:10px;margin-bottom:8px;color:#d2ccde;font-size:12px}
#xh-canvas-agent-root .xh-agent-command button{color:#c8bcec}
#xh-canvas-agent-root .xh-agent-error{font-size:12px;color:#ffd0d0;background:#3d272f;line-height:1.7;margin:0 18px 10px;border:1px solid #77505b;border-radius:9px}
#xh-canvas-agent-root .xh-agent-approval{background:#302b3b;border:1px solid #695679;border-radius:12px;color:#ece4f9}
#xh-canvas-agent-root .xh-agent-approval button.is-primary{background:#dcd0f6;color:#282134}
#xh-canvas-agent-root .xh-studio-refs{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 7px}
#xh-canvas-agent-root .xh-studio-refs>span{display:flex;gap:5px;align-items:center;border-radius:6px;background:#37323f;border:1px solid #52475e;padding:3px 6px;font-size:11px;max-width:100%}
#xh-canvas-agent-root .xh-studio-refs b{font-weight:400;max-width:190px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#xh-canvas-agent-root .xh-studio-refs button{border:0;background:transparent;color:#d3c5df;padding:0 2px}
#xh-canvas-agent-root .xh-studio-drawer{position:absolute;inset:0;background:#19191f;z-index:12;display:flex;flex-direction:column}
#xh-canvas-agent-root .xh-studio-drawer>header{display:flex;align-items:center;justify-content:space-between;padding:20px;border-bottom:1px solid #38333f}
#xh-canvas-agent-root .xh-studio-drawer>header strong{font-size:16px;font-weight:550}
#xh-canvas-agent-root .xh-studio-drawer>header small{display:block;color:#b5aabd;font-size:11px;margin-top:5px}
#xh-canvas-agent-root .xh-studio-drawer>header button{background:transparent;border:0;padding:5px;color:#c4b7d2}
#xh-canvas-agent-root .xh-studio-drawer-content{padding:14px 18px;overflow-y:auto;min-height:0;flex:1}
#xh-canvas-agent-root .xh-studio-history-row{display:block;width:100%;text-align:left;background:#24222b;border:1px solid #413949;border-radius:11px;padding:14px;margin-bottom:9px}
#xh-canvas-agent-root .xh-studio-history-row:hover{border-color:#8e789e;background:#2c2733}
#xh-canvas-agent-root .xh-studio-history-row strong{font-size:13px;display:block;font-weight:550}
#xh-canvas-agent-root .xh-studio-history-row small{font-size:10px;color:#baaac6}
#xh-canvas-agent-root .xh-studio-history-row p{font-size:12px;color:#c3b9ce;margin:8px 0 0;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
#xh-canvas-agent-root .xh-studio-task{background:#24232b;border:1px solid #413a49;border-radius:10px;padding:14px;margin-bottom:10px}
#xh-canvas-agent-root .xh-studio-task>div{display:flex;justify-content:space-between;align-items:center}
#xh-canvas-agent-root .xh-studio-task strong{font-size:13px}
#xh-canvas-agent-root .xh-studio-task small{font-size:10px;color:#b7a8c2}
#xh-canvas-agent-root .xh-studio-task p{color:#c6bacf;font-size:12px;margin:8px 0}
#xh-canvas-agent-root .xh-studio-task code{font-size:10px;color:#b3a6bf;overflow-wrap:anywhere}
#xh-canvas-agent-root .xh-studio-task p.xh-studio-task-error{color:#f3aaa9}
#xh-canvas-agent-root .xh-studio-task button{display:block;background:#3c3148;border:1px solid #6a547b;border-radius:6px;padding:5px 10px;margin-top:10px;font-size:12px}
#xh-canvas-agent-root .xh-studio-task ol{padding-left:16px;margin:10px 0 0}
#xh-canvas-agent-root .xh-studio-task li{padding:6px 0;line-height:1.7}
#xh-canvas-agent-root .xh-studio-task li b{font-size:11px;font-weight:400;color:#d4c7df}
#xh-canvas-agent-root .xh-studio-task li span{float:right;color:#b9a9c8;font-size:10px}
#xh-canvas-agent-root .xh-studio-task li p{font-size:11px;color:#f3aaa9;overflow-wrap:anywhere}
#xh-canvas-agent-root .xh-studio-toast{position:absolute;bottom:240px;left:24px;right:24px;border:1px solid #726381;background:#373040;border-radius:10px;padding:10px;text-align:center;font-size:12px;color:#f0e6ff;z-index:20;box-shadow:0 4px 18px #0004}
#xh-canvas-agent-root .xh-agent-skill-drawer,#xh-canvas-agent-root .xh-agent-model-menu,#xh-canvas-agent-root .xh-agent-run-mode-menu,#xh-canvas-agent-root .xh-agent-add-menu,#xh-canvas-agent-root .xh-agent-library,#xh-canvas-agent-root .xh-agent-material-popover{background:#24222b;border-color:#52485e;color:#e1d7ed}
#xh-canvas-agent-root .xh-agent-empty{color:#c1b7cf}
@media(max-width:900px){html.xh-agent-panel-open body>#root,html.xh-agent-panel-open.xh-agent-wide body>#root{width:100%!important;max-width:100%!important}#xh-canvas-agent-root .xh-agent-panel{width:min(460px,100vw)}#xh-canvas-agent-root [data-action="toggle-wide"]{display:none}}
@media(max-height:760px){#xh-canvas-agent-root .xh-studio-hero{padding:15px 5px 20px}#xh-canvas-agent-root .xh-studio-orbit{width:48px;height:48px;margin-bottom:10px;border-radius:16px}#xh-canvas-agent-root .xh-studio-hero h2{font-size:23px;margin:9px 0}#xh-canvas-agent-root .xh-studio-hero p{font-size:12px}#xh-canvas-agent-root .xh-agent-skill{min-height:75px}}
@media(prefers-reduced-motion:reduce){#xh-canvas-agent-root *,#xh-canvas-agent-root *:before,#xh-canvas-agent-root *:after{animation:none!important;transition:none!important}}
