/* ════════════════════════════════════════════════════════════════════════
   Aida · 星轨终端（AIDA COSMIC CONSOLE）
   ────────────────────────────────────────────────────────────────────────
   第 12 款皮肤：客户端自有 IP「Aida」专属主题。
   与旧皮肤的区别：旧款只换配色令牌；本款带完整主视觉层——
   星云底图、霓虹终端窗、猫耳光标、四芒星、像素方块、键帽阶梯、
   IP 立绘拍立得、首页主题 Hero，全部矢量/原图高清素材，无emoji无字形图标。

   加载顺序：置于 skin-texture-core.css / skin-silk.css 之后。
   质感内核通过 --silk-* 变量管辖卡片层，本文件只需覆写这套变量即可
   让全站 200+ 组件统一获得 Aida 的星云卡面与霓虹描边。
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. 令牌层 ───────────────────────────────────────────────────────── */
html[data-theme="aida"] {
  color-scheme: dark;

  --bg: #080d22;
  --bg-deep: #050818;
  --card: #101a3c;
  --modal-scrim: rgba(4, 7, 22, 0.90);

  --text: #eaf2ff;
  --text-secondary: #aebfe4;
  --sub: #8296c4;
  --line: rgba(126, 170, 255, 0.15);
  --line-strong: rgba(126, 190, 255, 0.28);

  --primary: #5ce1ff;
  --primary-light: #9cf0ff;
  --primary-deep: #3aa8ff;
  --primary-glow: rgba(92, 225, 255, 0.34);
  --primary-gradient: linear-gradient(118deg, #4de2ff 0%, #8b8bff 52%, #c77bff 100%);
  --primary-gradient-hover: linear-gradient(118deg, #7cecff 0%, #a29bff 52%, #dc95ff 100%);
  --primary-gradient-soft: linear-gradient(118deg, rgba(77, 226, 255, 0.14), rgba(167, 107, 255, 0.10));
  --on-primary: #07112c;

  --danger: #ff7d9e;
  --danger-glow: rgba(255, 125, 158, 0.24);
  --warning: #ffd073;
  --warning-glow: rgba(255, 208, 115, 0.20);
  --info: #8b8bff;
  --info-glow: rgba(139, 139, 255, 0.22);

  --glass-bg: rgba(14, 22, 54, 0.90);
  --glass-border: rgba(110, 170, 255, 0.20);
  --glass-blur: none;
  --glass-shadow: 0 8px 30px rgba(2, 6, 24, 0.55), 0 0 0 1px rgba(92, 225, 255, 0.07);
  --glass-shadow-lg: 0 18px 58px rgba(2, 6, 24, 0.62), 0 0 0 1px rgba(140, 130, 255, 0.12);

  --shadow-xs: 0 1px 3px rgba(2, 6, 24, 0.45);
  --shadow-sm: 0 3px 10px rgba(2, 6, 24, 0.45);
  --shadow-md: 0 8px 24px rgba(2, 6, 24, 0.52);
  --shadow-lg: 0 16px 44px rgba(2, 6, 24, 0.60);
  --shadow-xl: 0 28px 76px rgba(2, 6, 24, 0.66);
  --shadow-glow-primary: 0 0 26px rgba(92, 225, 255, 0.26), 0 6px 20px rgba(139, 107, 255, 0.20);

  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* 质感内核契约：让全站卡片吃 Aida 的星云卡面 + 霓虹描边 */
  --silk-line: color-mix(in srgb, #5ce1ff 22%, rgba(255, 255, 255, 0.06));
  --silk-line-strong: color-mix(in srgb, #a67bff 38%, rgba(255, 255, 255, 0.11));
  --silk-toplight: rgba(190, 226, 255, 0.13);
  --silk-inner: rgba(140, 190, 255, 0.045);
  --silk-floor: color-mix(in srgb, #10193c 88%, transparent);
  --silk-soft-shadow:
    0 0 0 1px rgba(92, 225, 255, 0.13),
    0 0 24px rgba(92, 225, 255, 0.07),
    0 10px 28px rgba(2, 6, 24, 0.48);
  --silk-soft-shadow-hover:
    0 0 0 1px rgba(140, 130, 255, 0.32),
    0 0 32px rgba(120, 170, 255, 0.14),
    0 14px 34px rgba(2, 6, 24, 0.56);
  --silk-row-shadow: 0 4px 16px rgba(2, 6, 24, 0.38);
  --silk-row-shadow-hover: 0 8px 24px rgba(2, 6, 24, 0.48);
  --silk-panel-art:
    radial-gradient(ellipse 92% 76% at 0% 0%, rgba(77, 226, 255, 0.11) 0%, transparent 60%),
    radial-gradient(ellipse 86% 78% at 100% 100%, rgba(167, 107, 255, 0.12) 0%, transparent 64%),
    radial-gradient(circle at 88% 12%, rgba(230, 250, 255, 0.055) 0 1px, transparent 2px);
  --silk-panel-art-size: auto, auto, 68px 68px;
  --silk-panel-art-pos: 0 0, 0 0, 0 0;
  --silk-panel-art-repeat: no-repeat, no-repeat, repeat;
}

/* ── 2. 全屏主视觉层 ─────────────────────────────────────────────────── */
html[data-theme="aida"] body {
  background-color: #070b1e;
  background-image:
    linear-gradient(105deg, rgba(6, 10, 28, 0.82) 0%, rgba(6, 10, 28, 0.48) 46%, rgba(6, 10, 28, 0.12) 100%),
    url("./assets/skins/aida/aida-nebula.svg");
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll;
}

/* 扫描线 / 星尘：内容之下、背景之上 */
html[data-theme="aida"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(120, 200, 255, 0.012) 3px 4px),
    radial-gradient(ellipse 60% 50% at 18% 8%, rgba(77, 226, 255, 0.055), transparent 70%);
}

/* 右下角 IP 立绘：羽化融入星云，不抢内容 */
html[data-theme="aida"] body::after {
  content: "";
  position: fixed;
  right: -3vw;
  bottom: -8vh;
  width: min(52vw, 700px);
  height: min(52vw, 700px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.20;
  mix-blend-mode: screen;
  background: url("./assets/skins/aida/aida-cosmos.png") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at 64% 58%, #000 18%, transparent 72%);
  mask-image: radial-gradient(ellipse at 64% 58%, #000 18%, transparent 72%);
}

html[data-theme="aida"] .layout { position: relative; z-index: 1; }

/* ── 3. 标题栏 / 侧栏 / 菜单 ────────────────────────────────────────── */
html[data-theme="aida"] .app-titlebar {
  background: linear-gradient(90deg, #0b1234 0%, #14123e 52%, #1a1242 100%);
  border-bottom: 1px solid rgba(92, 225, 255, 0.22);
  box-shadow: 0 2px 18px rgba(77, 226, 255, 0.08);
}
html[data-theme="aida"] .app-titlebar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 225, 255, 0.75), rgba(199, 123, 255, 0.65), transparent);
  pointer-events: none;
}
html[data-theme="aida"] .titlebar-title {
  color: #dff2ff;
  letter-spacing: 0.02em;
}
html[data-theme="aida"] .titlebar-brand::before {
  content: "";
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 7px;
  vertical-align: -4px;
  background: url("./assets/skins/aida/aida-mark.svg") center / contain no-repeat;
}

html[data-theme="aida"] .sidebar {
  background:
    radial-gradient(ellipse 120% 40% at 0% 0%, rgba(77, 226, 255, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(10, 16, 42, 0.97) 0%, rgba(8, 11, 32, 0.96) 62%, rgba(14, 10, 38, 0.97) 100%);
  border-right: 1px solid rgba(92, 225, 255, 0.16);
  box-shadow: inset -1px 0 0 rgba(167, 107, 255, 0.10), 8px 0 32px rgba(2, 6, 24, 0.32);
}
html[data-theme="aida"] .sidebar::after {
  background: linear-gradient(180deg, rgba(77, 226, 255, 0.40), transparent 26%, transparent 72%, rgba(199, 123, 255, 0.30));
}
html[data-theme="aida"] .brand {
  color: #eaf6ff;
  background: linear-gradient(100deg, #7ceaff 0%, #a9a0ff 55%, #e0a0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="aida"] .menu-item {
  color: #a9bce4;
  border: 1px solid transparent;
  border-radius: 12px;
}
html[data-theme="aida"] .menu-item:hover {
  color: #dff6ff;
  background: rgba(92, 225, 255, 0.08);
  border-color: rgba(92, 225, 255, 0.16);
}
html[data-theme="aida"] .menu-item.active {
  color: #06122c;
  background: linear-gradient(100deg, #6ce8ff 0%, #9d9cff 56%, #cf92ff 100%);
  border-color: rgba(224, 245, 255, 0.55);
  box-shadow: 0 4px 18px rgba(92, 225, 255, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
html[data-theme="aida"] .menu-item.active::before {
  display: none;
}
html[data-theme="aida"] .menu-item.active .menu-icon,
html[data-theme="aida"] .menu-item.active .community-menu-icon,
html[data-theme="aida"] .menu-item.active .community-menu-label { color: #06122c; }
html[data-theme="aida"] .skin-switcher-btn { color: #aebfe4; }
html[data-theme="aida"] .skin-switcher-btn:hover {
  color: #8ff0ff;
  background: rgba(92, 225, 255, 0.10);
}

/* ── 4. 卡片 / 面板：英雄卡同族塞博质感 ───────────────────────────────
   配方：深空玻璃底 + 细扫描线 + 四角 HUD 刻度 + 青→紫发光描线（底缘）
   + 双层霓虹阴影。分层：主力卡全配；次级件收敛只留描线与微光。 */
html[data-theme="aida"] .card,
html[data-theme="aida"] .settings-box,
html[data-theme="aida"] .settings-panel,
html[data-theme="aida"] .account-card,
html[data-theme="aida"] .dashboard-top-card,
html[data-theme="aida"] .dashboard-hot-card,
html[data-theme="aida"] .workspace-summary-card,
html[data-theme="aida"] .modal-box,
html[data-theme="aida"] .wizard-panel,
html[data-theme="aida"] .news-card,
html[data-theme="aida"] .news-control-panel,
html[data-theme="aida"] .apps-card,
html[data-theme="aida"] .shop-flow-card,
html[data-theme="aida"] .codx-add-panel,
html[data-theme="aida"] .trae-proxy-right-panel,
html[data-theme="aida"] .upsell-trust-item,
html[data-theme="aida"] .tools-catalog-item,
html[data-theme="aida"] .privacy-ledger-item,
html[data-theme="aida"] .cmc-item {
  border-radius: 18px;
  border: 1px solid rgba(126, 170, 255, 0.18);
  background:
    /* 底缘青→紫发光描线（英雄卡同款） */
    linear-gradient(90deg, transparent, rgba(92, 225, 255, 0) 0%, rgba(92, 225, 255, 0.55) 24%, rgba(169, 139, 255, 0.55) 60%, rgba(169, 139, 255, 0) 100%) left bottom / 100% 2px no-repeat,
    /* 四角 HUD 刻度（短横线） */
    linear-gradient(90deg, rgba(150, 235, 255, 0.85), rgba(150, 235, 255, 0)) left 11px top 11px / 15px 1.5px no-repeat,
    linear-gradient(90deg, rgba(150, 235, 255, 0) , rgba(150, 235, 255, 0.85)) right 11px top 11px / 15px 1.5px no-repeat,
    linear-gradient(90deg, rgba(150, 235, 255, 0.85), rgba(150, 235, 255, 0)) left 11px bottom 11px / 15px 1.5px no-repeat,
    linear-gradient(90deg, rgba(150, 235, 255, 0), rgba(150, 235, 255, 0.85)) right 11px bottom 11px / 15px 1.5px no-repeat,
    /* 右上青晕 / 左下紫晕 */
    radial-gradient(120% 90% at 100% 0%, rgba(122, 140, 255, 0.13), transparent 56%),
    radial-gradient(100% 80% at 0% 100%, rgba(92, 225, 255, 0.05), transparent 58%),
    /* 扫描线纹理 */
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(150, 210, 255, 0.012) 3px 4px),
    /* 主玻璃面 */
    linear-gradient(165deg, rgba(22, 32, 72, 0.62), rgba(10, 16, 44, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(200, 235, 255, 0.13),
    0 10px 30px rgba(2, 6, 24, 0.40),
    0 0 18px rgba(92, 225, 255, 0.05);
}
/* 主力内容卡 hover：光晕胀开 + 轻微抬升 */
html[data-theme="aida"] .card:hover,
html[data-theme="aida"] .news-card:hover,
html[data-theme="aida"] .apps-card:hover,
html[data-theme="aida"] .account-card:hover,
html[data-theme="aida"] .dashboard-top-card:hover,
html[data-theme="aida"] .dashboard-hot-card:hover,
html[data-theme="aida"] .workspace-summary-card:hover,
html[data-theme="aida"] .shop-flow-card:hover {
  border-color: rgba(140, 150, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(200, 235, 255, 0.17),
    0 16px 40px rgba(2, 6, 24, 0.5),
    0 0 30px rgba(92, 225, 255, 0.14),
    0 0 18px rgba(169, 139, 255, 0.08);
}
/* 次级小件：同底色收敛版——无刻度、描线更淡 */
html[data-theme="aida"] .chip,
html[data-theme="aida"] .stat-item,
html[data-theme="aida"] .settings-value,
html[data-theme="aida"] .privacy-ledger-item,
html[data-theme="aida"] .cmc-item,
html[data-theme="aida"] .tools-catalog-item {
  background:
    linear-gradient(90deg, transparent, rgba(92, 225, 255, 0) 0%, rgba(92, 225, 255, 0.30) 25%, rgba(169, 139, 255, 0.30) 60%, rgba(169, 139, 255, 0) 100%) left bottom / 100% 1.5px no-repeat,
    linear-gradient(165deg, rgba(20, 30, 66, 0.55), rgba(10, 16, 44, 0.70));
  border-color: rgba(126, 170, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(200, 235, 255, 0.09), 0 6px 18px rgba(2, 6, 24, 0.30);
}
html[data-theme="aida"] .quota-box,
html[data-theme="aida"] .chip,
html[data-theme="aida"] .stat-item,
html[data-theme="aida"] .settings-value,
html[data-theme="aida"] pre {
  background: rgba(10, 18, 46, 0.62);
  border: 1px solid rgba(126, 170, 255, 0.14);
  color: #dceaff;
}
html[data-theme="aida"] .quota-track,
html[data-theme="aida"] .progress-track {
  background: rgba(8, 14, 38, 0.86);
}
html[data-theme="aida"] .quota-track > div,
html[data-theme="aida"] .progress-bar > div {
  background: var(--primary-gradient);
  box-shadow: 0 0 14px rgba(92, 225, 255, 0.45);
}

/* ── 4b. 每页定制：总览英雄卡已迁小助手（此处删除）；情报头卡升英雄卡 ── */
html[data-theme="aida"] .page[data-page="dashboard"] > .aida-hero { display: none; }

/* 情报页头卡：平头卡 → 英雄卡同款（星夜底图 + 右上 Aida 夜景 + 底缘发光描线） */
html[data-theme="aida"] .news-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(126, 170, 255, 0.20);
  background:
    linear-gradient(90deg, rgba(8, 13, 38, 0.97) 0%, rgba(10, 15, 44, 0.92) 42%, rgba(12, 16, 46, 0.55) 70%, rgba(12, 16, 46, 0.14) 100%),
    url("./assets/skins/aida/aida-night.png") right -36px center / auto 190% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
  box-shadow: 0 14px 38px rgba(2, 6, 24, 0.45), inset 0 1px 0 rgba(200, 235, 255, 0.14);
}
html[data-theme="aida"] .news-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5ce1ff 24%, #a98bff 64%, transparent);
  opacity: 0.72;
  pointer-events: none;
}
html[data-theme="aida"] .news-hero .news-hero-main,
html[data-theme="aida"] .news-hero .news-hero-aside { position: relative; z-index: 1; }
html[data-theme="aida"] .news-hero .news-logo-mark { color: #8ff0ff; }
html[data-theme="aida"] .news-workbench { padding-top: 4px; }
html[data-theme="aida"] .news-control-panel { margin-top: 10px; }
html[data-theme="aida"] .news-search,
html[data-theme="aida"] .news-tabs {
  border-color: rgba(126, 170, 255, 0.16);
  background: rgba(8, 14, 38, 0.55);
}
html[data-theme="aida"] .news-search:focus-within {
  border-color: rgba(92, 225, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.10);
}
html[data-theme="aida"] .news-tabs button { color: #9db4dd; }
html[data-theme="aida"] .news-tabs button.active {
  color: #f0faff;
  background: var(--primary-gradient);
  box-shadow: 0 6px 18px rgba(92, 225, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
html[data-theme="aida"] .news-category-tabs button.active {
  color: #8ff0ff;
  background: rgba(92, 225, 255, 0.10);
}
html[data-theme="aida"] .news-time::before {
  background: #5ce1ff;
  box-shadow: 0 0 0 4px rgba(92, 225, 255, 0.14), 0 0 12px rgba(92, 225, 255, 0.55);
}
html[data-theme="aida"] .news-time::after {
  background: linear-gradient(180deg, rgba(92, 225, 255, 0.28), rgba(148, 163, 184, 0.10));
}

/* ── 5. 按钮 / 输入 / 标签 ──────────────────────────────────────────── */
html[data-theme="aida"] .btn {
  background: rgba(18, 28, 64, 0.78);
  color: #c5d6f7;
  border-color: rgba(126, 170, 255, 0.20);
  border-radius: 11px;
}
html[data-theme="aida"] .btn:hover {
  color: #f0f8ff;
  background: rgba(28, 42, 88, 0.86);
  border-color: rgba(92, 225, 255, 0.42);
  box-shadow: 0 0 18px rgba(92, 225, 255, 0.13);
}
html[data-theme="aida"] .btn.primary,
html[data-theme="aida"] .account-fetch-primary {
  color: var(--on-primary);
  font-weight: 700;
  background: var(--primary-gradient);
  border-color: rgba(220, 245, 255, 0.50);
  box-shadow: 0 6px 22px rgba(92, 225, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
html[data-theme="aida"] .btn.primary:hover {
  background: var(--primary-gradient-hover);
  box-shadow: 0 8px 30px rgba(130, 160, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
html[data-theme="aida"] .btn.danger {
  color: #ffc2d2;
  background: rgba(255, 105, 145, 0.12);
  border-color: rgba(255, 125, 158, 0.34);
}
html[data-theme="aida"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="aida"] select,
html[data-theme="aida"] textarea {
  background: rgba(8, 14, 38, 0.72);
  color: #eaf2ff;
  border-color: rgba(126, 170, 255, 0.20);
  border-radius: 10px;
}
html[data-theme="aida"] input:focus,
html[data-theme="aida"] select:focus,
html[data-theme="aida"] textarea:focus {
  border-color: #5ce1ff;
  box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.16), 0 0 20px rgba(92, 225, 255, 0.12);
  outline: none;
}
html[data-theme="aida"] .switch input:checked + .switch-slider {
  background: var(--primary-gradient);
  box-shadow: 0 0 14px rgba(92, 225, 255, 0.42);
}
html[data-theme="aida"] ::-webkit-scrollbar-track { background: rgba(6, 10, 28, 0.40); }
html[data-theme="aida"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(92, 225, 255, 0.42), rgba(167, 107, 255, 0.42));
  border-radius: 999px;
  border: 2px solid rgba(8, 14, 38, 0.70);
}
html[data-theme="aida"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(92, 225, 255, 0.72), rgba(167, 107, 255, 0.72));
}

/* ── 6. 登录 / 授权页主视觉 ─────────────────────────────────────────── */
html[data-theme="aida"] .license-gate {
  background:
    linear-gradient(90deg, rgba(6, 10, 28, 0.97) 0%, rgba(6, 10, 28, 0.86) 34%, rgba(6, 10, 28, 0.28) 68%, rgba(6, 10, 28, 0.06) 100%),
    url("./assets/skins/aida/aida-night.png") right center / auto 116% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
}
html[data-theme="aida"] .license-card {
  background: rgba(12, 20, 50, 0.92);
  border: 1px solid rgba(92, 225, 255, 0.26);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(2, 6, 24, 0.72), 0 0 0 1px rgba(167, 107, 255, 0.12);
}
html[data-theme="aida"] .license-card::before {
  background: linear-gradient(90deg, transparent, #5ce1ff, #c77bff, transparent);
}

/* ── 7. 首页 Aida Hero ──────────────────────────────────────────────── */
.aida-hero { display: none; }

html[data-theme="aida"] .aida-hero {
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 268px;
  margin: 2px 0 20px;
  padding: 26px 30px;
  border: 1px solid rgba(126, 190, 255, 0.26);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(8, 13, 38, 0.97) 0%, rgba(10, 15, 44, 0.92) 34%, rgba(12, 16, 46, 0.52) 62%, rgba(12, 16, 46, 0.10) 100%),
    url("./assets/skins/aida/aida-night.png") right -40px center / auto 168% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
  box-shadow:
    0 18px 48px rgba(2, 6, 24, 0.52),
    inset 0 1px 0 rgba(200, 235, 255, 0.16),
    0 0 0 1px rgba(92, 225, 255, 0.06);
}
html[data-theme="aida"] .aida-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(150, 210, 255, 0.018) 3px 4px),
    radial-gradient(ellipse 46% 80% at 8% 10%, rgba(77, 226, 255, 0.14), transparent 70%);
}
html[data-theme="aida"] .aida-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5ce1ff 22%, #a98bff 62%, transparent);
  opacity: 0.72;
}

.aida-hero__inner { position: relative; z-index: 2; max-width: 62%; }
.aida-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(92, 225, 255, 0.34);
  border-radius: 999px;
  background: rgba(12, 24, 60, 0.72);
  color: #bfeaff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.aida-hero__eyebrow img { width: 20px; height: 20px; }
.aida-hero__eyebrow em {
  font-style: normal;
  letter-spacing: 0;
  padding: 2px 8px;
  border-radius: 999px;
  color: #07112c;
  background: linear-gradient(100deg, #7ceaff, #cf9bff);
}
.aida-hero__title {
  margin: 14px 0 6px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f2f9ff;
  text-shadow: 0 2px 24px rgba(92, 225, 255, 0.30);
}
.aida-hero__title b {
  background: linear-gradient(100deg, #7ceaff 0%, #a9a0ff 50%, #e0a0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.aida-hero__desc {
  margin: 0;
  color: #aebfe4;
  font-size: 13px;
  line-height: 1.7;
}
.aida-hero__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  max-width: 560px;
}
.aida-hero__card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid rgba(126, 190, 255, 0.24);
  border-radius: 14px;
  background: rgba(14, 23, 56, 0.72);
  color: #d8e8ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.aida-hero__card:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 225, 255, 0.58);
  box-shadow: 0 8px 24px rgba(92, 225, 255, 0.16);
}
.aida-hero__card img,
.aida-hero__card svg {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  padding: 4px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(92, 225, 255, 0.18), rgba(167, 107, 255, 0.18));
  border: 1px solid rgba(126, 190, 255, 0.24);
  stroke: #a9e9ff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 右侧浮层：终端窗 / 角色拍立得 / 四芒星 / 猫耳光标 */
.aida-hero__art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.aida-hero__terminal {
  position: absolute;
  right: 26%;
  top: 30px;
  width: 226px;
  filter: drop-shadow(0 14px 30px rgba(2, 6, 24, 0.66));
  animation: aidaFloat 6s ease-in-out infinite;
}
.aida-hero__polaroid {
  position: absolute;
  right: 22px;
  bottom: 12px;
  width: 126px;
  padding: 6px 6px 20px;
  border-radius: 10px;
  background: #f4f1ff;
  box-shadow: 0 12px 32px rgba(2, 6, 24, 0.62), 0 0 0 1px rgba(220, 235, 255, 0.45);
  transform: rotate(6deg);
}
.aida-hero__polaroid img { display: block; width: 100%; border-radius: 6px; }
.aida-hero__polaroid span {
  display: block;
  margin-top: 5px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #46347c;
}
.aida-hero__spark {
  position: absolute;
  width: 30px; height: 30px;
  filter: drop-shadow(0 0 10px rgba(140, 220, 255, 0.8));
  animation: aidaTwinkle 3.6s ease-in-out infinite;
}
.aida-hero__spark--a { right: 21%; top: 16px; }
.aida-hero__spark--b { right: 12%; bottom: 30px; width: 18px; height: 18px; animation-delay: 1.2s; }
.aida-hero__spark--c { left: 46%; top: 22px; width: 14px; height: 14px; animation-delay: 2.1s; }
.aida-hero__cursor {
  position: absolute;
  right: 16%;
  bottom: 22px;
  width: 30px; height: 30px;
  filter: drop-shadow(0 0 8px rgba(92, 225, 255, 0.7));
  animation: aidaFloat 5s ease-in-out infinite reverse;
}

@keyframes aidaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes aidaTwinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.86) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.06) rotate(22deg); }
}

@media (max-width: 1180px) {
  html[data-theme="aida"] .aida-hero__inner { max-width: 72%; }
  html[data-theme="aida"] .aida-hero__terminal { right: 18%; width: 180px; opacity: 0.9; }
  html[data-theme="aida"] .aida-hero__polaroid { width: 92px; }
}
@media (max-width: 900px) {
  html[data-theme="aida"] .aida-hero { min-height: 0; padding: 22px; }
  html[data-theme="aida"] .aida-hero__inner { max-width: 100%; }
  html[data-theme="aida"] .aida-hero__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme="aida"] .aida-hero__art { display: none; }
}

/* ── 8. 皮肤选择器里的 Aida 缩略图 ─────────────────────────────────── */
html[data-theme="aida"] .skin-picker-panel,
.skin-item.skin-aida .skin-preview {
  border-color: rgba(92, 225, 255, 0.36);
}
.skin-item.skin-aida .skin-preview {
  background:
    url("./assets/skins/aida/aida-portrait.png") center 22% / 190% no-repeat,
    linear-gradient(140deg, #12235a, #3a1d6e);
  box-shadow: 0 2px 12px rgba(92, 225, 255, 0.40), inset 0 0 0 1px rgba(220, 245, 255, 0.35);
}
.skin-item.skin-aida .skin-preview .sp-dot,
.skin-item.skin-aida .skin-preview .sp-accent { display: none; }
html[data-theme="aida"] .skin-item.active {
  border-color: #5ce1ff;
  background: rgba(92, 225, 255, 0.10);
  box-shadow: 0 4px 20px rgba(92, 225, 255, 0.26);
}
html[data-theme="aida"] .skin-item.active .skin-name { color: #8ff0ff; }

/* ── 9. 低功耗 / 无障碍：动效与发光降级 ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="aida"] .aida-hero__terminal,
  html[data-theme="aida"] .aida-hero__spark,
  html[data-theme="aida"] .aida-hero__cursor { animation: none; }
}
html[data-theme="aida"].low-power .aida-hero__terminal,
html[data-theme="aida"].low-power .aida-hero__spark,
html[data-theme="aida"].low-power .aida-hero__cursor,
body.low-power .aida-hero__terminal,
body.low-power .aida-hero__spark,
body.low-power .aida-hero__cursor { animation: none; }

/* ════════════════════════════════════════════════════════════════════════
   10. 小助手页（原议事殿）· Codex 式窗口布局
   ────────────────────────────────────────────────────────────────────────
   原则：一个既有 id / class / 按钮都不删，只叠主视觉层并重排容器。
   顶部主题横幅 + 品牌页签条 + 三栏卡片窗口 + 浮动输入条。
   聊起来后横幅自动收窄（:has 命中真实消息），把高度还给对话流。
   ════════════════════════════════════════════════════════════════════════ */
/* 坞结构全皮肤共用：小助手视图下页签+操作钮都会停靠进 ach-dock。
   非 aida 皮肤 hero 退化成透明行（ach-body 是 aida 品牌文案，别皮不显示）。 */
.aida-council-hero { display: block; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.aida-council-hero .ach-body { display: none; }
.ach-dock { display: flex; align-items: center; gap: 10px; padding: 10px 14px 0; }
.ach-dock:empty { display: none; }
.ach-dock .council-view-tabs { order: 0; flex: none; padding: 0; width: auto !important; margin-inline: 0 !important; }
.ach-dock .council-chat-head {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  border: 0; background: none; box-shadow: none; padding: 0;
}
.ach-dock .council-chat-titles { display: none; }
/* 拉帘折叠柄（全皮肤基座；aida 下有精修样式覆盖） */
.ach-fold {
  order: 9; flex: none; width: 24px; height: 24px; padding: 0; margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line, rgba(126, 190, 255, 0.22)); border-radius: 8px;
  background: var(--surface-soft, var(--card, transparent)); color: var(--text-muted, var(--sub, #9fd8ff));
  cursor: pointer; transition: transform .3s ease;
}
.ach-dock { max-height: 64px; overflow: hidden; transition: max-height .3s cubic-bezier(.16,1,.3,1), padding .3s ease; }
/* 拉帘柄是 hero 的直接子节点（坞条已挪卡底）：默认悬卡右上，折叠后居中 */
.ach-fold { position: absolute; top: 8px; right: 10px; z-index: 5; }
.council-page.aide-dock-collapsed .ach-dock { max-height: 28px; padding: 0 8px; }
.council-page.aide-dock-collapsed .ach-dock > * { display: none; }
.council-page.aide-dock-collapsed .ach-fold { left: 50%; right: auto; border-color: transparent; background: none; transform: translateX(-50%) rotate(180deg); }

html[data-theme="aida"] .page.council-page.active {
  gap: 10px;
  padding: 0 2px 6px;
}

/* ── 主题横幅 ── */
html[data-theme="aida"] .aida-council-hero {
  display: block;
  position: relative;
  isolation: isolate;
  flex: none;
  overflow: hidden;
  min-height: 156px;
  padding: 16px 22px;
  border: 1px solid rgba(126, 170, 255, 0.17);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(8, 13, 38, 0.97) 0%, rgba(10, 15, 44, 0.92) 38%, rgba(12, 16, 46, 0.46) 66%, rgba(12, 16, 46, 0.08) 100%),
    url("./assets/skins/aida/aida-night.png") right -30px center / auto 205% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
  box-shadow: 0 14px 38px rgba(2, 6, 24, 0.45), inset 0 1px 0 rgba(200, 235, 255, 0.14);
  transition: min-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
}
html[data-theme="aida"] .aida-council-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5ce1ff 24%, #a98bff 64%, transparent);
  opacity: 0.72;
}
/* 有真实消息时横幅自动收窄，把高度还给对话 */
html[data-theme="aida"] .council-page.has-cmsgs .aida-council-hero {
  min-height: 70px;
  padding: 10px 22px;
}

/* ── 品牌页签条 ── */
html[data-theme="aida"] .council-view-tabs {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(126, 190, 255, 0.20);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(11, 18, 52, 0.88), rgba(18, 16, 54, 0.86));
  box-shadow: inset 0 1px 0 rgba(200, 235, 255, 0.08);
}
html[data-theme="aida"] .council-view-tabs::after {
  content: "AIDA / COSMIC CONSOLE";
  margin-left: auto;
  padding-right: 6px;
  color: rgba(146, 178, 235, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
html[data-theme="aida"] .council-view-tabs .api-hub-view-tab {
  border-radius: 11px;
  border: 1px solid transparent;
  color: #aebfe4;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="aida"] .council-view-tabs .api-hub-view-tab:hover {
  color: #dff6ff;
  background: rgba(92, 225, 255, 0.08);
}
html[data-theme="aida"] .council-view-tabs .api-hub-view-tab.active {
  color: #07112c;
  background: var(--primary-gradient);
  border-color: rgba(220, 245, 255, 0.48);
  box-shadow: 0 4px 16px rgba(92, 225, 255, 0.26);
}

/* ── 三栏窗口：卡片化 ── */
html[data-theme="aida"] .council-workspace { gap: 10px; }
html[data-theme="aida"] .council-panel {
  border: 1px solid rgba(126, 190, 255, 0.20);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 90% 60% at 0% 0%, rgba(77, 226, 255, 0.07), transparent 62%),
    linear-gradient(160deg, rgba(13, 21, 52, 0.86), rgba(11, 15, 42, 0.88));
  box-shadow: 0 10px 30px rgba(2, 6, 24, 0.38), inset 0 1px 0 rgba(200, 235, 255, 0.08);
  overflow: hidden;
}
html[data-theme="aida"] .council-main { display: flex; flex-direction: column; min-height: 0; }
html[data-theme="aida"] .council-chat-head {
  flex: none;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(92, 225, 255, 0.18);
  background: linear-gradient(90deg, rgba(12, 20, 54, 0.94), rgba(20, 16, 56, 0.90));
  box-shadow: 0 2px 12px rgba(2, 6, 24, 0.28);
}
html[data-theme="aida"] .council-chat-title {
  color: #eaf6ff;
  font-weight: 700;
  letter-spacing: 0.01em;
}
html[data-theme="aida"] .council-chat-actions .btn {
  border-radius: 10px;
  border-color: rgba(126, 190, 255, 0.22);
  background: rgba(18, 28, 64, 0.72);
  color: #bfd4f8;
}
html[data-theme="aida"] .council-chat-actions .btn:hover,
html[data-theme="aida"] #councilFocus.on {
  color: #8ff0ff;
  border-color: rgba(92, 225, 255, 0.48);
  background: rgba(92, 225, 255, 0.10);
}
html[data-theme="aida"] .council-messages {
  padding: 16px 18px 10px;
  background-image: radial-gradient(circle at 92% 8%, rgba(140, 220, 255, 0.05), transparent 34%);
}
html[data-theme="aida"] .council-composer {
  flex: none;
  margin: 0 12px 12px;
  padding: 10px 12px 9px;
  border: 1px solid rgba(126, 190, 255, 0.24);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(14, 23, 56, 0.94), rgba(12, 18, 46, 0.94));
  box-shadow: 0 8px 26px rgba(2, 6, 24, 0.42), inset 0 1px 0 rgba(200, 235, 255, 0.10);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="aida"] .council-composer:focus-within {
  border-color: rgba(92, 225, 255, 0.58);
  box-shadow: 0 8px 30px rgba(92, 225, 255, 0.16), inset 0 1px 0 rgba(200, 235, 255, 0.14);
}
html[data-theme="aida"] .council-composer textarea {
  background: transparent;
  border: 0;
  color: #eaf2ff;
  box-shadow: none;
}
html[data-theme="aida"] .council-composer textarea:focus { box-shadow: none; border: 0; }
html[data-theme="aida"] .council-side-tabs { border-bottom-color: rgba(126, 190, 255, 0.16); }
html[data-theme="aida"] .council-side-tab.active {
  color: #8ff0ff;
  border-bottom-color: #5ce1ff;
}
html[data-theme="aida"] .council-rail-head h3 {
  color: #9fb6e6;
  letter-spacing: 0.04em;
}

/* ── 小助手单栏视图：横幅更沉浸，消息限宽 ── */
html[data-theme="aida"] .council-page.is-aide-view .council-messages { padding-inline: 24px; }

@media (max-width: 900px) {
  html[data-theme="aida"] .aida-council-hero { min-height: 0; padding: 14px 18px; }
  html[data-theme="aida"] .council-view-tabs::after { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   11. Aida 桌宠球（桌面悬浮球 / 浮窗内球 / 页内浮泡共用）
   ────────────────────────────────────────────────────────────────────────
   素材：2048² IP 原图 → Pillow 裁头 + 去白底 + 圆形羽化 → 256² 透明贴纸。
   两态：空闲 = 白底立绘头像 + 青色呼吸环；工作 = 夜色终端头像 +
   紫色旋转环 + 原有三点动画 + 桌宠轻晃。成员珠/群珠（m-orb/g-orb）不参与，
   换珠功能保持原样。不改任何既有 DOM 与状态类名。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb) {
  position: relative;
  border: 2px solid rgba(150, 220, 255, 0.62);
  background: linear-gradient(160deg, #101a42, #1c1450);
  box-shadow:
    0 0 0 3px rgba(92, 225, 255, 0.16),
    0 8px 22px rgba(2, 6, 24, 0.58),
    inset 0 1px 0 rgba(220, 245, 255, 0.24);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease;
}
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb)::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 5;
  border-radius: 50%;
  background:
    url("./assets/skins/aida/aida-pet-idle.png") center / cover no-repeat,
    radial-gradient(circle at 30% 20%, rgba(92, 225, 255, 0.28), transparent 62%);
  pointer-events: none;
}
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb) > i { opacity: 0.22; }
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb) .orb-glyph,
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb) .orb-face {
  opacity: 0 !important;
}
html[data-theme="aida"] .aide-orb:not(.m-orb):not(.g-orb):hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 0 0 4px rgba(92, 225, 255, 0.30),
    0 10px 28px rgba(92, 225, 255, 0.26),
    inset 0 1px 0 rgba(220, 245, 255, 0.32);
}

/* 桌面悬浮球：窗口 76×80，球体放大到 62px 仍留得下光环与三点气泡 */
html[data-theme="aida"] #ball {
  width: 62px;
  height: 62px;
  animation: aidaPetIdle 3.6s ease-in-out infinite;
}
@keyframes aidaPetIdle {
  0%, 100% { box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.16), 0 8px 22px rgba(2, 6, 24, 0.58), inset 0 1px 0 rgba(220, 245, 255, 0.24); }
  50% { box-shadow: 0 0 0 4px rgba(92, 225, 255, 0.30), 0 8px 26px rgba(92, 225, 255, 0.22), inset 0 1px 0 rgba(220, 245, 255, 0.32); }
}

/* 工作中：换夜色头像 + 紫环 + 轻晃，三点仍是原 #think / .af-think */
html[data-theme="aida"] body.busy #ball::before,
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb)::before {
  background:
    url("./assets/skins/aida/aida-pet-busy.png") center / cover no-repeat,
    radial-gradient(circle at 30% 20%, rgba(167, 107, 255, 0.30), transparent 62%);
}
html[data-theme="aida"] body.busy #ball {
  animation: aidaPetWork 1.6s ease-in-out infinite;
  border-color: rgba(199, 145, 255, 0.86);
  box-shadow:
    0 0 0 3px rgba(167, 107, 255, 0.52),
    0 0 24px rgba(167, 107, 255, 0.42),
    0 8px 22px rgba(2, 6, 24, 0.58);
}
@keyframes aidaPetWork {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb) {
  border-color: rgba(199, 145, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(167, 107, 255, 0.48), 0 0 20px rgba(167, 107, 255, 0.36);
}

/* 三点气泡：霓虹胶囊，动画沿用 council-dot-bounce（契约不动） */
html[data-theme="aida"] #think,
html[data-theme="aida"] .af-think {
  z-index: 8;
  border-color: rgba(167, 107, 255, 0.52);
  background: linear-gradient(100deg, rgba(18, 28, 70, 0.96), rgba(30, 20, 72, 0.96));
  box-shadow: 0 4px 16px rgba(2, 6, 24, 0.52), 0 0 14px rgba(167, 107, 255, 0.26);
}
html[data-theme="aida"] #think i,
html[data-theme="aida"] .af-think i {
  background: #8ff0ff;
  box-shadow: 0 0 7px rgba(92, 225, 255, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="aida"] #ball,
  html[data-theme="aida"] body.busy #ball { animation: none; }
}
html[data-theme="aida"].low-power #ball,
html[data-theme="aida"].low-power body.busy #ball,
body.low-power #ball { animation: none; }

/* ════════════════════════════════════════════════════════════════════════
   12. 悬浮小助手面板：Aida 星云 + IP 人物背景
   ────────────────────────────────────────────────────────────────────────
   面板 DOM 由 aide-float.js 动态生成，这里只叠视觉层，不动结构。
   人物放在 ::before 里并压暗，保证消息与输入条可读。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] .aide-float-panel {
  /* 不许改 position：基座靠 fixed+inset 定高，改 relative 面板失高被内容撑长——
     悬浮窗输入条被挤出窗底的实证（is-window 变体同伤） */
  isolation: isolate;
  border: 1px solid rgba(126, 190, 255, 0.30);
  background: linear-gradient(165deg, rgba(11, 18, 48, 0.98), rgba(14, 12, 42, 0.98));
  box-shadow: 0 22px 60px rgba(2, 6, 24, 0.68), 0 0 0 1px rgba(92, 225, 255, 0.10);
}
html[data-theme="aida"] .aide-float-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.30;
  background:
    url("./assets/skins/aida/aida-pet-wave.png") right 4px bottom 2px / auto 48% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
}
html[data-theme="aida"] .aide-float-panel .af-head {
  border-bottom-color: rgba(92, 225, 255, 0.20);
  background: linear-gradient(90deg, rgba(12, 20, 54, 0.96), rgba(22, 16, 58, 0.94));
}
html[data-theme="aida"] .aide-float-panel .af-head::before {
  content: "";
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 6px;
  vertical-align: -4px;
  background: url("./assets/skins/aida/aida-mark.svg") center / contain no-repeat;
}
html[data-theme="aida"] .aide-float-panel .af-tab.active,
html[data-theme="aida"] .aide-float-panel .af-tabs button.on {
  color: #8ff0ff;
  border-bottom-color: #5ce1ff;
}
html[data-theme="aida"] .aide-float-panel .af-composer {
  border-color: rgba(126, 190, 255, 0.26);
  background: rgba(12, 20, 50, 0.92);
  border-radius: 16px;
}

