/* ============================================================
   洞明 · 玻璃双皮肤主题层（2026-08-26）
   默认皮肤：theme-liquidglass（浅色液态玻璃）
   深色皮肤：theme-glassmorphism（深紫玻璃拟态）
   原则：不动几何布局，只替换表面材质；置于 style.css 之后加载。
   ============================================================ */

/* ---------- 主题变量 ---------- */
body.theme-liquidglass {
  /* 玻璃新变量 */
  --g-panel: rgba(255, 255, 255, .38);
  --g-panel-strong: rgba(255, 255, 255, .55);
  --g-panel-in: rgba(255, 255, 255, .46);
  --g-border: rgba(255, 255, 255, .78);
  --g-border-soft: rgba(255, 255, 255, .6);
  --g-blur: blur(18px) saturate(150%);
  --g-shadow: 0 16px 44px rgba(46, 61, 96, .20), inset 0 1px 0 rgba(255,255,255,.65);
  --g-shadow-soft: 0 8px 26px rgba(46, 61, 96, .14), inset 0 1px 0 rgba(255,255,255,.6);
  --g-text: #1d2330;
  --g-text-mid: #4a4560;
  --g-text-dim: #6a6f85;
  --g-accent: #5B3A7E;
  --g-accent-deep: #4A2F68;
  --g-tint: #B9A6D4;
  --g-input-bg: rgba(255, 255, 255, .5);
  --g-seg-bg: rgba(29, 35, 48, .06);
  --g-radius: 20px;
  --g-radius-sm: 12px;
  /* 旧变量名映射（style.css 既有规则大量引用，必须随主题联动，否则浅底深字值会隐形） */
  --text-hi: #1d2330;
  --text-mid: #4a4560;
  --text-dim: #6a6f85;
  --border-soft: rgba(31, 31, 31, .10);
  --bg-card: rgba(255, 255, 255, .55);
  --bg-deep: #F6F2FB;
  --bg-mid: #EFEAF6;
  --gold: #8F6FD0;
  --gold-soft: #B9A6D4;
  --vermilion: #5B3A7E;
  --radius: 20px;
}
body.theme-glassmorphism {
  /* 玻璃新变量 */
  --g-panel: rgba(255, 255, 255, .12);
  --g-panel-strong: rgba(255, 255, 255, .18);
  --g-panel-in: rgba(255, 255, 255, .09);
  --g-border: rgba(255, 255, 255, .32);
  --g-border-soft: rgba(255, 255, 255, .22);
  --g-blur: blur(16px) saturate(150%);
  --g-shadow: 0 8px 32px rgba(15, 8, 35, .35), inset 0 1px 0 rgba(255,255,255,.28);
  --g-shadow-soft: 0 6px 22px rgba(15, 8, 35, .28), inset 0 1px 0 rgba(255,255,255,.2);
  --g-text: #F5F2FB;
  --g-text-mid: #D8CCEA;
  --g-text-dim: #B9A6D4;
  --g-accent: #CBB8E8;
  --g-accent-deep: #E9DFF7;
  --g-tint: rgba(203, 184, 232, .55);
  --g-input-bg: rgba(255, 255, 255, .10);
  --g-seg-bg: rgba(255, 255, 255, .08);
  --g-radius: 18px;
  --g-radius-sm: 12px;
  /* 旧变量名映射 */
  --text-hi: #F5F2FB;
  --text-mid: #D8CCEA;
  --text-dim: #B9A6D4;
  --border-soft: rgba(255, 255, 255, .22);
  --bg-card: rgba(255, 255, 255, .10);
  --bg-deep: #241241;
  --bg-mid: #3A2160;
  --gold: #CBB8E8;
  --gold-soft: #B9A6D4;
  --vermilion: #7C5CBF;
  --radius: 18px;
}

