/* =====================================================================
   AIGC 前台主题层 · 纯 CSS 覆盖，不改任何业务 JS
   默认配色：石墨（graphite）。用户可在页面右上角「换配色」里切换，
   选择保存在浏览器本地（localStorage: aigc-theme），下次打开自动沿用。
   要完全回退：删掉 index.html 里那三行 theme 相关标签即可。
   ===================================================================== */

/* ===== 线性图标：替代 emoji，跨系统渲染一致，颜色跟随文字 ===== */
.ic{display:inline-block;width:1em;height:1em;vertical-align:-.125em;background-color:currentColor;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain}
.ic-ticket{-webkit-mask-image:var(--ic-ticket);mask-image:var(--ic-ticket)}
.ic-sun{-webkit-mask-image:var(--ic-sun);mask-image:var(--ic-sun);width:1.15em;height:1.15em}
.ic-moon{-webkit-mask-image:var(--ic-moon);mask-image:var(--ic-moon);width:1.15em;height:1.15em}
.ic-palette{-webkit-mask-image:var(--ic-palette);mask-image:var(--ic-palette);width:1.15em;height:1.15em}
:root{
  --ic-ticket:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5A1.5 1.5 0 0 1 4.5 7h15A1.5 1.5 0 0 1 21 8.5v2a2 2 0 0 0 0 3.9v2A1.5 1.5 0 0 1 19.5 18h-15A1.5 1.5 0 0 1 3 16.4v-2a2 2 0 0 0 0-3.9Z'/%3E%3Cpath d='M14 7v11' stroke-dasharray='2 2.5'/%3E%3C/svg%3E");
  --ic-sun:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --ic-moon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z'/%3E%3C/svg%3E");
  --ic-palette:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18h1.2a1.8 1.8 0 0 0 1.3-3.1 1.8 1.8 0 0 1 1.3-3.1H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z'/%3E%3Ccircle cx='7.5' cy='11' r='1.1' fill='%23000' stroke='none'/%3E%3Ccircle cx='10.5' cy='7' r='1.1' fill='%23000' stroke='none'/%3E%3Ccircle cx='15.5' cy='8' r='1.1' fill='%23000' stroke='none'/%3E%3C/svg%3E");
}
/* ===== 换色弹窗 ===== */
.tsw-pop{position:fixed;z-index:9999;min-width:150px;border:1px solid;border-radius:12px;padding:6px;
  box-shadow:0 18px 48px rgba(0,0,0,.5);font-size:13px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
.tsw-item{display:flex;align-items:center;gap:9px;width:100%;padding:8px 10px;border:0;background:transparent;
  border-radius:8px;cursor:pointer;color:inherit;font:inherit;text-align:left}
.tsw-dot{width:13px;height:13px;border-radius:50%;flex:0 0 13px;box-shadow:0 0 0 2px rgba(255,255,255,.12)}
.tsw-check{margin-left:auto;opacity:0}
.tsw-item.is-on .tsw-check{opacity:1}

/* ---------- 石墨 ---------- */
html[data-theme="graphite"] .dark-mode.studio-shell{background:linear-gradient(180deg,#0d0f12,#131619) !important}
html[data-theme="graphite"] .dark-mode{color:#e8ebf0 !important}
html[data-theme="graphite"] .dark-mode.bg-\[\#f0f7ff\],html[data-theme="graphite"] .dark-mode .bg-\[\#f0f7ff\]{background-color:transparent !important}
html[data-theme="graphite"] .dark-mode.studio-shell .studio-output,html[data-theme="graphite"] .dark-mode.studio-shell .studio-panel,
html[data-theme="graphite"] .dark-mode .studio-output,html[data-theme="graphite"] .dark-mode .studio-panel{
  background-color:#16191e !important;border-color:#282d36 !important;box-shadow:0 24px 70px rgba(0,0,0,.55) !important}
html[data-theme="graphite"] .dark-mode .bg-white,html[data-theme="graphite"] .dark-mode .bg-gray-50,html[data-theme="graphite"] .dark-mode .bg-slate-50{background-color:#16191e !important}
html[data-theme="graphite"] .dark-mode .bg-gray-100,html[data-theme="graphite"] .dark-mode .bg-gray-200,html[data-theme="graphite"] .dark-mode .bg-gray-900{background-color:#20242b !important}
html[data-theme="graphite"] .dark-mode .hover\:bg-gray-200:hover{background-color:#39404b !important}
html[data-theme="graphite"] .dark-mode .bg-blue-50,html[data-theme="graphite"] .dark-mode .bg-blue-50\/30,html[data-theme="graphite"] .dark-mode .bg-blue-100{background-color:rgba(20,184,166,.12) !important}
html[data-theme="graphite"] .dark-mode .border-gray-200,html[data-theme="graphite"] .dark-mode .border-gray-100,html[data-theme="graphite"] .dark-mode .border-dashed,
html[data-theme="graphite"] .dark-mode .border-blue-100{border-color:#282d36 !important}
html[data-theme="graphite"] .dark-mode .border-gray-300{border-color:#39404b !important}
html[data-theme="graphite"] .dark-mode select,html[data-theme="graphite"] .dark-mode input[type=text],html[data-theme="graphite"] .dark-mode input[type=password],
html[data-theme="graphite"] .dark-mode textarea,html[data-theme="graphite"] .dark-mode .control-field select{
  background-color:#0f1115 !important;border-color:#282d36 !important;color:#e8ebf0 !important}
html[data-theme="graphite"] .dark-mode select option{background-color:#16191e !important;color:#e8ebf0 !important}
html[data-theme="graphite"] .control-field select:focus,html[data-theme="graphite"] .dark-mode select:focus,html[data-theme="graphite"] .dark-mode textarea:focus{
  border-color:#14b8a6 !important;box-shadow:0 0 0 3px rgba(20,184,166,.12) !important}
html[data-theme="graphite"] .dark-mode ::-webkit-scrollbar-track{background:#16191e}
html[data-theme="graphite"] .dark-mode ::-webkit-scrollbar-thumb{background:#39404b}
html[data-theme="graphite"] .dark-mode ::-webkit-scrollbar-thumb:hover{background:#98a1ae}
/* 主色（深浅两种模式都用同一主色） */
html[data-theme="graphite"] .bg-\[\#4a90e2\],html[data-theme="graphite"] .bg-blue-500,html[data-theme="graphite"] .bg-blue-600,
html[data-theme="graphite"] .dark-mode .bg-blue-500,html[data-theme="graphite"] .dark-mode .bg-blue-600{background-color:#14b8a6 !important}
html[data-theme="graphite"] .hover\:bg-blue-600:hover,html[data-theme="graphite"] .hover\:bg-blue-700:hover,html[data-theme="graphite"] .bg-\[\#4a90e2\]:hover{background-color:#0d9488 !important}
html[data-theme="graphite"] .generate-btn{box-shadow:0 6px 20px rgba(20,184,166,.18) !important}
html[data-theme="graphite"] .text-blue-400,html[data-theme="graphite"] .text-blue-500,html[data-theme="graphite"] .text-blue-600,html[data-theme="graphite"] .dark-mode .text-blue-400,
html[data-theme="graphite"] .admin-log-kicker,html[data-theme="graphite"] .announcement-admin-type,html[data-theme="graphite"] .announcement-modal-kicker{color:#14b8a6 !important}
html[data-theme="graphite"] .border-blue-400,html[data-theme="graphite"] .border-blue-500{border-color:#14b8a6 !important}
html[data-theme="graphite"] .bg-blue-500\/20{background-color:rgba(20,184,166,.12) !important}
html[data-theme="graphite"] .dark-mode .bg-slate-500{background-color:#20242b !important}
html[data-theme="graphite"] .dark-mode .hover\:bg-slate-600:hover{background-color:#39404b !important}
/* 徽章在深色下的对比度 */
html[data-theme="graphite"] .dark-mode .bg-orange-50{background-color:rgba(245,158,11,.12) !important}
html[data-theme="graphite"] .dark-mode .border-orange-200{border-color:rgba(245,158,11,.34) !important}
html[data-theme="graphite"] .dark-mode .text-orange-600{color:#fbbf24 !important}
html[data-theme="graphite"] .dark-mode .bg-yellow-500\/20{background-color:rgba(20,184,166,.12) !important}
html[data-theme="graphite"] .dark-mode .border-yellow-500\/30{border-color:#14b8a655 !important}
html[data-theme="graphite"] .dark-mode .text-yellow-400{color:#14b8a6 !important}
/* 换色弹窗 */
html[data-theme="graphite"] .tsw-pop{background:#16191e;border-color:#282d36;color:#e8ebf0}
html[data-theme="graphite"] .tsw-item:hover{background:#20242b}
html[data-theme="graphite"] .tsw-item.is-on{color:#14b8a6}

/* ---------- 靛紫 ---------- */
html[data-theme="indigo"] .dark-mode.studio-shell{background:radial-gradient(circle at 18% 0%,rgba(139,92,246,.14),transparent 36%),linear-gradient(180deg,#0e0b1a,#15112b) !important}
html[data-theme="indigo"] .dark-mode{color:#e9e5f7 !important}
html[data-theme="indigo"] .dark-mode.bg-\[\#f0f7ff\],html[data-theme="indigo"] .dark-mode .bg-\[\#f0f7ff\]{background-color:transparent !important}
html[data-theme="indigo"] .dark-mode.studio-shell .studio-output,html[data-theme="indigo"] .dark-mode.studio-shell .studio-panel,
html[data-theme="indigo"] .dark-mode .studio-output,html[data-theme="indigo"] .dark-mode .studio-panel{
  background-color:#1a1630 !important;border-color:#2f2856 !important;box-shadow:0 24px 70px rgba(0,0,0,.6) !important}
html[data-theme="indigo"] .dark-mode .bg-white,html[data-theme="indigo"] .dark-mode .bg-gray-50,html[data-theme="indigo"] .dark-mode .bg-slate-50{background-color:#1a1630 !important}
html[data-theme="indigo"] .dark-mode .bg-gray-100,html[data-theme="indigo"] .dark-mode .bg-gray-200,html[data-theme="indigo"] .dark-mode .bg-gray-900{background-color:#241e42 !important}
html[data-theme="indigo"] .dark-mode .hover\:bg-gray-200:hover{background-color:#3f3670 !important}
html[data-theme="indigo"] .dark-mode .bg-blue-50,html[data-theme="indigo"] .dark-mode .bg-blue-50\/30,html[data-theme="indigo"] .dark-mode .bg-blue-100{background-color:rgba(139,92,246,.14) !important}
html[data-theme="indigo"] .dark-mode .border-gray-200,html[data-theme="indigo"] .dark-mode .border-gray-100,html[data-theme="indigo"] .dark-mode .border-dashed,
html[data-theme="indigo"] .dark-mode .border-blue-100{border-color:#2f2856 !important}
html[data-theme="indigo"] .dark-mode .border-gray-300{border-color:#3f3670 !important}
html[data-theme="indigo"] .dark-mode select,html[data-theme="indigo"] .dark-mode input[type=text],html[data-theme="indigo"] .dark-mode input[type=password],
html[data-theme="indigo"] .dark-mode textarea,html[data-theme="indigo"] .dark-mode .control-field select{
  background-color:#120f22 !important;border-color:#2f2856 !important;color:#e9e5f7 !important}
html[data-theme="indigo"] .dark-mode select option{background-color:#1a1630 !important;color:#e9e5f7 !important}
html[data-theme="indigo"] .control-field select:focus,html[data-theme="indigo"] .dark-mode select:focus,html[data-theme="indigo"] .dark-mode textarea:focus{
  border-color:#8b5cf6 !important;box-shadow:0 0 0 3px rgba(139,92,246,.14) !important}
html[data-theme="indigo"] .dark-mode ::-webkit-scrollbar-track{background:#1a1630}
html[data-theme="indigo"] .dark-mode ::-webkit-scrollbar-thumb{background:#3f3670}
html[data-theme="indigo"] .dark-mode ::-webkit-scrollbar-thumb:hover{background:#a49cc4}
/* 主色（深浅两种模式都用同一主色） */
html[data-theme="indigo"] .bg-\[\#4a90e2\],html[data-theme="indigo"] .bg-blue-500,html[data-theme="indigo"] .bg-blue-600,
html[data-theme="indigo"] .dark-mode .bg-blue-500,html[data-theme="indigo"] .dark-mode .bg-blue-600{background-color:#8b5cf6 !important}
html[data-theme="indigo"] .hover\:bg-blue-600:hover,html[data-theme="indigo"] .hover\:bg-blue-700:hover,html[data-theme="indigo"] .bg-\[\#4a90e2\]:hover{background-color:#7c3aed !important}
html[data-theme="indigo"] .generate-btn{box-shadow:0 6px 20px rgba(139,92,246,.28) !important}
html[data-theme="indigo"] .text-blue-400,html[data-theme="indigo"] .text-blue-500,html[data-theme="indigo"] .text-blue-600,html[data-theme="indigo"] .dark-mode .text-blue-400,
html[data-theme="indigo"] .admin-log-kicker,html[data-theme="indigo"] .announcement-admin-type,html[data-theme="indigo"] .announcement-modal-kicker{color:#8b5cf6 !important}
html[data-theme="indigo"] .border-blue-400,html[data-theme="indigo"] .border-blue-500{border-color:#8b5cf6 !important}
html[data-theme="indigo"] .bg-blue-500\/20{background-color:rgba(139,92,246,.14) !important}
html[data-theme="indigo"] .dark-mode .bg-slate-500{background-color:#241e42 !important}
html[data-theme="indigo"] .dark-mode .hover\:bg-slate-600:hover{background-color:#3f3670 !important}
/* 徽章在深色下的对比度 */
html[data-theme="indigo"] .dark-mode .bg-orange-50{background-color:rgba(245,158,11,.12) !important}
html[data-theme="indigo"] .dark-mode .border-orange-200{border-color:rgba(245,158,11,.34) !important}
html[data-theme="indigo"] .dark-mode .text-orange-600{color:#fbbf24 !important}
html[data-theme="indigo"] .dark-mode .bg-yellow-500\/20{background-color:rgba(139,92,246,.14) !important}
html[data-theme="indigo"] .dark-mode .border-yellow-500\/30{border-color:#8b5cf655 !important}
html[data-theme="indigo"] .dark-mode .text-yellow-400{color:#8b5cf6 !important}
/* 换色弹窗 */
html[data-theme="indigo"] .tsw-pop{background:#1a1630;border-color:#2f2856;color:#e9e5f7}
html[data-theme="indigo"] .tsw-item:hover{background:#241e42}
html[data-theme="indigo"] .tsw-item.is-on{color:#8b5cf6}

/* ---------- 暖砂 ---------- */
html[data-theme="sand"] .dark-mode.studio-shell{background:linear-gradient(180deg,#14120f,#1b1814) !important}
html[data-theme="sand"] .dark-mode{color:#f0ebe3 !important}
html[data-theme="sand"] .dark-mode.bg-\[\#f0f7ff\],html[data-theme="sand"] .dark-mode .bg-\[\#f0f7ff\]{background-color:transparent !important}
html[data-theme="sand"] .dark-mode.studio-shell .studio-output,html[data-theme="sand"] .dark-mode.studio-shell .studio-panel,
html[data-theme="sand"] .dark-mode .studio-output,html[data-theme="sand"] .dark-mode .studio-panel{
  background-color:#201c17 !important;border-color:#352e26 !important;box-shadow:0 24px 70px rgba(0,0,0,.55) !important}
html[data-theme="sand"] .dark-mode .bg-white,html[data-theme="sand"] .dark-mode .bg-gray-50,html[data-theme="sand"] .dark-mode .bg-slate-50{background-color:#201c17 !important}
html[data-theme="sand"] .dark-mode .bg-gray-100,html[data-theme="sand"] .dark-mode .bg-gray-200,html[data-theme="sand"] .dark-mode .bg-gray-900{background-color:#2b251e !important}
html[data-theme="sand"] .dark-mode .hover\:bg-gray-200:hover{background-color:#463d31 !important}
html[data-theme="sand"] .dark-mode .bg-blue-50,html[data-theme="sand"] .dark-mode .bg-blue-50\/30,html[data-theme="sand"] .dark-mode .bg-blue-100{background-color:rgba(240,161,50,.12) !important}
html[data-theme="sand"] .dark-mode .border-gray-200,html[data-theme="sand"] .dark-mode .border-gray-100,html[data-theme="sand"] .dark-mode .border-dashed,
html[data-theme="sand"] .dark-mode .border-blue-100{border-color:#352e26 !important}
html[data-theme="sand"] .dark-mode .border-gray-300{border-color:#463d31 !important}
html[data-theme="sand"] .dark-mode select,html[data-theme="sand"] .dark-mode input[type=text],html[data-theme="sand"] .dark-mode input[type=password],
html[data-theme="sand"] .dark-mode textarea,html[data-theme="sand"] .dark-mode .control-field select{
  background-color:#17140f !important;border-color:#352e26 !important;color:#f0ebe3 !important}
html[data-theme="sand"] .dark-mode select option{background-color:#201c17 !important;color:#f0ebe3 !important}
html[data-theme="sand"] .control-field select:focus,html[data-theme="sand"] .dark-mode select:focus,html[data-theme="sand"] .dark-mode textarea:focus{
  border-color:#f0a132 !important;box-shadow:0 0 0 3px rgba(240,161,50,.12) !important}
html[data-theme="sand"] .dark-mode ::-webkit-scrollbar-track{background:#201c17}
html[data-theme="sand"] .dark-mode ::-webkit-scrollbar-thumb{background:#463d31}
html[data-theme="sand"] .dark-mode ::-webkit-scrollbar-thumb:hover{background:#a89c8c}
/* 主色（深浅两种模式都用同一主色） */
html[data-theme="sand"] .bg-\[\#4a90e2\],html[data-theme="sand"] .bg-blue-500,html[data-theme="sand"] .bg-blue-600,
html[data-theme="sand"] .dark-mode .bg-blue-500,html[data-theme="sand"] .dark-mode .bg-blue-600{background-color:#f0a132 !important}
html[data-theme="sand"] .hover\:bg-blue-600:hover,html[data-theme="sand"] .hover\:bg-blue-700:hover,html[data-theme="sand"] .bg-\[\#4a90e2\]:hover{background-color:#d98a1c !important}
html[data-theme="sand"] .generate-btn{box-shadow:0 6px 20px rgba(240,161,50,.22) !important}
html[data-theme="sand"] .text-blue-400,html[data-theme="sand"] .text-blue-500,html[data-theme="sand"] .text-blue-600,html[data-theme="sand"] .dark-mode .text-blue-400,
html[data-theme="sand"] .admin-log-kicker,html[data-theme="sand"] .announcement-admin-type,html[data-theme="sand"] .announcement-modal-kicker{color:#f0a132 !important}
html[data-theme="sand"] .border-blue-400,html[data-theme="sand"] .border-blue-500{border-color:#f0a132 !important}
html[data-theme="sand"] .bg-blue-500\/20{background-color:rgba(240,161,50,.12) !important}
html[data-theme="sand"] .dark-mode .bg-slate-500{background-color:#2b251e !important}
html[data-theme="sand"] .dark-mode .hover\:bg-slate-600:hover{background-color:#463d31 !important}
/* 徽章在深色下的对比度 */
html[data-theme="sand"] .dark-mode .bg-orange-50{background-color:rgba(245,158,11,.12) !important}
html[data-theme="sand"] .dark-mode .border-orange-200{border-color:rgba(245,158,11,.34) !important}
html[data-theme="sand"] .dark-mode .text-orange-600{color:#fbbf24 !important}
html[data-theme="sand"] .dark-mode .bg-yellow-500\/20{background-color:rgba(240,161,50,.12) !important}
html[data-theme="sand"] .dark-mode .border-yellow-500\/30{border-color:#f0a13255 !important}
html[data-theme="sand"] .dark-mode .text-yellow-400{color:#f0a132 !important}
/* 换色弹窗 */
html[data-theme="sand"] .tsw-pop{background:#201c17;border-color:#352e26;color:#f0ebe3}
html[data-theme="sand"] .tsw-item:hover{background:#2b251e}
html[data-theme="sand"] .tsw-item.is-on{color:#f0a132}