/* ════════════════════════════════════════════════════════════════════════
   13. 桌宠化（客户令：不是球，是完整 Q 版小人）
   ────────────────────────────────────────────────────────────────────────
   覆盖第 11 节的圆形球壳：容器全透明、无圆角无边框，人物立绘本身即轮廓。
   素材 = 2048² 原图 → 连通域去白底 / 椭圆羽化 → 透明 PNG。
   空闲 = 站姿小人；工作 = 坐姿终端场景 + 三点气泡 + 紫色脚下光。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] #ball,
html[data-theme="aida"] .aide-float-bubble {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}
html[data-theme="aida"] #ball { width: min(96%, 128px); height: min(94%, 150px); }
html[data-theme="aida"] .aide-float-bubble { width: 68px; height: 82px; }
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb) {
  width: 68px; height: 82px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}
html[data-theme="aida"] #ball > i,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb) > i { opacity: 0 !important; }

/* 人物立绘：::before 承载。三态均为 API 生成的透明底 PNG，不是矩形图片。 */
html[data-theme="aida"] #ball::before,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb)::before {
  content: "" !important;
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 0 !important;
  background: url("./assets/skins/aida/aida-pet-idle.png") center bottom / contain no-repeat !important;
  filter: drop-shadow(0 6px 14px rgba(2, 6, 24, 0.62));
  animation: aidaPetFloat 3.6s ease-in-out infinite;
  pointer-events: none;
}
/* 工作中：坐姿敲键盘 + 三点气泡 */
html[data-theme="aida"] body.busy #ball::before,
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb)::before {
  background: url("./assets/skins/aida/aida-pet-busy.png") center bottom / contain no-repeat !important;
  filter: drop-shadow(0 6px 16px rgba(120, 80, 220, 0.55));
  animation: aidaPetWorkFloat 1.6s ease-in-out infinite;
}
/* 空闲时鼠标靠近：挥手表情包 */
html[data-theme="aida"] body:not(.busy) #ball:hover::before,
html[data-theme="aida"] .aide-float-bubble:not(.af-busy) .aide-orb:not(.m-orb):not(.g-orb):hover::before {
  background: url("./assets/skins/aida/aida-pet-wave.png") center bottom / contain no-repeat !important;
}

