/* ===================================================================
   杜鸣工作室 · 通用深浅兜底皮肤 (dm-theme.css)
   -------------------------------------------------------------------
   给「没有专属星图 CSS」的页面提供可见的深/浅两版（门户、次要子页、
   荣誉星图主页等）。已接入 theme-star-*.css 的站点不必在意本文件：
   所有规则用 :where() 把特异性压到最低，各站更具体的专属规则优先。
   必须放在页面所有 CSS 之后引入（与 dm-shell.css 同层）。
   =================================================================== */

/* ---------------- 深色 ---------------- */
:where(html[data-dm-theme="dark"]) body{
  background-color:#17130d;
  color:#fdf4e3;
}
:where(html[data-dm-theme="dark"]) body a{ color:#e0a54a; }
:where(html[data-dm-theme="dark"]) body :where(h1,h2,h3,h4,h5,h6,strong,b,th){ color:#ffe1a8; }
:where(html[data-dm-theme="dark"]) body :where(
  .card,.panel,.box,.tile,.sheet,.wrap,.container,.content,
  section,article,header,footer,aside,main,
  [class*="card"],[class*="panel"],[class*="box"],[class*="item"],[class*="list"]
){
  background-color:rgba(42,34,23,.72);
  border-color:rgba(255,198,92,.16);
  color:#fdf4e3;
}
:where(html[data-dm-theme="dark"]) body :where(input,textarea,select){
  background-color:#2a2217; color:#fdf4e3; border-color:rgba(255,198,92,.26);
}
:where(html[data-dm-theme="dark"]) body :where(button,.btn){
  background-color:rgba(255,198,92,.10); color:#ffe1a8;
  border-color:rgba(255,198,92,.36);
}
:where(html[data-dm-theme="dark"]) body :where(table,th,td,hr){
  border-color:rgba(255,198,92,.16);
}
:where(html[data-dm-theme="dark"]) body :where(code,pre){
  background-color:#201a12; color:#ffd88a;
}

/* ---------------- 浅色（供原生深色页面切浅色用） ---------------- */
:where(html[data-dm-theme="light"]) body{
  background-color:#fdf6ea;
  color:#2f2417;
}
:where(html[data-dm-theme="light"]) body a{ color:#a85b08; }
:where(html[data-dm-theme="light"]) body :where(h1,h2,h3,h4,h5,h6,strong,b,th){ color:#2f2417; }
:where(html[data-dm-theme="light"]) body :where(
  .card,.panel,.box,.tile,.sheet,.wrap,.container,.content,
  section,article,header,footer,aside,main,
  [class*="card"],[class*="panel"],[class*="box"],[class*="item"],[class*="list"]
){
  background-color:#fffefb;
  border-color:rgba(122,80,30,.12);
  color:#2f2417;
}
:where(html[data-dm-theme="light"]) body :where(input,textarea,select){
  background-color:#fffefb; color:#2f2417; border-color:rgba(122,80,30,.18);
}
:where(html[data-dm-theme="light"]) body :where(button,.btn){
  background-color:#fff0cc; color:#8a4a06; border-color:rgba(168,91,8,.30);
}
:where(html[data-dm-theme="light"]) body :where(table,th,td,hr){
  border-color:rgba(122,80,30,.12);
}
:where(html[data-dm-theme="light"]) body :where(code,pre){
  background-color:#f8eddb; color:#6b4a20;
}
