/* ============================================================
   L · 智能 Agent 工作台样式
   ============================================================ */
.agx {
  display: flex;
  height: calc(100vh - 96px);
  min-height: 720px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  color: var(--ink);
}
.agx-loading { padding: 80px; text-align: center; color: var(--muted); }

/* 左侧图标栏 */
.agx-rail {
  width: 92px; flex: 0 0 92px; background: var(--bg); border-right: 1px solid var(--border);
  padding: 14px 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.agx-railbtn {
  border: 0; background: transparent; border-radius: 12px; padding: 9px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted); cursor: pointer; transition: .15s;
}
.agx-railbtn:hover { background: var(--bg-mute); color: var(--ink); }
.agx-railbtn.on { background: var(--bg-mute); color: var(--ink); font-weight: 700; }
.agx-rail-ic { font-size: 19px; line-height: 1; }

/* 主区域 */
.agx-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agx-top {
  height: 62px; flex: 0 0 62px; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.agx-tabs { display: flex; align-items: center; gap: 10px; }
.agx-tab {
  border: 1px solid transparent; background: transparent; border-radius: 10px;
  padding: 7px 12px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.agx-tab:hover { background: var(--bg-mute); }
.agx-tab.on { background: var(--bg); border-color: var(--border); color: var(--ink); font-weight: 600; }
.agx-ready {
  font-size: 12px; color: var(--ok); background: rgba(22,163,74,.08); border-radius: 999px; padding: 3px 10px;
}
.agx-top-actions { display: flex; align-items: center; gap: 10px; }
.agx-topbtn {
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2); border-radius: 10px;
  padding: 7px 13px; font-size: 13px; cursor: pointer;
}
.agx-topbtn.primary { background: var(--ink); border-color: transparent; color: #fff; }
.agx-user {
  width: 32px; height: 32px; border-radius: 50%; background: var(--bg-mute); color: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.agx-body { flex: 1; overflow-y: auto; padding: 30px 26px 40px; }

/* 首页 Hero */
.agx-hero { max-width: 1000px; margin: 0 auto; text-align: center; }
.agx-bot-area { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 14px; }
.agx-editbot {
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.agx-editbot:hover { background: var(--bg-mute); }
.agx-hero h1 { font-size: 34px; letter-spacing: -.5px; margin: 6px 0 8px; font-weight: 800; color: var(--ink); }
.agx-hero-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* BOT 形象 */
.agx-bot {
  position: relative; background: var(--bot-color, #111); flex: none;
  display: block; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 16px 40px rgba(142, 204, 245, .16);
}
.agx-bot-hero { width: 92px; height: 92px; }
.agx-bot-preview { width: 190px; height: 190px; }
.agx-bot-mini { width: 30px; height: 30px; }
.agx-eye {
  position: absolute; top: 34%; width: 12%; height: 18%; background: #fff; border-radius: 999px;
}
.agx-eye-l { left: 30%; }
.agx-eye-r { right: 30%; }
.agx-bot-mini .agx-eye { top: 33%; }
.agx-emo-happy .agx-eye { height: 9%; border-radius: 999px 999px 0 0; }
.agx-emo-thinking .agx-eye-r { top: 29%; }
.agx-emo-excited .agx-eye { height: 20%; }
.agx-emo-calm .agx-eye { top: 37%; }

.agx-shape-circle { border-radius: 50%; }
.agx-shape-oval { border-radius: 50% / 42%; }
.agx-shape-pill { border-radius: 999px; }
.agx-shape-squircle { border-radius: 38%; }
.agx-shape-blob { border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
.agx-shape-bean { border-radius: 62% 38% 62% 38% / 70% 42% 70% 30%; }
.agx-shape-shield { border-radius: 22% 22% 52% 52% / 16% 16% 66% 66%; }
.agx-shape-arch { border-radius: 52% 52% 14% 14%; }
.agx-shape-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.agx-shape-drop { border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.agx-shape-triangle { clip-path: polygon(50% 4%, 98% 96%, 2% 96%); }
.agx-shape-hex { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.agx-shape-flower { border-radius: 45% 55% 45% 55% / 55% 45% 55% 45%; }
.agx-shape-cloud { border-radius: 50% 50% 44% 44% / 58% 58% 42% 42%; }
.agx-shape-egg { border-radius: 50% 50% 48% 48% / 60% 60% 40% 40%; }
.agx-shape-cube { border-radius: 14%; }

/* 输入器 */
.agx-composer {
  position: relative; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: var(--shadow); padding: 14px 14px 10px; text-align: left;
}
.agx-input {
  width: 100%; border: 0; outline: 0; resize: none; font: inherit; font-size: 14px;
  line-height: 1.6; color: var(--ink); background: transparent; min-height: 54px; padding: 4px 6px;
}
.agx-input::placeholder { color: var(--muted); }
.agx-toolrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 2px 0; }
.agx-toolrow-2 { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 9px; }
.agx-icbtn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--muted); font-size: 16px; cursor: pointer;
}
.agx-select {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--bg);
  border-radius: 9px; padding: 3px 8px; font-size: 12px; color: var(--ink-2);
}
.agx-select select { border: 0; outline: 0; background: transparent; font: inherit; color: inherit; max-width: 190px; }
.agx-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.agx-pill {
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2); border-radius: 9px;
  padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.agx-pill.on { background: var(--bg-mute); border-color: var(--ink); color: var(--ink); }
.agx-mini { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.agx-mini select { border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); font-size: 12px; padding: 3px 6px; min-width: 58px; color: var(--ink-2); }
.agx-spacer { flex: 1; }
.agx-send {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 17px; font-weight: 700;
}
.agx-send:disabled { opacity: .5; }
.agx-adv { margin-top: 8px; font-size: 12px; color: var(--muted); }
.agx-adv summary { cursor: pointer; }
.agx-adv-body { display: grid; gap: 8px; padding: 10px 4px 2px; }
.agx-input-line {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 12px;
}
.agx-hint { font-size: 12px; color: var(--muted); }

/* 入口卡片 */
.agx-entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 26px; }
.agx-entry {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px 16px;
}
.agx-entry:hover { border-color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,.05); }
.agx-entry-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-mute); color: var(--ink); display: grid; place-items: center; font-size: 18px; }
.agx-entry b { display: block; font-size: 14px; color: var(--ink); }
.agx-entry small { color: var(--muted); font-size: 12px; }