/* 脚下光晕：桌宠"站"在桌面上的落点 */
html[data-theme="aida"] #ball::after,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb)::after {
  content: "" !important;
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  z-index: 1;
  width: 74%; height: 13px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(92, 225, 255, 0.38), transparent 70%) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  pointer-events: none;
}
html[data-theme="aida"] body.busy #ball::after,
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb)::after {
  background: radial-gradient(ellipse, rgba(167, 107, 255, 0.56), transparent 70%) !important;
}

html[data-theme="aida"] #ball:hover,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb):hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: none !important;
}
html[data-theme="aida"] #think { top: -1px; }

@keyframes aidaPetFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes aidaPetWorkFloat {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-3px) rotate(1.2deg); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="aida"] #ball::before,
  html[data-theme="aida"] .aide-float-bubble .aide-orb::before { animation: none; }
}
html[data-theme="aida"].low-power #ball::before,
body.low-power #ball::before,
html[data-theme="aida"].low-power .aide-float-bubble .aide-orb::before,
body.low-power .aide-float-bubble .aide-orb::before { animation: none; }

/* ════════════════════════════════════════════════════════════════════════
   14. 桌宠立体感：多层光影 + 环境光环 + 地面投影 + 循环动画
   ────────────────────────────────────────────────────────────────────────
   素材仍是 2D 透明 PNG（不卡、不占内存），立体感全靠分层光影：
   轮廓高光 / 双侧边缘光 / 体积阴影 / 背后光环 / 接地投影 / 透视摆动。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] #ball,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb) {
  isolation: isolate;
}

/* 人物本体：3D 手办素材自带体积光/AO，这里只补一层体积阴影 + 一层边缘辉光。
   滤镜链保持两层——多层 drop-shadow 叠 3D transform 会让 WebView 整层不绘制。 */
