/*
 * 浅色主题("白天主题") —— 2026-07 用户反馈"切到白天主题后一些文字被遮挡/同色看不清"，
 * 排查后发现根因：原来的浅色覆盖规则只逐个枚举了15条最基础的class(背景/主文字/边框)，
 * 而整个项目实际用到的颜色相关class多达244种(各种状态标签/徽章配色/按钮强调色)，剩下
 * 230多种在暗色背景下调好看的鲜艳颜色，切到浅色背景后完全没人管，文字自然读不清。
 *
 * 设计原则(第一版，2026-07)：
 *   1. 保留现有的暖米色/焦糖橙基调(背景#f6ede2、卡片#fffaf2、主强调色#ec5b13)，不推倒重来。
 *   2. 不再逐个class手动枚举——Tailwind的颜色class天然是"角色前缀-色相-明度(/透明度)"这种
 *      规律结构，用属性选择器按"色相家族"分组覆盖(比如所有text-amber-*不管具体明度/透明度
 *      统一按amber家族处理)，一次覆盖一整个色相家族，不会再出现"覆盖了/50却漏了/40"这种
 *      枚举遗漏(帖子导航"上一篇/下一篇"框用的bg-background-dark/40就是被漏掉的真实案例)。
 *      以后项目里新增同色相的其它明度/透明度用法，不需要再回来补规则。
 *   3. 每个色相定义三个角色：
 *      - 文字色(text-{hue}-*)：这些class在暗色主题里普遍用的是浅色调(比如text-amber-300)，
 *        为了在暗背景上显眼；浅色主题下必须换成深色调的同色相，否则浅色文字配浅色背景
 *        就是"同色看不清"的直接原因。
 *      - 软背景色(bg-{hue}-*，含各种/透明度)：统一换成同色相的浅色半透明底色，营造徽章/
 *        标签常见的"浅底色+深文字"效果，而不是直接沿用暗色主题的深底色。
 *      - 边框色(border-{hue}-*)：统一换成同色相的中等透明度边框，勾勒轮廓但不抢眼。
 *
 * 第二版改动(2026-07 第六十轮，"真首页"配色迁移)：用户新做的网站真首页("/"，见home.html)
 * 是仿旧时代游戏专区的蓝金配色，要求论坛的白天主题也改成同一套配色搭配(晚上主题不变)。
 * 只重新调整了上面第1条提到的"核心品牌色层"(页面/卡片背景、主强调色、logo、header、
 * 边框、正文文字这几个不属于任何具体色相家族的角色)，**没有动**第2/3条描述的"17个标准
 * 色相家族+2个自定义强调色"这一整块系统性可读性修复——那一块管的是帖子状态标签/徽章
 * 分类颜色这类语义色(比如"精华帖"用amber、"置顶"用red)，不是网站的品牌配色，动了反而
 * 会让不同类别的标签失去颜色区分度，所以保持原样。新的核心配色方案(直接取自home.html
 * 实际用到的色值)：
 *   - 页面背景 #fafbfc / 次要面板 #f5f8fb / 卡片 #f2efe8(浅米灰) —— 对应home.html白色
 *     阅读区的干净观感，替换掉原来的暖米色三级background(f6ede2/f8ecdd/fffaf2)。
 *     卡片色第六十四轮从纯白#ffffff改成浅米灰#f2efe8(用户反馈"太白太亮不舒服")，
 *     页面基底/次要面板/表单输入框背景不受影响，保持原色。
 *   - 主强调色分三档：CTA按钮/图标强调 #0076c1(中蓝，home.html的header-bar-blue主色)，
 *     焦点框/hover发光/边框强调 #1c5ba1(home.html的.border-blue-dark)，logo/最高强调
 *     文字 #004b8d(home.html主容器边框色，视觉上最深最"权威")。
 *   - 少量点缀色：金黄 #f7b500(home.html的header-bar-yellow，专门用来标记"每日更新"/
 *     "最新消息"这类内容板块标题)，这次只用在两处最贴切的地方——顶部常驻header的
 *     渐变点缀、以及admin.html里原本挂绿色的"accent"二级强调色角色(彻底新造UI元素去
 *     用金黄没有必要，复用这两个已有的、语义上就是"次要/点缀强调色"的现成挂载点更克制)。
 *   - 正文/次要文字换成冷色调墨蓝灰(#1e293b主文字/#4a6178次要文字)，不再是暖褐色；
 *     中性灰色系(gray/slate/zinc/neutral/stone这几个色相家族)也从暖褐灰(#6b5638)
 *     换成冷蓝灰(#475569)，避免和新的蓝色基调冲突——这条严格说属于上面"不动"的色相
 *     家族范围，但灰色本身不承载任何"分类"语义(不像红/绿/黄那样用来区分帖子状态)，
 *     单纯是从属于整体基调的中性色，所以和核心品牌色层一起调整，逻辑上更连贯。
 *   - 品牌动效(logo渐变文字、呼吸光晕)：延续第一版"浅色主题下改成静态色、不做动效"
 *     这条既有设计取向不变，只是静态颜色换成新的深蓝#004b8d。
 *
 * 从templates/partials/user_center_drawer.html的内联<style>搬出来，改成独立文件用
 * <link>引入，好处：①不用每个引用页面各自重复一份内联CSS；②方便admin.html这类之前
 * 完全没有浅色主题支持的页面直接引入同一份文件，不需要跟着引入整个用户中心抽屉组件。
 */