/* ---------- 页面背景网格 ---------- */
body.theme-liquidglass {
  background:
    radial-gradient(900px 620px at 82% 0%, rgba(214, 196, 240, .85), transparent 58%),
    radial-gradient(820px 560px at 0% 100%, rgba(240, 226, 248, .85), transparent 52%),
    radial-gradient(500px 400px at 45% 30%, rgba(233, 223, 247, .55), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F6F2FB 100%) fixed;
  color: var(--g-text);
}
body.theme-glassmorphism {
  background:
    radial-gradient(1200px 800px at 85% 8%, rgba(150, 105, 200, .50), transparent 62%),
    radial-gradient(1000px 700px at 8% 88%, rgba(91, 58, 126, .65), transparent 55%),
    radial-gradient(700px 500px at 55% 45%, rgba(203, 184, 232, .18), transparent 58%),
    linear-gradient(135deg, #241241 0%, #3A2160 45%, #5B3A7E 100%) fixed;
  color: var(--g-text);
}
body.theme-glassmorphism .top-nav,
body.theme-glassmorphism .light-wrap,
body.theme-glassmorphism .drawer,
body.theme-glassmorphism .modal,
body.theme-glassmorphism .chat-body .msg { color: var(--g-text); }

/* ---------- 通用玻璃基元 ---------- */
body.theme-liquidglass .top-nav,
body.theme-glassmorphism .top-nav,
body.theme-liquidglass .drawer,
body.theme-glassmorphism .drawer,
body.theme-liquidglass .card,
body.theme-glassmorphism .card,
body.theme-liquidglass .pane,
body.theme-glassmorphism .pane,
body.theme-liquidglass .inference-card,
body.theme-glassmorphism .inference-card,
body.theme-liquidglass .gate-card,
body.theme-glassmorphism .gate-card,
body.theme-liquidglass .modal,
body.theme-glassmorphism .modal,
body.theme-liquidglass .settings-dialog,
body.theme-glassmorphism .settings-dialog,
body.theme-liquidglass .recharge-dialog,
body.theme-glassmorphism .recharge-dialog,
body.theme-liquidglass .guide-dialog,
body.theme-glassmorphism .guide-dialog,
body.theme-liquidglass .adv-dialog,
body.theme-glassmorphism .adv-dialog {
  background: var(--g-panel);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow);
  backdrop-filter: var(--g-blur);
  -webkit-backdrop-filter: var(--g-blur);
}