html[data-theme="aida"] #ball::before,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb)::before {
  filter:
    drop-shadow(0 12px 14px rgba(2, 6, 24, 0.70))
    drop-shadow(0 0 12px rgba(92, 225, 255, 0.34)) !important;
  animation: aidaPet3D 4.2s ease-in-out infinite !important;
}
html[data-theme="aida"] body.busy #ball::before,
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb)::before {
  filter:
    drop-shadow(0 12px 14px rgba(2, 6, 24, 0.70))
    drop-shadow(0 0 14px rgba(167, 107, 255, 0.48)) !important;
  animation: aidaPet3DWork 1.5s ease-in-out infinite !important;
}
/* 2D 变换做视差：轻微缩放 + 摆动，配合渐变光环/接地投影形成层次 */
@keyframes aidaPet3D {
  0%, 100% { transform: translateY(0) rotateZ(-0.8deg) scale(1); }
  50% { transform: translateY(-7px) rotateZ(0.8deg) scale(1.025); }
}
@keyframes aidaPet3DWork {
  0%, 100% { transform: translateY(0) rotateZ(-0.6deg) scale(1); }
  50% { transform: translateY(-2px) rotateZ(0.6deg) scale(1.012); }
}

/* 背后环境光环：借用已有的 <i> 空元素，不新增 DOM */
html[data-theme="aida"] #ball > i,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb) > i {
  opacity: 1 !important;
  position: absolute; left: 50%; top: 44%;
  width: 112%; height: 82%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(92, 225, 255, 0.30), rgba(139, 107, 255, 0.14) 52%, transparent 72%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
  animation: aidaHalo 4.2s ease-in-out infinite !important;
}
@keyframes aidaHalo {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

/* 接地投影：随人物浮动同步收缩，脚不再"飘" */
html[data-theme="aida"] #ball::after,
html[data-theme="aida"] .aide-float-bubble .aide-orb:not(.m-orb):not(.g-orb)::after {
  width: 82%; height: 16px; bottom: 0;
  background: radial-gradient(ellipse, rgba(2, 6, 24, 0.74) 0%, rgba(92, 225, 255, 0.30) 42%, transparent 72%) !important;
  filter: blur(3px);
  animation: aidaGround 4.2s ease-in-out infinite !important;
}
html[data-theme="aida"] body.busy #ball::after,
html[data-theme="aida"] .aide-float-bubble.af-busy .aide-orb:not(.m-orb):not(.g-orb)::after {
  background: radial-gradient(ellipse, rgba(2, 6, 24, 0.74) 0%, rgba(167, 107, 255, 0.42) 44%, transparent 72%) !important;
}
@keyframes aidaGround {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scaleX(0.92); }
  50% { opacity: 0.58; transform: translateX(-50%) scaleX(1.05); }
}

