#newapi-manage-plus-entry{position:fixed;right:20px;bottom:20px;z-index:45;display:flex;align-items:center;gap:8px;background:#fff;color:#18212f;border:1px solid #cbd4e1;border-radius:8px;padding:8px 10px;box-shadow:0 6px 20px #14233b1a;font:13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;box-sizing:border-box;max-width:calc(100vw - 16px)}
#newapi-manage-plus-entry[hidden]{display:none}
#newapi-manage-plus-entry button{appearance:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:0;border:0;border-radius:5px;min-width:44px;min-height:44px;padding:8px;color:#5c6675;background:#f6f7f9;font:inherit;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
#newapi-manage-plus-entry.is-dragging button{cursor:grabbing}
#newapi-manage-plus-entry a{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;color:#175bd6;text-decoration:none;border-radius:5px;padding:8px 10px;background:#eaf1ff;white-space:nowrap}
#newapi-manage-plus-entry a:hover{background:#dce8fd}
#newapi-manage-plus-entry button:hover{background:#eef1f5}
#newapi-manage-plus-entry a:focus-visible,#newapi-manage-plus-entry button:focus-visible{outline:2px solid #2674e8;outline-offset:3px}
@media(max-width:600px){#newapi-manage-plus-entry{right:12px;bottom:12px;padding:6px;gap:6px}#newapi-manage-plus-entry a{padding:8px}}

/* =====================================================================
   New API 官方前端换肤：套用聊天平台配色（与 public/style.css、public/chat/app.css 同值）。
   做法：只覆盖官方前端自带的 shadcn CSS 变量（--background/--foreground/--card/--primary/...），
   不改 DOM 结构、不碰组件逻辑，版本升级时变量名比 class 名更稳定。
   主题切换：官方页面本身用 <html class="light"> / <html class="dark"> 控制，
   entry.js 会据此增删 class 并记忆到 localStorage，这里只提供两套变量取值。
   ===================================================================== */
html.dark{
  --background:#0c1218; --foreground:#e8e6df;
  --card:#151f29; --card-foreground:#e8e6df;
  --popover:#1b2732; --popover-foreground:#e8e6df;
  --primary:#d6b26f; --primary-foreground:#21190d;
  --secondary:#24333f; --secondary-foreground:#e8e6df;
  --muted:#1b2732; --muted-foreground:#a7b2b8;
  --accent:#30291d; --accent-foreground:#f0d9aa;
  --destructive:#f0a09a; --destructive-foreground:#2a1210;
  --success:#97c8a8; --success-foreground:#0f1f16;
  --warning:#e1c99e; --warning-foreground:#21190d;
  --info:#93afc2; --info-foreground:#101820;
  --neutral:#84939c; --neutral-foreground:#e8e6df;
  --border:#293640; --input:#293640; --ring:#d6b26f;
  --chart-1:#d6b26f; --chart-2:#93afc2; --chart-3:#9eb7a8; --chart-4:#cf9c9f; --chart-5:#e1c99e;
  --overview-accent-1:#d6b26f; --overview-accent-2:#93afc2; --overview-accent-3:#9eb7a8;
  --sidebar:#101820; --sidebar-foreground:#e8e6df;
  --sidebar-primary:#d6b26f; --sidebar-primary-foreground:#21190d;
  --sidebar-accent:#1b2732; --sidebar-accent-foreground:#f0d9aa;
  --sidebar-border:#293640; --sidebar-ring:#d6b26f;
  --skeleton-base:#1b2732; --skeleton-highlight:#24333f;
  color-scheme:dark;
}
html.light{
  --background:#f2eee5; --foreground:#243033;
  --card:#faf7f0; --card-foreground:#243033;
  --popover:#fffdf7; --popover-foreground:#243033;
  --primary:#8a5d20; --primary-foreground:#fffdf7;
  --secondary:#e9e2d5; --secondary-foreground:#243033;
  --muted:#f8f4eb; --muted-foreground:#596568;
  --accent:#eee1c9; --accent-foreground:#543a17;
  --destructive:#9a3733; --destructive-foreground:#fffdf7;
  --success:#326647; --success-foreground:#fffdf7;
  --warning:#8a5d20; --warning-foreground:#fffdf7;
  --info:#4e6e80; --info-foreground:#fffdf7;
  --neutral:#6e7879; --neutral-foreground:#243033;
  --border:#d8d0c2; --input:#d8d0c2; --ring:#8a5d20;
  --chart-1:#8a5d20; --chart-2:#4e6e80; --chart-3:#4e705b; --chart-4:#945761; --chart-5:#79501e;
  --overview-accent-1:#8a5d20; --overview-accent-2:#4e6e80; --overview-accent-3:#4e705b;
  --sidebar:#faf7f0; --sidebar-foreground:#243033;
  --sidebar-primary:#8a5d20; --sidebar-primary-foreground:#fffdf7;
  --sidebar-accent:#eee1c9; --sidebar-accent-foreground:#543a17;
  --sidebar-border:#d8d0c2; --sidebar-ring:#8a5d20;
  --skeleton-base:#e9e2d5; --skeleton-highlight:#dcd2c0;
  color-scheme:light;
}
html.dark,html.light{ --radius:12px; }

/* 圆角、阴影微调：卡片/弹层更接近聊天平台的"卡片感" */
html.dark .bg-card,html.light .bg-card,
html.dark [data-slot="card"],html.light [data-slot="card"]{
  border-radius:var(--radius)!important;
  box-shadow:0 10px 28px #00000026;
}
html.light [data-slot="card"]{ box-shadow:0 10px 28px #40352214; }
html.dark [data-slot="popover-content"],html.light [data-slot="popover-content"],
html.dark [data-slot="dialog-content"],html.light [data-slot="dialog-content"],
html.dark [data-slot="dropdown-menu-content"],html.light [data-slot="dropdown-menu-content"]{
  border-radius:var(--radius)!important;
}
html.dark [data-slot="button"][data-variant="default"],html.light [data-slot="button"][data-variant="default"]{
  box-shadow:none;
}

/* 顶部导航/侧边栏 hover、选中态跟随强调色，而不是默认蓝 */
html.dark [data-slot="sidebar-menu-button"][data-active],html.light [data-slot="sidebar-menu-button"][data-active]{
  background:var(--sidebar-accent); color:var(--sidebar-accent-foreground); font-weight:500;
}
html.dark nav a.active,html.light nav a.active{ color:var(--primary)!important; }

/* ---------- 侧边栏“快捷入口”分组：entry.js 动态插入，这里只负责外观 ---------- */
.mp-quick-group [data-slot="sidebar-group-label"]{
  color:var(--primary); opacity:.92;
}
.mp-quick-group [data-slot="sidebar-menu-button"] svg{ color:var(--primary); }
.mp-quick-badge{
  margin-left:auto;font-size:10px;line-height:1;padding:2px 5px;border-radius:999px;
  background:var(--sidebar-accent);color:var(--sidebar-accent-foreground);
  white-space:nowrap;flex-shrink:0;
}

/* ---------- entry.js 注入的主题切换按钮，挂在顶部右侧 ---------- */
#mp-theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;border-radius:8px;border:1px solid var(--border);
  background:var(--card);color:var(--foreground);cursor:pointer;flex-shrink:0;
}
#mp-theme-toggle:hover{ background:var(--accent); color:var(--accent-foreground); }
#mp-theme-toggle svg{ width:16px; height:16px; }
#mp-theme-toggle:focus-visible{outline:2px solid var(--ring);outline-offset:3px}
#mp-theme-toggle.mp-theme-toggle-floating{display:grid;position:fixed;top:18px;right:20px;z-index:40;width:40px;height:40px;box-shadow:0 8px 24px #0000001f}
#mp-quick-group.mp-pricing-quick{position:sticky;top:5rem;align-self:flex-start;width:100%;max-width:16rem;flex-shrink:0;background:hsl(var(--card));margin-bottom:.75rem}
@media(min-width:1280px){#mp-quick-group.mp-pricing-quick{margin-bottom:0;position:fixed;left:1.25rem;top:5rem;width:15rem}}
@media(min-width:1280px) and (max-width:1399px){#mp-quick-group.mp-pricing-quick ~ main.min-w-0.space-y-4 > .flex.flex-col.gap-4 > .grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1279px){#mp-quick-group.mp-pricing-quick{position:relative;top:0;max-width:none}}
@media(max-width:600px){#mp-quick-group.mp-pricing-quick{display:none}}
@media(max-width:600px){#mp-theme-toggle.mp-theme-toggle-floating{top:12px;right:12px}}
