/* 玲珑门户 · 新皮肤（现代科技风）· 单一 tokens 覆盖层 · 2026-11-10 包2
 *
 * 本文件覆盖「颜色」类 design token + 少量针对性增强（品牌方块/气泡），
 * 字体/间距/结构一律沿用各页面内联旧值 → 换肤不改版式、只换配色与质感。
 * 由 app.py 的 /__skin.css 在开关=new 时下发；开关=old 时不下发任何覆盖。
 * 注入位置在 </head> 前，同优先级下后者胜出 → 全局 token 与下述增强生效。
 */
:root {
    color-scheme: light;     /* 2026-11-13：不跟随系统深色，全站统一浅色 */
    --paper:      #F5F7FB;   /* 冷调极浅蓝白（原 暖纸白 #FBFAF6） */
    --paper-2:    #EDF1F7;   /* 助手消息底 */
    --paper-3:    #DCE3EC;   /* hover 底 */
    --ink:        #182433;   /* 深藏青（原 炭墨 #26292B） */
    --ink-60:     #4C5A6B;   /* 次要文字 */
    --ink-40:     #8B97A6;   /* 时间戳/占位 */
    --line:       #DCE3EC;   /* 发丝线 */
    --indigo:     #1F5FDB;   /* 皇家蓝主色（原 黛青 #31566B） */
    --indigo-deep:#1749A6;
    --brass:      #0E9CB2;   /* 青色点缀（原 绢金 #9A7B3F） */
    --moss:       #1E9E6A;   /* 在线绿 */
    --ochre:      #D24B3F;   /* 离线/错误红 */

    /* ── 2026-11-13 二轮：把 tokens.css 的全部颜色变量也在这里压成浅色 ──
       浏览器若还缓存着旧 tokens.css（系统深色时会把背景切黑），本文件在
       </head> 前注入、同优先级后者胜出 → 无论旧文件在不在，都白底深字。 */
    --bg: #F5F7FB;  --surface: #FFFFFF;  --surface-2: #EDF1F7;
    --line: #DCE3EC; --line-soft: #E9EEF5;
    --ink: #182433; --ink-2: #4C5A6B; --muted: #8B97A6; --weak: #A8B2BF;
    --accent: #1F5FDB; --accent-deep: #1749A6; --accent-soft: #EAF0F6; --accent-solid: #1F5FDB;
    --ok: #1E9E6A; --ok-soft: #ECFDF3; --warn: #D97706; --warn-soft: #FFF8EB;
    --danger: #D24B3F; --danger-soft: #FEF2F2; --info: #2563EB; --info-soft: #EFF6FF;
    --recruit: #7C3AED; --recruit-soft: #F5F1FE;
    --card: #FFFFFF; --panel: #FFFFFF; --chip: #EDF1F7; --soft: #EDF1F7;
    --mid: #8B97A6; --mut: #8B97A6; --ink-20: #A8B2BF; --ink-soft: #EDF1F7;
    --brand: #1F5FDB; --brand-soft: #EAF0F6; --royal: #1F5FDB; --navy: #1749A6;
    --blue: #2563EB; --cyan: #0E9CB2; --teal: #1D9E75; --green: #16A34A;
    --red: #D24B3F; --amber: #D97706; --bad: #D24B3F; --purple: #7C3AED;
    --bright: #1F5FDB; --shadow-pop: 0 4px 16px rgba(0,0,0,.08);
}

/* ── 现代科技风增强（仅 new 轨道，old 完全不受影响）── */

/* 顶栏：清爽纯白 + 冷调发丝线 */
.topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #E3E9F2;
}

/* 品牌方块：渐变 + 大圆角 + 阴影 —— 改版最显眼的锚点 */
.seal {
    border-radius: 10px;
    background: linear-gradient(135deg, #2B7FFF 0%, #1F5FDB 55%, #0E9CB2 100%);
    box-shadow: 0 3px 10px rgba(31, 95, 219, 0.28);
    color: #FFFFFF;
    font-weight: 700;
}

/* 标题：更重、更深 */
.brand h1 { font-weight: 700; color: #182433; }
.brand .sub { color: #4C5A6B; }

/* 用户气泡：渐变 + 阴影 + 现代大圆角 */
.msg.user .bubble {
    background: linear-gradient(135deg, #2B7FFF 0%, #1F5FDB 100%);
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(31, 95, 219, 0.22);
}

/* 助手气泡：纯白卡片 + 冷调描边 */
.msg.assistant .bubble {
    background: #FFFFFF;
    border: 1px solid #E3E9F2;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

/* 图标按钮悬停：皇家蓝 */
.icon-btn:hover { color: #1F5FDB; background: #EDF1F7; }

/* 链接 / 高亮：皇家蓝 */
.rich a.richlink, .rich .ln.hl { color: #1F5FDB; }

/* ── 2026-11-13 兜底：系统设了深色，门户也保持浅色 ─────────────────────
   避免浏览器把大面积区域刷成黑底、深字看不见（品牌字/logo/回答气泡）。 */
@media (prefers-color-scheme: dark) {
  html, body { background: #F5F7FB; color: #182433; }
}

/* ── 2026-11-13 二轮：关键区域直接钉死浅色 ─────────────────────────────
   侧栏、回答里的表格行/引用块/代码片段、品牌名，即使浏览器还拿着旧版
   tokens.css（或系统自动反色），也不许出现「黑底 + 深色字」。 */
.sidebar, .sb-body, .login-card, .rc-sheet, .msg.assistant .bubble,
.rich .rich-quote, .rich code, .rich .rich-table th, .rich .rich-table td {
    background-color: #FFFFFF !important;
    color: #182433 !important;
}
.rich .rich-table tbody tr:nth-child(even) td { background-color: #F5F7FB !important; }
.sb-brand-name, .brand h1, .brand .sub { color: #182433 !important; }

/* 回答正文里任何元素都不许「黑底 + 深字」：不管那段内容是回答渲染器
   还是旧模板塞进来的 inline 背景，一律透明底 + 深色字（链接保留蓝）。 */
.msg.assistant .bubble .rich, .msg.assistant .bubble .rich * {
    background-color: transparent !important;
    color: #182433 !important;
}
.msg.assistant .bubble .rich a.richlink,
.msg.assistant .bubble .rich b,
.msg.assistant .bubble .rich .ln.hl { color: #1F5FDB !important; }