/* 两颗漂浮光点：复用 .orb-glyph / .orb-face，文字用 font-size:0 隐去 */
html[data-theme="aida"] #ball .orb-glyph,
html[data-theme="aida"] #ball .orb-face {
  opacity: 1 !important;
  position: absolute; z-index: 6;
  font-size: 0 !important;
  width: 7px; height: 7px; border-radius: 2px;
  background: #e6faff;
  box-shadow: 0 0 10px rgba(92, 225, 255, 0.95);
  pointer-events: none;
}
html[data-theme="aida"] #ball .orb-glyph { left: 3%; top: 30%; animation: aidaSpark 3.4s ease-in-out infinite; }
html[data-theme="aida"] #ball .orb-face { right: 3%; top: 54%; width: 5px; height: 5px; animation: aidaSpark 3.4s ease-in-out infinite 1.2s; }
@keyframes aidaSpark {
  0%, 100% { opacity: 0.2; transform: translateY(4px) rotate(45deg) scale(0.7); }
  50% { opacity: 1; transform: translateY(-7px) rotate(135deg) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="aida"] #ball::before,
  html[data-theme="aida"] #ball > i,
  html[data-theme="aida"] #ball::after,
  html[data-theme="aida"] #ball .orb-glyph,
  html[data-theme="aida"] #ball .orb-face { animation: none !important; }
}
html[data-theme="aida"].low-power #ball::before,
body.low-power #ball::before,
html[data-theme="aida"].low-power #ball > i,
body.low-power #ball > i { animation: none !important; }