/* 提示词库 */
.agx-lib { text-align: left; }
.agx-lib-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; }
.agx-libtab {
  flex: none; border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2); border-radius: 9px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.agx-libtab.on { background: var(--bg-mute); border-color: var(--ink); color: var(--ink); font-weight: 600; }
.agx-lib-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.agx-card { background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.agx-card:hover { border-color: var(--ink); box-shadow: 0 8px 22px rgba(0,0,0,.05); }
.agx-card-cover { height: 92px; display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: 1px; font-size: 18px; }
.agx-cover-0 { background: linear-gradient(135deg, #111827, #4b5563); }
.agx-cover-1 { background: linear-gradient(135deg, #0f172a, #475569); }
.agx-cover-2 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.agx-cover-3 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.agx-cover-4 { background: linear-gradient(135deg, #16a34a, #4ade80); }
.agx-cover-5 { background: linear-gradient(135deg, #db2777, #f472b6); }
.agx-card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.agx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agx-card-head b { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-use { border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--ink); border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.agx-use:hover { background: var(--bg-mute); }
.agx-card p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 会话 */
.agx-chat { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100%; }
.agx-chat-head { display: flex; align-items: center; gap: 10px; padding: 2px 0 14px; }
.agx-chat-head b { font-size: 15px; color: var(--ink); }
.agx-back { border: 1px solid var(--border-strong); background: var(--bg); border-radius: 9px; width: 30px; height: 30px; cursor: pointer; color: var(--ink-2); }
.agx-stream { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 6px 2px 20px; }
.agx-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.agx-msg { display: flex; gap: 10px; align-items: flex-start; }
.agx-msg.user { flex-direction: row-reverse; }
.agx-msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-mute); color: var(--ink); display: grid; place-items: center; font-size: 12px; flex: none; overflow: hidden; }
.agx-msg.user .agx-msg-avatar { background: var(--bg-mute); color: var(--ink); }
.agx-msg-main { max-width: 76%; }
.agx-bubble {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px; padding: 10px 13px;
  font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--ink);
}
.agx-msg.user .agx-bubble { background: var(--bg-mute); border-color: var(--border-strong); }
.agx-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.agx-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: agx-blink 1s infinite; }
.agx-typing i:nth-child(2) { animation-delay: .15s; }
.agx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes agx-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.agx-proposal { margin-top: 8px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 14px; }
.agx-proposal-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.agx-badge { font-size: 11px; background: rgba(217,119,6,.08); color: var(--warn); border-radius: 999px; padding: 2px 8px; }
.agx-proposal-line { font-size: 12px; color: var(--muted); margin-top: 6px; word-break: break-word; }
.agx-proposal-actions { display: flex; gap: 8px; margin-top: 10px; }
.agx-btn { border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2); border-radius: 9px; padding: 7px 12px; font-size: 12px; cursor: pointer; }
.agx-btn.primary { background: var(--ink); border-color: transparent; color: #fff; }

/* BOT 弹窗 */
.agx-bot-modal { width: min(560px, 92vw); max-height: 78vh; overflow-y: auto; text-align: left; }
.agx-bm-head { display: flex; align-items: center; justify-content: space-between; }
.agx-bm-head h2 { margin: 0; font-size: 18px; }
.agx-x { border: 0; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; }
.agx-bm-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px; margin: 12px 0; cursor: pointer; }
.agx-bm-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.agx-bm-card { border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px; margin: 10px 0; }
.agx-bm-cardhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.agx-bm-memorybar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; font-size: 12px; color: var(--muted); }
.agx-bm-memorybar button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.agx-memory { width: 100%; min-height: 74px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px; font: inherit; font-size: 12px; resize: vertical; }
.agx-bm-preview { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; padding: 20px; margin: 12px 0; }
.agx-bm-label { font-size: 12px; color: var(--muted); margin: 12px 0 7px; }
.agx-shape-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.agx-shape-btn { border: 1px solid var(--border-strong); background: var(--bg); border-radius: 9px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.agx-shape-btn.on { border-color: var(--ink); background: var(--bg-mute); }
.agx-mini-bot { width: 28px; height: 28px; background: #111; display: block; }
.agx-color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.agx-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; }
.agx-color.on { box-shadow: 0 0 0 2px var(--ink); }
.agx-select-lg { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; font-size: 13px; background: var(--bg); }
.agx-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.agx-chip { border: 1px solid var(--border-strong); background: var(--bg); border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.agx-chip.on { background: var(--bg-mute); border-color: var(--ink); color: var(--ink); }
.agx-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.agx-switch { width: 40px; height: 22px; border-radius: 999px; border: 0; background: var(--border-strong); position: relative; cursor: pointer; }
.agx-switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; }
.agx-switch.on { background: var(--ink); }
.agx-switch.on::after { left: 20px; }
.agx-form { display: grid; gap: 12px; }
.agx-form label { font-size: 12px; color: var(--muted); display: grid; gap: 6px; }
.agx-form label.agx-inline { display: flex; align-items: center; justify-content: space-between; }
.agx-history { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.agx-history-item { text-align: left; border: 1px solid var(--border-strong); background: var(--bg); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.agx-history-item b { display: block; font-size: 13px; color: var(--ink); }
.agx-history-item small { color: var(--muted); font-size: 11px; }
.agx-pop { position: absolute; left: 10px; bottom: 54px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.1); display: grid; padding: 6px; gap: 2px; z-index: 5; }
.agx-pop button { border: 0; background: transparent; text-align: left; padding: 7px 12px; border-radius: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.agx-pop button:hover { background: var(--bg-mute); }

/* 弹窗强制浅色，避免继承站点深色 modal 样式 */
.agx-light-modal {
  background: var(--bg) !important; color: var(--ink) !important;
  border: 1px solid var(--border-strong) !important; box-shadow: 0 24px 60px rgba(0,0,0,.15) !important;
}
.agx-light-modal h2, .agx-light-modal b { color: var(--ink) !important; }
.agx-light-modal .modal-close { background: var(--bg-mute) !important; color: var(--ink) !important; }
.agx-light-modal .agx-shape-btn { background: var(--bg) !important; }
.agx-light-modal .agx-chip, .agx-light-modal .agx-btn { background: var(--bg) !important; color: var(--ink-2) !important; }
.agx-light-modal .agx-chip.on { background: var(--bg-mute) !important; color: var(--ink) !important; }
.agx-light-modal .agx-btn.primary { background: var(--ink) !important; color: #fff !important; }
.agx-light-modal .agx-memory, .agx-light-modal .agx-input-line, .agx-light-modal .agx-select-lg { background: var(--bg) !important; color: var(--ink) !important; }

/* 创意简报编辑弹窗 */
.agp-brief-field { display: block; margin-top: 14px; }
.agp-brief-field > em { display: block; font-style: normal; font-size: 11px; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 6px; }
.agp-brief-field input,
.agp-brief-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; resize: vertical;
}
.agp-brief-field input:focus,
.agp-brief-field textarea:focus { outline: none; border-color: var(--ink-2); }

/* ============================================================
   站点暗色适配：跟随 dark-theme.css 变量，仅覆盖 .agx 组件特有值
   ============================================================ */
body.dark-site .agx {
  background: var(--bg);
  border-color: var(--border);
}
body.dark-site .agx-rail,
body.dark-site .agx-top {
  background: var(--bg-soft);
  border-color: var(--border);
}
body.dark-site .agx-composer {
  background: var(--bg-soft);
  border-color: var(--border);
  box-shadow: 0 18px 46px rgba(0,0,0,.3);
}
body.dark-site .agx-dot { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.5); }
body.dark-site .agx-send { background: #e5e7eb; color: #0f1117; }
body.dark-site .agx-topbtn.primary { background: #e5e7eb; color: #0f1117; }
body.dark-site .agx-btn.primary { background: #e5e7eb; color: #0f1117; }
body.dark-site .agx-bot-hero:hover,
body.dark-site .agx-bot-preview:hover { box-shadow: 0 18px 50px rgba(255,255,255,.08); }

/* 弹窗暗色 */
body.dark-site .agx-light-modal {
  background: var(--bg-soft) !important; color: var(--ink) !important;
  border: 1px solid var(--border) !important; box-shadow: 0 30px 80px rgba(0,0,0,.5) !important;
}
body.dark-site .agx-light-modal h2,
body.dark-site .agx-light-modal b { color: var(--ink) !important; }
body.dark-site .agx-light-modal .modal-close { background: var(--bg-mute) !important; color: var(--ink) !important; }
body.dark-site .agx-light-modal .agx-shape-btn { background: var(--bg) !important; border-color: var(--border) !important; }
body.dark-site .agx-light-modal .agx-chip,
body.dark-site .agx-light-modal .agx-btn { background: var(--bg) !important; color: var(--ink-2) !important; }
body.dark-site .agx-light-modal .agx-chip.on { background: var(--bg-mute) !important; color: var(--ink) !important; }
body.dark-site .agx-light-modal .agx-btn.primary { background: #e5e7eb !important; color: #0f1117 !important; }
body.dark-site .agx-light-modal .agx-memory,
body.dark-site .agx-light-modal .agx-input-line,
body.dark-site .agx-light-modal .agx-select-lg {
  background: var(--bg) !important; color: var(--ink) !important; border-color: var(--border) !important;
}
body.dark-site .agx-bm-row,
body.dark-site .agx-bm-card,
body.dark-site .agx-bm-preview { background: var(--bg); border-color: var(--border); }
body.dark-site .agx-color { border-color: var(--bg-soft); box-shadow: 0 0 0 1px var(--border); }
body.dark-site .agx-switch { background: var(--border); }
body.dark-site .agx-switch.on { background: #e5e7eb; }

/* BOT 动效：漂浮 + 眨眼 + 眼睛跟随鼠标 */
.agx-bot-hero { animation: agx-bob 4.2s ease-in-out infinite; }
.agx-bot-preview { animation: agx-bob 5s ease-in-out infinite; }
.agx-bot-hero:hover, .agx-bot-preview:hover { box-shadow: 0 18px 50px rgba(142, 204, 245, .28); }
.agx-eye { transition: transform .18s ease-out; animation: agx-blink 5.4s infinite; }
.agx-emo-happy .agx-eye { animation-duration: 3.8s; }
.agx-emo-excited { animation-duration: 2.6s; }
.agx-emo-calm { animation-duration: 6.5s; }
@keyframes agx-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(-1.2deg); }
}
@keyframes agx-blink {
  0%, 91%, 100% { opacity: 1; }
  94% { opacity: .12; }
}
.agx-bot-area { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .agx-bot-hero, .agx-bot-preview, .agx-eye { animation: none; }
}

/* 应用广场 / CLI 弹窗卡片 */
.agx-appgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.agx-appcard {
  text-align: left; border: 1px solid var(--border-strong); background: var(--bg);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--ink);
}
.agx-appcard:hover { border-color: var(--ink); background: var(--bg-mute); }
.agx-appcard span { font-size: 20px; display: block; margin-bottom: 6px; }
.agx-appcard b { display: block; font-size: 13px; }
.agx-appcard small { color: var(--muted); font-size: 12px; }

/* ============================================================
   Foke 风格：左创作会话 + 右浅色工作台
   ============================================================ */
.agp {
  display: flex; min-height: calc(100vh - 60px);
  margin: -26px -34px -10px;
  background: var(--surface); color: var(--ink);
  border-radius: 0; overflow: hidden;
}
.agp-side {
  width: 264px; flex: 0 0 264px; background: var(--bg-soft);
  border-right: 1px solid var(--border); padding: 18px 16px 16px;
  display: flex; flex-direction: column; gap: 10px; transition: .2s;
}
.agp-side.collapsed { width: 0; flex-basis: 0; padding: 0; overflow: hidden; border: 0; }
.agp-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.agp-side-head span { font-size: 14px; font-weight: 700; color: var(--ink); }
.agp-side-head button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.agp-newbtn {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow);
}
.agp-newbtn:hover { background: var(--bg-mute); border-color: var(--ink); }
.agp-recent { font-size: 12px; color: var(--muted); padding: 8px 4px 2px; }
.agp-convs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.agp-conv {
  display: flex; align-items: center; gap: 9px; text-align: left; border: 0; background: transparent;
  border-radius: 9px; padding: 9px 8px; cursor: pointer; color: var(--ink-2); width: 100%;
}
.agp-conv:hover { background: var(--bg-mute); }
.agp-conv.on { background: var(--bg-mute); }
.agp-conv-ic { color: var(--muted); font-size: 14px; }
.agp-conv-main { flex: 1; min-width: 0; }
.agp-conv-main b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agp-conv-main small { color: var(--muted); font-size: 11px; }
.agp-conv-del { opacity: 0; color: var(--muted); font-size: 11px; }
.agp-conv:hover .agp-conv-del { opacity: 1; }
.agp-conv-empty {
  border: 1px dashed var(--border-strong); border-radius: 10px; padding: 14px 12px; margin-top: 4px;
  background: var(--surface);
}
.agp-conv-empty b { display: block; font-size: 12.5px; color: var(--ink-2); }
.agp-conv-empty small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.agp-sidefoot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.agp-promo { background: #17161d; color: #fff; border-radius: 14px; padding: 16px 15px; }
.agp-promo-k { font-size: 13px; font-weight: 700; }
.agp-promo p { color: var(--muted); font-size: 11.5px; line-height: 1.6; margin: 6px 0 12px; }
.agp-promo-btn {
  width: 100%; border: 0; border-radius: 8px; background: var(--ink); color: var(--bg);
  padding: 8px 10px; font-size: 12px; cursor: pointer;
}
.agp-promo-btn:hover { background: var(--green-800); }
.agp-side-note { color: var(--muted); font-size: 11.5px; line-height: 1.7; padding: 0 4px; }
.agp-main { flex: 1; min-width: 0; display: flex; }
.agp-scroll { flex: 1; overflow-y: auto; padding: 44px 40px 40px; }

.agp-hero { max-width: 780px; margin: 0 auto; text-align: center; }
.agp-logo {
  width: 64px; height: 64px; border-radius: 18px; border: 1px solid var(--border-strong);
  background: var(--bg-mute); display: grid; place-items: center; margin: 0 auto 14px; cursor: pointer;
  box-shadow: var(--shadow); animation: agp-logo-bob 4s ease-in-out infinite;
}
.agp-logo .agx-bot-logo { width: 40px; height: 40px; }
.agp-logo:hover { border-color: var(--ink); }
@keyframes agp-logo-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.agp-eyebrow { font-size: 11px; letter-spacing: 2.4px; color: var(--muted); margin-bottom: 10px; }
.agp-hero h1 { font-size: 42px; line-height: 1.2; color: var(--ink); margin: 0 0 10px; font-weight: 800; letter-spacing: -.5px; }
.agp-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; }

.agp .agx-composer {
  text-align: left; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  padding: 16px 18px 12px; box-shadow: 0 14px 34px rgba(0,0,0,.06); backdrop-filter: none;
}
.agp .agx-input { min-height: 86px; font-size: 15px; color: var(--ink); }
.agp .agx-input::placeholder { color: var(--muted); }
.agp-composer-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.agp-composer-head b { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.agp-spark { color: var(--ink); font-size: 13px; }
.agp-tag {
  margin-left: auto; font-size: 11px; color: var(--ink); background: var(--bg-mute); border-radius: 999px; padding: 3px 9px;
}
.agp-composer-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.agp-attach { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.agp-attach:hover { color: var(--ink); }
.agp-model {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 8px; background: var(--bg-soft);
}
.agp-model select { border: 0; background: transparent; font-size: 12px; color: var(--ink-2); outline: 0; max-width: 210px; }
.agp-dot { width: 7px; height: 7px; border-radius: 50%; background: #45c99b; }
.agp-caret { color: var(--muted); font-size: 11px; }
.agp .agx-send {
  width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 17px; font-weight: 700;
}
.agp .agx-send:hover { background: var(--green-800); }
.agp-usage { text-align: right; color: var(--muted); font-size: 11px; padding-top: 8px; }

.agp-quick { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin: 16px 0 26px; }
.agp-quick button {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; cursor: pointer;
}
.agp-quick button:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-mute); }
.agp-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11.5px; margin: 8px 0 18px; }
.agp-divider::before, .agp-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.agp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.agp-feature {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 13px;
  padding: 16px 15px 14px; cursor: pointer; color: var(--ink);
}
.agp-feature:hover { border-color: var(--ink); box-shadow: 0 12px 26px rgba(0,0,0,.05); transform: translateY(-1px); }
.agp-feat-ic {
  width: 34px; height: 34px; border-radius: 9px; background: var(--bg-mute); color: var(--ink);
  display: grid; place-items: center; font-size: 16px; margin-bottom: 14px;
}
.agp-feature b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.agp-feature small { color: var(--muted); font-size: 11.5px; }
.agp-feature i { position: absolute; right: 13px; top: 12px; color: var(--muted); font-style: normal; font-size: 12px; }
.agp-footnote { color: var(--muted); font-size: 11px; margin-top: 18px; }

/* 会话视图（浅色） */
.agp-chat { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 190px); }
.agp-chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; }
.agp-chat-head b { font-size: 15px; color: var(--ink); }
.agp-mini-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.agp .agx-back { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.agp .agx-stream { flex: 1; gap: 14px; padding: 8px 0 18px; }
.agp .agx-bubble { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.agp .agx-msg.user .agx-bubble { background: var(--bg-mute); border-color: var(--border-strong); color: var(--ink); }
.agp .agx-msg-avatar { background: var(--bg-mute); color: var(--ink); }
.agp .agx-proposal { background: var(--surface); border-color: var(--border-strong); }
.agp .agx-proposal-line { color: var(--muted); }
.agp .agx-empty { color: var(--muted); }
.agp .agx-badge { background: #fff4dd; color: #a86b00; }
.agp .agx-btn { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.agp .agx-btn.primary { background: var(--ink); color: var(--bg); border-color: transparent; }

/* BOT 弹窗回到浅色，和页面一致 */
.agx-light-modal {
  background: var(--surface) !important; color: var(--ink) !important;
  border: 1px solid var(--border-strong) !important; box-shadow: 0 30px 80px rgba(0,0,0,.15) !important;
}
.agx-light-modal h2, .agx-light-modal b { color: var(--ink) !important; }
.agx-light-modal .modal-close { background: var(--bg-mute) !important; color: var(--ink) !important; }
.agx-light-modal .agx-shape-btn { background: var(--surface) !important; border-color: var(--border-strong) !important; }
.agx-light-modal .agx-chip, .agx-light-modal .agx-btn { background: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--border-strong) !important; }
.agx-light-modal .agx-chip.on { background: var(--bg-mute) !important; color: var(--ink) !important; border-color: var(--ink) !important; }
.agx-light-modal .agx-btn.primary { background: var(--ink) !important; color: var(--bg) !important; }
.agx-light-modal .agx-memory, .agx-light-modal .agx-input-line, .agx-light-modal .agx-select-lg {
  background: var(--surface) !important; color: var(--ink) !important; border-color: var(--border-strong) !important;
}
.agx-light-modal .agx-bm-row, .agx-light-modal .agx-bm-card, .agx-light-modal .agx-bm-preview {
  background: var(--bg-soft) !important; border-color: var(--border) !important;
}
.agx-light-modal .agx-bm-row small, .agx-light-modal .agx-hint { color: var(--muted) !important; }
.agx-light-modal .agx-color { border-color: var(--bg) !important; box-shadow: 0 0 0 1px var(--border-strong) !important; }
.agx-light-modal .agx-switch { background: var(--border-strong) !important; }
.agx-light-modal .agx-switch.on { background: var(--ink) !important; }
.agx-light-modal .agx-appcard { background: var(--bg-soft) !important; border-color: var(--border) !important; color: var(--ink) !important; }
.agx-light-modal .agx-appcard small { color: var(--muted) !important; }

@media (max-width: 1100px) {
  .agp-features { grid-template-columns: repeat(2, 1fr); }
  .agp-scroll { padding: 30px 22px; }
}
@media (max-width: 820px) {
  .agp { margin: -18px -16px -10px; }
  .agp-side { display: none; }
  .agp-hero h1 { font-size: 30px; }
  .agp-features { grid-template-columns: 1fr 1fr; }
  .agp-scroll { padding: 24px 14px; }
}

@media (max-width: 1180px) {
  .agx-lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agx-entries { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .agx { height: auto; min-height: 0; border-radius: 14px; }
  .agx-rail { display: none; }
  .agx-hero h1 { font-size: 26px; }
  .agx-lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agx-body { padding: 18px 12px 26px; }
  .agx-shape-grid { grid-template-columns: repeat(4, 1fr); }
}

.agp-model b { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.agp-model-note { font-size: 10px; color: var(--muted); background: var(--bg-mute); border-radius: 5px; padding: 1px 5px; }
.agx-readonly { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border-strong); background: var(--bg-soft); border-radius: 9px; padding: 9px 11px; }
.agx-readonly b { font-size: 13px; color: var(--ink-2); }
.agx-readonly span { font-size: 11px; color: var(--muted); }
/* 素材 / Skill / 思考强度 */
.agp-composer-foot { flex-wrap: wrap; row-gap: 8px; }
.agp-sup { font-size: 10px; color: var(--ink); background: var(--bg-mute); border-radius: 999px; padding: 0 5px; margin-left: 3px; }
.agp-think { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.agp-think select { border: 1px solid var(--border-strong); border-radius: 7px; background: var(--bg-soft); font-size: 11px; color: var(--ink-2); padding: 3px 5px; outline: 0; }
.agp-selected { display: none; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.agp-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-mute); color: var(--ink); border-radius: 999px; font-size: 11.5px; padding: 4px 8px; }
.agp-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0; }
.agp-chip-skill { border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); background: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
.agp-chip-skill button { color: var(--ink-2); }
.agp-asset-modal { width: min(720px, 94vw); }
.agp-asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-height: 46vh; overflow-y: auto; margin-top: 12px; }
.agp-asset { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 8px; text-align: left; cursor: pointer; color: var(--ink); overflow: hidden; }
.agp-asset.on { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(17,24,39,.1); }
.agp-asset img { width: 100%; height: 72px; object-fit: cover; border-radius: 7px; display: block; background: var(--bg-mute); }
.agp-asset-ic { display: grid; place-items: center; height: 72px; border-radius: 7px; background: var(--bg-mute); font-size: 24px; }
.agp-asset b { display: block; font-size: 11.5px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agp-asset small { color: var(--muted); font-size: 10.5px; }
.agp-asset-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.7; border: 1px dashed #e2dfeb; border-radius: 10px; padding: 18px; text-align: center; }
.modal:has(.agp-skill-library) { max-width: 920px; }
.agp-skill-modal { width: 100%; max-width: 860px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.agp-skill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-right: 34px; }
.agp-skill-head h2 { margin: 0 0 6px; }
.agp-skill-head .agx-hint { margin: 0; max-width: 58ch; }
.agp-skill-count { flex: none; border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 11px; font-size: 11px; color: var(--muted); background: var(--bg-soft); white-space: nowrap; }
.agp-skill-count b { color: var(--ink); font-size: 12px; }
.agp-skill-toolbar { display: flex; gap: 9px; align-items: center; margin: 14px 0 12px; }
.agp-skill-toolbar .agx-input-line { flex: 1; }
.agp-skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow-y: auto; padding: 2px; margin: 0 0 4px; min-height: 120px; max-height: 44vh; }
.agp-skill-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 136px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.agp-skill-card:hover { border-color: color-mix(in srgb, var(--ink) 44%, var(--border-strong)); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 23, 42, .08); }
.agp-skill-card:focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 2px; }
.agp-skill-card.on { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, var(--surface)); box-shadow: inset 0 0 0 1px var(--ink); }
.agp-skill-card[hidden] { display: none; }
.agp-skill-cardtop { display: flex; align-items: flex-start; gap: 10px; padding-right: 20px; }
.agp-skill-glyph { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border-strong); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.agp-skill-card.on .agp-skill-glyph { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.agp-skill-info { min-width: 0; flex: 1; }
.agp-skill-info b { display: block; font-size: 13px; line-height: 1.4; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-skill-info small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.agp-skill-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 10.5px; color: var(--muted); }
.agp-skill-state { border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 9px; color: var(--ink-2); background: var(--bg-soft); font: inherit; font-size: 10.5px; cursor: pointer; }
.agp-skill-state:hover { border-color: var(--ink); color: var(--ink); }
.agp-skill-card.on .agp-skill-state { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.agp-skill-card.on::after { content: '✓'; position: absolute; top: 11px; right: 12px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-size: 10px; font-weight: 700; }
.agp-skill-cardops { display: flex; gap: 6px; }
.agp-skill-cardops button { border: 1px solid var(--border-strong); background: transparent; color: var(--muted); border-radius: 7px; font-size: 10.5px; padding: 3px 8px; cursor: pointer; }
.agp-skill-cardops button:hover { color: var(--ink); border-color: var(--ink); }
.agp-skill-editor { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; display: grid; gap: 9px; overflow-y: auto; max-height: 46vh; }
.agp-skill-editor[hidden] { display: none; }
.agp-skill-form-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.agp-skill-form-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agp-skill-filehint { color: var(--muted); font-size: 10.5px; }
.agp-skill-editor .agx-memory { min-height: 90px; max-height: 32vh; }
.agp-skill-actions { margin-top: 12px; }
.agp-skill-library .agp-asset-empty { margin: 8px 0 2px; }
@media (max-width: 820px) {
  .agp-asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agp-composer-foot { gap: 8px; }
}
/* 大屏铺满 + 更大的 BOT 标识 */
.view:has(> .agp) { max-width: none; width: 100%; padding: 0; }
.view:has(> .agp) .agp { margin: 0; width: 100%; min-height: calc(100vh - 60px); }
.agp-logo { width: 88px; height: 88px; border-radius: 24px; margin-bottom: 18px; }
.agp-logo .agx-bot-logo { width: 56px; height: 56px; }
.agp-hero { max-width: 1080px; }
.agp-hero h1 { font-size: 46px; }
.agp-chat { max-width: 980px; }

@media (min-width: 1600px) {
  .agp-side { width: 280px; flex-basis: 280px; }
  .agp-scroll { padding: 56px 56px 48px; }
  .agp-hero { max-width: 1180px; }
  .agp-hero h1 { font-size: 50px; }
  .agp-feature { padding: 18px 17px 16px; }
  .agp-feat-ic { width: 38px; height: 38px; font-size: 18px; }
}
@media (min-width: 2200px) {
  .agp-hero { max-width: 1320px; }
  .agp-hero h1 { font-size: 54px; }
  .agp-scroll { padding: 64px 72px 56px; }
  .agp-composer { padding: 20px 22px 14px; }
  .agp .agx-input { min-height: 100px; font-size: 16px; }
  .agp-features { gap: 16px; }
}
/* 新工具条：模型 / 思考滑杆 / 联网 / 主动询问 / 记忆 */
.agp-composer { position: relative; }
.agp-composer-foot { justify-content: space-between; }
.agp-tools-left, .agp-tools-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agp-tools-right { margin-left: auto; justify-content: flex-end; }
.agp-tool {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--ink-2); border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.agp-tool:hover { border-color: var(--ink); color: var(--ink); }
.agp-model-btn { max-width: 260px; }
.agp-model-btn [data-model-name] { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.agp-provider { color: var(--muted); font-size: 10.5px; background: var(--bg-mute); border-radius: 5px; padding: 1px 5px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.agp-think-btn b { color: var(--ink); font-weight: 600; }
.agp-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 5px 9px; font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.agp-toggle i { width: 24px; height: 14px; border-radius: 999px; background: var(--border-strong); position: relative; transition: .18s; }
.agp-toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); transition: .18s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.agp-toggle.on { color: var(--ink); border-color: var(--ink); background: var(--bg-soft); }
.agp-toggle.on i { background: var(--ink); }
.agp-toggle.on i::after { left: 12px; }
.agp-pop {
  position: absolute; right: 0; bottom: 78px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 22px 50px rgba(0,0,0,.12);
  padding: 10px; width: 340px; max-height: min(380px, 55vh); overflow-y: auto; text-align: left;
}
.agp-model-pop { width: 400px; }
.agp-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.agp-pop-head small { color: var(--ink); font-weight: 600; font-size: 11.5px; }
.agp-pop-section { font-size: 11px; color: var(--muted); padding: 8px 6px 4px; }
.agp-model-item {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent;
  border-radius: 9px; padding: 8px 8px; cursor: pointer; text-align: left; color: var(--ink);
}
.agp-model-item:hover { background: var(--bg-mute); }
.agp-model-item.on { background: var(--bg-mute); }
.agp-mi-main { flex: 1; min-width: 0; }
.agp-mi-main b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agp-mi-main small { color: var(--muted); font-size: 10.5px; }
.agp-mi-check { color: var(--ink); font-weight: 700; }
.agp-seg {
  position: relative; height: 44px; margin: 10px 6px 4px; border-radius: 8px;
  background: var(--bg-mute); border: 1px solid var(--border-strong); overflow: hidden;
  touch-action: none; cursor: grab; user-select: none;
  transition: background .35s ease, border-color .35s ease;
}
.agp-seg:active { cursor: grabbing; }
.agp-seg.high {
  background: linear-gradient(100deg, #111827 0%, #374151 45%, #1f2937 100%);
  border-color: #111827;
}
.agp-seg-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 1;
  background: linear-gradient(90deg, #374151, #6b7280);
  opacity: 0; transition: width .5s cubic-bezier(.22, 1.16, .36, 1), opacity .25s;
}
.agp-seg.high .agp-seg-fill { width: 100% !important; opacity: 1; }
.agp-meteors { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .25s; }
.agp-seg.high .agp-meteors { opacity: 1; }
.agp-meteors i {
  position: absolute; left: -12%; border-radius: 50%;
  background: var(--surface); box-shadow: 0 0 5px 1px rgba(255,255,255,.7);
  opacity: 0; animation-name: agp-meteor-right; animation-timing-function: linear; animation-iteration-count: infinite;
  will-change: left, opacity;
}
.agp-meteors i::after {
  content: ''; position: absolute; right: 2px; top: 50%; width: var(--len, 24px); height: 1.5px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.9));
  transform: translateY(-50%); border-radius: 2px;
}
@keyframes agp-meteor-right {
  0% { left: -12%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}
.agp-seg-thumb {
  position: absolute; left: 0; top: 0; bottom: 0; width: 25%; padding: 3px; box-sizing: border-box; z-index: 3;
  transition: transform .48s cubic-bezier(.34, 1.46, .64, 1); will-change: transform; pointer-events: none;
}
.agp-seg-thumb::after {
  content: ''; display: block; width: 100%; height: 100%; border-radius: 5px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 2px 9px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.9);
}
.agp-seg.high .agp-seg-thumb { opacity: 0; }
.agp-seg.high .agp-seg-thumb::after { background: transparent; box-shadow: none; }
.agp-seg.dragging .agp-seg-thumb,
.agp-seg.dragging .agp-seg-fill { transition: none; }
.agp-seg.dragging .agp-seg-thumb::after { background: var(--surface); }
.agp-seg-div { position: absolute; top: 9px; bottom: 9px; width: 1px; background: rgba(17,24,39,.12); pointer-events: none; z-index: 4; }
.agp-seg.high .agp-seg-div { background: rgba(255,255,255,.25); opacity: 0; }
.agp-think-ticks { display: flex; justify-content: space-between; margin-top: 8px; }
.agp-think-ticks span { font-size: 10.5px; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.agp-think-ticks span.on { color: var(--ink); font-weight: 700; }
.agp-think-desc { padding: 8px 6px 4px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 900px) {
  .agp-tools-right { margin-left: 0; }
  .agp-pop { right: auto; left: 0; width: min(340px, 92vw); }
  .agp-model-pop { width: min(400px, 92vw); }
}
/* Agent 页跟随全站底色 */
body:has(.agp) { background: var(--site-tint, #f7f7f8); }
body:has(.agp) .app, body:has(.agp) .main, body:has(.agp) .content { background: var(--site-tint, #f7f7f8); }
.view:has(> .agp) { background: var(--site-tint, #f7f7f8); }
.agp { background: var(--site-tint, #f7f7f8); }
.agp-side { background: var(--bg-soft); border-right-color: var(--border-strong); }
.agp-side { background: var(--bg-soft); }
.agp-conv:hover { background: var(--bg-mute); }
.agp-feature, .agp-composer, .agp-quick button { background: var(--surface); border-color: var(--border-strong); }
.agp-composer-foot { border-top-color: var(--border); }
.agp-divider::before, .agp-divider::after { background: var(--border-strong); }
.agp-usage, .agp-footnote { color: var(--muted); }
body:has(.agp) ::-webkit-scrollbar-track { background: color-mix(in srgb, var(--site-tint, #f7f7f8) 70%, #e5e7eb); }
body:has(.agp) ::-webkit-scrollbar-thumb { background: #d1d5db; }
body:has(.agp) ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
/* 侧栏跟随主题 */
body:has(.agp) .sidebar {
  background: var(--surface) !important;
  border-right-color: var(--border) !important;
}
body:has(.agp) .brand,
body:has(.agp) .space-tag { background: transparent !important; }