/* ============================================================
   三套风格：夜观（默认，见 style.css）· 水墨 · 敦煌
   切换方式：<html data-theme="ink">
   ============================================================ */

/* ---------------------------------------------------------- 水墨 · 宣纸 */
[data-theme="ink"] {
  color-scheme: light;
  --ink: #ecece5;        /* 宣纸 */
  --indigo: #f6f6f1;     /* 面板：更白的纸 */
  --indigo-2: #c8cac0;   /* 淡墨线 */
  --moon: #1c1d1a;       /* 浓墨 */
  --mist: #63675f;       /* 淡墨 */
  --gold: #2f5d5a;       /* 黛青 */
  --cinnabar: #b3362a;   /* 印泥 */
  --celadon: #3d7560;    /* 石绿 */
  --wood: #3f8a5f; --fire: #c0503d; --earth: #9a7633; --metal: #6f6b60; --water: #3a6aa8;
  --display: "Ma Shan Zheng", "STXingkai", "KaiTi", "STKaiti", serif;
  --medal-hi: #ffffff; --medal-lo: #e3e4dc; --pop-bg: #fbfbf8;
}
[data-theme="ink"] body { background-image: radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.9), transparent 60%),
  radial-gradient(ellipse at 100% 100%, rgba(47,93,90,.06), transparent 50%); background-size: auto; }