/* ════════════════════════════════════════════════════════════════════════
   15. 小助手页 · GPT / Codex 式布局重排
   ────────────────────────────────────────────────────────────────────────
   客户令：Hero 与聊天窗口必须是两张独立卡片；顶栏并进页签与操作按钮；
   消息是无框文本流（不要气泡框）；输入条在聊天窗口内部贴底；
   欢迎版 / 聊天版按有无真实消息自动切换。全部既有 id 与按钮保留。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] .page.council-page.active { gap: 12px; padding: 0 4px 10px; }

/* ① 品牌顶栏：徽标 + 名称 + 右侧视图页签 */
html[data-theme="aida"] .council-view-tabs {
  order: 1;
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(126, 190, 255, 0.22);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(12, 20, 56, 0.96), rgba(20, 15, 54, 0.94));
  box-shadow: 0 10px 28px rgba(2, 6, 24, 0.40), inset 0 1px 0 rgba(200, 235, 255, 0.12);
}
html[data-theme="aida"] .council-view-tabs::before {
  content: "";
  width: 26px; height: 26px; flex: none;
  background: url("./assets/skins/aida/aida-mark.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(92, 225, 255, 0.55));
}
html[data-theme="aida"] .council-view-tabs::after {
  content: "Aida · 小助手";
  margin-left: 0; padding-right: 0;
  color: #dff2ff; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
}
html[data-theme="aida"] .council-view-tabs .api-hub-view-tabs {
  margin-left: auto;
  display: flex; gap: 6px;
}

/* ② 一体化指挥卡：Hero = 顶部坞(视图页签+操作钮) + 展示体(文案+立绘)。
   页签/聊天头由 JS 在小助手视图下停进 .ach-dock，换视图/换肤再搬回去 */
html[data-theme="aida"] .aida-council-hero {
  order: 0;
  flex: none;
  display: flex; flex-direction: column;
  min-height: 214px;
  padding: 0;
  background:
    radial-gradient(ellipse 62% 96% at 88% 18%, rgba(92, 225, 255, 0.20), transparent 62%),
    radial-gradient(ellipse 54% 86% at 18% 92%, rgba(167, 107, 255, 0.18), transparent 64%),
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat,
    linear-gradient(120deg, #0d1640, #14103a);
  box-shadow: 0 18px 42px rgba(2, 6, 24, 0.48), inset 0 1px 0 rgba(200, 235, 255, 0.16);
}
/* 坞：页签在左、操作钮在右；停靠态下剥掉两个被搬元素的独立卡片壳 */
html[data-theme="aida"] .ach-dock {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(126, 190, 255, 0.16);
}
html[data-theme="aida"] .ach-dock:empty { display: none; }
html[data-theme="aida"] .page.council-page.active .ach-dock .council-view-tabs,
html[data-theme="aida"] .ach-dock .council-view-tabs {
  order: 0; width: auto !important; max-width: none; flex: none;
  margin: 0 !important;
  padding: 0; border: 0; background: none; box-shadow: none; gap: 8px;
}
html[data-theme="aida"] .ach-dock .council-view-tabs::before { order: 0; content: none; }
html[data-theme="aida"] .ach-dock .council-view-tabs::after { content: none; }
html[data-theme="aida"] .ach-dock .council-view-tabs .api-hub-view-tabs {
  order: 0; margin-left: 0 !important; flex: none;
}
html[data-theme="aida"] .ach-dock .council-chat-head {
  margin-left: auto; padding: 0; border: 0; background: none; box-shadow: none;
  display: flex; align-items: center; gap: 8px;
}
html[data-theme="aida"] .ach-dock .council-chat-titles { display: none; }
/* 欢迎态下操作钮由大卡承担，坞里不再重复一排小钮 */
html[data-theme="aida"] .council-page.is-aide-view:not(.has-cmsgs) .ach-dock .council-chat-head { display: none; }
/* 聊天态坞右端的小立绘徽章——管理员旨划掉：坞条只留页签+拉帘柄 */
html[data-theme="aida"] .council-page.has-cmsgs .ach-dock::after { content: none; }
/* 操作钮整排出卡：悬浮小助已由坞条 achFloat 钮承担，其余功能会话列/聊天里本来就有（管理员旨：删重复） */
html[data-theme="aida"] .council-page.is-aide-view .ach-dock .council-chat-head { display: none; }
/* 悬浮小助坞钮：发光星球轨图标 + 胶囊壳，与拉帘柄同族 */
html[data-theme="aida"] .council-page.is-aide-view .ach-float {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 2px; padding: 4px 11px 4px 7px;
  border: 1px solid rgba(140, 220, 255, 0.35); border-radius: 999px;
  background: linear-gradient(135deg, rgba(38, 68, 140, 0.55), rgba(20, 24, 70, 0.72));
  color: #bfe9ff; font-size: 11.5px; font-weight: 600;
}
html[data-theme="aida"] .council-page.is-aide-view .ach-float svg { filter: drop-shadow(0 0 5px rgba(92, 225, 255, 0.7)); }
html[data-theme="aida"] .council-page.is-aide-view .ach-float:hover {
  color: #eaf8ff; border-color: rgba(140, 220, 255, 0.65);
  box-shadow: 0 0 14px rgba(92, 225, 255, 0.30);
}
/* 展示体：文案区 + 立绘区，欢迎态整版展开 */
html[data-theme="aida"] .ach-body { position: relative; flex: 1; min-height: 0; padding: 14px 24px; display: flex; align-items: center; gap: 10px; }
/* ══ 2026-11-06 管理员旨·总览卡原样搬入：欢迎/聊天两态同一张 268 整卡（只有拉帘折叠才收）。
      旧的 has-cmsgs 收缩/隐藏规则全部作废，用下面这组压住 ══ */
html[data-theme="aida"] .council-page.is-aide-view.has-cmsgs .aida-council-hero { min-height: 268px; }
html[data-theme="aida"] .council-page.is-aide-view.has-cmsgs .ach-body { display: flex; }
/* 聊天头回 main 后重复钮会复活（新会话/创建/专注/悬浮全有处可去）——整个头在 aide 视图隐藏 */
html[data-theme="aida"] .council-page.is-aide-view .council-chat-head { display: none; }

/* ③ 工作区：左会话列表 + 右聊天窗（输入条内嵌贴底），左右各一张深色卡片 */
html[data-theme="aida"] .council-workspace { order: 3; }
html[data-theme="aida"] .council-page.is-aide-view .council-workspace {
  display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 12px;
  flex: 1; min-height: 0; height: auto;
}
html[data-theme="aida"] .council-page.is-aide-view .council-side {
  grid-column: 1; grid-row: 1;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(126, 190, 255, 0.24);
  background: linear-gradient(170deg, rgba(11, 18, 46, 0.95), rgba(9, 13, 36, 0.96));
  box-shadow: 0 18px 46px rgba(2, 6, 24, 0.52), inset 0 1px 0 rgba(200, 235, 255, 0.10);
}
html[data-theme="aida"] .council-page.is-aide-view .council-side-tabs {
  border-bottom-color: rgba(92, 225, 255, 0.16);
}
html[data-theme="aida"] .council-page.is-aide-view .council-side-tab.active {
  color: #8be2ff; border-bottom-color: #5ce1ff;
}
html[data-theme="aida"] .council-page.is-aide-view .council-side-search .council-input {
  background: rgba(24, 36, 80, 0.6); border-color: rgba(126, 190, 255, 0.22); color: #dbe8ff;
}
html[data-theme="aida"] .council-page.is-aide-view .council-main {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(126, 190, 255, 0.24);
  background: linear-gradient(170deg, rgba(11, 18, 46, 0.95), rgba(9, 13, 36, 0.96));
  box-shadow: 0 18px 46px rgba(2, 6, 24, 0.52), inset 0 1px 0 rgba(200, 235, 255, 0.10);
}
html[data-theme="aida"] .council-page.is-aide-view .council-chat-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(92, 225, 255, 0.16);
  background: linear-gradient(90deg, rgba(13, 21, 54, 0.96), rgba(20, 15, 52, 0.94));
  box-shadow: none;
}
html[data-theme="aida"] .council-page.is-aide-view .council-chat-title { font-size: 14px; }
html[data-theme="aida"] .council-page.is-aide-view .council-chat-actions {
  margin-left: auto; display: flex; gap: 6px; flex-wrap: nowrap;
}
html[data-theme="aida"] .council-page.is-aide-view .council-chat-actions .btn {
  padding: 5px 9px; font-size: 11px; border-radius: 9px;
  background: rgba(24, 36, 80, 0.72); border-color: rgba(126, 190, 255, 0.24);
}

/* 消息流：去掉气泡框，改成 GPT 式纯文本流 */
html[data-theme="aida"] .council-page.is-aide-view .council-messages {
  flex: 1; min-height: 0; padding: 20px 24px 8px; gap: 18px;
  background-image: none;
}
html[data-theme="aida"] .council-page.is-aide-view .cmsg .m-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 13.5px; line-height: 1.8; color: #dbe8ff;
}
html[data-theme="aida"] .council-page.is-aide-view .cmsg .m-body { max-width: min(92%, 820px); }
/* 用户消息保留气泡——悬浮窗 Devin 式：助手纯文本流，用户渐变泡 */
html[data-theme="aida"] .council-page.is-aide-view .cmsg.is-user .m-content {
  background: linear-gradient(135deg, #3d8bff, #8b8bff) !important;
  color: #fff !important;
  border-radius: 16px 16px 5px 16px !important;
  padding: 9px 14px !important;
  box-shadow: 0 6px 18px rgba(61, 139, 255, 0.30) !important;
}
/* 欢迎版：消息区留白占位，不显示旧提示语 */
html[data-theme="aida"] .council-page.is-aide-view:not(.has-cmsgs) .council-messages { visibility: hidden; }

/* 输入条：窗口内部底部，工具栏一行 + 渐变发送钮 */
html[data-theme="aida"] .council-page.is-aide-view .council-composer {
  flex: none; margin: 0 14px 14px; padding: 12px 14px 10px;
  border-radius: 20px;
  border: 1px solid rgba(126, 190, 255, 0.28);
  background: linear-gradient(160deg, rgba(18, 28, 66, 0.96), rgba(13, 20, 50, 0.96));
  box-shadow: 0 10px 28px rgba(2, 6, 24, 0.48), inset 0 1px 0 rgba(200, 235, 255, 0.12);
}
html[data-theme="aida"] .council-page.is-aide-view .council-composer textarea { min-height: 44px; font-size: 13.5px; }
html[data-theme="aida"] .council-page.is-aide-view .cc-tools { display: flex; align-items: center; gap: 8px; }
html[data-theme="aida"] .council-page.is-aide-view .council-send {
  width: 40px; height: 40px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-gradient); color: var(--on-primary);
  border-color: rgba(220, 245, 255, 0.5);
  box-shadow: 0 4px 16px rgba(92, 225, 255, 0.35);
}