/* ---------- 顶栏 ---------- */
body.theme-liquidglass .top-nav { background: rgba(255, 255, 255, .42); border-bottom: 1px solid var(--g-border-soft); }
body.theme-glassmorphism .top-nav { background: rgba(255, 255, 255, .10); border-bottom: 1px solid var(--g-border-soft); }
body.theme-liquidglass .nav-logo,
body.theme-liquidglass .tf-brand,
body.theme-liquidglass .tf-who-sub,
body.theme-liquidglass .tf-side-title { color: var(--g-text); }
body.theme-glassmorphism .nav-logo,
body.theme-glassmorphism .tf-brand,
body.theme-glassmorphism .tf-who-sub,
body.theme-glassmorphism .tf-side-title { color: var(--g-text); }
body.theme-liquidglass .tf-who-label,
body.theme-liquidglass .tf-side-section,
body.theme-liquidglass .tf-hist-title { color: var(--g-text-dim); }
body.theme-glassmorphism .tf-who-label,
body.theme-glassmorphism .tf-side-section,
body.theme-glassmorphism .tf-hist-title { color: var(--g-text-dim); }
body.theme-liquidglass .nav-logo-img { border-radius: 50%; box-shadow: 0 4px 14px rgba(70,50,130,.30), 0 0 0 1px rgba(255,255,255,.6); }
/* 深皮下小尺寸篆印：白片托底（单纯提亮在紫底上仍不清晰） */
body.theme-glassmorphism .nav-logo-img {
  border-radius: 50%;
  background: #FBF8F1;
  padding: 2px;
  box-shadow: 0 2px 10px rgba(15,8,35,.5), 0 0 0 1px rgba(255,255,255,.55);
}
body.theme-glassmorphism .footer-logo { filter: brightness(1.6) saturate(1.05) drop-shadow(0 0 18px rgba(200,160,255,.30)); }
body.theme-liquidglass .model-fixed,
body.theme-liquidglass .model-select { color: var(--g-text-mid); background: var(--g-panel-in); border: 1px solid var(--g-border-soft); }
body.theme-glassmorphism .model-fixed,
body.theme-glassmorphism .model-select { color: var(--g-text-mid); background: var(--g-panel-in); border: 1px solid var(--g-border-soft); }
body.theme-liquidglass .tf-credits-btn { color: var(--g-accent); border-bottom: 1px solid var(--g-tint); background: none; }
body.theme-glassmorphism .tf-credits-btn { color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); background: none; }
body.theme-liquidglass .btn-text { color: var(--g-text-mid); }
/* 深皮下白底浅字不可读：btn-text（登录/注册等）改玻璃面板底 */
body.theme-glassmorphism .btn-text { color: var(--g-text); background: var(--g-panel-in); border: 1px solid var(--g-border-soft); }
body.theme-liquidglass .tf-top-banner { background: var(--g-panel-in); color: var(--g-text-mid); border: 1px solid var(--g-border-soft); }
body.theme-glassmorphism .tf-top-banner { background: var(--g-panel-in); color: var(--g-text-mid); border: 1px solid var(--g-border-soft); }
body.theme-liquidglass .tf-banner-tag { background: var(--g-accent); color: #fff; }
body.theme-glassmorphism .tf-banner-tag { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- 抽屉（左右栏） ---------- */
body.theme-liquidglass .drawer-left { border-radius: 0 20px 20px 0; border-left: none; }
body.theme-liquidglass .drawer-right { border-radius: 20px 0 0 20px; border-right: none; }
body.theme-glassmorphism .drawer-left { border-radius: 0 18px 18px 0; border-left: none; }
body.theme-glassmorphism .drawer-right { border-radius: 18px 0 0 18px; border-right: none; }
body.theme-liquidglass .tf-new-chat,
body.theme-glassmorphism .tf-new-chat {
  color: var(--g-text);
  background: var(--g-panel-strong);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow-soft);
  border-radius: 14px;
}
body.theme-liquidglass .tf-new-chat:hover { background: rgba(255,255,255,.72); }
body.theme-glassmorphism .tf-new-chat:hover { background: rgba(255,255,255,.22); }
body.theme-liquidglass .tf-mz-card,
body.theme-liquidglass .tf-hist-item,
body.theme-liquidglass .tf-task-inline { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .tf-mz-card,
body.theme-glassmorphism .tf-hist-item,
body.theme-glassmorphism .tf-task-inline { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-liquidglass .tf-mz-sub,
body.theme-liquidglass .tf-empty-tip,
body.theme-liquidglass .tf-task-total { color: var(--g-text-dim); }
body.theme-glassmorphism .tf-mz-sub,
body.theme-glassmorphism .tf-empty-tip,
body.theme-glassmorphism .tf-task-total { color: var(--g-text-dim); }
body.theme-liquidglass .tf-task-bar { background: rgba(29,35,48,.10); }
body.theme-glassmorphism .tf-task-bar { background: rgba(255,255,255,.16); }
body.theme-liquidglass .tf-task-bar i,
body.theme-liquidglass .tf-task-num { background: linear-gradient(90deg, #8F6FD0, #5B3A7E); color: #fff; }
body.theme-glassmorphism .tf-task-bar i { background: linear-gradient(90deg, #CBB8E8, #fff); }
body.theme-glassmorphism .tf-task-num { background: rgba(255,255,255,.2); color: #fff; }
body.theme-liquidglass .tf-side-actions button,
body.theme-liquidglass .tf-side-bottom button,
body.theme-glassmorphism .tf-side-actions button,
body.theme-glassmorphism .tf-side-bottom button {
  background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text-mid); border-radius: var(--g-radius-sm);
}
body.theme-liquidglass .tf-icon-btn,
body.theme-glassmorphism .tf-icon-btn,
body.theme-liquidglass .tf-tool-btn,
body.theme-glassmorphism .tf-tool-btn { color: var(--g-text-mid); }
body.theme-liquidglass .tf-icon-btn:hover,
body.theme-glassmorphism .tf-icon-btn:hover { background: var(--g-panel-strong); color: var(--g-accent); }
body.theme-glassmorphism .tf-icon-btn:hover { color: #fff; }

/* ---------- 中间对话区 ---------- */
body.theme-liquidglass .light-wrap { background: transparent; }
body.theme-glassmorphism .light-wrap { background: transparent; }
body.theme-liquidglass .tf-brand-head h1,
body.theme-glassmorphism .tf-brand-head h1 { color: var(--g-text); font-family: var(--serif); font-weight: 900; letter-spacing: .18em; }
body.theme-liquidglass .tf-brand-head p,
body.theme-glassmorphism .tf-brand-head p { color: var(--g-text-dim); font-family: var(--serif); font-weight: 500; letter-spacing: .14em; }
body.theme-liquidglass .tf-brand-logo { border-radius: 50%; box-shadow: 0 14px 36px rgba(70,50,130,.35), 0 0 0 1px rgba(255,255,255,.6), 0 0 46px rgba(185,166,212,.5); }
/* 深皮下中间大 logo：白片托底（提亮对深紫印章不够），去掉紫色辉光 */
body.theme-glassmorphism .tf-brand-logo { border-radius: 50%; background: #FBF8F1; padding: 4px; box-shadow: 0 10px 34px rgba(15,8,35,.5), 0 0 0 1px rgba(255,255,255,.55); }

body.theme-liquidglass .msg.ai { background: var(--g-panel); border: 1px solid var(--g-border); box-shadow: var(--g-shadow-soft); backdrop-filter: var(--g-blur); -webkit-backdrop-filter: var(--g-blur); color: var(--g-text); }
body.theme-glassmorphism .msg.ai { background: var(--g-panel); border: 1px solid var(--g-border); box-shadow: var(--g-shadow-soft); backdrop-filter: var(--g-blur); -webkit-backdrop-filter: var(--g-blur); color: var(--g-text); }
body.theme-liquidglass .msg.user { background: rgba(255,255,255,.82); color: #4b2f74; }
body.theme-glassmorphism .msg.user { background: rgba(255,255,255,.85); color: #4b2f74; }
body.theme-liquidglass .msg.typing { color: var(--g-text-dim); }
body.theme-glassmorphism .msg.typing { color: var(--g-text-dim); }

/* ---------- 输入框 ---------- */
body.theme-liquidglass .tf-input-box,
body.theme-glassmorphism .tf-input-box {
  background: var(--g-panel);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow-soft);
  backdrop-filter: var(--g-blur);
  -webkit-backdrop-filter: var(--g-blur);
  border-radius: var(--g-radius);
}
body.theme-liquidglass .tf-input-box:focus-within { border-color: #fff; box-shadow: var(--g-shadow-soft), 0 0 0 1px rgba(139,111,208,.4); }
body.theme-glassmorphism .tf-input-box:focus-within { border-color: rgba(255,255,255,.55); }
body.theme-liquidglass .tf-input-box textarea { color: var(--g-text); }
body.theme-glassmorphism .tf-input-box textarea { color: var(--g-text); }
body.theme-liquidglass .tf-input-box textarea::placeholder { color: #8a8fa3; }
body.theme-glassmorphism .tf-input-box textarea::placeholder { color: rgba(255,255,255,.62); }
body.theme-liquidglass .send-btn { background: linear-gradient(135deg, #8F6FD0, #5B3A7E); border: 1px solid rgba(255,255,255,.30); box-shadow: 0 8px 22px rgba(91,58,126,.30), inset 0 1px 0 rgba(255,255,255,.25); }
body.theme-liquidglass .send-btn svg path { fill: #fff; }
body.theme-glassmorphism .send-btn { background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 14px rgba(20,10,50,.3); }
body.theme-glassmorphism .send-btn svg path { fill: #fff; }

/* ---------- 模式 chips ---------- */
body.theme-liquidglass .mode-chip,
body.theme-liquidglass .chip { background: rgba(255,255,255,.34); border: 1px solid rgba(255,255,255,.75); color: #4a4560; }
body.theme-liquidglass .mode-chip.active,
body.theme-liquidglass .chip.active { color: #4b2f74; background: rgba(255,255,255,.85); border-color: #fff; box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(70,50,130,.18), 0 0 0 1px rgba(139,111,208,.4); }
body.theme-glassmorphism .mode-chip,
body.theme-glassmorphism .chip { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.3); color: var(--g-text-mid); }
body.theme-glassmorphism .mode-chip.active,
body.theme-glassmorphism .chip.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)) padding-box, linear-gradient(135deg, rgba(255,255,255,.8), rgba(203,184,232,.6)) border-box;
  border: 1.5px solid transparent; box-shadow: 0 4px 18px rgba(20,10,50,.25);
}
body.theme-liquidglass .mode-desc,
body.theme-glassmorphism .mode-desc { color: var(--g-text-dim); }

/* ---------- 表单（右栏排盘） ---------- */
body.theme-liquidglass .form-row input,
body.theme-liquidglass .form-row select,
body.theme-liquidglass .form-row textarea,
body.theme-glassmorphism .form-row input,
body.theme-glassmorphism .form-row select,
body.theme-glassmorphism .form-row textarea {
  background: var(--g-input-bg);
  border: 1px solid var(--g-border-soft);
  color: var(--g-text);
  border-radius: 11px;
}
/* 浅皮下白 50% 底+白边框贴白背景几乎隐形：提底色、边框改紫调 */
body.theme-liquidglass .form-row input,
body.theme-liquidglass .form-row select,
body.theme-liquidglass .form-row textarea {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(91, 58, 126, .38);
}
body.theme-liquidglass .form-row input::placeholder { color: #8a8fa3; }
body.theme-liquidglass .form-row input:focus,
body.theme-liquidglass .form-row select:focus { border-color: rgba(139,111,208,.7); box-shadow: 0 0 0 3px rgba(185,166,212,.25); }
body.theme-glassmorphism .form-row input:focus,
body.theme-glassmorphism .form-row select:focus { border-color: rgba(255,255,255,.55); }
body.theme-liquidglass .form-row select option { background: #fff; color: #1d2330; }
body.theme-glassmorphism .form-row select option { background: #3A2160; color: #F5F2FB; }
body.theme-liquidglass .form-row label,
body.theme-glassmorphism .form-row label { color: var(--g-text-mid); }
body.theme-liquidglass .panel-tip,
body.theme-glassmorphism .panel-tip { color: var(--g-text-dim); }
body.theme-liquidglass .date-mode { background: var(--g-seg-bg); border: 1px solid var(--g-border-soft); }
body.theme-glassmorphism .date-mode { background: var(--g-seg-bg); border: 1px solid var(--g-border-soft); }
body.theme-liquidglass .date-mode-btn { color: var(--g-text-dim); }
body.theme-liquidglass .date-mode-btn.active { background: rgba(255,255,255,.9); color: #4b2f74; box-shadow: 0 2px 8px rgba(46,61,96,.14), inset 0 1px 0 #fff; }
body.theme-glassmorphism .date-mode-btn { color: var(--g-text-dim); }
body.theme-glassmorphism .date-mode-btn.active { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45); box-shadow: 0 2px 8px rgba(20,10,50,.2); }

/* ---------- 主按钮 ---------- */
body.theme-liquidglass .btn-primary,
body.theme-liquidglass .big-cta {
  background: linear-gradient(135deg, #8F6FD0, #5B3A7E);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(91, 58, 126, .30), inset 0 1px 0 rgba(255, 255, 255, .28);
}
body.theme-liquidglass .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(91, 58, 126, .40), inset 0 1px 0 rgba(255, 255, 255, .28); }
body.theme-glassmorphism .btn-primary,
body.theme-glassmorphism .big-cta {
  background: linear-gradient(135deg, rgba(255,255,255,.30), rgba(255,255,255,.10));
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 24px rgba(20,10,50,.35);
}
body.theme-glassmorphism .btn-primary:hover { background: rgba(255,255,255,.22); }

/* ---------- 右栏 tabs ---------- */
body.theme-liquidglass .pane-tabs { border-bottom: 1px solid rgba(29,35,48,.10); }
body.theme-glassmorphism .pane-tabs { border-bottom: 1px solid rgba(255,255,255,.18); }
body.theme-liquidglass .pane-tab { color: var(--g-text-dim); }
body.theme-liquidglass .pane-tab.active { color: #4b2f74; }
body.theme-liquidglass .pane-tab.active::after { background: linear-gradient(90deg, #8F6FD0, #5B3A7E); }
body.theme-glassmorphism .pane-tab { color: var(--g-text-dim); }
body.theme-glassmorphism .pane-tab.active { color: #fff; }
body.theme-glassmorphism .pane-tab.active::after { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.7); }

/* ---------- 弹窗 ---------- */
body.theme-liquidglass .modal-overlay,
body.theme-glassmorphism .modal-overlay { background: rgba(20, 12, 40, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.theme-liquidglass .modal,
body.theme-liquidglass .settings-dialog,
body.theme-liquidglass .recharge-dialog,
body.theme-liquidglass .guide-dialog { border-radius: 20px; color: var(--g-text); }
body.theme-glassmorphism .modal,
body.theme-glassmorphism .settings-dialog,
body.theme-glassmorphism .recharge-dialog,
body.theme-glassmorphism .guide-dialog { border-radius: 18px; color: var(--g-text); }
body.theme-liquidglass .denom-card { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .denom-card { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-liquidglass .redeem-intro,
body.theme-glassmorphism .redeem-intro { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text-mid); }
body.theme-liquidglass .set-desc,
body.theme-glassmorphism .set-desc { color: var(--g-text-mid); }
body.theme-liquidglass .set-sub-title,
body.theme-glassmorphism .set-sub-title { color: var(--g-text); }
body.theme-liquidglass .settings-close,
body.theme-glassmorphism .settings-close { color: var(--g-text-mid); }

/* 皮肤切换按钮组 */
.skin-switch { display: flex; gap: 8px; margin-top: 8px; }
.skin-switch button { flex: 1; padding: 9px 6px; border-radius: 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--g-border-soft); background: var(--g-panel-in); color: var(--g-text-mid); }
.skin-switch button.active { color: var(--g-accent); border: 1.5px solid var(--g-accent); background: var(--g-panel-strong); }
body.theme-glassmorphism .skin-switch button.active { color: #fff; border-color: #fff; }
/* 顶栏皮肤快切按钮（复用 btn-text 底形，仅放图标） */
.skin-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; }
.skin-toggle svg { display: block; }

/* ---------- 过三关 / 命途卡片 ---------- */
body.theme-liquidglass .life-node,
body.theme-liquidglass .life-suggest,
body.theme-glassmorphism .life-node,
body.theme-glassmorphism .life-suggest { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-liquidglass .inference-number { background: var(--g-accent); color: #fff; }
body.theme-glassmorphism .inference-number { background: rgba(255,255,255,.2); color: #fff; }
body.theme-liquidglass .inference-title { color: var(--g-text); }
body.theme-glassmorphism .inference-title { color: var(--g-text); }
body.theme-liquidglass .inference-content { color: var(--g-text-mid); }
body.theme-glassmorphism .inference-content { color: var(--g-text-mid); }

/* ---------- 滚动条 ---------- */
body.theme-liquidglass ::-webkit-scrollbar-thumb { background: rgba(29,35,48,.22); }
body.theme-glassmorphism ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- index 停留页 ---------- */
/* 品牌文字统一 logo 风格：衬线 + 重磅字重（子集已覆盖所需汉字，拉丁 AI 回退系统衬线） */
body.theme-liquidglass.tf-landing .hero h1,
body.theme-glassmorphism.tf-landing .hero h1 { font-weight: 900; }
body.theme-liquidglass.tf-landing .subtitle,
body.theme-glassmorphism.tf-landing .subtitle { font-family: var(--serif); font-weight: 700; }
body.theme-liquidglass .nav-logo,
body.theme-glassmorphism .nav-logo { font-weight: 700; }
body.theme-liquidglass.tf-landing .hero h1 { color: var(--g-text); }
body.theme-liquidglass.tf-landing .subtitle { color: var(--g-accent); }
body.theme-liquidglass.tf-landing .hero p { color: var(--g-text-mid); }
body.theme-liquidglass.tf-landing .tech-card { background: var(--g-panel); border: 1px solid var(--g-border); box-shadow: var(--g-shadow-soft); backdrop-filter: var(--g-blur); -webkit-backdrop-filter: var(--g-blur); border-radius: var(--g-radius); }
body.theme-liquidglass.tf-landing .tech-card h3 { color: var(--g-text); }
body.theme-liquidglass.tf-landing .tech-card p { color: var(--g-text-mid); }
body.theme-glassmorphism.tf-landing .hero h1 { color: #fff; }
body.theme-glassmorphism.tf-landing .subtitle { color: var(--g-tint); }
body.theme-glassmorphism.tf-landing .hero p { color: var(--g-text-mid); }
body.theme-glassmorphism.tf-landing .tech-card { background: rgba(255,255,255,.10); border: 1px solid var(--g-border); box-shadow: var(--g-shadow-soft); backdrop-filter: var(--g-blur); -webkit-backdrop-filter: var(--g-blur); border-radius: 18px; }
body.theme-glassmorphism.tf-landing .tech-card h3 { color: #fff; }
body.theme-glassmorphism.tf-landing .tech-card p { color: var(--g-text-mid); }
body.theme-liquidglass.tf-landing .footer,
body.theme-glassmorphism.tf-landing .footer { color: var(--g-text-dim); }

/* ---------- 全术法详批弹窗（reading-*） ---------- */
body.theme-liquidglass .reading-modal {
  background: linear-gradient(165deg, #FFFFFF 0%, #F6F2FB 100%);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow);
}
body.theme-glassmorphism .reading-modal {
  background: linear-gradient(165deg, rgba(58, 33, 96, .96) 0%, rgba(36, 18, 65, .96) 100%);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow);
}
body.theme-liquidglass .reading-modal h2,
body.theme-liquidglass .reading-modal h3,
body.theme-liquidglass .reading-modal label,
body.theme-liquidglass .reading-modal .reading-unknown { color: var(--g-text); }
body.theme-liquidglass .reading-modal header p,
body.theme-liquidglass .reading-modal section p,
body.theme-liquidglass .reading-modal small { color: var(--g-text-dim); }
body.theme-glassmorphism .reading-modal h2,
body.theme-glassmorphism .reading-modal h3,
body.theme-glassmorphism .reading-modal label,
body.theme-glassmorphism .reading-modal .reading-unknown { color: var(--g-text); }
body.theme-glassmorphism .reading-modal header p,
body.theme-glassmorphism .reading-modal section p,
body.theme-glassmorphism .reading-modal small { color: var(--g-text-dim); }
body.theme-liquidglass .reading-modal input,
body.theme-liquidglass .reading-modal select,
body.theme-liquidglass .reading-modal textarea { background: #fff; border: 1px solid rgba(91, 58, 126, .22); color: var(--g-text); }
body.theme-glassmorphism .reading-modal input,
body.theme-glassmorphism .reading-modal select,
body.theme-glassmorphism .reading-modal textarea { background: var(--g-input-bg); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-liquidglass .reading-submit { background: var(--g-accent); color: #fff; }
body.theme-glassmorphism .reading-submit { background: var(--g-accent); color: #241241; font-weight: 700; }
body.theme-liquidglass .reading-cancel,
body.theme-glassmorphism .reading-cancel { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text-mid); }

/* ---------- 深色皮肤专项修复：硬编码浅色的组件 ---------- */
body.theme-glassmorphism .tf-task-inline {
  background: linear-gradient(165deg, rgba(58, 33, 96, .97), rgba(36, 18, 65, .97)) !important;
  border: 1px solid var(--g-border);
}
body.theme-glassmorphism .tf-task-inline .task-check,
body.theme-glassmorphism .tf-task-inline .task-check.pop { color: var(--g-text) !important; }
body.theme-glassmorphism .tf-task-inline .task-check.pop .task-reward { color: #CBB8E8 !important; }
body.theme-glassmorphism .tf-task-inline .tf-task-bar,
body.theme-glassmorphism .tf-task-inline .tf-task-bar.pop { background: rgba(255,255,255,.16) !important; }
body.theme-glassmorphism .tf-task-inline .task-checkbox { border-color: rgba(255,255,255,.4) !important; }
body.theme-glassmorphism .tf-new-card-head { color: var(--g-text) !important; }
body.theme-glassmorphism .tf-new-card-body { color: var(--g-text-dim) !important; }
body.theme-glassmorphism .tf-new-card-desc { color: var(--g-text-dim) !important; }
body.theme-glassmorphism .task-section-head { color: var(--g-text-mid) !important; }
body.theme-glassmorphism .task-section-title { color: var(--g-text-mid) !important; }
body.theme-glassmorphism .tf-task-num { color: var(--g-text) !important; }
body.theme-glassmorphism .tf-task-total { color: var(--g-text-dim) !important; }
/* 侧栏任务卡/新手卡/任务弹窗：旧规则白底硬编码，深皮下白底浅字不可读 */
body.theme-glassmorphism .task-item { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .newbie-card,
body.theme-glassmorphism .task-hero { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); }
body.theme-glassmorphism .task-pop-title,
body.theme-glassmorphism .task-group-title.pop { color: var(--g-text) !important; }
body.theme-glassmorphism .task-pop-progress-row,
body.theme-glassmorphism .task-pop-tip { color: var(--g-text-mid) !important; }
body.theme-glassmorphism .task-pop-close,
body.theme-glassmorphism .pop-arrow { color: var(--g-text-dim) !important; }
body.theme-glassmorphism .task-group.pop-group { background: rgba(255,255,255,.06); }

/* ---------- 深色皮肤第二批修复：设置/充值/日历/预览/合盘等弹窗与控件 ----------
   症结同第一批：style.css 里大量 #FAF7F0/#fff 硬编码浅底 + 浅色主题文字，深皮下不可读 */
body.theme-glassmorphism .settings-nav { background: var(--g-panel-in); border-right-color: var(--g-border-soft); }
body.theme-glassmorphism .set-plan-row { background: var(--g-panel-in); border-color: var(--g-border-soft); }
body.theme-glassmorphism .set-btn-logout { color: #ff9c8a; border-color: rgba(255, 128, 110, .4); }
body.theme-glassmorphism .set-tx-wrap { border-color: var(--g-border-soft); }
body.theme-glassmorphism .set-credits-row { border-bottom-color: rgba(255,255,255,.08); }
body.theme-glassmorphism .tx-out { color: #ff9c8a; }
body.theme-glassmorphism .rel-chip { background: var(--g-input-bg); border-color: var(--g-border-soft); color: var(--g-text-mid); }
body.theme-glassmorphism .ctx-cap { background: var(--g-panel-in); border-color: var(--g-border-soft); color: var(--g-text-dim); }
body.theme-glassmorphism .mode-switch-tip { background: var(--g-panel-strong); border-color: var(--g-border-soft); box-shadow: var(--g-shadow-soft); }
body.theme-glassmorphism .scroll-down { background: var(--g-panel-strong); border-color: var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .date-cal { background: #3A2160; border-color: var(--g-border); box-shadow: 0 12px 32px rgba(15,8,35,.5); }
body.theme-glassmorphism .cal-title, body.theme-glassmorphism .cal-month { color: var(--g-text); }
body.theme-glassmorphism .cal-year { background: var(--g-input-bg); border-color: var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .cal-nav { background: rgba(255,255,255,.08); color: var(--g-text-mid); }
body.theme-glassmorphism .cal-nav:hover { background: rgba(255,255,255,.16); color: var(--g-text); }
body.theme-glassmorphism .cal-day { color: var(--g-text-mid); }
body.theme-glassmorphism .cal-day:hover { background: rgba(255,255,255,.1); color: var(--g-text); }
body.theme-glassmorphism .cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
body.theme-glassmorphism .pai-preview { background: var(--g-panel-in); border-color: var(--g-border-soft); }
body.theme-glassmorphism .pp-head, body.theme-glassmorphism .pp-meta { color: var(--g-text-dim); }
body.theme-glassmorphism .pp-pillar { background: var(--g-input-bg); border-color: var(--g-border-soft); }
body.theme-glassmorphism .life-onboard, body.theme-glassmorphism .life-form { background: var(--g-panel-in); border-color: var(--g-border-soft); }
body.theme-glassmorphism .recharge-banner { background: rgba(203,184,232,.12); border: 1px solid var(--g-border-soft); color: var(--g-text-mid); }
body.theme-glassmorphism .redeem-row input { background: var(--g-input-bg); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .plan-btn.ghost { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text-mid); }
body.theme-glassmorphism .plan-btn.dark { background: var(--g-accent); color: #241241; }

/* ---------- 深色皮肤第三批修复：主/次按钮文字、beta 标签、弹窗近实底 ----------
   白玻璃底 + 白字（btn-primary/btn-ghost）在深皮下不可读；弹窗沿用半透明面板时
   玻璃叠玻璃整体发糊，弹窗改高不透明度深紫/暖白面板 */
body.theme-glassmorphism .btn-primary,
body.theme-glassmorphism .big-cta { color: #241241; font-weight: 700; }
body.theme-glassmorphism .btn-ghost { background: var(--g-panel-in); border: 1px solid var(--g-border-soft); color: var(--g-text); }
body.theme-glassmorphism .tab-beta { color: #E9DFF7; background: rgba(255,255,255,.18); }
body.theme-glassmorphism .modal,
body.theme-glassmorphism .settings-dialog,
body.theme-glassmorphism .recharge-dialog,
body.theme-glassmorphism .guide-dialog,
body.theme-glassmorphism .adv-dialog {
  background: linear-gradient(165deg, #32205C 0%, #241241 100%);
}
body.theme-liquidglass .modal,
body.theme-liquidglass .settings-dialog,
body.theme-liquidglass .recharge-dialog,
body.theme-liquidglass .guide-dialog,
body.theme-liquidglass .adv-dialog {
  background: linear-gradient(165deg, #FFFFFF 0%, #F6F2FB 100%);
}
/* mode-desc：渐变文字用 -webkit-text-fill-color，必须同步覆盖 */
body.theme-glassmorphism .mode-desc {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--g-text-mid) !important;
  color: var(--g-text-mid) !important;
}
body.theme-glassmorphism .mode-switch-tip { color: var(--g-text-dim) !important; }
/* 表单占位符：全局 override（浏览器默认灰在紫底上偏弱） */
body.theme-glassmorphism ::placeholder { color: rgba(185, 166, 212, .8) !important; }
body.theme-glassmorphism .custom-date-wrap input::placeholder { color: rgba(185, 166, 212, .8) !important; }
body.theme-glassmorphism .field-hint,
body.theme-glassmorphism .guide-list,
body.theme-glassmorphism .guide-dialog p,
body.theme-glassmorphism .auth-tip,
body.theme-glassmorphism .tf-empty-tip,
body.theme-glassmorphism .tf-hist-title,
body.theme-glassmorphism .tf-side-title { color: var(--g-text-dim) !important; }
body.theme-glassmorphism .loading { color: var(--g-text-mid) !important; }

/* ---------- 浅色皮肤专项修复：旧硬编码同步覆盖 ---------- */
body.theme-liquidglass .mode-desc {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--g-text-mid) !important;
  color: var(--g-text-mid) !important;
}
body.theme-liquidglass .tf-task-inline { background: rgba(255,255,255,.82) !important; border: 1px solid rgba(31,31,31,.08); }
body.theme-liquidglass .tf-task-inline .task-check.pop { color: var(--g-text) !important; }
body.theme-liquidglass .tf-task-inline .task-check.pop .task-reward { color: var(--g-accent) !important; }
body.theme-liquidglass .tf-task-inline .task-checkbox { border-color: rgba(31,31,31,.18) !important; }
body.theme-liquidglass .tf-new-card-head { color: var(--g-text) !important; }
body.theme-liquidglass .tf-new-card-body,
body.theme-liquidglass .tf-new-card-desc { color: var(--g-text-mid) !important; }
body.theme-liquidglass .task-section-head,
body.theme-liquidglass .task-section-title { color: var(--g-text-dim) !important; }
body.theme-liquidglass ::placeholder { color: var(--g-text-dim) !important; }
body.theme-liquidglass .custom-date-wrap input::placeholder { color: var(--g-text-dim) !important; }

/* ---------- 动效（克制） ---------- */
body.theme-liquidglass .drawer,
body.theme-glassmorphism .drawer,
body.theme-liquidglass .card,
body.theme-glassmorphism .card { transition: background .2s ease-out, border-color .2s ease-out; }

/* ---------- 过三关卡片（玻璃深色适配） ---------- */
body.theme-glassmorphism .validation-card { background: var(--g-panel-in); border-color: var(--g-border-soft); }
body.theme-glassmorphism .vc-head { color: var(--g-text-dim); }
body.theme-glassmorphism .vc-head b { color: var(--g-text); }
body.theme-glassmorphism .vc-period { color: var(--g-accent); background: rgba(255, 255, 255, .08); }
body.theme-glassmorphism .validation-card p { color: var(--g-text-mid); }
body.theme-glassmorphism .vc-opt { color: var(--g-text); background: rgba(255, 255, 255, .06); border-color: var(--g-border-soft); }
body.theme-glassmorphism .vc-opt:hover { border-color: var(--gold); color: var(--g-text); background: rgba(255, 255, 255, .12); }
body.theme-glassmorphism .vc-note { background: var(--g-input-bg); color: var(--g-text); border: 1px solid var(--g-border-soft); border-radius: 8px; padding: 8px 10px; }
