/* 极云伴侣 v4（2026-10-24）：右侧滑出的侧边栏（展开时页面模糊不可操作）+ 右下角浮动入口；窄屏全屏面板。 */
:root {
  --companion-width: 420px;
  --companion-gap: 16px;
  --cp-bg: #121517;
  --cp-bg-2: #171b1e;
  --cp-surface: #1c2125;
  --cp-surface-2: #22282c;
  --cp-line: rgba(255, 255, 255, .08);
  --cp-line-2: rgba(255, 255, 255, .14);
  --cp-text: #eeebe4;
  --cp-text-2: #b3b7b8;
  --cp-text-3: #7f878b;
  --cp-gold: #e6c983;
  --cp-gold-2: #c9a45c;
  --cp-gold-soft: rgba(230, 201, 131, .12);
  --cp-gold-line: rgba(230, 201, 131, .34);
  --cp-gold-grad: linear-gradient(135deg, #f4e2b4 0%, #dfc07c 55%, #c59f55 100%);
  --cp-on-gold: #1f1a0f;
  --cp-user: #2c271d;
  --cp-shadow: 0 24px 64px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
  --cp-green: #5fd49a;
}
html[data-theme="light"] {
  --cp-bg: #ffffff;
  --cp-bg-2: #fbfaf7;
  --cp-surface: #f5f4f0;
  --cp-surface-2: #eeece6;
  --cp-line: rgba(30, 36, 44, .08);
  --cp-line-2: rgba(30, 36, 44, .15);
  --cp-text: #232a33;
  --cp-text-2: #4d5763;
  --cp-text-3: #848d97;
  --cp-gold: #9a7428;
  --cp-gold-2: #b48a3a;
  --cp-gold-soft: rgba(196, 160, 85, .12);
  --cp-gold-line: rgba(176, 138, 60, .38);
  --cp-user: #f6efdf;
  --cp-shadow: 0 24px 60px rgba(30, 36, 44, .16), 0 2px 8px rgba(30, 36, 44, .06);
  --cp-green: #1f9d62;
}

/* ---------- 标题旁的入口按钮 ---------- */
.prompt-companion-launcher[hidden] { display: none !important; }
.composer-title { flex-wrap: wrap; row-gap: 8px; }
.prompt-companion-launcher {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px;
  min-height: 32px; margin-left: 6px; padding: 0 12px 0 10px;
  border: 1px solid var(--cp-gold-line); border-radius: 999px;
  color: var(--cp-gold); background: var(--cp-gold-soft);
  font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.prompt-companion-launcher::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 auto; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l1.9 5.6a3 3 0 0 0 1.9 1.9l5.7 2-5.7 2a3 3 0 0 0-1.9 1.9L12 21.5l-1.9-5.6a3 3 0 0 0-1.9-1.9L2.5 12l5.7-2a3 3 0 0 0 1.9-1.9z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l1.9 5.6a3 3 0 0 0 1.9 1.9l5.7 2-5.7 2a3 3 0 0 0-1.9 1.9L12 21.5l-1.9-5.6a3 3 0 0 0-1.9-1.9L2.5 12l5.7-2a3 3 0 0 0 1.9-1.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prompt-companion-launcher:hover { border-color: var(--cp-gold); background: rgba(230, 201, 131, .2); transform: translateY(-1px); }
.prompt-companion-launcher[aria-expanded="true"] { color: var(--cp-on-gold); border-color: transparent; background: var(--cp-gold-grad); }
.prompt-companion-launcher:focus-visible { outline: 2px solid var(--cp-gold); outline-offset: 2px; }

/* 填入后画面描述闪一下 */
.companion-filled { animation: companion-filled 1.4s ease-out; }
@keyframes companion-filled { 0% { box-shadow: 0 0 0 0 rgba(230, 201, 131, .0); } 20% { box-shadow: 0 0 0 3px rgba(230, 201, 131, .55); } 100% { box-shadow: 0 0 0 0 rgba(230, 201, 131, 0); } }

/* ---------- 面板 ---------- */
.prompt-chat-popup {
  position: fixed; z-index: 60; inset: var(--companion-gap) var(--companion-gap) var(--companion-gap) auto;
  width: var(--companion-width); height: auto; max-width: none; max-height: none;
  margin: 0; padding: 0; overflow: visible;
  border: 1px solid var(--cp-line-2); border-radius: 20px;
  color: var(--cp-text);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(230, 201, 131, .10) 0%, transparent 55%),
    linear-gradient(180deg, var(--cp-bg-2) 0%, var(--cp-bg) 100%);
  box-shadow: var(--cp-shadow);
  font-size: 14px;
}
.prompt-chat-popup[open] { display: flex; flex-direction: column; animation: companion-enter .3s cubic-bezier(.2, .8, .2, 1) both; }
.prompt-chat-popup::backdrop { background: rgba(6, 8, 10, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: companion-backdrop .3s ease-out both; }
html[data-theme="light"] .prompt-chat-popup::backdrop { background: rgba(30, 36, 44, .22); }
@keyframes companion-backdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes companion-enter { from { opacity: 0; transform: translateX(24px) scale(.985); } to { opacity: 1; transform: none; } }
.prompt-chat-popup svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 头部 */
.companion-header { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 16px 14px 14px 18px; border-bottom: 1px solid var(--cp-line); }
.companion-identity { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.companion-avatar, .companion-message-avatar, .companion-welcome-orb, .companion-fab-avatar {
  position: relative; display: grid; flex: 0 0 auto; place-items: center;
  color: var(--cp-on-gold); background: var(--cp-gold-grad);
}
.companion-avatar svg, .companion-message-avatar svg, .companion-welcome-orb svg, .companion-fab-avatar svg { fill: currentColor; stroke: none; }
.companion-avatar { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; box-shadow: 0 6px 18px rgba(201, 164, 92, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.companion-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.companion-name { display: flex; align-items: center; gap: 7px; }
.companion-name strong { color: var(--cp-text); font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.companion-badge { padding: 2px 7px; border: 1px solid var(--cp-gold-line); border-radius: 999px; color: var(--cp-gold); background: var(--cp-gold-soft); font-size: 10.5px; font-weight: 650; line-height: 1.4; }
.companion-title small { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--cp-text-3); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.companion-online { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--cp-green); box-shadow: 0 0 0 3px rgba(95, 212, 154, .16); }
.companion-head-actions { display: flex; flex: 0 0 auto; gap: 2px; }
/* 收起：标题栏里的文字按钮 + 侧边栏左边缘的把手 */
.companion-collapse { display: inline-flex; align-items: center; gap: 2px; height: 32px; margin-left: 4px; padding: 0 8px 0 12px; border: 1px solid var(--cp-line-2); border-radius: 10px; color: var(--cp-text-2); background: var(--cp-surface); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.companion-collapse svg { font-size: 16px; stroke-width: 2.2; }
.companion-collapse:hover { border-color: var(--cp-gold-line); color: var(--cp-gold); }
.companion-collapse:focus-visible, .companion-collapse-tab:focus-visible { outline: 2px solid var(--cp-gold); outline-offset: 2px; }
.companion-collapse-tab { position: absolute; z-index: 4; top: 50%; left: -30px; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 30px; padding: 14px 0; border: 1px solid var(--cp-line-2); border-right: 0; border-radius: 12px 0 0 12px; color: var(--cp-text-2); background: var(--cp-bg-2); box-shadow: -8px 0 24px rgba(0, 0, 0, .25); font: inherit; font-size: 12px; cursor: pointer; transform: translateY(-50%); transition: color .15s ease, left .15s ease; }
.companion-collapse-tab svg { font-size: 16px; stroke-width: 2.2; }
.companion-collapse-tab span { writing-mode: vertical-rl; letter-spacing: .2em; }
.companion-collapse-tab:hover { left: -34px; color: var(--cp-gold); }
.companion-icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; color: var(--cp-text-3); background: transparent; font-size: 18px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.companion-icon-button:hover:not(:disabled), .companion-icon-button[aria-expanded="true"] { color: var(--cp-text); background: var(--cp-surface-2); }
.companion-icon-button:focus-visible { outline: 2px solid var(--cp-gold); outline-offset: 1px; }
.companion-icon-button:disabled { opacity: .45; cursor: wait; }

/* 历史 */
.companion-history { position: absolute; z-index: 3; top: 68px; right: 12px; left: 12px; max-height: 50%; overflow: auto; padding: 6px; border: 1px solid var(--cp-line-2); border-radius: 14px; background: var(--cp-bg); box-shadow: var(--cp-shadow); }
.companion-history[hidden] { display: none !important; }
.companion-history-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; color: var(--cp-text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.companion-history-item:hover, .companion-history-item.is-active { background: var(--cp-surface); }
.companion-history-title { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.companion-history-date { flex: 0 0 auto; color: var(--cp-text-3); font-size: 11px; }
.companion-history-empty { margin: 0; padding: 14px; color: var(--cp-text-3); font-size: 13px; }

/* 对话 */
.companion-messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 16px; min-height: 0; overflow: auto; padding: 18px 18px 12px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--cp-line-2) transparent; }
.companion-message { display: flex; align-items: flex-start; gap: 10px; max-width: 100%; animation: companion-message .25s ease-out both; }
@keyframes companion-message { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.companion-message.is-user { align-self: flex-end; flex-direction: row-reverse; max-width: 88%; }
.companion-message-avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 14px; }
.companion-message.is-user .companion-message-avatar { display: none; }
.companion-message p { margin: 0; padding: 11px 14px; border-radius: 4px 16px 16px 16px; color: var(--cp-text); background: var(--cp-surface); font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.companion-message.is-user p { border-radius: 16px 4px 16px 16px; background: var(--cp-user); border: 1px solid var(--cp-gold-line); }
.companion-waiting { display: flex; align-items: center; gap: 10px; }
.companion-dots { display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--cp-surface); }
.companion-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cp-text-3); animation: companion-dot 1.2s infinite ease-in-out; }
.companion-dots i:nth-child(2) { animation-delay: .15s; }
.companion-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes companion-dot { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

/* 欢迎区 */
.companion-welcome { display: flex; flex-direction: column; align-items: center; margin: auto 0; padding: 8px 4px 4px; text-align: center; }
.companion-welcome-orb { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 18px; font-size: 28px; box-shadow: 0 10px 30px rgba(201, 164, 92, .35), inset 0 1px 0 rgba(255, 255, 255, .5); animation: companion-float 4s ease-in-out infinite; }
@keyframes companion-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.companion-welcome h3 { margin: 0 0 8px; color: var(--cp-text); font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.companion-welcome p { max-width: 320px; margin: 0 0 20px; color: var(--cp-text-2); font-size: 13.5px; line-height: 1.7; }
.companion-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.companion-starter { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 64px; padding: 12px 13px; border: 1px solid var(--cp-line-2); border-radius: 14px; color: var(--cp-text); background: var(--cp-surface); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.companion-starter span { font-size: 13.5px; font-weight: 650; }
.companion-starter small { color: var(--cp-text-3); font-size: 11.5px; }
.companion-starter:hover:not(:disabled) { border-color: var(--cp-gold-line); background: var(--cp-surface-2); transform: translateY(-1px); }
.companion-starter.is-optimize { border-style: dashed; border-color: var(--cp-gold-line); background: var(--cp-gold-soft); }
.companion-starter.is-optimize span { color: var(--cp-gold); }

/* 快捷指令 */
.companion-quick { display: flex; flex: 0 0 auto; gap: 6px; overflow-x: auto; padding: 4px 18px 10px; scrollbar-width: none; }
.companion-quick::-webkit-scrollbar { display: none; }
.companion-quick button { flex: 0 0 auto; min-height: 30px; padding: 0 12px; border: 1px solid var(--cp-line-2); border-radius: 999px; color: var(--cp-text-2); background: transparent; font: inherit; font-size: 12px; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.companion-quick button:hover:not(:disabled) { border-color: var(--cp-gold-line); color: var(--cp-gold); }
.companion-quick button:disabled { opacity: .5; cursor: wait; }

/* 输入区 */
.companion-form { display: flex; flex: 0 0 auto; flex-direction: column; gap: 8px; padding: 0 14px 12px; }
.companion-apply { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 12px; color: var(--cp-on-gold); background: var(--cp-gold-grad); box-shadow: 0 6px 18px rgba(201, 164, 92, .25), inset 0 1px 0 rgba(255, 255, 255, .45); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; animation: companion-message .25s ease-out both; }
.companion-apply::before { content: "↙"; font-size: 15px; }
.companion-apply:hover:not(:disabled) { filter: brightness(1.05); }
.companion-apply:disabled:not(.is-done) { display: none; }
.companion-apply.is-done { color: var(--cp-green); background: var(--cp-surface); box-shadow: none; cursor: default; }
.companion-apply.is-done::before { content: none; }
.companion-input-box { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--cp-line-2); border-radius: 16px; background: var(--cp-surface); transition: border-color .15s ease, box-shadow .15s ease; }
.companion-input-box:focus-within { border-color: var(--cp-gold-line); box-shadow: 0 0 0 3px var(--cp-gold-soft); }
.prompt-chat-popup .companion-input-box textarea { box-shadow: none !important; border: 0 !important; background: transparent !important; border-radius: 0; }
.companion-input-box textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; padding: 5px 0; border: 0; outline: none; color: var(--cp-text); background: transparent; font: inherit; font-size: 14px; line-height: 1.6; }
.companion-input-box textarea::placeholder { color: var(--cp-text-3); }
.companion-send { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; color: var(--cp-on-gold); background: var(--cp-gold-grad); font-size: 18px; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.companion-send svg { stroke-width: 2.2; }
.companion-send:hover:not(:disabled) { transform: translateY(-1px); }
.companion-send:disabled { opacity: .5; cursor: wait; }
.companion-form-foot { display: flex; align-items: center; gap: 8px; min-height: 16px; padding: 0 4px; }
.companion-status { flex: 1; min-width: 0; color: var(--cp-text-3); font-size: 12px; line-height: 1.45; }
.companion-status.is-success { color: var(--cp-green); }
.companion-status.is-error { color: #ee8a7f; }
html[data-theme="light"] .companion-status.is-error { color: #b4232e; }
.companion-hint { flex: 0 0 auto; color: var(--cp-text-3); font-size: 11px; opacity: .8; }

/* ---------- 右下角浮动入口 ---------- */
.companion-fab { position: fixed; z-index: 59; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.companion-fab[hidden], .companion-fab-greeting[hidden] { display: none !important; }
.companion-fab-button { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border: 1px solid var(--cp-gold-line); border-radius: 999px; color: var(--cp-text); background: var(--cp-bg); box-shadow: var(--cp-shadow); font: inherit; cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.companion-fab-button:hover { transform: translateY(-2px); border-color: var(--cp-gold); }
.companion-fab-button:focus-visible { outline: 2px solid var(--cp-gold); outline-offset: 3px; }
.companion-fab-avatar { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }
.companion-fab-avatar::after { content: ""; position: absolute; inset: -4px; border: 2px solid rgba(230, 201, 131, .5); border-radius: 50%; animation: companion-pulse 2.4s ease-out infinite; }
@keyframes companion-pulse { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.companion-fab-avatar svg { width: 1em; height: 1em; }
.companion-fab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.companion-fab-text strong { font-size: 14px; font-weight: 700; }
.companion-fab-text small { color: var(--cp-gold); font-size: 11.5px; }
.companion-fab-greeting { position: relative; width: 260px; padding: 14px 32px 14px 16px; border: 1px solid var(--cp-line-2); border-radius: 16px 16px 4px 16px; color: var(--cp-text-2); background: var(--cp-bg); box-shadow: var(--cp-shadow); font-size: 13px; line-height: 1.6; animation: companion-message .3s ease-out both; }
.companion-fab-greeting strong { display: block; margin-bottom: 4px; color: var(--cp-text); font-size: 14px; }
.companion-fab-greeting-close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; color: var(--cp-text-3); background: transparent; font-size: 16px; cursor: pointer; }
.companion-fab-greeting-close:hover { color: var(--cp-text); background: var(--cp-surface); }

/* ---------- 窄屏：面板全屏 ---------- */
@media (max-width: 1179px) {
  .prompt-chat-popup { inset: 12px 12px 12px auto; width: min(440px, calc(100vw - 24px)); z-index: 80; }
}
@media (max-width: 760px) {
  /* 手机底部有导航栏：浮动按钮放在导航栏上方，键盘弹出时隐藏。 */
  .companion-fab { bottom: calc(var(--mobile-tabbar-height, 0px) + env(safe-area-inset-bottom) + 12px); }
  body.mobile-app-keyboard-open .companion-fab, body.mobile-app-menu-open .companion-fab { display: none; }
}
@media (max-width: 640px) {
  .companion-collapse-tab { display: none; }
  .prompt-chat-popup { inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) 8px; width: auto; border-radius: 18px; }
  .companion-header { padding: 12px 10px 12px 14px; }
  .companion-messages { padding: 14px 14px 10px; }
  .companion-quick { padding: 4px 14px 10px; }
  .companion-form { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
  .companion-hint { display: none; }
  .companion-fab { right: 14px; }
  .companion-fab-greeting { width: min(260px, calc(100vw - 28px)); }
  .composer-title .prompt-companion-launcher { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .prompt-chat-popup[open], .companion-message, .companion-apply, .companion-fab-greeting, .companion-welcome-orb, .companion-fab-avatar::after, .companion-dots i { animation: none; }
  body, .prompt-companion-launcher, .companion-fab-button { transition: none; }
}

/* ---------- 白天主题：网站全局给 button / textarea 加了 !important 白底边框，这里用更高优先级还原伴侣自己的样式 ---------- */
html[data-theme="light"] .prompt-chat-popup .companion-input-box textarea { color: var(--cp-text) !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html[data-theme="light"] .prompt-chat-popup .companion-icon-button { color: var(--cp-text-3) !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html[data-theme="light"] .prompt-chat-popup .companion-icon-button:is(:hover, [aria-expanded="true"]) { color: var(--cp-text) !important; background: var(--cp-surface-2) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-starter { color: var(--cp-text) !important; border: 1px solid var(--cp-line-2) !important; background: var(--cp-surface) !important; box-shadow: none !important; }
html[data-theme="light"] .prompt-chat-popup .companion-starter:hover { border-color: var(--cp-gold-line) !important; background: var(--cp-surface-2) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-starter.is-optimize { border: 1px dashed var(--cp-gold-line) !important; background: var(--cp-gold-soft) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-quick button { color: var(--cp-text-2) !important; border: 1px solid var(--cp-line-2) !important; background: transparent !important; box-shadow: none !important; }
html[data-theme="light"] .prompt-chat-popup .companion-quick button:hover { color: var(--cp-gold) !important; border-color: var(--cp-gold-line) !important; }
html[data-theme="light"] .prompt-chat-popup :is(.companion-apply, .companion-send) { color: var(--cp-on-gold) !important; border: 0 !important; background: var(--cp-gold-grad) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-apply.is-done { color: var(--cp-green) !important; background: var(--cp-surface) !important; box-shadow: none !important; }
html[data-theme="light"] .prompt-chat-popup .companion-history-item { color: var(--cp-text) !important; border: 0 !important; background: transparent !important; }
html[data-theme="light"] .prompt-chat-popup .companion-history-item:is(:hover, .is-active) { background: var(--cp-surface) !important; }
html[data-theme="light"] .companion-fab .companion-fab-button { color: var(--cp-text) !important; border: 1px solid var(--cp-gold-line) !important; background: var(--cp-bg) !important; }
html[data-theme="light"] .companion-fab .companion-fab-greeting-close { color: var(--cp-text-3) !important; border: 0 !important; background: transparent !important; }
html[data-theme="light"] .composer-title .prompt-companion-launcher { color: var(--cp-gold) !important; border: 1px solid var(--cp-gold-line) !important; background: var(--cp-gold-soft) !important; }
html[data-theme="light"] .composer-title .prompt-companion-launcher[aria-expanded="true"] { color: var(--cp-on-gold) !important; border-color: transparent !important; background: var(--cp-gold-grad) !important; }
html[data-theme="light"] .prompt-chat-popup :is(.companion-name strong, .companion-welcome h3) { color: var(--cp-text) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-collapse { color: var(--cp-text-2) !important; border: 1px solid var(--cp-line-2) !important; background: var(--cp-surface) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-collapse:hover { color: var(--cp-gold) !important; border-color: var(--cp-gold-line) !important; }
html[data-theme="light"] .prompt-chat-popup .companion-collapse-tab { color: var(--cp-text-2) !important; border: 1px solid var(--cp-line-2) !important; border-right: 0 !important; background: var(--cp-bg) !important; box-shadow: -8px 0 24px rgba(30, 36, 44, .1) !important; }