/* 会话列表行：左侧星光描边 + 悬停泛光，删除钮 hover 变红 */
html[data-theme="aida"] .council-page.is-aide-view .council-session-row {
  border-radius: 12px; border: 1px solid transparent;
  color: #c3d6f6;
}
html[data-theme="aida"] .council-page.is-aide-view .council-session-row:hover {
  background: rgba(38, 56, 110, 0.42); border-color: rgba(126, 190, 255, 0.22);
}
html[data-theme="aida"] .council-page.is-aide-view .council-session-row.active {
  background: linear-gradient(120deg, rgba(92, 225, 255, 0.16), rgba(167, 107, 255, 0.12));
  border-color: rgba(140, 220, 255, 0.4);
  box-shadow: inset 3px 0 0 #5ce1ff, 0 4px 14px rgba(2, 6, 24, 0.35);
  color: #eaf6ff;
}
html[data-theme="aida"] .council-page.is-aide-view .council-session-row .s-del:hover {
  color: #ff9db4; border-color: rgba(255, 157, 180, 0.5);
}
html[data-theme="aida"] .council-page.is-aide-view .council-session-row .s-run-dot {
  box-shadow: 0 0 8px rgba(92, 225, 255, 0.9);
}

/* ── 管理员批注 2026-11-05：壳框全剥——页签胶囊/坞发际线/指挥卡/左右面板一律透明，
   不要描边大卡压内容；输入条向浮窗 af-composer 同款轻壳看齐。 */
html[data-theme="aida"] .council-view-tabs {
  padding: 6px 10px; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
html[data-theme="aida"] .ach-dock {
  padding: 6px 14px 0; border-bottom: 0; background: none;
}
html[data-theme="aida"] .council-page.is-aide-view .api-hub-view-tabs {
  border: 0; background: none; box-shadow: none; padding: 2px 0;
}
html[data-theme="aida"] .aida-council-hero {
  border: 0; background: none; box-shadow: none; border-radius: 0;
}
html[data-theme="aida"] .council-page.is-aide-view .council-side,
html[data-theme="aida"] .council-page.is-aide-view .council-main {
  border: 0; box-shadow: none; border-radius: 0; background: transparent;
}
html[data-theme="aida"] .council-page.is-aide-view .council-chat-head {
  border-bottom: 0; background: none;
}
/* 顶卡四功能位接管导航后：main 里的聊天头整排是重复件（专注/悬浮/创建/新会话）——全藏，
   放这里是为了压住上面同选择器那条 display:flex（后写者胜） */
html[data-theme="aida"] .council-page.is-aide-view .council-chat-head { display: none; }
html[data-theme="aida"] .council-page.is-aide-view .council-chat-actions .btn {
  background: transparent;
}
html[data-theme="aida"] .council-page.is-aide-view .council-composer {
  border-radius: 16px;
  border-color: rgba(126, 190, 255, 0.26);
  background: rgba(12, 20, 50, 0.92);
  box-shadow: none;
}

/* ── Codex 布局（2026-11-05 管理员旨·照抄客户端）：顶卡 = 首页 COSMIC hero 同款大小与设计，
   卡内容 = 坞条(页签+操作钮，透明嵌卡顶) + hero 展示体；右端拉帘柄整卡上收成细条。 */
html[data-theme="aida"] .council-page.is-aide-view .council-main { padding: 0 12px; }
/* 顶卡 = 总览 COSMIC hero 原样搬入（管理员旨：同卡同设计）：268 高、左右留边距，
   四个功能位就是卡底按钮排；页签条在卡外那份留给非 aida 皮肤，aida 下隐藏 */
html[data-theme="aida"] .council-page.is-aide-view > .council-view-tabs { display: none; }
html[data-theme="aida"] .council-page.is-aide-view .aida-council-hero {
  position: relative; isolation: isolate; overflow: hidden;
  flex: none; display: flex; flex-direction: column;
  min-height: 268px; margin: 2px 16px 0; padding: 0;
  border: 1px solid rgba(126, 190, 255, 0.26);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(8, 13, 38, 0.97) 0%, rgba(10, 15, 44, 0.92) 34%, rgba(12, 16, 46, 0.52) 62%, rgba(12, 16, 46, 0.10) 100%),
    url("./assets/skins/aida/aida-night.png") right -40px center / auto 168% no-repeat,
    url("./assets/skins/aida/aida-nebula.svg") center / cover no-repeat;
  box-shadow:
    0 18px 48px rgba(2, 6, 24, 0.52),
    inset 0 1px 0 rgba(200, 235, 255, 0.16),
    0 0 0 1px rgba(92, 225, 255, 0.06);
}
html[data-theme="aida"] .council-page.is-aide-view .aida-council-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(150, 210, 255, 0.018) 3px 4px),
    radial-gradient(ellipse 46% 80% at 8% 10%, rgba(77, 226, 255, 0.14), transparent 70%);
}
/* 展示体：内层 hero 剥成透明，卡片外壳由外层承担；立绘层 absolute 贴满、被外壳裁进卡内。
   内边距与总览 hero 完全一致（26/30），四个功能位就是 .aida-hero__cards 原位 */
