.auto-plugin-dock {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 240;
  transform: translate(calc(100% - 16px), -50%);
  transition: transform 0.18s ease;
}
.auto-plugin-dock:hover,
.auto-plugin-dock.is-open,
.auto-plugin-dock:focus-within {
  transform: translate(0, -50%);
}
@media (hover: none) {
  .auto-plugin-dock { transform: translate(calc(100% - 36px), -50%); }
  .auto-plugin-dock.is-open { transform: translate(0, -50%); }
}
.auto-plugin-tab {
  width: 42px;
  height: 72px;
  border: 1px solid rgba(255, 236, 214, 0.35);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #2a211c;
  color: #f3e6d4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.auto-plugin-tab svg { width: 18px; height: 18px; }
.auto-plugin-panel {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, calc(100vw - 64px));
  max-height: min(90vh, 920px);
  overflow: auto;
  background: #1c1814;
  color: #f6efe6;
  border: 1px solid rgba(255, 236, 214, 0.18);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.auto-plugin-panel.is-agent {
  overflow: hidden;
}
.auto-plugin-resize {
  position: absolute;
  z-index: 5;
  touch-action: none;
}
.auto-plugin-resize.is-w {
  left: -3px;
  top: 12px;
  bottom: 12px;
  width: 8px;
  cursor: ew-resize;
}
.auto-plugin-resize.is-n {
  left: 12px;
  right: 12px;
  top: -3px;
  height: 8px;
  cursor: ns-resize;
}
.auto-plugin-resize.is-s {
  left: 12px;
  right: 12px;
  bottom: -3px;
  height: 8px;
  cursor: ns-resize;
}
.auto-plugin-resize.is-nw {
  left: -4px;
  top: -4px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}
.auto-plugin-resize.is-sw {
  left: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}
.auto-plugin-panel h2 { margin: 0 0 4px; font-size: 16px; }
.auto-plugin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auto-plugin-title-row h2 { margin: 0; }
.auto-plugin-title-row button {
  border: 1px solid rgba(255, 236, 214, 0.28);
  background: transparent;
  color: #f6efe6;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.ap-mat-mask {
  position: fixed;
  inset: 0;
  z-index: 3600;
  background: rgba(8, 6, 4, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ap-mat-dialog {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: #1c1814;
  color: #f6efe6;
  border: 1px solid rgba(255, 236, 214, 0.18);
  border-radius: 16px;
  padding: 16px 16px 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
}
.ap-mat-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ap-mat-head h2 { margin: 0 0 4px; font-size: 18px; }
.ap-mat-head p, .ap-mat-note, .ap-mat-cast p { margin: 0; color: #b7aa9c; font-size: 12px; line-height: 1.5; }
.ap-mat-x {
  border: 0;
  background: transparent;
  color: #f6efe6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ap-mat-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ap-mat-card {
  border: 1px solid rgba(255, 236, 214, 0.12);
  border-radius: 12px;
  padding: 10px;
}
.ap-mat-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ap-mat-card-head strong { font-size: 14px; }
.ap-mat-card-head span { color: #b7aa9c; font-size: 12px; }
.ap-mat-note { margin-top: 6px !important; }
.ap-mat-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.ap-mat-empty { color: #8d8174; font-size: 12px; }
.ap-mat-thumb { margin: 0; width: 92px; }
.ap-mat-thumb img, .ap-mat-cast-item img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  background: #120f0c;
  display: block;
}
.ap-mat-thumb { position: relative; }
.ap-mat-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
}
.ap-mat-thumb figcaption, .ap-mat-cast-item span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #b7aa9c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-mat-actions, .ap-mat-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ap-mat-actions button, .ap-mat-foot button {
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: transparent;
  color: #f6efe6;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
}
.ap-mat-actions button:disabled { opacity: 0.45; cursor: default; }
.ap-mat-foot button.primary, .ap-mat-foot .primary { background: #8c3b2a; border-color: #8c3b2a; }
.ap-create-dialog { width: min(440px, 100%); }
.ap-create-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: #b7aa9c;
}
.ap-create-dialog input, .ap-create-dialog select {
  background: #120f0c;
  color: #f6efe6;
  border: 1px solid rgba(255, 236, 214, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.ap-create-dialog [hidden] { display: none; }
.ap-mat-cast { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ap-mat-cast-item {
  width: 92px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.auto-plugin-panel p { margin: 0; color: #b7aa9c; font-size: 12px; }
.auto-plugin-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.auto-plugin-top-actions { margin-top: 10px; }
.auto-plugin-summary { margin-top: 10px; }
.auto-plugin-summary-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #b7aa9c;
  font-size: 12px;
}
.auto-plugin-mini { display: block; margin-top: 6px; color: #b7aa9c; font-size: 12px; }
.auto-plugin-track {
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(255, 236, 214, 0.12);
  overflow: hidden;
}
.auto-plugin-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c46a4a;
  width: 0;
}
.auto-plugin-track.is-done i { background: #7d9a6a; }
.auto-plugin-track.is-error i { background: #c45a5a; }
.auto-plugin-track.is-running i { background: #e0a15a; }
.auto-plugin-row button, .auto-plugin-item button {
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: transparent;
  color: #f6efe6;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
}
.auto-plugin-row button.primary { background: #8c3b2a; border-color: #8c3b2a; }
.auto-plugin-row button.danger { color: #ffb4a8; border-color: rgba(255, 120, 96, 0.55); }
.auto-plugin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.auto-plugin-item {
  border: 1px solid rgba(255, 236, 214, 0.12);
  border-radius: 10px;
  padding: 8px;
}
.auto-plugin-item strong { font-size: 13px; }
.auto-plugin-item .auto-plugin-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.auto-plugin-open:hover strong { text-decoration: underline; }
.auto-plugin-log button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.auto-plugin-log button:hover { text-decoration: underline; }
.auto-plugin-item .meta { color: #b7aa9c; font-size: 12px; margin-top: 2px; }
.auto-plugin-form { display: grid; gap: 8px; margin-top: 10px; }
.auto-plugin-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #b7aa9c; }
.auto-plugin-form input, .auto-plugin-form textarea, .auto-plugin-form select {
  width: 100%;
  border: 1px solid rgba(255, 236, 214, 0.18);
  background: #120f0c;
  color: #f6efe6;
  border-radius: 8px;
  padding: 7px 8px;
  font: inherit;
}
.auto-plugin-check { flex-direction: row !important; align-items: center; gap: 8px; color: #f6efe6; }
.auto-plugin-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #b7aa9c; }
.auto-plugin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.auto-plugin-chips button {
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: #1a1512;
  color: #f6efe6;
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.auto-plugin-chips button.is-on {
  border-color: #e8b15a;
  background: rgba(232, 177, 90, 0.16);
  color: #ffd9a0;
}
.auto-plugin-chips em { font-style: normal; margin-left: 4px; color: #e8b15a; }
.auto-plugin-chip-preview {
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 236, 214, 0.06);
  color: #d9cbb8;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ap-form-refs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #b7aa9c;
}
.ap-form-refs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ap-form-refs-label { color: #b7aa9c; }
.ap-form-refs-drop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed rgba(255, 236, 214, 0.28);
  border-radius: 12px;
  background: #120f0c;
  padding: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ap-form-refs-drop.is-over {
  border-color: #e8b15a;
  background: rgba(232, 177, 90, 0.08);
  box-shadow: 0 0 0 2px rgba(232, 177, 90, 0.28);
}
.ap-form-refs-add {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: 1px dashed rgba(255, 236, 214, 0.35);
  border-radius: 8px;
  background: transparent;
  color: #cbbba8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 28px;
  line-height: 1;
}
.ap-form-refs-add.is-head {
  width: 28px;
  height: 28px;
  font-size: 20px;
  border-radius: 8px;
}
.ap-form-refs-add:hover:not(:disabled) {
  border-color: #e8b15a;
  color: #e8b15a;
}
.ap-form-refs-add:disabled {
  opacity: 0.4;
  cursor: default;
}
.ap-form-refs-hint-inline {
  margin: 0;
  color: #8f8478;
  font-size: 11px;
}
.ap-form-refs-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  min-height: 52px;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}
.ap-form-refs-list .canvas-agent-ref { width: 58px; flex-shrink: 0; }
.ap-form-refs-list .canvas-agent-ref-thumb {
  width: 52px;
  height: 52px;
  background: #1a1512;
  border-color: rgba(255, 236, 214, 0.18);
}
.ap-form-refs-note {
  margin: 0;
  color: #8f8478;
  font-size: 11px;
  line-height: 1.45;
}
.auto-plugin-log {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #d9cbb8;
  white-space: pre-wrap;
}
.auto-plugin-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1c1814;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 90;
}
.auto-plugin-confirm {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}
.auto-plugin-confirm-card {
  width: min(360px, 100%);
  background: #1c1814;
  border: 1px solid rgba(255, 236, 214, 0.16);
  border-radius: 12px;
  padding: 16px;
  color: #f6efe6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.auto-plugin-confirm-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}
.auto-plugin-confirm-card p {
  margin: 0;
  color: #b7aa9c;
  font-size: 13px;
  line-height: 1.5;
}
.auto-plugin-confirm-card .auto-plugin-row {
  justify-content: flex-end;
  margin-top: 14px;
}
.auto-plugin-pages { display: flex; gap: 6px; }
.auto-plugin-pages button {
  border: 1px solid rgba(255, 236, 214, 0.22);
  background: transparent;
  color: #b7aa9c;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.auto-plugin-pages button.is-on { background: #8c3b2a; border-color: #8c3b2a; color: #fff; }
.auto-plugin-panel[hidden] {
  display: none !important;
}
.auto-plugin-panel.is-agent:not([hidden]) {
  height: min(92vh, 940px);
  min-width: 320px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auto-plugin-panel.is-agent .ap-agent {
  flex: 1;
  min-height: 0;
}
.ap-agent { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; min-height: 0; }
.ap-agent-session-row {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}
.ap-agent-session-current {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: #120f0c;
  border-radius: 8px;
  padding: 2px 4px 2px 8px;
}
.ap-agent-session-row.is-menu-open .ap-agent-session-current {
  border-color: rgba(232, 177, 90, 0.55);
  background: #1a1612;
}
.ap-agent-session-seq {
  flex-shrink: 0;
  min-width: 1.25em;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #e8b15a;
  line-height: 1;
  user-select: none;
}
.ap-agent-session-name {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f6efe6;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 0;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-agent-session-name:disabled { opacity: 0.55; }
.ap-agent-session-menu-btn,
.ap-agent-session-act {
  flex-shrink: 0;
  width: 28px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #b7aa9c;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.ap-agent-session-menu-btn:hover,
.ap-agent-session-act:hover {
  background: rgba(232, 177, 90, 0.12);
  color: #e8b15a;
}
.ap-agent-session-act.is-danger:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.12);
}
.ap-agent-session-menu-btn:disabled,
.ap-agent-session-act:disabled {
  opacity: 0.45;
  cursor: default;
}
.ap-agent-session-menu-btn svg,
.ap-agent-session-act svg {
  display: block;
  pointer-events: none;
}
.ap-agent-session-row.is-menu-open .ap-agent-session-menu-btn {
  color: #e8b15a;
  background: rgba(232, 177, 90, 0.14);
}
.ap-agent-session-row.is-menu-open .ap-agent-session-menu-btn svg {
  transform: rotate(180deg);
}
.ap-agent-session-acts {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ap-agent-session-menu {
  position: absolute;
  left: 0;
  right: 34px;
  top: calc(100% + 6px);
  max-height: 240px;
  overflow: auto;
  background: #2a211c;
  border: 1px solid rgba(255, 236, 214, 0.22);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 6px;
  z-index: 6;
}
.ap-agent-session-menu[hidden] { display: none; }
.ap-agent-session-menu-caption {
  color: #b7aa9c;
  font-size: 11px;
  padding: 4px 8px 6px;
}
.ap-agent-session-empty {
  color: #b7aa9c;
  font-size: 12px;
  padding: 8px;
}
.ap-agent-session-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f6efe6;
  padding: 7px 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.ap-agent-session-item:hover,
.ap-agent-session-item.is-on {
  background: rgba(232, 177, 90, 0.14);
}
.ap-agent-session-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.ap-agent-session-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.ap-agent-session-item-sub {
  color: #b7aa9c;
  font-size: 11px;
  padding-left: 1.6em;
}
.ap-agent-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.ap-agent-empty, .ap-agent-note { color: #b7aa9c; font-size: 12px; line-height: 1.5; }
.ap-agent-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.ap-agent-msg.is-user { align-items: flex-end; }
.ap-agent-msg.is-bot { align-items: flex-start; }
.ap-agent-msg-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  padding: 0 4px;
  color: #b7aa9c;
}
.ap-agent-msg.is-user .ap-agent-msg-who { color: #e8b15a; }
.ap-agent-msg-act {
  border: 0;
  background: transparent;
  color: #b7aa9c;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  padding: 0;
  cursor: pointer;
}
.ap-agent-msg-act:hover { color: #e8b15a; }
.ap-agent-msg-act.is-quote:hover { color: #7ec8ff; }
.ap-agent-bubble {
  border: 1px solid rgba(255, 236, 214, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow: visible;
  max-width: 100%;
  box-sizing: border-box;
}
.ap-agent-msg.is-user .ap-agent-bubble {
  max-width: 92%;
  background: #2a211c;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.ap-agent-msg.is-bot .ap-agent-bubble { align-self: stretch; width: 100%; }
.ap-agent-bubble .canvas-agent-msg-refs {
  margin: 0 0 2px;
  justify-content: flex-end;
}
.ap-agent-bubble .ap-agent-bubble-text {
  white-space: pre-wrap;
  width: 100%;
}
.ap-agent-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(8, 6, 4, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.ap-agent-preview-mask img,
.ap-agent-preview-mask video {
  max-width: min(920px, 92vw);
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  background: #120f0c;
}
.ap-agent-suggest, .ap-agent-plan, .ap-agent-reset, .ap-agent-file button, .ap-agent-filebtn {
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: transparent;
  color: #f6efe6;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.ap-agent-suggest { display: block; width: 100%; }
.ap-agent-plan { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 8px; }
.ap-agent-plan strong { font-size: 13px; }
.ap-agent-plan span, .ap-agent-plan li { color: #d9cbb8; font-size: 12px; line-height: 1.45; }
.ap-agent-plan ol { margin: 0; padding-left: 18px; }
.ap-agent-plan em { color: #e8b15a; font-style: normal; font-size: 12px; }
.ap-agent-plan.is-done { opacity: 0.62; }
.ap-agent-form { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.ap-agent-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px 6px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.ap-agent-chips[hidden] { display: none; }
.ap-agent-chips .canvas-agent-ref {
  width: 58px;
}
.ap-agent-chips .canvas-agent-ref-thumb {
  width: 52px;
  height: 52px;
  background: #120f0c;
  border-color: rgba(255, 236, 214, 0.18);
}
.ap-agent-chips .ap-agent-chip-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 236, 214, 0.08);
  color: #d9cbb8;
  font-size: 12px;
  flex-shrink: 0;
  align-self: center;
}
.ap-agent-chips .ap-agent-chip-text button {
  border: 0;
  background: transparent;
  color: #e8b15a;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0;
}
.ap-agent-chips .canvas-agent-ref-ph.is-audio {
  color: #e8b15a;
}
.ap-agent-model {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b7aa9c;
  font-size: 12px;
}
.ap-agent-model select {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  background: #120f0c;
  color: #f6efe6;
  border: 1px solid rgba(255, 236, 214, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}
.ap-agent-model select optgroup {
  font-weight: 600;
  color: #e0a15a;
  background: #1a1612;
}
.ap-agent-model select option {
  font-weight: 400;
  color: #f6efe6;
  background: #120f0c;
}
.ap-agent-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  position: relative;
  background: #120f0c;
  border: 1px solid rgba(255, 236, 214, 0.2);
  border-radius: 12px;
  padding: 6px;
}
.ap-agent-composer.is-drop {
  border-color: #e8b15a;
  box-shadow: 0 0 0 2px rgba(232, 177, 90, 0.35);
}
.ap-agent-textwrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
}
.ap-agent-mention-wrap.canvas-mention-wrap {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  display: block;
  border-radius: 8px;
  overflow: hidden;
}
.ap-agent-mention-wrap .canvas-mention-backdrop,
.ap-agent-mention-wrap textarea.canvas-mention-input {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 28px 8px 8px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: normal;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
.ap-agent-mention-wrap .canvas-mention-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  color: #f6efe6 !important;
  -webkit-text-fill-color: #f6efe6 !important;
}
.ap-agent-mention-wrap textarea.canvas-mention-input {
  position: relative;
  z-index: 1;
  display: block;
  flex: none;
  resize: none;
  background: transparent !important;
  color: #f6efe6;
  -webkit-text-fill-color: #f6efe6;
  caret-color: #e8b15a;
}
.ap-agent-mention-wrap.is-mention-synced textarea.canvas-mention-input {
  color: rgba(246, 239, 230, 0.014) !important;
  -webkit-text-fill-color: rgba(246, 239, 230, 0.014) !important;
}
.ap-agent-mention-wrap .canvas-mention-unit.is-chip .canvas-mention-thumb {
  height: 1.45em;
  max-height: 1.45em;
}
.ap-agent-mention-wrap .canvas-mention-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.ap-agent-mention-wrap .canvas-mention-thumb.is-ph {
  background: rgba(232, 177, 90, 0.2);
}
.ap-agent-composer textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  border: 0;
  background: transparent;
  color: #f6efe6;
  padding: 8px 28px 8px 4px;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
  overflow-y: hidden;
  box-sizing: border-box;
}
.ap-agent-input-expand-mention {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.ap-agent-input-expand-mention .canvas-mention-backdrop,
.ap-agent-input-expand-mention .ap-agent-input-expand-ta {
  flex: 1;
  min-height: 180px;
  max-height: none;
  padding: 12px;
  font-size: 14px;
  line-height: 2.05;
}
.ap-agent-input-expand-mention .canvas-mention-backdrop {
  position: absolute;
  inset: 0;
  background: #120f0c;
  border-radius: 10px;
}
.ap-agent-input-expand-mention .ap-agent-input-expand-ta {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 236, 214, 0.18);
  border-radius: 10px;
  background: transparent !important;
}
.ap-agent-expand {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 26px;
  height: 26px;
  border: 0 !important;
  background: transparent !important;
  color: #b7aa9c !important;
  border-radius: 7px;
  padding: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ap-agent-expand svg {
  display: block;
  pointer-events: none;
}
.ap-agent-expand:hover {
  color: #e8b15a !important;
  background: rgba(232, 177, 90, 0.12) !important;
}
.ap-agent-input-expand {
  position: fixed;
  inset: 0;
  z-index: 12050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ap-agent-input-expand-panel {
  width: min(720px, 100%);
  height: min(72vh, 640px);
  background: #1a1612;
  border: 1px solid rgba(255, 236, 214, 0.2);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  gap: 10px;
}
.ap-agent-input-expand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #f6efe6;
  flex-shrink: 0;
}
.ap-agent-input-expand-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b7aa9c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ap-agent-input-expand-x:hover {
  color: #e8b15a;
  background: rgba(232, 177, 90, 0.12);
}
.ap-agent-input-expand-refs {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ap-agent-input-expand-refs-label {
  color: #b7aa9c;
  font-size: 12px;
}
.ap-agent-input-expand-refs .ap-agent-chips {
  max-height: none;
  overflow-x: auto;
}
.ap-agent-input-expand-ta {
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 236, 214, 0.18);
  border-radius: 10px;
  background: #120f0c;
  color: #f6efe6;
  padding: 12px;
  font: inherit;
  line-height: 1.5;
  resize: none;
}
.ap-agent-input-expand-ta:focus {
  outline: none;
  border-color: rgba(232, 177, 90, 0.55);
}
.ap-agent-input-expand-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.ap-agent-input-expand-ghost,
.ap-agent-input-expand-send {
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  cursor: pointer;
}
.ap-agent-input-expand-ghost {
  border: 1px solid rgba(255, 236, 214, 0.22);
  background: transparent;
  color: #f6efe6;
}
.ap-agent-input-expand-send {
  border: 1px solid #8c3b2a;
  background: #8c3b2a;
  color: #fff;
}
.ap-agent-input-expand-send:disabled,
.ap-agent-input-expand-ghost:disabled {
  opacity: 0.5;
  cursor: default;
}
.ap-agent-at-menu {
  position: fixed;
  z-index: 13000;
  width: min(300px, calc(100vw - 16px));
  max-height: 280px;
  overflow: auto;
  background: #2a211c;
  border: 1px solid rgba(255, 236, 214, 0.22);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 4px;
}
.ap-agent-at-caption {
  color: #b7aa9c;
  font-size: 11px;
  padding: 6px 8px 4px;
}
.ap-agent-at-empty {
  color: #d9cbb8;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px 10px;
  text-align: center;
}
.ap-agent-at-empty span {
  display: block;
  margin-top: 4px;
  color: #b7aa9c;
  font-size: 11px;
}
.ap-agent-at-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #f6efe6;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.ap-agent-at-item:hover,
.ap-agent-at-item.is-on {
  background: rgba(232, 177, 90, 0.16);
}
.ap-agent-at-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: #120f0c;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7aa9c;
  font-size: 12px;
}
.ap-agent-at-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ap-agent-at-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ap-agent-at-meta strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-agent-at-meta em {
  font-style: normal;
  color: #b7aa9c;
  font-size: 11px;
}
.ap-agent-plus, .ap-agent-composer button.primary, .ap-agent-plus-menu button {
  border: 1px solid rgba(255, 236, 214, 0.2);
  background: transparent;
  color: #f6efe6;
  cursor: pointer;
  font: inherit;
}
.ap-agent-plus {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.ap-agent-plus.has-ref { color: #e8b15a; border-color: rgba(232, 177, 90, 0.7); }
.ap-agent-composer button.primary {
  background: #8c3b2a;
  border-color: #8c3b2a;
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.ap-agent-plus-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #2a211c;
  border: 1px solid rgba(255, 236, 214, 0.22);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 3;
}
.ap-agent-plus-menu[hidden] { display: none; }
.ap-agent-plus-menu button { border-radius: 8px; padding: 6px 10px; text-align: left; }
.ap-agent-linklabel { display: flex; flex-direction: column; gap: 4px; color: #b7aa9c; font-size: 12px; }
.ap-agent-linklabel input {
  width: 100%;
  box-sizing: border-box;
  background: #120f0c;
  color: #f6efe6;
  border: 1px solid rgba(255, 236, 214, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}
.ap-agent-reset { align-self: flex-start; color: #b7aa9c; }
.ap-agent-form button:disabled, .ap-agent-form textarea:disabled, .ap-agent-form input:disabled { opacity: 0.5; }