[data-theme="ink"] .nav { background: rgba(236,236,229,.9); }
[data-theme="ink"] .btn:hover { color: #fff; }
[data-theme="ink"] .palace.ming { background: #eef1ea; }
[data-theme="ink"] .ziwei .center { background: var(--ink); }
[data-theme="ink"] .sym .pop { box-shadow: 0 16px 36px rgba(40,40,30,.18); }
[data-theme="ink"] .qian .stick { color: #fff; }
[data-theme="ink"] h1, [data-theme="ink"] h2, [data-theme="ink"] h3 { letter-spacing: .08em; }
[data-theme="ink"] .avatar { background: radial-gradient(circle at 35% 30%, #fff, #c9cbc1 70%); color: var(--moon); }

/* 水墨 hero：远山、薄雾、朱砂日 */
.hero-ink { position: relative; min-height: 560px; display: grid; align-items: center; overflow: hidden; }
.hero-ink svg.mountains { position: absolute; inset: auto 0 0 0; width: 100%; height: 75%; }
.hero-ink .mist { animation: drift 38s linear infinite; }
.hero-ink .mist.b { animation-duration: 55s; animation-direction: reverse; }
@keyframes drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
.hero-ink .wrap { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: start; padding: 3rem 0; }
.hero-ink .vertical { font-size: clamp(2.8rem, 6vw, 4.4rem); letter-spacing: .18em; color: var(--moon); }
.hero-ink .hero-copy { max-width: 30rem; padding-top: 2rem; }
.hero-ink .sun { position: absolute; right: 22%; top: 12%; width: 92px; height: 92px; border-radius: 50%; background: var(--cinnabar); opacity: .88; }

/* ---------------------------------------------------------- 敦煌 · 壁画 */
[data-theme="dunhuang"] {
  --ink: #2a1c14;        /* 赭褐墙面 */
  --indigo: #3a271b;     /* 面板 */
  --indigo-2: #5e4430;   /* 描边 */
  --moon: #f2e6cf;       /* 壁画底色 */
  --mist: #c6ab89;       /* 赭石淡色 */
  --gold: #e0a94f;       /* 金箔 */
  --cinnabar: #b5412c;   /* 土红 */
  --celadon: #6fb59a;    /* 石绿 */
  --azurite: #4f93bb;    /* 石青 */
  --wood: #6fb59a; --fire: #e0745a; --earth: #d9a85a; --metal: #e8dcc2; --water: #4f93bb;
  --display: "Noto Serif SC", "Songti SC", serif;
  --medal-hi: #4b3424; --medal-lo: #241710; --pop-bg: #33221a;
}
[data-theme="dunhuang"] body { background-image:
  radial-gradient(circle at 20% 10%, rgba(224,169,79,.08), transparent 40%),
  radial-gradient(circle at 85% 70%, rgba(79,147,187,.08), transparent 45%); background-size: auto; }
[data-theme="dunhuang"] h1, [data-theme="dunhuang"] h2 { font-weight: 900; letter-spacing: .1em; }
[data-theme="dunhuang"] h3 { font-weight: 600; }
[data-theme="dunhuang"] .nav { background: rgba(42,28,20,.92); }
[data-theme="dunhuang"] .btn.primary { background: var(--azurite); border-color: var(--azurite); }
[data-theme="dunhuang"] .btn.primary:hover { background: #3c7aa0; }
[data-theme="dunhuang"] .panel { border-image: none; box-shadow: inset 0 0 0 4px var(--indigo), inset 0 0 0 5px rgba(224,169,79,.35); }
[data-theme="dunhuang"] .palace.ming { background: #4a3020; }
[data-theme="dunhuang"] .seal { background: var(--azurite); box-shadow: inset 0 0 0 2px rgba(242,230,207,.85), inset 0 0 0 4px var(--azurite); }

/* 敦煌 hero：十二生肖轮盘 */
.hero-dh .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; padding: 2.5rem 0 4rem; }
.hero-dh h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.35; }
.hero-dh .hero-copy p { color: var(--mist); }
.wheel { position: relative; width: min(100%, 500px); aspect-ratio: 1; justify-self: center; }
.wheel .ring { position: absolute; border-radius: 50%; inset: 0; }
.wheel .ring.r1 { border: 2px solid var(--gold); }
.wheel .ring.r2 { inset: 6%; border: 1px dashed var(--celadon); animation: turn 300s linear infinite; }
.wheel .ring.r3 { inset: 27%; border: 10px double var(--azurite); opacity: .7; }
.wheel .ring.r4 { inset: 34%; background: repeating-conic-gradient(from 0deg, rgba(224,169,79,.25) 0 6deg, transparent 6deg 15deg); }
.wheel .core { position: absolute; inset: 39%; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle, #f2e6cf 0 38%, var(--gold) 39% 44%, var(--cinnabar) 45% 100%); color: var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.wheel .slot { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.wheel .slot > .sym { position: absolute; transform: translate(-50%, -50%); }
.wheel .sym-animal .sg { width: 4.3rem; height: 4.3rem; border-radius: 50%; display: grid; place-content: center; gap: 0;
  background: radial-gradient(circle at 35% 30%, #4b3424, #241710); border: 1px solid var(--gold); }
.wheel .sym-animal .live { font-size: 1.8rem; }
.wheel .sym-animal small { font-size: .78rem; }
.wheel .sym-animal:hover .sg, .wheel .sym-animal.open .sg { border-color: var(--celadon); box-shadow: 0 0 0 4px rgba(111,181,154,.25); }

/* ---------------------------------------------------------- 风格切换按钮 */
.swatch { width: 1.15rem; height: 1.15rem; border-radius: 50%; display: inline-block; border: 1px solid rgba(128,128,128,.6); vertical-align: middle; }
.swatch.night { background: linear-gradient(135deg, #10172b 50%, #cfae6b 50%); }
.swatch.ink { background: linear-gradient(135deg, #ecece5 50%, #1c1d1a 50%); }
.swatch.dunhuang { background: linear-gradient(135deg, #2a1c14 50%, #4f93bb 50%); }

@media (max-width: 900px) {
  .hero-dh .wrap { grid-template-columns: 1fr; }
  .hero-ink .wrap { grid-template-columns: 1fr auto; }
}
@media (max-width: 680px) {
  .wheel .sym-animal .sg { width: 3.2rem; height: 3.2rem; }
  .wheel .sym-animal .live { font-size: 1.35rem; }
  .wheel .sym-animal small { display: none; }
  .hero-ink { min-height: 480px; }
  .hero-ink .vertical { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ink .mist, .wheel .ring.r2 { animation: none; }
}