html[data-theme="aida"] .council-page.is-aide-view .ach-body {
  position: relative; z-index: 1; flex: 1; min-height: 0;
  display: flex; align-items: stretch; padding: 0;
}
html[data-theme="aida"] .council-page.is-aide-view .ach-body > .aida-hero {
  flex: 1; width: 100%; margin: 0; padding: 26px 30px; min-height: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
}
html[data-theme="aida"] .council-page.is-aide-view .ach-body > .aida-hero::before,
html[data-theme="aida"] .council-page.is-aide-view .ach-body > .aida-hero::after { content: none; }
/* 当前视图的功能位常亮 */
html[data-theme="aida"] .council-page.is-aide-view .aida-hero__card.active {
  color: #eaf6ff;
  border-color: rgba(140, 220, 255, 0.62);
  background: linear-gradient(135deg, rgba(92, 225, 255, 0.18), rgba(167, 107, 255, 0.14));
  box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.22), 0 8px 24px rgba(92, 225, 255, 0.16);
}
/* 拉帘柄：悬在卡片右上角的小 chevron；折叠后变正上方居中发光球 */
html[data-theme="aida"] .ach-fold {
  position: absolute; top: 12px; right: 14px; z-index: 5;
  flex: none; width: 24px; height: 24px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(126, 190, 255, 0.22); border-radius: 8px;
  background: rgba(16, 28, 66, 0.55); color: #9fd8ff; cursor: pointer;
  transition: color .15s, border-color .15s, transform .3s ease;
}
html[data-theme="aida"] .ach-fold:hover { color: #eaf6ff; border-color: rgba(92, 225, 255, 0.55); }
/* 折叠后只留一颗发光悬浮球（管理员旨）：整卡高度归零、球悬浮在内容顶正中 */
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .aida-council-hero {
  min-height: 0; height: 0; overflow: visible;
  border-color: transparent; background: none; box-shadow: none;
  /* 球悬在 workspace 上面：hero 高 0 后被同栈级后画的 workspace 盖住吃点击——抬 z-index 让它真点得着 */
  z-index: 40; pointer-events: none;
}
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .aida-council-hero .ach-fold { pointer-events: auto; }
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .ach-body,
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .ach-dock { display: none; }
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .ach-fold {
  /* 球悬在正上方居中：收/展开原地开合，不跳位置（管理员旨） */
  position: absolute; top: 10px; left: 50%; right: auto; margin: 0; z-index: 6;
  width: 34px; height: 34px; border-radius: 50%;
  color: #eaf6ff; border: 1px solid rgba(140, 220, 255, 0.65);
  background: radial-gradient(circle at 32% 28%, #3fd8ff 0%, #2b7de8 45%, #1a2a66 100%);
  box-shadow: 0 0 18px rgba(92, 225, 255, 0.75), 0 0 42px rgba(92, 225, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateX(-50%) rotate(180deg);
}
html[data-theme="aida"] .council-page.is-aide-view.aide-dock-collapsed .ach-fold:hover { filter: brightness(1.15); }
html[data-theme="aida"] .council-page.is-aide-view:not(.has-cmsgs) .council-messages { display: none; }
/* 小助手头像不限于圆圈：换成星轨立姿小人（管理员旨：一个人物在那里更好）。
   只动议事殿消息列里的 aide 珠——成员珠/群珠/浮窗球/英雄珠照原样。 */
html[data-theme="aida"] .council-messages .m-avatar.is-pal:has(.aide-orb) { overflow: visible; border-radius: 10px; background: none; box-shadow: none; }
html[data-theme="aida"] .council-messages .m-avatar.is-pal:has(.aide-orb) .aide-orb {
  width: 100%; height: 100%; border: 0; border-radius: 0; overflow: visible;
  background: none; box-shadow: none;
}
/* 复用本来就背小人图的 ::before：圆裁 cover → 站姿 contain，人物完整立出来 */
html[data-theme="aida"] .council-messages .m-avatar.is-pal:has(.aide-orb) .aide-orb::before {
  content: ""; position: absolute; z-index: 5; pointer-events: none;
  inset: -22px -4px -4px -10px; border-radius: 0;
  background: url("./assets/skins/aida/aida-pet-idle.png") center bottom / contain no-repeat;
  filter: drop-shadow(0 2px 7px rgba(92, 225, 255, 0.42));
}
/* 干活中的那一条换成坐姿终端小人（与悬浮球三态同律：闲=站姿·忙=终端坐姿） */
html[data-theme="aida"] .council-messages .cmsg.is-live .m-avatar.is-pal:has(.aide-orb) .aide-orb::before,
html[data-theme="aida"] .council-messages .cmsg.typing .m-avatar.is-pal:has(.aide-orb) .aide-orb::before {
  background-image: url("./assets/skins/aida/aida-pet-busy.png");
}
html[data-theme="aida"] .council-messages .m-avatar.is-pal:has(.aide-orb) .aide-orb::after { content: none; }
html[data-theme="aida"] .council-messages .m-avatar.is-pal:has(.aide-orb) .aide-orb > i { display: none; }
/* 聊天列两侧空隙：小人贴着"对话列"右缘站着（管理员旨：这个搬到靠右边）。
   挂在 workspace 上算坐标：会话列 252+gap8=260，消息列 860 居中于聊天卡，
   消息列右缘 = 260+(W-1120)/2+860 = W/2+560；小人左缘再进 10px，贴不住时别出 workspace。 */
html[data-theme="aida"] .council-page.is-aide-view .council-workspace { position: relative; }
html[data-theme="aida"] .council-page.is-aide-view .council-workspace::after {
  content: ""; position: absolute; z-index: 6; pointer-events: none;
  left: min(calc(50% + 570px), calc(100% - 78px)); bottom: 168px;
  width: 72px; height: 96px;
  background: url("./assets/skins/aida/aida-pet-wave.png") center bottom / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(92, 225, 255, 0.30));
}
/* 会话在跑：贴边小人也换成干活坐姿（页面里有 is-live 行就有活在跑） */
html[data-theme="aida"] .council-page.is-aide-view:has(.cmsg.is-live) .council-workspace::after {
  background-image: url("./assets/skins/aida/aida-pet-busy.png");
}
/* 收窄左间隔：小助手页 .main 横 padding 28→12、栏间 gap 10→8（管理员旨：左边间隔太大） */
html[data-theme="aida"][data-active-page="council"] .main:has(> .council-page.is-aide-view) { padding-left: 12px; padding-right: 12px; }
html[data-theme="aida"] .council-page.is-aide-view .council-workspace { gap: 8px; }
html[data-theme="aida"] .council-page.is-aide-view .council-messages {
  max-width: 860px; width: 100%; margin: 0 auto;
}
html[data-theme="aida"] .council-page.is-aide-view .council-composer {
  width: calc(100% - 20px); max-width: 780px; margin: 0 auto 14px;
}

@media (max-width: 1180px) {
  html[data-theme="aida"] .council-page.is-aide-view .council-chat-actions .btn { padding: 4px 7px; font-size: 10px; }
  /* 缝隙放不下贴边小人就让她退场，不压会话列 */
  html[data-theme="aida"] .council-page.is-aide-view .council-workspace::after { content: none; }
}
@media (max-width: 900px) {
  html[data-theme="aida"] .aida-council-hero { min-height: 0; padding: 16px 18px; }
}

/* ════════════════════════════════════════════════════════════════════════
   16. 桌面桌宠：真实 <img> 承载人物（无伪元素矩形底）
   ────────────────────────────────────────────────────────────────────────
   #ball::before 在 WebView 里会叠出矩形底，桌面球改成三张透明 PNG 切换；
   浮窗内球无 img，继续用伪元素方案（深色卡片上无可见矩形）。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] #ball { background: transparent !important; box-shadow: none !important; }
html[data-theme="aida"] #ball::before { display: none !important; }

html[data-theme="aida"] #ball .pet-img {
  position: absolute; inset: 0; z-index: 5;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
  pointer-events: none;
  filter:
    drop-shadow(0 12px 14px rgba(2, 6, 24, 0.70))
    drop-shadow(0 0 12px rgba(92, 225, 255, 0.34));
  animation: aidaPet3D 4.2s ease-in-out infinite;
}
html[data-theme="aida"] #ball .pet-busy,
html[data-theme="aida"] #ball .pet-wave { display: none; }

html[data-theme="aida"] body.busy #ball .pet-idle { display: none; }
html[data-theme="aida"] body.busy #ball .pet-busy {
  display: block;
  filter:
    drop-shadow(0 12px 14px rgba(2, 6, 24, 0.70))
    drop-shadow(0 0 14px rgba(167, 107, 255, 0.48));
  animation: aidaPet3DWork 1.5s ease-in-out infinite;
}
html[data-theme="aida"] body:not(.busy) #ball:hover .pet-idle { display: none; }
html[data-theme="aida"] body:not(.busy) #ball:hover .pet-wave { display: block; }

@media (prefers-reduced-motion: reduce) {
  html[data-theme="aida"] #ball .pet-img { animation: none !important; }
}
html[data-theme="aida"].low-power #ball .pet-img,
body.low-power #ball .pet-img { animation: none !important; }

/* ════════════════════════════════════════════════════════════════════════
   17. 强制去球壳：council.css 的 .aide-orb 自带 linear-gradient 珠体 +
   border-radius:50% + overflow:hidden；改直角后那层暖核渐变会露成矩形底。
   这里用最高优先级把珠体壳彻底剥掉，只留透明人物与光影层。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] body #ball.aide-orb,
html[data-theme="aida"] body #ball.aide-orb:not(.m-orb):not(.g-orb) {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  overflow: visible !important;
}
html[data-theme="aida"] body #ball > i,
html[data-theme="aida"] body #ball .orb-glyph,
html[data-theme="aida"] body #ball .orb-face,
html[data-theme="aida"] body #ball .pet-img,
html[data-theme="aida"] body #ball::after {
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
/* <i> 光环保留渐变大图（层次感来源），但绝不带实色底 */
html[data-theme="aida"] body #ball > i {
  background-image: radial-gradient(ellipse, rgba(92, 225, 255, 0.30), rgba(139, 107, 255, 0.14) 52%, transparent 72%) !important;
  border-radius: 50% !important;
}

/* ════════════════════════════════════════════════════════════════════════
   18. 布局收口：顶栏排布 / 铺满宽度 / 聊天窗口撑满剩余高度
   ────────────────────────────────────────────────────────────────────────
   council.css 的 width:min(1240px,100%) 会让右侧留白；.page 的 height:100%
   在 auto 父容器里失效，聊天窗口只按内容高度，下面空一大块。
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="aida"] .council-view-tabs::before { order: 1; }
html[data-theme="aida"] .council-view-tabs::after { order: 2; margin-left: 2px !important; }
html[data-theme="aida"] .council-view-tabs .api-hub-view-tabs { order: 3; margin-left: auto !important; }

html[data-theme="aida"] .page.council-page.active :is(.council-view-tabs, .aida-council-hero, .council-workspace) {
  width: 100%;
  max-width: none;
  min-width: 0;
}
html[data-theme="aida"][data-active-page="council"] .main {
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
html[data-theme="aida"][data-active-page="council"] .main::-webkit-scrollbar { display: none; }
/* 页面必须是"定高盒子"：.main 有 100vh 硬边界，页内只靠 flex 分配高度——
   一旦放开成内容高，长会话会把 composer 顶出视口（2026-11-05 输入框消失根因）。
   链：page(flex:1,min-h:0) → workspace(flex:1,min-h:0) → council-main(h:100%)
   → messages(flex:1,min-h:0,内部滚动) + composer(flex:none,钉底)。
   workspace 不许加 min-height 地板——短窗里地板会把 composer 重新顶出去，
   "占满下半屏"由 flex 分配天然保证。 */
html[data-theme="aida"] .page.council-page.active {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}
html[data-theme="aida"] .council-workspace { min-height: 0; }