/* ── 页面基底 ───────────────────────────────────────────────────────
   踩过的坑：把body.light-mode机械地整体替换成html.light时，这一条基础规则本身也被
   连带改成只样式化<html>标签自己——但每个页面自己的<style>里都有一条完全不受任何主题
   类限制的裸body{background-color:#1A1B26; ...}(比如post.html/admin.html各自都有一份)，
   <body>的这层不透明背景会盖在<html>的背景之上，只改html自己的背景没有实际视觉效果。
   这里额外用html.light body这个后代选择器精确点名<body>本身(<body>是<html>的子元素，
   天然是它的后代，选择器天然成立)，配合!important，才能真正盖掉那条裸body规则。 */
/* 2026-07 第六十九轮：用户反馈"浏览帖子列表时白色太刺眼"——page背景/顶部横幅/搜索框
   底纹这三处之前都接近纯白(#fafbfc/glass-header渐变末端白色/搜索框wrapper继承页面背景)，
   用AskUserQuestion确认要统一换成"浅绿色再淡50%"(取个人中心徽章墙"小牛试刀徽章"的
   accent-green浅底色调，再淡一档，比纯白柔和但不会明显偏绿)。#f2efe8的卡片色、
   input/textarea/select(含发帖标题/正文、高级编辑器)的纯白#ffffff、次要面板色#f5f8fb
   都不在这次改动范围内，用户明确要求不要动。 */
html.light,
html.light body {
    background-color: #f0fbf4 !important;
    color: #1e293b !important;
}
/* header是全站最常驻可见的一块chrome，蓝金两色都露一点：顶部渐变洗一层金黄(呼应
   home.html里header-bar-yellow标记内容板块标题的用法)，底部分割线用中蓝(结构线角色，
   和下面.text-primary等强调色的中蓝档位保持一致)。渐变末端从纯白#ffffff换成和上面
   页面基底一致的#f0fbf4(第六十九轮)，呼应"顶部横幅也是一个窄窄的白色"这条反馈。 */
html.light .glass-header {
    background: linear-gradient(to bottom, rgba(247, 181, 0, 0.16) 0%, rgba(240, 251, 244, 0.96) 100%) !important;
    border-bottom: 1px solid rgba(28, 91, 161, 0.35) !important;
}
/* 搜索栏外层wrapper(index.html/board.html各一处，class同时带sticky+bg-background-dark)
   ——bg-background-dark这个class本身在项目里被22个模板广泛复用于各种按钮/弹窗/图标
   底色，不能直接改它在浅色主题下的取值(会连带影响一大片和搜索框无关的UI)。这里用
   sticky+bg-background-dark的复合选择器精确只命中这两处搜索栏wrapper，让搜索框底纹
   和页面基底换成同一个颜色(第六十九轮用户明确要求"这三处统一换成同一个颜色")。 */
html.light .sticky[class*="bg-background-dark"] {
    background-color: #f0fbf4 !important;
}
/* 篝火漂浮火苗背景(2026-07第六十九轮，见partials/campfire_background.html)是晚上主题
   专属的氛围装饰——JS生成火星粒子那部分已经会检查<html>是否带dark class，不是的话
   直接跳过不生成新粒子，但#campfire-container自己的暖色径向渐变背景(不依赖JS)如果
   不额外隐藏，浅色主题下依然会整块显示，在新的浅绿色页面基底上叠一层不该出现的橙色
   光晕——这是真实验证时(Playwright测得computed display仍是block)才发现的，不是
   凭空预防。这里直接display:none整个隐藏容器，比等JS下一次interval判断更快更彻底，
   也顺带处理了"切主题瞬间容器里还残留着上一轮还没播完动画的火星节点"这种边界情况。 */
html.light #campfire-container {
    display: none !important;
}
/* 2026-07第六十二轮：用户反馈用户中心抽屉"纯白背景"导致里面的按钮行(bg-background-dark/60
   在浅色模式下解析成接近白色的#f5f8fb)和抽屉自身背景几乎同色，"好像就是三列文字"，
   没有按钮的层次感。原来的渐变(#ffffff→#eef5fb)两端都太接近白色。改成更明显、和按钮行
   拉开差距的浅蓝色渐变——按钮行依然是#f5f8fb(近白)，衬着这层更蓝的底色，才会读出"白色
   卡片浮在蓝色抽屉上"的层次，而不是"整片同一种颜色"。 */
