/* ============================================================
   东东AI · 控制台换肤包（Anthropic 视觉语言）
   只做“外观层”覆盖：字体 / 圆角 / 暖色底 / 细边框 / 装饰色收敛
   删掉本文件即完全还原；由 nginx 注入到 <head> 末尾
   ============================================================ */

/* ---------- 1. 字体：统一无衬线 ---------- */
body, button, input, textarea, select, .btn, [class*="font-"]{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
body{ letter-spacing:-0.005em; }

/* ---------- 2. 浅色：暖米白背景 ---------- */
html:not(.dark) body{ background-color:#faf9f5 !important; color:#141413; }
html:not(.dark) .bg-gray-50{ background-color:#f0eee6 !important; }
html:not(.dark) .bg-gray-100{ background-color:#ebe8dd !important; }
html:not(.dark) .bg-white{ background-color:#fffefb !important; }

/* ---------- 3. 浅色：细暖边 ---------- */
html:not(.dark) .border-gray-200{ border-color:#e2e0d6 !important; }
html:not(.dark) .border-gray-300{ border-color:#d9d6c9 !important; }

/* ---------- 4. 浅色：文字层级 ---------- */
html:not(.dark) .text-gray-900{ color:#141413 !important; }
html:not(.dark) .text-gray-800{ color:#1f1e1d !important; }
html:not(.dark) .text-gray-700{ color:#3d3d3a !important; }
html:not(.dark) .text-gray-600{ color:#5e5d59 !important; }
html:not(.dark) .text-gray-500{ color:#87867f !important; }

/* ---------- 5. 圆角克制 ---------- */
.rounded-lg{ border-radius:9px !important; }
.rounded-xl{ border-radius:12px !important; }
.rounded-2xl{ border-radius:16px !important; }

/* ---------- 6. 阴影更轻 ---------- */
.shadow-sm{ box-shadow:0 1px 2px rgba(20,20,19,.05) !important; }
.shadow{ box-shadow:0 4px 14px rgba(20,20,19,.07) !important; }
.shadow-md{ box-shadow:0 8px 24px rgba(20,20,19,.08) !important; }
.shadow-lg{ box-shadow:0 16px 40px rgba(20,20,19,.10) !important; }

/* ---------- 7. 侧边栏 / 顶栏 ---------- */
html:not(.dark) aside{ background-color:#faf9f5 !important; border-color:#e2e0d6 !important; }
html:not(.dark) header{ background-color:rgba(250,249,245,.92) !important; }

/* ---------- 8. 输入框 ---------- */
html:not(.dark) input, html:not(.dark) textarea, html:not(.dark) select{
  background-color:#fffefb !important; border-color:#e2e0d6 !important; color:#141413 !important;
}
html:not(.dark) input:focus, html:not(.dark) textarea:focus, html:not(.dark) select:focus{
  border-color:#d97757 !important; box-shadow:0 0 0 3px rgba(217,119,87,.15) !important;
}

/* ---------- 9. 链接/强调：陶土橙 ---------- */
html:not(.dark) .text-primary-500,
html:not(.dark) .text-primary-600,
html:not(.dark) .text-primary-700{ color:#c25f3f !important; }

/* ---------- 10. 装饰色浅底 → 暖中性（注意：用 ~= 精确匹配，避免误伤 -500 实色） ---------- */
html:not(.dark) :is(
  [class~="bg-primary-50"],[class~="bg-primary-100"],
  [class~="bg-teal-50"],[class~="bg-teal-100"],
  [class~="bg-cyan-50"],[class~="bg-cyan-100"],
  [class~="bg-sky-50"],[class~="bg-sky-100"],
  [class~="bg-blue-50"],[class~="bg-blue-100"],
  [class~="bg-indigo-50"],[class~="bg-indigo-100"],
  [class~="bg-violet-50"],[class~="bg-violet-100"],
  [class~="bg-purple-50"],[class~="bg-purple-100"],
  [class~="bg-slate-50"],[class~="bg-slate-100"]
){ background-color:#f2efe7 !important; }

/* ---------- 11. 装饰色文字（图标）→ 暖中性 ---------- */
html:not(.dark) :is(
  [class~="text-teal-500"],[class~="text-teal-600"],
  [class~="text-cyan-500"],[class~="text-cyan-600"],
  [class~="text-sky-500"],[class~="text-sky-600"],
  [class~="text-blue-500"],[class~="text-blue-600"],
  [class~="text-indigo-500"],[class~="text-indigo-600"],
  [class~="text-violet-500"],[class~="text-violet-600"],
  [class~="text-purple-500"],[class~="text-purple-600"],
  [class~="text-slate-500"],[class~="text-slate-600"]
){ color:#8a6f60 !important; }

/* ---------- 12. 装饰色描边 → 暖 ---------- */
html:not(.dark) :is(
  [class~="border-teal-200"],[class~="border-blue-200"],[class~="border-indigo-200"],
  [class~="border-violet-200"],[class~="border-purple-200"],[class~="border-cyan-200"],
  [class~="border-sky-200"],[class~="border-primary-200"]
){ border-color:#e2e0d6 !important; }

/* ---------- 13. 防横向裁切 ---------- */
html, body { overflow-x:hidden !important; }
#app { min-width:0 !important; }

/* =====================================================================
   第三轮：sub2api 的“主按钮/选中态”其实用的是 emerald→teal 渐变，
   不在 primary 色板内，所以前两轮没被替换。这里专门压平。
   ===================================================================== */

/* 1) 渐变按钮的起点/终点 → 陶土橙 */
html:not(.dark) :is(
  [class~="from-emerald-400"],[class~="from-emerald-500"],[class~="from-emerald-600"],
  [class~="from-teal-400"],[class~="from-teal-500"],[class~="from-teal-600"],
  [class~="from-cyan-400"],[class~="from-cyan-500"],[class~="from-cyan-600"]
){ --tw-gradient-from:#c25f3f !important; --tw-gradient-to:rgba(194,95,63,0) !important; }

html:not(.dark) :is(
  [class~="to-emerald-400"],[class~="to-emerald-500"],[class~="to-emerald-600"],
  [class~="to-teal-400"],[class~="to-teal-500"],[class~="to-teal-600"],
  [class~="to-cyan-400"],[class~="to-cyan-500"],[class~="to-cyan-600"]
){ --tw-gradient-to:#d97757 !important; }

/* 2) 实色按钮/徽标 → 陶土橙 */
html:not(.dark) :is(
  [class~="bg-emerald-500"],[class~="bg-emerald-600"],
  [class~="bg-teal-500"],[class~="bg-teal-600"],
  [class~="bg-cyan-500"],[class~="bg-cyan-600"]
){ background-color:#c25f3f !important; }

/* 3) 选中态浅底（侧边栏/标签）→ 暖米 */
html:not(.dark) :is(
  [class~="bg-emerald-50"],[class~="bg-emerald-100"],
  [class~="bg-teal-50"],[class~="bg-teal-100"],
  [class~="bg-cyan-50"],[class~="bg-cyan-100"],
  [class~="bg-green-50"],[class~="bg-green-100"]
){ background-color:#f2efe7 !important; }

/* 4) emerald 图标/文字（品牌含义）→ 陶土橙；green 留作成功语义 */
html:not(.dark) :is(
  [class~="text-emerald-500"],[class~="text-emerald-600"],[class~="text-emerald-700"],
  [class~="text-teal-500"],[class~="text-teal-600"],[class~="text-teal-700"],
  [class~="text-cyan-500"],[class~="text-cyan-600"],[class~="text-cyan-700"]
){ color:#b45a3c !important; }

/* 5) emerald/teal 描边 → 暖 */
html:not(.dark) :is(
  [class~="border-emerald-200"],[class~="border-teal-200"],[class~="border-cyan-200"]
){ border-color:#e2e0d6 !important; }

/* 6) hover 态也压平（避免悬停又变绿） */
html:not(.dark) :is(
  [class~="hover:bg-emerald-600"],[class~="hover:bg-teal-600"],[class~="hover:bg-cyan-600"]
){ background-color:#a44c31 !important; }
/* =====================================================================
   第四轮：页面底部那层“薄荷绿”来自布局容器的渐变（from-teal-50 / to-emerald-50），
   属于 50 级渐变停靠色，前三轮只压了 400-600 级，所以背景仍发绿。
   ===================================================================== */
html:not(.dark) :is(
  [class~="from-teal-50"],[class~="from-emerald-50"],[class~="from-cyan-50"],[class~="from-green-50"],[class~="from-sky-50"],[class~="from-blue-50"]
){ --tw-gradient-from:#f8f5ee !important; --tw-gradient-to:rgba(248,245,238,0) !important; }

html:not(.dark) :is(
  [class~="to-teal-50"],[class~="to-emerald-50"],[class~="to-cyan-50"],[class~="to-green-50"],[class~="to-sky-50"],[class~="to-blue-50"]
){ --tw-gradient-to:#faf8f2 !important; }

html:not(.dark) :is(
  [class~="via-teal-50"],[class~="via-emerald-50"],[class~="via-cyan-50"],[class~="via-white"],[class~="via-gray-50"]
){ --tw-gradient-to:rgba(250,248,242,1) !important; --tw-gradient-stops:var(--tw-gradient-from),#faf8f2,var(--tw-gradient-to) !important; }
/* ---------- 14. 关闭新手引导遮挡（driver.js 引导层） ---------- */
.driver-overlay, .driver-popover, .theme-tour-popover, .driver-highlighted-element ~ .driver-overlay { display:none !important; }
body.driver-active, body.driver-active * { pointer-events:auto !important; }