/* ============================================================
   Chinese Traditional Color Design Tokens (中国传统色设计令牌)
   
   Organized by cultural category. Color values derived from
   traditional CMYK references and visual matching to historical
   pigments and dyes.
   ============================================================ */

:root {
  /* ── 五正色 (Five Cardinal Colors / Wǔ Zhèng Sè) ──
     The five primary colors of Chinese cosmology,
     mapped to the Five Elements and Five Directions. */
  --wuzheng-qing: #1a6840;          /* 青 — Wood/East, blue-green of celadon */
  --wuzheng-chi: #c23a30;           /* 赤 — Fire/South, pure ceremonial red */
  --wuzheng-huang: #d4a017;         /* 黄 — Earth/Center, imperial yellow */
  --wuzheng-bai: #f5f0eb;           /* 白 — Metal/West, warm silk white */
  --wuzheng-hei: #1a1a1e;           /* 黑 — Water/North, lacquer black */

  /* ── 五间色 (Five Intermediate Colors / Wǔ Jiān Sè) ──
     Mixed from cardinal colors, representing transformation. */
  --wujian-lv: #5c8a4a;             /* 绿 — East intermediate, leaf green */
  --wujian-hong: #d45555;           /* 红 — South intermediate, bright red */
  --wujian-liuhuang: #b88a3b;       /* 骝黄 — Center intermediate, tawny */
  --wujian-bi: #3a8a7a;             /* 碧 — West intermediate, jade blue-green */
  --wujian-zi: #6a4c7a;             /* 紫 — North intermediate, purple */

  /* ── 矿物色 (Mineral Colors / Kuàngwù Sè) ──
     Derived from ground minerals and stones. */
  --kuangwu-shiqing: #1661ab;       /* 石青 — Azurite blue */
  --kuangwu-shilv: #3c9566;         /* 石绿 — Malachite green */
  --kuangwu-zhusha: #bf3030;        /* 朱砂 — Cinnabar vermillion */
  --kuangwu-qianfen: #f0e8dc;       /* 铅白 — Lead white (ceruse) */
  --kuangwu-daizhese: #425b6d;      /* 黛色 — Indigo stone, deep gray-blue */
  --kuangwu-shizhi: #7a5c50;        /* 赭石 — Ochre/sienna */
  --kuangwu-luoqing: #1a3a5c;       /* 螺青 — Conch shell blue, dark navy */
  --kuangwu-dianqing: #1b3a6b;      /* 靛青 — Indigo blue */
  --kuangwu-heishizhi: #3d3028;     /* 黑石脂 — Black stone grease, dark brown */
  --kuangwu-zikuang: #6b2e4a;       /* 紫矿 — Purple mineral ore */
  --kuangwu-mituoseng: #c9a252;     /* 密陀僧 — Litharge, golden yellow */

  /* ── 植物色 (Plant-Derived Colors / Zhíwù Sè) ──
     Extracted from flowers, bark, roots, and leaves. */
  --zhiwu-yanzhi: #9b2042;          /* 胭脂 — Rouge/carmine from safflower */
  --zhiwu-tenghuang: #e8b830;       /* 藤黄 — Gamboge, bright warm yellow */
  --zhiwu-huaqing: #2b5c8a;         /* 花青 — Flower blue (indigo extract) */
  --zhiwu-sufang: #7a2e3a;          /* 苏芳 — Sappanwood, deep rose-brown */
  --zhiwu-cihuang: #d4a520;         /* 雌黄 — Orpiment, golden pigment */
  --zhiwu-huangbo: #b89a2a;         /* 黄蘗 — Phellodendron bark yellow */
  --zhiwu-zhihuang: #e0a030;        /* 栀黄 — Gardenia yellow */
  --zhiwu-huaihuang: #c8b83a;       /* 槐黄 — Pagoda tree yellow */
  --zhiwu-taohong: #e8828a;         /* 桃红 — Peach blossom pink */
  --zhiwu-shuihong: #e0787a;        /* 水红 — Water red, dilute carmine */
  --zhiwu-mudanhong: #c24060;       /* 牡丹红 — Peony red */
  --zhiwu-xinghuang: #e89040;       /* 杏黄 — Apricot yellow-orange */
  --zhiwu-qianbi: #2a6848;          /* 青莲紫前碧 — */
  --zhiwu-qinglianze: #6050a0;      /* 青莲紫 — Blue lotus purple */
  --zhiwu-dingxiangzi: #9060a0;     /* 丁香紫 — Lilac purple */
  --zhiwu-qiehuazi: #6a3078;        /* 茄花紫 — Eggplant flower purple */

  /* ── 金属色 (Metal Colors / Jīnshǔ Sè) ──
     Gold, silver, and their variants. Use sparingly for luxury. */
  --jinshu-chijin: #e8a020;         /* 赤金 — Red/pure gold */
  --jinshu-kujin: #c89830;          /* 库金 — Treasury gold, aged gold */
  --jinshu-shajin: #c4a848;         /* 沙金 — Sand gold, pale gold */
  --jinshu-nijin: #b89040;          /* 泥金 — Mud gold, painted gold leaf */
  --jinshu-wujin: #5a4a20;          /* 乌金 — Black/dark gold */
  --jinshu-zijin: #8a5a30;          /* 紫金 — Purple gold, bronze-gold */
  --jinshu-jinse: #d4a830;          /* 金色 — Standard gold */
  --jinshu-yin: #c0c0c0;            /* 银 — Silver */
  --jinshu-yinni: #b8b0a0;          /* 银泥 — Silver mud, warm silver */
  --jinshu-yinzhu: #c04038;         /* 银朱 — Silver vermillion */

  /* ── 红色系 (Red Family / Hóng Sè Xì) ──
     The vast spectrum of reds, China's most culturally significant hue. */
  --hong-danhong: #d04040;          /* 丹红 — Cinnabar red */
  --hong-yinhong: #e07878;          /* 银红 — Silver red, soft pink-red */
  --hong-shanhuong: #e06050;        /* 珊瑚红 — Coral red */
  --hong-yuhong: #c85050;           /* 鱼红 — Fish red */
  --hong-jihong: #c02828;           /* 霁红 — Clear-sky red, porcelain red */
  --hong-feise: #e86880;            /* 妃色 — Imperial consort pink */
  --hong-tuoyan: #d87070;           /* 酡颜 — Flushed cheek, warm rose */
  --hong-jiang: #8a2030;            /* 绛 — Deep crimson */
  --hong-qiandan: #e06030;          /* 铅丹 — Lead red/minium, orange-red */
  --hong-dachi: #c83020;            /* 大赤 — Great red, saturated */
  --hong-tianchi: #c84830;          /* 田赤 — Field red, earthy vermillion */
  --hong-yanghong: #c8286a;         /* 洋红 — Magenta/foreign red */

  /* ── 绿色系 (Green Family / Lǜ Sè Xì) ── */
  --lv-tonglv: #2a805a;             /* 铜绿 — Copper green, patina */
  --lv-guanlv: #30785a;             /* 官绿 — Official green, formal */
  --lv-maiqingse: #6a7a48;          /* 麦青色 — Wheat green, olive */
  --lv-guapilv: #3a7050;            /* 瓜皮绿 — Watermelon rind green */
  --lv-doulv: #5a9a68;              /* 豆绿 — Bean green, soft sage */
  --lv-songlv: #2a6040;             /* 松绿 — Pine green, deep */
  --lv-shuilv: #70a888;             /* 水绿 — Water green, light aqua */
  --lv-yinggelv: #30885a;           /* 鹦哥绿 — Parrot green, vivid */
  --lv-cuise: #20a070;              /* 翠色 — Emerald/kingfisher green */

  /* ── 蓝色系 (Blue Family / Lán Sè Xì) ── */
  --lan-tianqing: #3a7ca0;          /* 天青 — Sky blue, celadon-inspired */
  --lan-qielan: #4878a8;            /* 窃蓝 — Stolen blue, refined */
  --lan-baiqing: #6a9ab0;           /* 白青 — White blue, pale */
  --lan-shuilan: #4a90b8;           /* 水蓝 — Water blue */
  --lan-foqing: #2858a0;            /* 佛青 — Buddha blue, lapis */
  --lan-taishiqing: #385868;        /* 太师青 — Grand tutor blue, dark */
  --lan-dishiqing: #2a4870;         /* 帝释青 — Imperial blue */
  --lan-gan: #1a3050;               /* 绀 — Deep dark blue */
  --lan-huiqing: #2040a0;           /* 回青 — Return blue, cobalt */
  --lan-jingjing: #305898;          /* 金精 — Gold essence blue */
  --lan-xueqing: #7888b8;          /* 雪青 — Snow blue, lavender-blue */
  --lan-tianshuibi: #58a8a0;        /* 天水碧 — Sky water blue-green */

  /* ── 黄褐色系 (Yellow-Brown Family) ── */
  --huanghe-tuhuang: #c09838;       /* 土黄 — Earth yellow */
  --huanghe-gaolingtu: #d0c0a8;     /* 高岭土 — Kaolin, warm clay */
  --huanghe-minghuang: #e8c820;     /* 明黄 — Bright/imperial yellow */
  --huanghe-ganhuang: #b89030;      /* 绀黄 — Dark yellow */
  --huanghe-duorong: #a08860;       /* 驼茸 — Camel hair, warm tan */
  --huanghe-baishtu: #c8b8a0;       /* 白善土 — White clay, off-white tan */

  /* ── 白灰色系 (White & Gray Family) ── */
  --baihui-yuebai: #d0dce8;         /* 月白 — Moon white, bluish white */
  --baihui-xiangybai: #f0e8d8;      /* 象牙白 — Ivory white */
  --baihui-lianzibai: #e8e0d0;      /* 莲子白 — Lotus seed white */
  --baihui-tianbai: #f0ece0;        /* 甜白 — Sweet white, porcelain */
  --baihui-gaobai: #f0ede8;         /* 缟白 — Raw silk white */
  --baihui-shuangse: #e8e0d8;       /* 霜色 — Frost color */
  --baihui-yunmubai: #e0dcd0;       /* 云母白 — Mica white, pearlescent */
  --baihui-yinyubai: #e0dcd8;       /* 银鱼白 — Silver fish white */
  --baihui-qianyun: #d8d0c8;        /* 浅云 — Light cloud */
  --baihui-yinshuhui: #a8a098;      /* 银鼠灰 — Silver mouse gray */
  --baihui-danyinhui: #b8b0a8;      /* 淡银灰 — Light silver gray */
  --baihui-yinhe: #908078;          /* 银褐 — Silver brown */
  --baihui-songhui: #908880;        /* 松灰 — Pine ash gray */
  --baihui-mitangjiao: #e8d8c0;     /* 米汤娇 — Rice soup delicate */

  /* ── 深暗色系 (Dark Tones) ── */
  --shen-xuanse: #2a1a18;           /* 玄色 — Mysterious black, reddish */
  --shen-mose: #30281e;             /* 墨色 — Ink black */
  --shen-zaose: #2a2028;            /* 皂色 — Soap black, purplish */
  --shen-yuanqing: #1a2838;         /* 元青 — Original blue-black */
  --shen-youzi: #3a2038;            /* 油紫 — Oil purple, deep */
  --shen-zise: #2a2a30;             /* 缁色 — Black silk */

  /* ── 紫色系 (Purple Family) ── */
  --zi-zhenzi: #8040a0;             /* 真紫 — True purple */
  --zi-qizi: #7a3888;               /* 齐紫 — Qi purple, historical */
  --zi-mushanze: #6a4878;           /* 暮山紫 — Evening mountain purple */
  --zi-ouhe: #b898a8;               /* 藕合 — Lotus root, muted mauve */
  --zi-baicaoshuang: #584858;       /* 百草霜 — Hundred herbs frost, dark */

  /* ── 特殊色 (Special / Cultural Colors) ── */
  --tesu-mise: #8a8a60;             /* 秘色 — Secret color (celadon glaze) */
  --tesu-haitianxia: #e8a8a0;       /* 海天霞 — Sea sky rosy clouds */
  --tesu-jeutou: #4a3028;           /* 爵头 — Duke's head, dark brown */
  --tesu-miehese: #c89060;          /* 蜜合色 — Honey blended color */
  --tesu-dongfangliangse: #d8d0b8;  /* 东方亮色 — Eastern bright color */
  --tesu-lianse: #b0a888;           /* 练色 — Refined/boiled silk color */
  --tesu-chizhangshe: #a84830;      /* 赤璋色 — Red jade tablet */
  --tesu-fokenghong: #c05058;       /* 弗肯红 — Frankincense red */
  --tesu-hafen: #e0c8c0;            /* 蛤粉 — Clam powder, pale pink */

  /* ── 季节主题 (Seasonal Themes) ── */
  --season-spring-primary: #7eb09b;   /* 春 — Spring: fresh green */
  --season-spring-secondary: #e8c8c0; /* 春 — Spring: peach blossom */
  --season-spring-bg: #f5f0e8;        /* 春 — Spring: warm white */

  --season-summer-primary: #c04040;   /* 夏 — Summer: fire red */
  --season-summer-secondary: #2a805a; /* 夏 — Summer: lush green */
  --season-summer-bg: #f0ece0;        /* 夏 — Summer: bright warm */

  --season-autumn-primary: #b88a3b;   /* 秋 — Autumn: golden brown */
  --season-autumn-secondary: #c04830; /* 秋 — Autumn: maple red */
  --season-autumn-bg: #f0e8d8;        /* 秋 — Autumn: warm ivory */

  --season-winter-primary: #2a4870;   /* 冬 — Winter: deep blue */
  --season-winter-secondary: #a8a098; /* 冬 — Winter: silver gray */
  --season-winter-bg: #e8e4e0;        /* 冬 — Winter: cool white */

  /* ── 五行主题 (Five Elements Theme Colors) ── */
  --wuxing-wood-primary: #2a805a;
  --wuxing-wood-light: #a0d0b0;
  --wuxing-wood-dark: #1a5038;

  --wuxing-fire-primary: #c23a30;
  --wuxing-fire-light: #e89090;
  --wuxing-fire-dark: #8a1820;

  --wuxing-earth-primary: #c09838;
  --wuxing-earth-light: #e8d0a0;
  --wuxing-earth-dark: #7a6020;

  --wuxing-metal-primary: #d4a830;
  --wuxing-metal-light: #f0e0b0;
  --wuxing-metal-dark: #8a7020;

  --wuxing-water-primary: #1a3050;
  --wuxing-water-light: #7888b8;
  --wuxing-water-dark: #0a1828;
}

/* ── Dark Mode Overrides ── */
@media (prefers-color-scheme: dark) {
  :root {
    --wuzheng-bai: #2a2a2e;
    --wuzheng-hei: #e8e4e0;
  }
}

/* ── Seasonal Class Variants ── */
.season-spring {
  --theme-primary: var(--season-spring-primary);
  --theme-secondary: var(--season-spring-secondary);
  --theme-bg: var(--season-spring-bg);
}
.season-summer {
  --theme-primary: var(--season-summer-primary);
  --theme-secondary: var(--season-summer-secondary);
  --theme-bg: var(--season-summer-bg);
}
.season-autumn {
  --theme-primary: var(--season-autumn-primary);
  --theme-secondary: var(--season-autumn-secondary);
  --theme-bg: var(--season-autumn-bg);
}
.season-winter {
  --theme-primary: var(--season-winter-primary);
  --theme-secondary: var(--season-winter-secondary);
  --theme-bg: var(--season-winter-bg);
}