html.light .bg-sidebar-dark {
    background: linear-gradient(to bottom, #dbe9f7 0%, #c3daf0 100%) !important;
    border-left-color: rgba(28, 91, 161, 0.35) !important;
    box-shadow: -14px 0 36px rgba(28, 91, 161, 0.18), inset 1px 0 16px rgba(0, 118, 193, 0.12) !important;
}
/* 属性选择器捕获所有透明度变体(/30、/40、/50、/60...)，不用逐个枚举 */
html.light [class*="bg-background-dark"] {
    background-color: #f5f8fb !important;
}
html.light [class*="bg-card-dark"] {
    background: #f2efe8 !important;
    border-color: #cfe0ef !important;
    box-shadow: 0 8px 26px rgba(15, 42, 74, 0.1) !important;
}
/* 2026-08 第七十六轮：帖子列表每条帖子的卡片背景从米白#f2efe8改成浅蓝#e2f0fc
   (用户明确要求，仅白天主题；晚上主题完全不动)。从上面的合并规则里拆出，
   bg-card-dark维持原色不变，边框/阴影沿用原值。
   2026-08 第七十九轮：用户反馈浅蓝不够明显——背景加深一档(#e2f0fc→#d3e7f9)，
   边框按"背景的两倍幅度"同步加深(#cfe0ef→#a7c8e8)。 */
html.light .post-card {
    background: #d3e7f9 !important;
    border-color: #a7c8e8 !important;
    box-shadow: 0 8px 26px rgba(15, 42, 74, 0.1) !important;
}
html.light .text-white {
    color: #1e293b !important;
}
html.light [class*="text-text-highlight"] {
    color: #4a6178 !important;
}
html.light [class*="border-border-highlight"],
html.light [class*="border-white/"],
html.light [class*="border-primary/1"],
html.light [class*="border-primary/3"],
html.light [class*="border-primary/4"] {
    border-color: rgba(28, 91, 161, 0.3) !important;
}
/* 2026-07(排查"白天主题下后台所有勾选框都无法勾选"反馈时定位到的真实bug，从round40
   浅色主题上线起就存在，只是当时dark是默认主题、没被普遍撞见——round63把默认主题
   换成light后才被大量用户碰到)：这条规则原来是"html.light input, textarea, select"
   不区分input的type，会连checkbox/radio也一起改成background-color:#ffffff !important。
   项目用了@tailwindcss/forms插件，它给":checked"状态的checkbox/radio设置的是
   background-color: currentColor(非!important)，配一个白色的勾选图标画在上面——
   我们这条!important规则会把这个"当前应该显示的填充色"强制覆盖成纯白，勾选图标
   (本身也是白色)就画在纯白背景上，变成完全看不见的"白底白字"。**checkbox底层
   checked状态其实一直是对的、能正常提交**，纯粹是视觉上勾选了看不出来，误以为
   "点了没反应"。修复：checkbox/radio整个排除出这条规则(不只是背景色，边框色/
   box-shadow等也一起排除)，完全交还给@tailwindcss/forms插件自己的默认样式处理——
   这正是dark主题下这两个元素从始至终的状态(dark主题从来没有针对它们写过任何覆盖
   规则，插件默认的白底(未勾选)/蓝色填充(已勾选)在深色页面背景下本来就显示正常)，
   浅色主题下用同样"零覆盖"的策略同样成立，甚至更贴合插件默认设计假设的浅色背景
   场景，不需要另外发明一套颜色。 */
html.light input:not([type="checkbox"]):not([type="radio"]),
html.light textarea,
html.light select {
    color: #1e293b !important;
    background-color: #ffffff !important;
    border-color: rgba(28, 91, 161, 0.4) !important;
    box-shadow: inset 0 1px 2px rgba(15, 42, 74, 0.06) !important;
}
html.light ::placeholder {
    color: #8095b0 !important;
    opacity: 1 !important;
}

/* ── 主强调色(primary，暗色主题下是青色#00F2FF)：文字/纯色按钮/发光阴影三种角色都要管，
   否则"发表回复"这类实心CTA按钮会变成一大块荧光青色，和新的蓝金基调打架。
   2026-07第六十轮："真首页"配色迁移——不再是单一焦糖橙，改成home.html里实际用到的
   中蓝#0076c1(CTA按钮/图标强调文字)，focus/发光效果单独取深一档的#1c5ba1(home.html
   的.border-blue-dark)，视觉上有个"平时是中蓝、交互态更沉一点"的层次，不是随手改的。 ── */
html.light .text-primary {
    color: #0076c1 !important;
}
/* 精确匹配(不带通配符)：只命中字面量class="bg-primary"这个纯色用法(发帖/回复等实心
   CTA按钮、悬浮发帖按钮)，换成和text-primary一致的中蓝实色。
   踩过的坑：最初用[class*="bg-primary"]通配符匹配，会连bg-primary/20这种"浅底色+
   text-primary深色文字"的徽章标签(比如板块标签)也一起命中变成同一个实色——
   这时候标签的底色和文字色变成完全相同的颜色，文字直接隐形在底色里，用真实浏览器
   截图才发现的。bg-primary(纯色，无斜杠)是精确的class选择器，天然不会匹配到
   bg-primary/20这种不同的class token，不需要通配符。 */
html.light .bg-primary {
    background-color: #0076c1 !important;
}
/* 带透明度后缀的bg-primary/XX：徽章/标签的浅底色用法，换成浅色半透明的蓝色调，
   和上面纯色CTA按钮的实色区分开，不会重演"底色文字同色"的问题。
   2026-07第六十轮真实踩到的坑(用Playwright测computed style才发现，字符串断言看不出来)：
   index.html的<body>标签自己带着class="... selection:bg-primary/40"(Tailwind的
   selection:变体，本意是设置文字选中高亮色，只作用于::selection伪元素)——但这条属性
   选择器是纯子串匹配，不认Tailwind的变体前缀语法，"selection:bg-primary/40"这串文本
   本身就包含"bg-primary/"这个子串，会被误判成"body元素自己用了bg-primary/XX这个浅底色
   徽章class"，进而把整个<body>的真实背景染成一层半透明蓝色——而且这条规则的选择器
   (html.light + 属性选择器，2个"类选择器"权重)比上面"页面基底"那条html.light body
   规则(html.light + body，1个类选择器+2个类型选择器)的CSS specificity更高，!important
   打平的情况下这条规则总是赢，导致body背景从来没有真正显示过页面基底色，只是换过
   主题色号后这次终于被真实计算出的backgroundColor验证暴露出来(这个bug在改这次配色
   之前、上一版暖橙主题下就已经存在，不是这次新引入的，只是没人拿真实浏览器验证过
   body的computed style，字符串断言测不出这类"选择器意外命中"的问题)。修复：用:not()
   精确排掉"selection:bg-primary/"这个变体前缀组合的子串匹配，不影响这条规则本来
   要覆盖的真实bg-primary/XX徽章标签用法。 */
html.light [class*="bg-primary/"]:not([class*="selection:bg-primary/"]) {
    background-color: rgba(0, 118, 193, 0.14) !important;
}
html.light [class*="shadow-primary"] {
    --tw-shadow-color: rgba(28, 91, 161, 0.35) !important;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
}
html.light [class*="hover:shadow-primary"]:hover {
    --tw-shadow-color: rgba(28, 91, 161, 0.45) !important;
}
html.light [class*="ring-primary"] {
    --tw-ring-color: rgba(28, 91, 161, 0.4) !important;
}

/* ── admin.html的"上浮+发光"hover效果(.tab-link/.admin-hover-glow)：暗色主题下发的是
   青色#00F2FF光晕，浅色背景上同样会晃眼违和，换成和上面shadow-primary同一套中蓝。
   故意用box-shadow实现发光而不是border-color——早期版本试过给"自定义导出"几个勾选框
   用hover:border-primary做发光，结果在浅色主题下这个效果完全消失(不是变淡，是彻底
   失效)：根因是上面第70~74行"html.light [class*="border-border-highlight"]"这条
   !important规则会无差别匹配这几个勾选框身上同时存在的border-border-highlight这个
   class token(不区分是否hover)，而!important的声明不管对方选择器specificity多高
   都会赢——两条规则同时命中border-color这一个属性时，那条!important规则总是获胜，
   hover时原本想要的青色border-color变化因此被悄悄吃掉、从未真正生效过。box-shadow
   是完全独立的另一个CSS属性，压根不在那条!important规则的管辖范围内，天然绕开了
   这整个坑，不需要再去和它抢优先级。 ── */
html.light .tab-link:hover,
html.light .tab-link:focus-visible {
    box-shadow: 0 12px 28px -22px rgba(15, 30, 50, .35), 0 0 0 1px rgba(28, 91, 161, .45), 0 0 14px 1px rgba(28, 91, 161, .3) !important;
}
html.light .admin-hover-glow:hover,
html.light .admin-hover-glow:focus-visible {
    box-shadow: 0 18px 36px -24px rgba(15, 30, 50, .3), 0 0 0 1px rgba(28, 91, 161, .55), 0 0 16px 2px rgba(28, 91, 161, .4) !important;
}

/* ── 品牌Logo：暗色主题下的青色渐变shimmer文字+青色呼吸光晕在浅背景上又晃眼又看不清，
   浅色主题下改成克制的静态色文字，不做动效(日间主题更平静，是有意的设计取舍)。
   2026-07第六十轮：静态色从暖褐改成home.html主容器边框那种最深的蓝#004b8d，作为
   三档蓝色里"最高强调"的那一档，专门留给logo这种最需要分量感的元素。 ── */
html.light .brand-shimmer {
    background: none !important;
    -webkit-text-fill-color: #004b8d !important;
    color: #004b8d !important;
    animation: none !important;
}
html.light .brand-pulse {
    animation: none !important;
    filter: none !important;
}
html.light .logo-glow {
    text-shadow: none !important;
}

/* ── 各色相家族：文字/软背景/边框三个角色，属性选择器一次覆盖同色相全部明度和透明度变体。
   文字色统一换深、软背景统一换浅色半透明底、边框统一换中等透明度——这是本次修复的核心，
   覆盖项目里全部17个标准色相家族+2个自定义强调色(accent-green/accent-orange)。 ── */
html.light [class*="text-red-"] {
    color: #b91c1c !important;
}
html.light [class*="bg-red-"] {
    background-color: rgba(220,38,38, 0.14) !important;
}
html.light [class*="border-red-"] {
    border-color: rgba(220,38,38, 0.4) !important;
}

html.light [class*="text-orange-"] {
    color: #c2410c !important;
}
html.light [class*="bg-orange-"] {
    background-color: rgba(234,88,12, 0.14) !important;
}
html.light [class*="border-orange-"] {
    border-color: rgba(234,88,12, 0.4) !important;
}

html.light [class*="text-amber-"] {
    color: #92400e !important;
}
html.light [class*="bg-amber-"] {
    background-color: rgba(217,119,6, 0.14) !important;
}
html.light [class*="border-amber-"] {
    border-color: rgba(217,119,6, 0.4) !important;
}

html.light [class*="text-yellow-"] {
    color: #854d0e !important;
}
html.light [class*="bg-yellow-"] {
    background-color: rgba(202,138,4, 0.14) !important;
}
html.light [class*="border-yellow-"] {
    border-color: rgba(202,138,4, 0.4) !important;
}

html.light [class*="text-lime-"] {
    color: #3f6212 !important;
}
html.light [class*="bg-lime-"] {
    background-color: rgba(101,163,13, 0.14) !important;
}
html.light [class*="border-lime-"] {
    border-color: rgba(101,163,13, 0.4) !important;
}

html.light [class*="text-green-"] {
    color: #15803d !important;
}
html.light [class*="bg-green-"] {
    background-color: rgba(34,197,94, 0.14) !important;
}
html.light [class*="border-green-"] {
    border-color: rgba(34,197,94, 0.4) !important;
}

html.light [class*="text-emerald-"] {
    color: #047857 !important;
}
html.light [class*="bg-emerald-"] {
    background-color: rgba(16,185,129, 0.14) !important;
}
html.light [class*="border-emerald-"] {
    border-color: rgba(16,185,129, 0.4) !important;
}

html.light [class*="text-teal-"] {
    color: #0f766e !important;
}
html.light [class*="bg-teal-"] {
    background-color: rgba(20,184,166, 0.14) !important;
}
html.light [class*="border-teal-"] {
    border-color: rgba(20,184,166, 0.4) !important;
}

html.light [class*="text-cyan-"] {
    color: #0e7490 !important;
}
html.light [class*="bg-cyan-"] {
    background-color: rgba(6,182,212, 0.14) !important;
}
html.light [class*="border-cyan-"] {
    border-color: rgba(6,182,212, 0.4) !important;
}

html.light [class*="text-sky-"] {
    color: #0369a1 !important;
}
html.light [class*="bg-sky-"] {
    background-color: rgba(14,165,233, 0.14) !important;
}
html.light [class*="border-sky-"] {
    border-color: rgba(14,165,233, 0.4) !important;
}

html.light [class*="text-blue-"] {
    color: #1d4ed8 !important;
}
html.light [class*="bg-blue-"] {
    background-color: rgba(59,130,246, 0.14) !important;
}
html.light [class*="border-blue-"] {
    border-color: rgba(59,130,246, 0.4) !important;
}

html.light [class*="text-indigo-"] {
    color: #4338ca !important;
}
html.light [class*="bg-indigo-"] {
    background-color: rgba(99,102,241, 0.14) !important;
}
html.light [class*="border-indigo-"] {
    border-color: rgba(99,102,241, 0.4) !important;
}

html.light [class*="text-violet-"] {
    color: #6d28d9 !important;
}
html.light [class*="bg-violet-"] {
    background-color: rgba(139,92,246, 0.14) !important;
}
html.light [class*="border-violet-"] {
    border-color: rgba(139,92,246, 0.4) !important;
}

html.light [class*="text-purple-"] {
    color: #7e22ce !important;
}
html.light [class*="bg-purple-"] {
    background-color: rgba(168,85,247, 0.14) !important;
}
html.light [class*="border-purple-"] {
    border-color: rgba(168,85,247, 0.4) !important;
}

html.light [class*="text-fuchsia-"] {
    color: #a21caf !important;
}
html.light [class*="bg-fuchsia-"] {
    background-color: rgba(217,70,239, 0.14) !important;
}
html.light [class*="border-fuchsia-"] {
    border-color: rgba(217,70,239, 0.4) !important;
}

html.light [class*="text-pink-"] {
    color: #be185d !important;
}
html.light [class*="bg-pink-"] {
    background-color: rgba(236,72,153, 0.14) !important;
}
html.light [class*="border-pink-"] {
    border-color: rgba(236,72,153, 0.4) !important;
}

html.light [class*="text-rose-"] {
    color: #be123c !important;
}
html.light [class*="bg-rose-"] {
    background-color: rgba(244,63,94, 0.14) !important;
}
html.light [class*="border-rose-"] {
    border-color: rgba(244,63,94, 0.4) !important;
}

html.light [class*="text-accent-green"] {
    color: #15803d !important;
}
html.light [class*="bg-accent-green"] {
    background-color: rgba(34,197,94, 0.14) !important;
}
html.light [class*="border-accent-green"] {
    border-color: rgba(34,197,94, 0.4) !important;
}

html.light [class*="text-accent-orange"] {
    color: #c2410c !important;
}
html.light [class*="bg-accent-orange"] {
    background-color: rgba(234,88,12, 0.14) !important;
}
html.light [class*="border-accent-orange"] {
    border-color: rgba(234,88,12, 0.4) !important;
}

/* ── 中性灰色系(gray/slate/zinc/neutral/stone)：2026-07第六十轮从暖褐灰换成冷蓝灰，
   呼应新的蓝金基调(暖褐灰是配旧的焦糖橙主题的，留着会显得脱节)。这几个灰色系不承载
   任何"分类"语义(不像红/绿/黄那样区分帖子状态)，纯粹是从属于整体基调的中性色，所以
   跟着核心品牌色一起调，逻辑上比归进"不动的色相家族"更合理。 ── */
html.light [class*="text-gray-"],
html.light [class*="text-slate-"],
html.light [class*="text-zinc-"],
html.light [class*="text-neutral-"],
html.light [class*="text-stone-"] {
    color: #475569 !important;
}
html.light [class*="bg-gray-"],
html.light [class*="bg-slate-"],
html.light [class*="bg-zinc-"],
html.light [class*="bg-neutral-"],
html.light [class*="bg-stone-"] {
    background-color: rgba(71, 85, 105, 0.12) !important;
}
html.light [class*="border-gray-"],
html.light [class*="border-slate-"],
html.light [class*="border-zinc-"],
html.light [class*="border-neutral-"],
html.light [class*="border-stone-"] {
    border-color: rgba(71, 85, 105, 0.3) !important;
}

/* ── admin.html专属：这个页面是独立的一套硬编码颜色体系(body{background:#0F111B}、
   .panel{background:#1F2238}、.tab-active{...青色...}、.brand-text渐变shimmer)，压根
   没有复用前台页面的background-dark/card-dark这些Tailwind自定义颜色名，前面那些属性
   选择器规则对admin.html的这几个结构性类完全不起作用——用真实浏览器截图对比才发现
   header已经变亮但下面的卡片/标签栏还是纯黑，就是这个原因。这几条单独补上。
   2026-07第六十轮：.tab-active(激活标签页)按用户确认的方案用CTA蓝#0076c1；.bg-accent/
   .text-accent/.border-accent这组admin专属的"二级强调色"(原来是绿色，和前台的
   accent-green是两回事)改成金黄#f7b500——这是"少量点缀"金色最合适的落脚点，不需要
   为了用上金色再新造一个UI元素，复用这个本来就是"次要强调色"语义的现成挂载点。 ── */
html.light .panel {
    background: #f2efe8 !important;
    border-color: #cfe0ef !important;
    box-shadow: 0 8px 26px rgba(15, 42, 74, 0.1) !important;
}
html.light .tab-active {
    background: rgba(0, 118, 193, 0.14) !important;
    color: #0076c1 !important;
    border-color: rgba(0, 118, 193, 0.5) !important;
}
html.light .brand-text {
    background: none !important;
    -webkit-text-fill-color: #004b8d !important;
    color: #004b8d !important;
    animation: none !important;
}
html.light .brand-logo {
    animation: none !important;
    filter: none !important;
}
/* admin.html自己的tailwind.config另外定义了一套更短的自定义颜色名(bg/card/muted/
   accent)，和前台页面的background-dark/card-dark/text-highlight是两套完全不重叠的
   命名，要单独覆盖——bg-bg/bg-card这类class虽然眼熟(和"背景色"字面意思一样)，本质上
   只是admin.html自己tailwind.config里注册的自定义色板名，和前台的background-dark是
   同一个视觉角色、不同的字面量名字。 */
html.light [class*="bg-bg"] {
    background-color: #fafbfc !important;
}
/* 精确匹配：admin.html的bg-card是裸class(没有/透明度变体)，用精确选择器避免子串误撞到
   前台页面的bg-card-dark(那个字符串确实包含"bg-card"这个子串，通配符会连它一起命中，
   虽然两边巧合都设成了同一个米白色、这次不会有可见问题，但精确匹配更严谨，不依赖这种
   容易在以后改动时悄悄失效的巧合)。 */
html.light .bg-card {
    background-color: #f2efe8 !important;
}
html.light [class*="text-muted"] {
    color: #4a6178 !important;
}
/* 2026-07第六十四轮：用户反馈"纯白太亮太刺眼，长时间看不舒服"，把三处"卡片/内容区"
   角色的背景(前台post-card/bg-card-dark、admin的.panel/.bg-card)从纯白#ffffff
   统一换成偏暖的浅米灰#f2efe8——页面最外层基底背景(#fafbfc)和表单输入框背景
   (input/textarea/select，仍是#ffffff)刻意不跟着变，用户明确要求只改"卡片/
   内容区"这一层，且输入框需要和容器拉开对比度才看得清边界，不属于"卡片"角色。 */

/* 精确组合选择器：只命中"未选中态子标签切换按钮"(admin.html里所有xxxSubTab按钮组
   共用的动态class写法 :class="... ? 'bg-primary text-bg' : 'bg-bg text-muted/70
   hover:text-white'")——bg-bg和text-muted/70这两个class同时出现在同一个元素上，
   在整个admin.html里唯一对应这一种按钮，不会误伤其它单独用bg-bg(比如页面背景/
   输入框)或单独用text-muted/70(比如大量说明性<p>文字)的地方。用复合选择器
   (两个属性选择器叠加)天然比上面单一的[class*="bg-bg"]规则(line ~466附近)更
   具体，不需要额外提高!important权重就能生效。 */
html.light [class*="bg-bg"][class*="text-muted/70"] {
    background-color: rgba(247, 181, 0, 0.14) !important;
}
/* 精确匹配(不带通配符)：admin.html的accent只有裸class用法(没有/透明度后缀的变体)，
   用精确选择器天然不会误撞到text-accent-green/text-accent-orange这两个前台自定义色
   (虽然那两个也含"accent"这个词根，但精确匹配是整段class token比对，不是子串匹配，
   不会误伤)。 */
html.light .bg-accent {
    background-color: rgba(247, 181, 0, 0.16) !important;
}
html.light .text-accent {
    color: #a06a00 !important;
}
html.light .border-accent {
    border-color: rgba(247, 181, 0, 0.5) !important;
}

/* ── 例外：在线状态圆点(partials/presence_dot.html)是纯色的小圆点指示器，靠"实心醒目的
   颜色"传达在线/离开/离线状态，不是徽章标签那种"浅底色+深文字"的角色——如果被上面的
   色相家族规则当成软背景处理，会被冲淡成一个几乎看不见的半透明色块，丧失指示器的作用。
   用"bg-{色}-500 + rounded-full"这个更具体的组合选择器覆盖(两个属性选择器叠加，
   优先级天然高于上面单一属性选择器的规则，不需要额外提高!important权重)，保留原本
   饱和的实心颜色。

   2026-07(排查"敏感词黑名单红底浅字看不清"反馈时定位到的真实bug)：`bg-red-500`这个
   子串匹配还会意外命中"敏感词黑名单"词汇胶囊(word_list_card.html里`bg-red-500/20
   ... rounded-full`)——胶囊的class同时含有`bg-red-500`(作为`bg-red-500/20`的子串)
   和`rounded-full`(胶囊形状)，被这条"专门给在线状态圆点用"的规则误伤，把本该是
   柔和浅红底(来自上面色相家族规则rgba(220,38,38,0.14))的胶囊背景强制刷成纯饱和实色
   #ef4444，配深红文字#b91c1c——深红配亮红，几乎同色系不同明度，对比度很差。用真实
   Playwright测过computed style才发现(字符串断言测不出这类"选择器意外命中"的问题)。
   修复：再叠加`[class*="border-2"]`这个只有presence_dot.html真正会用到的边框宽度
   class(border-2，2px描边)，词汇胶囊统一用的是不带宽度后缀的`border`(默认1px)，
   两者从此不会再撞在一起。 ── */
html.light [class*="bg-green-500"][class*="rounded-full"][class*="border-2"] { background-color: #22c55e !important; }
html.light [class*="bg-yellow-500"][class*="rounded-full"][class*="border-2"] { background-color: #eab308 !important; }
html.light [class*="bg-red-500"][class*="rounded-full"][class*="border-2"] { background-color: #ef4444 !important; }
html.light [class*="bg-gray-500"][class*="rounded-full"][class*="border-2"] { background-color: #6b7280 !important; }
html.light [class*="bg-blue-500"][class*="rounded-full"][class*="border-2"] { background-color: #3b82f6 !important; }

/* ── 附带发现修复(2026-07第六十轮，改配色主题时用Playwright真实截图/computed style
   核对才发现，字符串断言测不出这类"硬编码颜色绕开class体系"的问题)：全项目还有几处
   直接把暗色主题的青色#00F2FF/rgba(0,242,255,...)写死在具体组件的<style>块或Tailwind
   任意值语法(shadow-[...])里，不经过上面任何一条基于class名字匹配的规则，浅色主题下
   完全没人管，会在白色/浅蓝背景上露出一圈突兀的青色光晕。逐个排查全项目"0,242,255"
   字面量后确认：.logo-glow/.brand-shimmer/.brand-pulse/.brand-text/.brand-logo/
   .tab-active/.tab-link:hover/.admin-hover-glow:hover 这些已经被上面的规则通过
   animation:none/text-shadow:none/filter:none或直接换色覆盖掉了，不用重复处理；
   admin_content_preview.html(独立预览页，从没接入过主题切换体系)和announcement_popup.html
   (公告弹窗，故意做成不随主题变化的"官方公告卷轴"固定深色观感，背景色本身也没有跟着
   html.light变过)这两处本来就不属于"跟随日夜主题"的范围，不需要处理。真正遗漏、且
   在浅色主题下会被用户看到的，是下面这5处。 ── */
/* 首页悬浮"+"发帖按钮：边框色用border-background-dark在深色主题下制造"从深色背景挖空"
   的镶嵌错觉，浅色主题下背景已经不是深色了，边框跟着换成新的卡片白色；发光色从青色换蓝。 */
html.light .publish-btn {
    border-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 118, 193, 0.45) !important;
}
/* 帖子卡片hover时的边框高亮，原来是硬编码青色，独立于.post-card基础样式规则之外。 */
html.light .post-card:hover {
    border-color: rgba(28, 91, 161, 0.4) !important;
}
/* 回复楼层"引用回复"按钮：整个是post.html里的具名class，边框/底色/文字/发光全套换蓝。 */
html.light .reply-quote-btn {
    border-color: rgba(28, 91, 161, 0.45) !important;
    background: rgba(0, 118, 193, 0.12) !important;
    color: #0076c1 !important;
    box-shadow: 0 0 10px rgba(28, 91, 161, 0.2) !important;
}
html.light .reply-quote-btn:hover {
    background: rgba(0, 118, 193, 0.18) !important;
    box-shadow: 0 0 16px rgba(28, 91, 161, 0.45) !important;
}
/* 投票面板：选项被选中/已投票命中时的发光，是partials/poll_panel.html里3处Tailwind
   任意值语法shadow-[0_0_Npx_rgba(0,242,255,X)]，不是具名class，用属性选择器匹配。
   踩过的坑(真实用Playwright测出来的，不是靠读代码猜的)：第一版只按"blur半径"这段
   前缀匹配(比如"shadow-[0_0_20px_rgba(0,242,255"，不含具体透明度)，结果意外撞上了
   bottom_nav.html悬浮"+"按钮的shadow-[0_0_20px_rgba(0,242,255,0.6)]——两者blur半径
   恰好都是20px，前缀相同，我加的这条规则和上面.publish-btn那条规则同为1个属性/类
   选择器、specificity相同，按CSS层叠"后定义的赢"，把.publish-btn原本要设的0.45透明度
   覆盖成了这里的0.25，验证时才发现发光强度不对。改成连具体的透明度值一起放进匹配
   字符串里(每处的blur+透明度组合在全项目内是唯一的，不会再互相/跟别处误撞)。 */
html.light [class*="shadow-[0_0_20px_rgba(0,242,255,0.25)"] { box-shadow: 0 0 20px rgba(28, 91, 161, 0.25) !important; }
html.light [class*="shadow-[0_0_24px_rgba(0,242,255,0.45)"] { box-shadow: 0 0 24px rgba(28, 91, 161, 0.45) !important; }
html.light [class*="shadow-[0_0_14px_rgba(0,242,255,0.55)"] { box-shadow: 0 0 14px rgba(28, 91, 161, 0.55) !important; }
/* 用户中心"使用徽章"按钮的呼吸光晕keyframe(user_center_drawer.html)：原规则用的是
   animation简写属性(animation: badgeUsePulse 2.2s ease-in-out infinite)，颜色写死在
   @keyframes内部，没法直接用属性选择器+!important改颜色值本身。改用animation-name
   这个长写子属性单独覆盖引用的keyframe名字(简写属性拆解到具体的animation-name这个
   子属性时，两条规则的优先级按这一个子属性单独比较，我的!important能赢，不影响简写
   规则里animation-duration/timing-function/iteration-count这些没被我碰过的其它子属性，
   它们依然由原规则决定)，指向新定义的、颜色是蓝色的同构keyframe(名字不同，不存在
   "两个同名keyframes谁覆盖谁"这类问题)。 */
html.light .badge-use-pulse {
    animation-name: badgeUsePulseLight !important;
}
@keyframes badgeUsePulseLight {
    0%, 100% { box-shadow: 0 0 2px 0 rgba(28, 91, 161, 0.35), 0 0 0 1px rgba(28, 91, 161, 0.35); }
    50% { box-shadow: 0 0 10px 4px rgba(28, 91, 161, 0.65), 0 0 0 1px rgba(28, 91, 161, 0.75); }
}

/* ── 2026-07 用户反馈"层次感不够/看不清字"审计(第六十二轮)：这次没有只改用户点名的
   帖子详情页管理员铭牌一处，而是先搞清楚根因、再按同一个根因全项目排查了一遍。

   根因：项目里"实心CTA按钮/徽章铭牌"的标准写法是 bg-primary(纯色背景) + 一个专门的
   "深色文字"工具类(前台页面叫text-background-dark，admin.html自己另一套短命名叫
   text-bg——两者是同一个视觉角色的两个不同名字，值都是#1A1B26)。这个组合在dark模式下
   非常合理：bg-primary是亮青色#00F2FF，配深色文字对比度很好。但round 60把浅色模式下
   的bg-primary换成了偏深的中蓝#0076c1，而text-background-dark/text-bg两个类当时都
   没有被地毯式排查覆盖到(它们既不在"17个标准色相家族"体系里，也不算"admin短命名"
   体系里已覆盖的bg-bg/bg-card/text-muted/bg-accent那几个)——深蓝底+近黑字，对比度骤降，
   这正是用户反馈"看不见管理员三个字"的真正原因，且这个组合在全站有40处左右(前台
   11处+admin.html 29处)，不是孤立的一处。 */
html.light .bg-primary.text-background-dark,
html.light .bg-primary.text-bg {
    color: #ffffff !important;
}

/* ── 同一次审计顺带发现的第二个真实问题：bg-emerald-500(接龙/投票提交按钮)和
   bg-accent-orange(文章搬运"AI重写"按钮等)在原始设计里也是"纯色按钮+深色文字"，
   但它们被上面"17个标准色相家族"体系里、针对"徽章浅底色标签"场景设计的通配符规则
   ([class*="bg-emerald-"]/[class*="bg-accent-orange"])一起命中，稀释成了14%透明度
   的浅色水洗——按钮本身的实色背景几乎消失，只剩一圈若隐若现的色块，这也是一种
   "层次感缺失"(看不出这是个可点击的按钮)。这两个类在项目里只有"裸用法"(不带/透明度
   后缀)，用精确类选择器(不是通配符)恢复成原始实色即可，不需要连带改文字色——
   深色文字配这两个够亮的颜色本身对比度是够的，问题只出在背景被意外稀释这一步。 ── */
html.light .bg-emerald-500 {
    background-color: #10b981 !important;
}
html.light .bg-accent-orange {
    background-color: #FF9D00 !important;
}
