@charset "UTF-8";
/* ═══════════════════════════════════════════════════════════════════════
   星夜灵感图鉴 · Starry Muse
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. 令牌 ─────────────────────────────────────────────────────────── */
:root {
  /* 夜 · 夜穹 */
  --ink-0:   #060a1c;
  --ink-1:   #0b1330;
  --ink-2:   #122048;
  --ink-3:   #1c3168;
  --cobalt:  #2c569c;
  --lagoon:  #6fb3d2;
  --gold:    #f0c14b;
  --gold-hi: #ffe1a3;
  --ember:   #e3743f;
  --cypress: #16281f;
  --paper:   #f3ead6;

  --fg:      #f1e7d0;
  --fg-dim:  #a9b6d6;
  --fg-mute: #7c89ad;
  --accent:  var(--gold);
  --accent-soft: rgba(240, 193, 75, .16);

  --pane:      rgba(11, 20, 46, .58);
  --pane-2:    rgba(18, 32, 72, .48);
  --edge:      rgba(198, 216, 255, .14);
  --edge-lit:  rgba(240, 193, 75, .48);
  --shade:     0 24px 60px -28px rgba(2, 5, 18, .92);
  --shade-lift:0 44px 90px -34px rgba(2, 5, 18, .96);

  --font-serif: 'Cormorant Garamond', 'Noto Serif SC', 'Source Han Serif SC',
                'Songti SC', 'STSong', 'SimSun', Georgia, serif;
  --font-cn:    'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body:  'Noto Sans SC', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei',
                system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 4.2vw, 60px);
  --rail-w: 236px;
  --head-h: 68px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --dur: .58s;

  color-scheme: dark;
}

html[data-mode="midi"],
html[data-mode="sun"],
html[data-mode="bedroom"],
html[data-mode="iris"] {
  /* 昼 · 金野 */
  --ink-0:   #f3e2b4;
  --ink-1:   #eed9a2;
  --ink-2:   #e3c67e;
  --ink-3:   #d5ab52;
  --cobalt:  #4a72b0;
  --lagoon:  #7c9a63;
  --gold:    #bd8a2c;
  --gold-hi: #7c4e12;
  --ember:   #c2452b;
  --cypress: #2b3b22;
  --paper:   #fffaf0;

  --accent:  var(--gold);
  --accent-soft: rgba(184, 121, 31, .17);

  --pane:      rgba(255, 250, 236, .60);
  --pane-2:    rgba(255, 248, 226, .48);
  --edge:      rgba(90, 62, 18, .20);
  --edge-lit:  rgba(184, 121, 31, .58);
  --shade:     0 22px 52px -26px rgba(86, 55, 12, .48);
  --shade-lift:0 40px 84px -32px rgba(86, 55, 12, .56);

  color-scheme: light;
}

/* 夜 · 夜鸢（鸢尾花·夜 —— 深靛紫夜空 + 蓝紫鸢尾 + 柠檬黄花心） */
html[data-mode="cafe"] {
  --gold:      #cbb86a;
  --accent:    #b9a6e0;
  --accent-soft: rgba(185, 166, 224, .16);
  --ember:     #6a8a5a;
  --cypress:   #141030;
}

/* 各模式的点缀色：--gold 统一为「金/黄系」，--accent 为该主题主色，语义清晰不串色 */
html[data-mode="sun"]     { --gold:#e6b030; --accent:#d98a2e; --accent-soft:rgba(217,138,46,.16); }
html[data-mode="bedroom"] { --gold:#e0b94a; --accent:#b07fc0; --accent-soft:rgba(176,127,192,.16); }
html[data-mode="iris"]    { --gold:#d8c24a; --accent:#6a5ac0; --accent-soft:rgba(106,90,192,.16); }

/* 各主题文字色 & 对比度增强 —— 参考梵高画作取色，弱对比主题压深色拉开反差 */
/* 金野 · 麦田与柏树 → 青绿天 + 麦金黄，深青绿文字 */
html[data-mode="midi"] {
  --ink-0:   #e7ecc9; --ink-1: #dde6bf; --ink-2: #cdddb0; --ink-3: #bcd09a;
  --fg:      #123f3a;
  --fg-dim:  #2c5a52;
  --fg-mute: #4a7a70;
  --gold:    #c8922a; --gold-hi: #f1d267;
  --cobalt:  #2f8f86; --lagoon: #5a9a86; --ember: #c8742b; --cypress: #1e3c28; --paper: #fffaf0;
  --edge:     rgba(40, 80, 60, .22); --edge-lit: rgba(200, 146, 42, .58);
  --accent:  var(--gold); --accent-soft: rgba(200, 146, 42, .20);
  --pane:      rgba(250, 252, 240, .62); --pane-2: rgba(242, 248, 226, .50);
  --shade:     0 22px 52px -26px rgba(40, 70, 50, .44);
  --shade-lift:0 40px 84px -32px rgba(40, 70, 50, .52);
  --cstar: rgba(47,143,134,.56); --cstar2: rgba(90,150,140,.40);
}
/* 暖阳 · 向日葵 → 铬黄昼空 + 深棕文字 */
html[data-mode="sun"] {
  --ink-0:   #f8e6a8; --ink-1: #f4dd9e; --ink-2: #eed09a; --ink-3: #e2bd72;
  --fg:      #3d2a0e;
  --fg-dim:  #6b4a22;
  --fg-mute: #947048;
  --gold:    #e6b030; --gold-hi: #f8dd76;
  --cobalt:  #c79a2e; --lagoon: #7a8a3a; --ember: #c8742b; --cypress: #6e5c2a; --paper: #fff8e6;
  --edge:     rgba(120, 82, 20, .22); --edge-lit: rgba(230, 176, 48, .56);
  --accent:  #d98a2e; --accent-soft: rgba(217, 138, 46, .22);
  --pane:      rgba(255, 252, 240, .62); --pane-2: rgba(255, 246, 222, .50);
  --shade:     0 22px 52px -26px rgba(96, 62, 12, .46);
  --shade-lift:0 40px 84px -32px rgba(96, 62, 12, .54);
  --cstar: rgba(230,176,48,.56); --cstar2: rgba(200,170,90,.40);
}
/* 静室 · 阿尔勒的卧室 → 粉紫墙 + 黄木，深紫红文字 */
html[data-mode="bedroom"] {
  --ink-0:   #e4d4e8; --ink-1: #dcc8e2; --ink-2: #d0b8d8; --ink-3: #c0a4cc;
  --fg:      #2a1530;
  --fg-dim:  #4a305e;
  --fg-mute: #6a5090;
  --gold:    #e0b94a; --gold-hi: #f2d9a0;
  --cobalt:  #7a5a9a; --lagoon: #e0a040; --ember: #b0563a; --cypress: #46345c; --paper: #fbf3f6;
  --edge:     rgba(90, 50, 120, .26); --edge-lit: rgba(176, 127, 192, .58);
  --accent:  #b07fc0; --accent-soft: rgba(176, 127, 192, .22);
  --pane:      rgba(242, 232, 250, .68); --pane-2: rgba(230, 218, 240, .56);
  --shade:     0 22px 52px -26px rgba(60, 30, 80, .44);
  --shade-lift:0 40px 84px -32px rgba(60, 30, 80, .52);
  --cstar: rgba(120,80,140,.56); --cstar2: rgba(160,120,180,.40);
}
/* 花汐 · 鸢尾花 → 蓝紫花 + 柠檬黄绿背景，深靛文字 */
html[data-mode="iris"] {
  --ink-0:   #e6e8f4; --ink-1: #daddf0; --ink-2: #c8ccea; --ink-3: #b6bcde;
  --fg:      #1a1746;
  --fg-dim:  #34306e;
  --fg-mute: #565aa0;
  --gold-hi: #eef0b0;
  --cobalt:  #5a4f9c; --lagoon: #d8c24a; --ember: #b0563a; --cypress: #28285a; --paper: #f4f8f0;
  --edge:     rgba(60, 60, 140, .26); --edge-lit: rgba(106, 90, 192, .56);
  --accent:  #6a5ac0; --accent-soft: rgba(106, 90, 192, .20);
  --pane:      rgba(232, 234, 252, .66); --pane-2: rgba(214, 220, 248, .54);
  --shade:     0 22px 52px -26px rgba(30, 30, 80, .44);
  --shade-lift:0 40px 84px -32px rgba(30, 30, 80, .52);
  --cstar: rgba(90,79,156,.56); --cstar2: rgba(138,138,208,.40);
}
/* 夜鸢 · 鸢尾花·夜 → 深靛紫夜空 + 薰衣草白 / 蓝紫文字 */
html[data-mode="cafe"] {
  --fg:      #ece6f4;
  --fg-dim:  #c4b8d8;
  --fg-mute: #9488b0;
  --gold:    #cbb86a; --gold-hi: #e8dca0;
  --lagoon:  #8a9ad8;
  --edge:     rgba(110, 90, 150, .24); --edge-lit: rgba(185, 166, 224, .52);
  --accent:  #b9a6e0; --accent-soft: rgba(185, 166, 224, .16);
}

/* ── 2. 基座 ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.62;
  color: var(--fg);
  background: var(--ink-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color .8s var(--ease), background-color .8s var(--ease);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.defs { position: absolute; width: 0; height: 0; }

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 999;
  padding: 10px 16px; background: var(--gold); color: #16100a;
  border-radius: 10px; transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

::selection { background: var(--accent); color: var(--ink-0); }

/* ── 3. 背景层 ───────────────────────────────────────────────────────── */
.layer { position: fixed; inset: 0; pointer-events: none; }

.layer--sky   { z-index: -6; width: 100%; height: 100%; filter: saturate(1.06); }
.layer--dust  { z-index: -4; width: 100%; height: 100%; }

.layer--fallback {
  z-index: -7;
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(240,193,75,.22), transparent 52%),
    radial-gradient(90% 70% at 18% 30%, rgba(111,179,210,.20), transparent 58%),
    linear-gradient(178deg, #0a1230 0%, #14264f 42%, #0a1128 100%);
  opacity: 0;
}
html.no-webgl .layer--fallback { opacity: 1; }
html.no-webgl .layer--sky { display: none; }
html[data-mode="midi"].no-webgl .layer--fallback {
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(230,196,78,.30), transparent 55%),
    linear-gradient(178deg, #a8d4c8 0%, #5fae9c 40%, #c0902a 100%);
}
html[data-mode="sun"].no-webgl .layer--fallback {
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(255,250,230,.60), transparent 55%),
    linear-gradient(178deg, #fbeec0 0%, #f3cf5e 46%, #8a5e26 100%);
}
html[data-mode="bedroom"].no-webgl .layer--fallback {
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(224,176,144,.28), transparent 55%),
    linear-gradient(178deg, #dcc8e2 0%, #bd9fc8 46%, #9d7fb0 100%);
}
html[data-mode="iris"].no-webgl .layer--fallback {
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(216,194,74,.26), transparent 55%),
    linear-gradient(178deg, #c2c8e8 0%, #8a8ad0 46%, #5a4f9c 100%);
}
html[data-mode="cafe"].no-webgl .layer--fallback {
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(203,184,106,.28), transparent 55%),
    linear-gradient(178deg, #0a0d28 0%, #3a2f72 46%, #1f1b46 100%);
}

.layer--grain {
  z-index: -3; opacity: .30; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.layer--horizon { z-index: -5; }
.layer--horizon > svg:first-child {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 46vh;
  will-change: transform;
}
.hill { transition: fill .8s var(--ease); }
/* 波浪装饰取各主题天空主色系，前景加深做区分 */
.hill--far  { fill: rgba(28, 50, 104, .52); }   /* 夜穹·深蓝 */
.hill--near { fill: rgba(11, 22, 54, .76); }
/* 金野 · 麦田与柏树 · 天蓝远丘 + 麦金近丘 */
html[data-mode="midi"] .hill--far  { fill: rgba(95, 160, 150, .50); }
html[data-mode="midi"] .hill--near { fill: rgba(176, 140, 52, .55); }
/* 夜鸢 · 鸢尾花·夜 · 深靛紫远丘 + 墨紫近丘 */
html[data-mode="cafe"] .hill--far  { fill: rgba(58, 47, 114, .54); }
html[data-mode="cafe"] .hill--near { fill: rgba(20, 16, 45, .78); }
/* 暖阳 · 向日葵 · 暖金麦色丘 */
html[data-mode="sun"] .hill--far  { fill: rgba(222, 184, 96, .50); }
html[data-mode="sun"] .hill--near { fill: rgba(184, 132, 52, .56); }
/* 静室 · 阿尔勒的卧室 · 薰衣草远丘 + 赭红近丘 */
html[data-mode="bedroom"] .hill--far  { fill: rgba(162, 132, 184, .50); }
html[data-mode="bedroom"] .hill--near { fill: rgba(150, 82, 62, .55); }
/* 花汐 · 鸢尾花 · 蓝紫远丘 + 沙绿近丘 */
html[data-mode="iris"] .hill--far  { fill: rgba(138, 138, 208, .50); }
html[data-mode="iris"] .hill--near { fill: rgba(110, 120, 62, .55); }

/* ── 星柱：左侧星座装饰 ─────────────────────────────────────────────── */
.star-pillar {
  position: absolute; left: clamp(-30px, 1.5vw, 36px); bottom: -6px;
  width: clamp(90px, 11vw, 180px); height: 78vh;
  opacity: .72;
  transform-origin: 50% 100%;
  animation: pillar-drift 14s ease-in-out infinite;
}
.star-pillar .sp__line {
  stroke: var(--gold);
  stroke-width: .8;
  opacity: .22;
}
.star-pillar .sp__s {
  fill: var(--gold);
  filter: drop-shadow(0 0 3px var(--gold));
}
.star-pillar .sp__s--top {
  fill: #fff;
  filter: drop-shadow(0 0 5px var(--gold)) drop-shadow(0 0 12px rgba(240,193,75,.55));
  animation: twinkle-top 3s ease-in-out infinite;
}
.star-pillar .sp__flare-e {
  fill: var(--gold-hi, #ffe1a3);
  opacity: .35;
  animation: flare-pulse 4s ease-in-out infinite;
}
.star-pillar .sp__flare-e:nth-child(2) { animation-delay: -1.3s; }
.star-pillar .sp__flare-e:nth-child(3) { animation-delay: -2.7s; }

/* 各模式星柱色调 */
html[data-mode="nuit"] .star-pillar,
html[data-mode="cafe"] .star-pillar {
  opacity: .80;
}
html[data-mode="nuit"] .star-pillar .sp__line { stroke: var(--lagoon); opacity: .28; }
html[data-mode="cafe"] .star-pillar .sp__line { stroke: var(--accent); opacity: .28; }
html[data-mode="midi"] .star-pillar,
html[data-mode="sun"] .star-pillar,
html[data-mode="bedroom"] .star-pillar,
html[data-mode="iris"] .star-pillar {
  opacity: .55;
}
html[data-mode="midi"] .star-pillar .sp__line   { stroke: var(--cobalt); opacity: .18; }
html[data-mode="sun"]  .star-pillar .sp__line   { stroke: var(--gold); opacity: .20; }
html[data-mode="bedroom"] .star-pillar .sp__line { stroke: var(--accent); opacity: .16; }
html[data-mode="iris"]  .star-pillar .sp__line   { stroke: var(--cobalt); opacity: .18; }

@keyframes pillar-drift {
  0%, 100% { transform: rotate(-.5deg) translateX(0); }
  50%      { transform: rotate(.6deg) translateX(2px); }
}
@keyframes twinkle-top {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .65; transform: scale(.88); }
}
@keyframes flare-pulse {
  0%, 100% { opacity: .20; transform: scaleX(1); }
  50%      { opacity: .45; transform: scaleX(1.15); }
}

/* ── 4. 顶栏 ─────────────────────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 40;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--ink-0) 82%, transparent),
    color-mix(in srgb, var(--ink-0) 30%, transparent) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.masthead::after {
  content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 12%, var(--edge) 88%, transparent);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__mark svg { width: 100%; height: 100%; overflow: visible; }
.brand__mark .swirl {
  fill: none; stroke: var(--gold); stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 90; stroke-dashoffset: 90;
  animation: draw 1.6s var(--ease) .2s forwards;
}
.brand__mark .orb {
  fill: var(--gold); transform-origin: 33px 12px;
  animation: pop .7s var(--ease) 1s backwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } }

.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__text b {
  font-family: var(--font-cn); font-weight: 600;
  font-size: 17px; letter-spacing: .22em; text-indent: .22em;
}
.brand__text i {
  font-family: var(--font-serif); font-style: italic;
  font-size: 10.5px; letter-spacing: .34em; color: var(--fg-mute);
}

.masthead__tools { display: flex; align-items: center; gap: 10px; }

.tool {
  display: inline-flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--edge);
  border-radius: 14px 20px 15px 22px / 20px 14px 22px 15px;
  background: var(--pane);
  color: var(--fg-dim);
  transition: color .3s var(--ease), border-color .3s var(--ease),
              background-color .3s var(--ease), transform .3s var(--ease);
}
.tool:hover { color: var(--fg); border-color: var(--edge-lit); transform: translateY(-2px); }
.tool svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.tool--icon { width: 38px; padding: 0; justify-content: center; position: relative; }
.tool--icon[href] svg { fill: none; }
.tool--search span { font-size: 13px; }
.tool kbd {
  font: 600 10px/1 var(--font-body);
  padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--edge); color: var(--fg-mute);
}
.tool__badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  font: 600 10px/1 var(--font-body); font-style: normal;
  background: var(--gold); color: var(--ink-0);
  border-radius: 9px;
}
.ico-day { display: none; }
html[data-mode="midi"] .ico-day, html[data-mode="sun"] .ico-day,
html[data-mode="bedroom"] .ico-day, html[data-mode="iris"] .ico-day { display: block; }
html[data-mode="midi"] .ico-night, html[data-mode="sun"] .ico-night,
html[data-mode="bedroom"] .ico-night, html[data-mode="iris"] .ico-night { display: none; }

/* ── 5. 骨架 ─────────────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
  padding: 0 var(--gutter) 0 0;
}

/* ── 6. 星轨导航 ─────────────────────────────────────────────────────── */
.rail {
  position: sticky; top: var(--head-h);
  padding: 30px 0 40px var(--gutter);
  max-height: calc(100vh - var(--head-h));
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--edge) transparent;
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 4px; }

.rail__constellation { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rail__path {
  fill: none; stroke: var(--edge); stroke-width: 1;
  stroke-dasharray: 2 5; stroke-linecap: round;
}
.rail__path--lit {
  stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: none;
  opacity: .55;
  transition: stroke .6s var(--ease);
}

.rail__list { position: relative; display: flex; flex-direction: column; gap: 2px; }

.rail__item { margin-left: calc(var(--o, 0) * 1px); }

.rail__btn {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center;
  gap: 10px; padding: 8px 12px 8px 6px;
  border-radius: 12px 18px 13px 20px / 18px 12px 20px 13px;
  text-align: left; color: var(--fg-dim);
  transition: color .34s var(--ease), background-color .34s var(--ease),
              transform .34s var(--ease), text-shadow .34s var(--ease);
  /* 星尘微光：确保在任何背景上都可读 */
  text-shadow:
    0 0 6px rgba(240, 193, 75, .25),
    0 0 18px rgba(240, 193, 75, .10),
    0 1px 3px rgba(0, 0, 0, .35);
}
.rail__btn:hover {
  color: var(--fg); background: var(--accent-soft); transform: translateX(3px);
  text-shadow:
    0 0 8px rgba(240, 193, 75, .40),
    0 0 24px rgba(240, 193, 75, .18),
    0 1px 3px rgba(0, 0, 0, .30);
}

.rail__star { width: 22px; height: 22px; }
.rail__star circle {
  fill: var(--fg-mute);
  transition: fill .34s var(--ease), r .34s var(--ease);
  filter: drop-shadow(0 0 2px rgba(240, 193, 75, .20));
}
.rail__star path   { stroke: var(--fg-mute); stroke-width: 1.1; fill: none; opacity: 0; transition: opacity .34s var(--ease); }

.rail__name {
  font-family: var(--font-cn); font-weight: 400;
  font-size: 14.5px; letter-spacing: .09em; white-space: nowrap;
  /* 名称文字额外发光层 */
  text-shadow:
    0 0 7px rgba(240, 193, 75, .28),
    0 0 20px rgba(240, 193, 75, .12);
}
.rail__num {
  font-family: var(--font-serif); font-size: 12px; font-style: italic;
  color: var(--fg-mute); transition: color .34s var(--ease);
}

.rail__btn[aria-current="true"] {
  color: var(--fg); background: var(--accent-soft);
  text-shadow:
    0 0 10px rgba(240, 193, 75, .50),
    0 0 30px rgba(240, 193, 75, .22),
    0 0 50px rgba(240, 193, 75, .10),
    0 1px 2px rgba(0, 0, 0, .25);
}
.rail__btn[aria-current="true"] .rail__star circle { fill: var(--cat, var(--gold)); r: 4.6; }
.rail__btn[aria-current="true"] .rail__star path { stroke: var(--cat, var(--gold)); opacity: .85; }
.rail__btn[aria-current="true"] .rail__name { font-weight: 600; letter-spacing: .12em;
  text-shadow:
    0 0 12px rgba(240, 193, 75, .55),
    0 0 36px rgba(240, 193, 75, .25),
    0 1px 2px rgba(0, 0, 0, .20);
}
.rail__btn[aria-current="true"] .rail__num { color: var(--cat, var(--gold)); }

/* 弱对比主题：导航文字增强发光 */
html[data-mode="bedroom"] .rail__btn {
  text-shadow:
    0 0 7px rgba(176, 127, 192, .40),
    0 0 20px rgba(176, 127, 192, .18),
    0 1px 3px rgba(10, 5, 20, .45);
}
html[data-mode="bedroom"] .rail__btn:hover {
  text-shadow:
    0 0 10px rgba(176, 127, 192, .55),
    0 0 28px rgba(176, 127, 192, .26),
    0 1px 3px rgba(10, 5, 20, .38);
}
html[data-mode="iris"] .rail__btn {
  text-shadow:
    0 0 7px rgba(111, 134, 214, .40),
    0 0 20px rgba(111, 134, 214, .18),
    0 1px 3px rgba(8, 12, 30, .45);
}
html[data-mode="iris"] .rail__btn:hover {
  text-shadow:
    0 0 10px rgba(111, 134, 214, .55),
    0 0 28px rgba(111, 134, 214, .26),
    0 1px 3px rgba(8, 12, 30, .38);
}

.rail__sep {
  height: 1px; margin: 12px 12px 12px 6px;
  background: linear-gradient(90deg, var(--edge), transparent);
}
.rail__note {
  margin: 18px 0 0 6px; font-size: 11.5px; letter-spacing: .14em;
  color: var(--fg-mute); font-family: var(--font-serif); font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .30);
}

/* ── 7. 舞台 ─────────────────────────────────────────────────────────── */
.stage { min-height: 100vh; padding-left: clamp(16px, 2.6vw, 44px); }
.view  { perspective: 1500px; perspective-origin: 50% 26%; }

/* ── 8. 首屏 ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(56px, 11vh, 130px) 0 clamp(44px, 7vh, 84px);
  max-width: 46ch;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(12px, 1.1vw, 14px); letter-spacing: .42em;
  text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.hero__eyebrow::before {
  content: ''; width: clamp(26px, 4vw, 54px); height: 2px;
  background: currentColor; filter: url(#brushSoft);
}

.hero__title {
  margin: 0;
  font-family: var(--font-cn); font-weight: 900;
  font-size: clamp(52px, 11.5vw, 148px);
  line-height: .90; letter-spacing: .02em;
  color: transparent;
  background: linear-gradient(160deg,
    var(--gold-hi) 0%, var(--gold) 26%, var(--lagoon) 62%, var(--cobalt) 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 14px 34px rgba(4, 8, 24, .6));
  /* 柔和星光发光——不要粗勾边，只要氛围光晕 */
  text-shadow:
    0 0 20px rgba(240, 193, 75, .35),
    0 0 50px rgba(240, 193, 75, .15);
}
html[data-mode="midi"] .hero__title, html[data-mode="sun"] .hero__title,
html[data-mode="bedroom"] .hero__title, html[data-mode="iris"] .hero__title {
  /* 浅色天空：柔和投影即可，字形清晰度由下方各主题的 -webkit-text-stroke 负责 */
  filter: drop-shadow(0 8px 20px rgba(40, 24, 8, .20));
}

/* 金野 · 麦田与柏树 → 深青蓝绿 → 麦金黄（去开头浅色糊段，强对比） */
html[data-mode="midi"] .hero__title {
  background-image: linear-gradient(150deg, #14505a 0%, #2f8f86 34%, #c8922a 100%);
  -webkit-text-stroke: 1.2px rgba(12, 40, 38, .42);
  text-shadow: 0 2px 12px rgba(20, 50, 46, .20);
}
/* 暖阳 · 向日葵 → 深赭棕 → 铬黄 → 深橄榄（去奶白开头，金棕强对比） */
html[data-mode="sun"] .hero__title {
  background-image: linear-gradient(150deg, #7a4a14 0%, #e6b030 46%, #b07a1e 100%);
  -webkit-text-stroke: 1.2px rgba(60, 32, 8, .42);
  text-shadow: 0 2px 12px rgba(70, 40, 10, .20);
}
/* 静室 · 阿尔勒的卧室 → 深紫红 → 亮薰衣草 → 金黄（去浅紫糊段） */
html[data-mode="bedroom"] .hero__title {
  background-image: linear-gradient(150deg, #4a1f55 0%, #a06fb8 42%, #e0b94a 100%);
  -webkit-text-stroke: 1.2px rgba(40, 16, 50, .42);
  text-shadow: 0 2px 12px rgba(45, 18, 55, .20);
}
/* 花汐 · 鸢尾花 → 深靛蓝紫 → 蓝紫 → 柠檬黄（去浅蓝糊段） */
html[data-mode="iris"] .hero__title {
  background-image: linear-gradient(150deg, #2f2a78 0%, #6a5ac0 42%, #d8c24a 100%);
  -webkit-text-stroke: 1.2px rgba(20, 18, 60, .42);
  text-shadow: 0 2px 12px rgba(25, 22, 65, .20);
}
/* 夜鸢 · 鸢尾花·夜 → 深靛紫夜 → 蓝紫鸢尾 → 柠檬黄花心（夜色亮字，留光晕） */
html[data-mode="cafe"] .hero__title {
  background-image: linear-gradient(150deg, #1a1748 0%, #5a4f9c 46%, #cbb86a 100%);
  text-shadow:
    0 0 14px rgba(185, 166, 224, .38),
    0 0 36px rgba(120, 140, 210, .20);
}

.hero__title span { display: block; }
.hero__title .en {
  font-family: var(--font-serif); font-weight: 400; font-style: italic;
  font-size: clamp(20px, 3.4vw, 40px); letter-spacing: .30em;
  margin-top: .28em; opacity: .82;
}

.hero__stroke { display: block; width: min(100%, 460px); height: 18px; margin: 26px 0 24px; overflow: visible; }
.hero__stroke path {
  fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round;
  filter: url(#brush);
  stroke-dasharray: 520; stroke-dashoffset: 520;
  animation: draw 2s var(--ease) .35s forwards;
}

.hero__lede {
  margin: 0 0 30px;
  font-family: var(--font-cn);
  font-size: clamp(15px, 1.35vw, 18px); line-height: 1.95;
  color: var(--fg-dim);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.hero__lede b { color: var(--fg); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px;
  border-radius: 16px 24px 17px 26px / 24px 16px 26px 17px;
  font-size: 14px; letter-spacing: .06em;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              background-color .4s var(--ease), color .4s var(--ease);
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.btn--primary {
  background: var(--gold); color: #191207;
  box-shadow: 0 16px 34px -16px rgba(240, 193, 75, .7);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 26px 48px -18px rgba(240, 193, 75, .82); }
.btn--ghost { border: 1px solid var(--edge); color: var(--fg-dim); background: var(--pane); }
.btn--ghost:hover { color: var(--fg); border-color: var(--edge-lit); transform: translateY(-3px); }

/* 弱对比主题：主按钮提亮 */
html[data-mode="bedroom"] .btn--primary {
  background: linear-gradient(135deg, #d490e0 0%, #b07fc0 100%);
  box-shadow: 0 16px 34px -16px rgba(176, 127, 192, .75), 0 0 0 1px rgba(176,127,192,.2);
}
html[data-mode="bedroom"] .btn--primary:hover {
  box-shadow: 0 26px 48px -18px rgba(176, 127, 192, .88), 0 0 0 1px rgba(176,127,192,.3);
}
html[data-mode="iris"] .btn--primary {
  background: linear-gradient(135deg, #8ea8f0 0%, #6f86d6 100%);
  box-shadow: 0 16px 34px -16px rgba(111, 134, 214, .75), 0 0 0 1px rgba(111,134,214,.2);
}
html[data-mode="iris"] .btn--primary:hover {
  box-shadow: 0 26px 48px -18px rgba(111, 134, 214, .88), 0 0 0 1px rgba(111,134,214,.3);
}

/* ── 9. 分区标题 ─────────────────────────────────────────────────────── */
.sect { margin: 0 0 clamp(52px, 7vh, 88px); }

.sect__head {
  display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 26px);
  margin: 0 0 clamp(22px, 3vh, 34px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--edge);
}
.sect__index {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(30px, 4vw, 52px); line-height: .8;
  color: var(--cat, var(--gold)); opacity: .5;
}
.sect__titles { flex: 1; min-width: 0; }
.sect__name {
  margin: 0; font-family: var(--font-cn); font-weight: 600;
  font-size: clamp(24px, 3.2vw, 38px); letter-spacing: .12em; line-height: 1.2;
}
.sect__en {
  display: block; margin-top: 4px;
  font-family: var(--font-serif); font-style: italic; font-size: 13px;
  letter-spacing: .30em; text-transform: uppercase; color: var(--fg-mute);
}
.sect__blurb {
  margin: 0; max-width: 34ch; padding-bottom: 4px;
  font-size: 13px; line-height: 1.8; color: var(--fg-mute);
  font-family: var(--font-cn);
}
.sect__count {
  font-family: var(--font-serif); font-size: 13px; font-style: italic;
  color: var(--fg-mute); white-space: nowrap;
}

/* ── 10. 卡片网格 ────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(14px, 1.5vw, 22px);
}

.card {
  --sc: 1;
  --op: 1;
  position: relative;
  padding: 17px 19px 16px;
  border-radius: 20px 30px 21px 34px / 30px 20px 34px 21px;
  border: 1px solid var(--edge);
  background:
    linear-gradient(152deg,
      color-mix(in srgb, var(--cat, var(--cobalt)) 14%, var(--pane)) 0%,
      var(--pane-2) 58%,
      color-mix(in srgb, var(--ink-0) 46%, transparent) 100%);
  box-shadow: var(--shade);
  /* 纯 2D 变换：无 translateZ，Edge 命中区域不会偏移 */
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc));
  opacity: var(--op);
  transition: transform .5s var(--ease), border-color .4s var(--ease),
              box-shadow .5s var(--ease), opacity .5s var(--ease);
  will-change: transform;
  overflow: hidden;
  cursor: pointer;
}

/* 油画排线肌理 */
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .30; mix-blend-mode: soft-light;
  background:
    repeating-linear-gradient(114deg,
      rgba(255,255,255,.13) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(66deg,
      rgba(0,0,0,.14) 0 1px, transparent 1px 6px);
}
/* 悬停时从左下渗出的颜料光 */
.card::after {
  content: ''; position: absolute; inset: -40% -20% auto -30%; height: 180%;
  pointer-events: none; opacity: 0;
  background: radial-gradient(58% 52% at 24% 78%,
    color-mix(in srgb, var(--cat, var(--gold)) 62%, transparent), transparent 70%);
  transition: opacity .55s var(--ease);
}

.card:hover, .card:focus-within {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.03);
  border-color: color-mix(in srgb, var(--cat, var(--gold)) 55%, transparent);
  box-shadow: var(--shade-lift);
}
.card:hover::after, .card:focus-within::after { opacity: .30; }

/* 弱对比主题：卡片增强层次感 */
html[data-mode="bedroom"] .card,
html[data-mode="iris"] .card {
  border-color: color-mix(in srgb, var(--ink-0) 28%, transparent);
  background:
    linear-gradient(152deg,
      color-mix(in srgb, var(--cat, var(--accent)) 18%, var(--pane)) 0%,
      var(--pane-2) 55%,
      color-mix(in srgb, var(--ink-0) 54%, transparent) 100%);
}
html[data-mode="bedroom"] .card:hover,
html[data-mode="iris"] .card:hover {
  border-color: color-mix(in srgb, var(--cat, var(--accent)) 65%, transparent);
}

/* 语义链接：保留给屏幕阅读器与 SEO；命中检测由 JS .card 点击接管 */
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  pointer-events: none; }
.card__top, .card__desc, .card__foot { position: relative; }

.card__top { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }

.sigil { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; }
.sigil svg { width: 100%; height: 100%; }

.card__ids { min-width: 0; flex: 1; }
.card__name {
  display: block;
  font-family: var(--font-cn); font-weight: 600; font-size: 15.5px;
  letter-spacing: .04em; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__en {
  display: block; margin-top: 1px;
  font-family: var(--font-serif); font-style: italic; font-size: 11.5px;
  letter-spacing: .16em; color: var(--fg-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card__desc {
  margin: 0 0 12px; font-size: 12.8px; line-height: 1.72;
  color: var(--fg-dim); font-family: var(--font-cn);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; position: relative; z-index: 2; }
.tag {
  font: inherit; font-size: 10.5px; letter-spacing: .1em; padding: 2.5px 8px;
  border-radius: 7px 10px 8px 11px / 10px 7px 11px 8px;
  border: 1px solid var(--edge); color: var(--fg-mute);
  background: transparent; cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.tag:hover, .tag:focus-visible {
  color: var(--fg); border-color: color-mix(in srgb, var(--cat, var(--gold)) 46%, transparent);
  background: color-mix(in srgb, var(--cat, var(--gold)) 12%, transparent);
  outline: none;
}

.card__flag {
  position: absolute; top: 0; right: 0;
  padding: 4px 10px 5px; border-radius: 0 0 0 12px;
  font-size: 9.5px; letter-spacing: .18em;
  background: color-mix(in srgb, var(--cat, var(--gold)) 82%, transparent);
  color: var(--ink-0); font-weight: 600;
}

/* 收藏钮 */
.card__pin {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; color: var(--fg-mute);
  opacity: 0; transform: scale(.7) translateZ(1px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), color .3s var(--ease);
}
.card:hover .card__pin, .card__pin.on { opacity: 1; transform: none; }
.card__pin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.card__pin:hover { color: var(--gold); }
.card__pin.on { color: var(--gold); }
.card__pin.on svg { fill: var(--gold); }

/* 入场动画基态 */
.card.enter { opacity: 0; }

/* ── 11. 首页星区总览 ────────────────────────────────────────────────── */
.constellations {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.cnode {
  position: relative; display: block; padding: 20px 18px 18px;
  border-radius: 22px 16px 26px 18px / 16px 24px 18px 28px;
  border: 1px solid var(--edge);
  background: linear-gradient(158deg, var(--pane), color-mix(in srgb, var(--ink-0) 40%, transparent));
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease);
  overflow: hidden;
  cursor: pointer;
}
.cnode::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat) 58%, transparent), transparent 68%);
  opacity: .34; transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.cnode:hover { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.025); border-color: color-mix(in srgb, var(--cat) 52%, transparent); box-shadow: var(--shade-lift); }
.cnode:hover::before { opacity: .7; transform: scale(1.18); }

/* 弱对比主题：分类卡片增强 */
html[data-mode="bedroom"] .cnode,
html[data-mode="iris"] .cnode {
  border-color: color-mix(in srgb, var(--ink-0) 26%, transparent);
  background: linear-gradient(158deg,
    color-mix(in srgb, var(--ink-0) 18%, var(--pane)),
    color-mix(in srgb, var(--ink-0) 48%, transparent));
}
html[data-mode="bedroom"] .cnode:hover,
html[data-mode="iris"] .cnode:hover {
  border-color: color-mix(in srgb, var(--cat, var(--accent)) 60%, transparent);
}

.cnode__n {
  font-family: var(--font-serif); font-style: italic; font-size: 12px;
  color: var(--cat); letter-spacing: .18em;
}
.cnode__name {
  display: block; margin: 8px 0 3px;
  font-family: var(--font-cn); font-weight: 600; font-size: 19px; letter-spacing: .1em;
}
.cnode__en {
  display: block; font-family: var(--font-serif); font-style: italic;
  font-size: 11.5px; letter-spacing: .22em; color: var(--fg-mute);
}
.cnode__bar {
  margin-top: 16px; height: 36px; border-radius: 10px;
  background: var(--edge); overflow: hidden;
  position: relative;
}
/* ── 星空底层：深靛涡旋夜空 ─────────────────────────────── */
.cnode__bar::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 140% 100% at 20% 100%, rgba(240,193,75,.18), transparent 55%),
    radial-gradient(ellipse 100% 80% at 80% 10%, rgba(145,180,230,.14), transparent 50%),
    linear-gradient(165deg,
      #0a0e1e 0%, #111833 30%, #1a2448 55%, #0d1229 80%, #070b18 100%);
  border-radius: inherit;
}
/* ── 笔触涡旋层（feTurbulence 风格的 CSS 近似）────────────── */
.cnode__bar::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 30% 70%, rgba(74,96,168,.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 65% 40%, rgba(56,82,156,.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 15% 25%, rgba(100,130,200,.12), transparent 50%);
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity: .8;
}
/* ── 星辰散点（box-shadow 星场）──────────────────────────── */
.cnode__bar i {
  display: block; position: absolute; inset: 0;
  width: 2px; height: 2px; border-radius: 50%;
  background: transparent;
  box-shadow:
    /* 第一排亮星 */
     6px 5px 0 0 rgba(255,250,235,.92),
    18px 3px 0 0 rgba(255,245,220,.78),
    34px 7px 0 0 rgba(240,225,190,.86),
    52px 4px 0 0 rgba(255,252,240,.94),
    68px 6px 0 0 rgba(245,235,210,.76),
    84px 2px 0 0 rgba(255,248,230,.88),
   102px 5px 0 0 rgba(250,238,205,.82),
   118px 3px 0 0 rgba(255,250,235,.90),
   134px 7px 0 0 rgba(240,228,195,.80),
   150px 4px 0 0 rgba(255,245,225,.85),
    /* 第二排 */
     9px 14px 0 0 rgba(200,215,255,.72),
    25px 11px 0 0 rgba(180,200,255,.64),
    41px 15px 0 0 rgba(210,225,255,.76),
    57px 12px 0 0 rgba(190,208,255,.68),
    73px 16px 0 0 rgba(205,220,255,.74),
    89px 13px 0 0 rgba(185,202,255/.66),
   105px 14px 0 0 rgba(215,228,255/.78),
   121px 11px 0 0 rgba(195,212,255/.70),
   137px 15px 0 0 rgba(188,206,255/.65),
   153px 12px 0 0 rgba(208,222,255/.73),
    /* 第三排微星 */
    12px 23px 0 0 rgba(255,250,235,.45),
    28px 21px 0 0 rgba(255,248,230,.38),
    46px 25px 0 0 rgba(255,252,240/.48),
    62px 22px 0 0 rgba(245,235,210/.42),
    78px 26px 0 0 rgba(255,245,225/.46),
    94px 20px 0 0 rgba(250,238,205/.40),
   110px 24px 0 0 rgba(255,250,235/.44),
   126px 21px 0 0 rgba(240,228,195/.39),
   142px 25px 0 0 rgba(255,248,230/.47);
  transform-origin: left center;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
/* ── 地平线辉光（进度指示）──────────────────────────────── */
.cnode__bar i::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--cat, var(--accent)) var(--p, 40%),
    transparent calc(var(--p, 40%) + 20%));
  border-radius: 0 0 10px 10px;
  filter: blur(1.5px);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--cat, var(--accent)) 50%, transparent);
}
/* ── 流星划过（hover 时触发）─────────────────────────────── */
.cnode__bar i::after {
  content: ''; position: absolute;
  width: 28px; height: 1.5px;
  top: 6px; left: -28px;
  background: linear-gradient(90deg, transparent, rgba(255,250,235,.8), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: none;
}
.cnode.lit .cnode__bar i { opacity: 1; }
.cnode.lit .cnode__bar i::after {
  animation: cnodeShooting 3.2s ease-in-out infinite;
  animation-delay: var(--shoot-delay, 0s);
}
@keyframes cnodeShooting {
  0%   { left: -28px; opacity: 0; }
  12%  { opacity: .85; }
  40%  { left: calc(var(--p, 40%) * 1.4); opacity: 0; }
  100% { left: calc(var(--p, 40%) * 1.4); opacity: 0; }
}

/* ── 昼间模式：星图转为各主题的原野 / 光晕（取本主题令牌）── */
html[data-mode="midi"] .cnode__bar::before,
html[data-mode="sun"] .cnode__bar::before,
html[data-mode="bedroom"] .cnode__bar::before,
html[data-mode="iris"] .cnode__bar::before {
  background:
    radial-gradient(ellipse 140% 100% at 20% 100%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 55%),
    radial-gradient(ellipse 100% 80% at 80% 10%, color-mix(in srgb, var(--lagoon) 24%, transparent), transparent 50%),
    linear-gradient(165deg,
      color-mix(in srgb, var(--lagoon) 46%, var(--ink-0)) 0%,
      var(--ink-1) 30%, var(--ink-2) 55%, var(--ink-3) 80%,
      color-mix(in srgb, var(--gold) 38%, var(--ink-3)) 100%);
}
html[data-mode="midi"] .cnode__bar::after,
html[data-mode="sun"] .cnode__bar::after,
html[data-mode="bedroom"] .cnode__bar::after,
html[data-mode="iris"] .cnode__bar::after {
  background:
    radial-gradient(ellipse 90% 60% at 30% 70%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 65% 40%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 55%);
  opacity: .6;
}
html[data-mode="midi"] .cnode__bar i,
html[data-mode="sun"] .cnode__bar i,
html[data-mode="bedroom"] .cnode__bar i,
html[data-mode="iris"] .cnode__bar i {
  box-shadow:
     6px 5px 0 0 var(--cstar), 18px 3px 0 0 var(--cstar), 34px 7px 0 0 var(--cstar),
    52px 4px 0 0 var(--cstar), 68px 6px 0 0 var(--cstar), 84px 2px 0 0 var(--cstar),
   102px 5px 0 0 var(--cstar), 118px 3px 0 0 var(--cstar), 134px 7px 0 0 var(--cstar),
   150px 4px 0 0 var(--cstar),
     9px 14px 0 0 var(--cstar2), 25px 11px 0 0 var(--cstar2), 41px 15px 0 0 var(--cstar2),
    57px 12px 0 0 var(--cstar2), 73px 16px 0 0 var(--cstar2), 89px 13px 0 0 var(--cstar2),
   105px 14px 0 0 var(--cstar2), 121px 11px 0 0 var(--cstar2), 137px 15px 0 0 var(--cstar2),
   153px 12px 0 0 var(--cstar2),
    12px 23px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
    28px 21px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
    46px 25px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
    62px 22px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
    78px 26px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
    94px 20px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
   110px 24px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
   126px 21px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent),
   142px 25px 0 0 color-mix(in srgb, var(--cstar2) 70%, transparent);
}
html[data-mode="midi"] .cnode__bar i::before,
html[data-mode="sun"] .cnode__bar i::before,
html[data-mode="bedroom"] .cnode__bar i::before,
html[data-mode="iris"] .cnode__bar i::before {
  box-shadow: 0 0 8px 1.5px color-mix(in srgb, var(--cat, var(--accent)) 35%, transparent);
}
.cnode__count {
  display: block; margin-top: 8px; font-size: 11px;
  letter-spacing: .12em; color: var(--fg-mute);
}

/* ── 每个星区的流星错开 + 星场微偏移 ─────────────────────── */
.cnode:nth-child(1)  { --shoot-delay: 0.0s; }
.cnode:nth-child(2)  { --shoot-delay: 0.5s; }
.cnode:nth-child(3)  { --shoot-delay: 1.1s; }
.cnode:nth-child(4)  { --shoot-delay: 0.3s; }
.cnode:nth-child(5)  { --shoot-delay: 1.6s; }
.cnode:nth-child(6)  { --shoot-delay: 0.8s; }
.cnode:nth-child(7)  { --shoot-delay: 2.0s; }
.cnode:nth-child(8)  { --shoot-delay: 0.2s; }
.cnode:nth-child(9)  { --shoot-delay: 1.3s; }
.cnode:nth-child(10) { --shoot-delay: 0.6s; }
.cnode:nth-child(11) { --shoot-delay: 1.8s; }
.cnode:nth-child(12) { --shoot-delay: 0.4s; }
.cnode:nth-child(13) { --shoot-delay: 1.5s; }
.cnode:nth-child(14) { --shoot-delay: 0.9s; }

/* ── 减弱动效偏好：隐藏流星、星场静态 ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cnode__bar i::after { animation: none !important; opacity: 0 !important; }
}

/* ── 12. 空状态 ──────────────────────────────────────────────────────── */
.void {
  padding: clamp(40px, 8vh, 80px) 0; max-width: 42ch;
}
.void__mark { width: 84px; height: 84px; margin-bottom: 22px; opacity: .6; }
.void__mark path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.void h3 {
  margin: 0 0 12px; font-family: var(--font-cn); font-weight: 600;
  font-size: 22px; letter-spacing: .1em;
}
.void p { margin: 0 0 20px; color: var(--fg-mute); font-size: 13.5px; line-height: 1.9; }

/* ── 13. 检索浮层 ────────────────────────────────────────────────────── */
.finder { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; }
.finder[hidden] { display: none; }
.finder__scrim {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink-0) 74%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .35s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.finder__panel {
  position: relative; width: min(720px, calc(100vw - 32px));
  margin-top: min(14vh, 120px);
  border-radius: 20px 28px 22px 30px / 28px 20px 30px 22px;
  border: 1px solid var(--edge-lit);
  background: linear-gradient(168deg,
    color-mix(in srgb, var(--ink-2) 88%, transparent),
    color-mix(in srgb, var(--ink-0) 92%, transparent));
  box-shadow: 0 50px 100px -30px rgba(2, 5, 18, .9);
  overflow: hidden;
  animation: rise .5s var(--ease);
}
html[data-mode="midi"] .finder__panel, html[data-mode="sun"] .finder__panel,
html[data-mode="bedroom"] .finder__panel, html[data-mode="iris"] .finder__panel {
  background: linear-gradient(168deg,
    color-mix(in srgb, var(--paper) 94%, transparent),
    color-mix(in srgb, var(--ink-1) 92%, transparent));
}
@keyframes rise { from { opacity: 0; transform: translateY(-22px) scale(.97); } }

/* ── 13b. 夜空模式浮层 ──────────────────────────────────────────────── */
.modes { position: fixed; inset: 0; z-index: 70; }
.modes[hidden] { display: none; }
.modes__scrim { position: absolute; inset: 0; background: rgba(4, 8, 20, .5); backdrop-filter: blur(3px); }
.modes__panel {
  position: absolute; left: 50%; top: calc(var(--head-h) + 10px);
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  padding: 16px 16px 18px; border-radius: 20px 16px 24px 18px / 16px 22px 18px 26px;
  border: 1px solid var(--edge);
  background: linear-gradient(168deg, var(--pane), color-mix(in srgb, var(--ink-0) 46%, transparent));
  box-shadow: var(--shade-lift); backdrop-filter: blur(18px) saturate(1.1);
  animation: rise .42s var(--ease);
}
.modes__title {
  margin: 2px 4px 13px; font-family: var(--font-cn); font-size: 12.5px;
  letter-spacing: .22em; color: var(--fg-mute);
}
.modes__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 11px; border-radius: 14px 11px 16px 12px / 11px 15px 12px 16px;
  border: 1px solid var(--edge); cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--ink-0) 40%, transparent);
  color: var(--fg-dim); font: inherit;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.mode:hover, .mode:focus-visible { border-color: var(--edge-lit); transform: translateY(-2px); outline: none; color: var(--fg); }
.mode[aria-current="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); }
.mode__swatch {
  width: 34px; height: 34px; flex: none; border-radius: 10px 8px 11px 9px / 8px 11px 9px 11px;
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 12px rgba(0,0,0,.28);
}
.mode__txt { min-width: 0; }
.mode__name { display: block; font-family: var(--font-cn); font-weight: 600; font-size: 14px; letter-spacing: .06em; }
.mode__en { display: block; font-family: var(--font-serif); font-style: italic; font-size: 10px; letter-spacing: .08em; color: var(--fg-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.finder__field {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid var(--edge);
}
.finder__field > svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; }
.finder__field input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-size: 16px; font-family: var(--font-cn);
}
.finder__field input::placeholder { color: var(--fg-mute); }
.finder__esc {
  font-size: 10px; letter-spacing: .14em; color: var(--fg-mute);
  border: 1px solid var(--edge); border-radius: 7px; padding: 4px 8px;
}

.finder__results { max-height: min(52vh, 460px); overflow-y: auto; padding: 8px; }
.finder__results::-webkit-scrollbar { width: 6px; }
.finder__results::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 6px; }

.fres {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center;
  gap: 12px; padding: 10px 12px; border-radius: 12px;
  transition: background-color .2s var(--ease);
}
.fres[data-active="true"], .fres:hover { background: var(--accent-soft); }
.fres__name { font-family: var(--font-cn); font-size: 14px; }
.fres__name mark { background: none; color: var(--gold); font-weight: 600; }
.fres__desc { display: block; font-size: 11.5px; color: var(--fg-mute); margin-top: 1px; }
.fres__cat {
  font-size: 10.5px; letter-spacing: .12em; padding: 3px 9px;
  border-radius: 8px; border: 1px solid var(--edge); color: var(--fg-mute);
  white-space: nowrap;
}
.finder__empty { padding: 34px 20px; text-align: center; color: var(--fg-mute); font-size: 13px; }

.finder__hint {
  display: flex; gap: 18px; padding: 11px 20px;
  border-top: 1px solid var(--edge);
  font-size: 11px; color: var(--fg-mute);
}
.finder__hint kbd {
  display: inline-block; padding: 2px 5px; margin-right: 3px;
  border: 1px solid var(--edge); border-radius: 4px; font-size: 10px;
}

/* ── 14. 回到顶部 ────────────────────────────────────────────────────── */
.ascend {
  position: fixed; right: clamp(16px, 2.4vw, 34px); bottom: clamp(16px, 2.4vw, 34px);
  z-index: 50; width: 50px; height: 50px;
  border-radius: 50%; border: 1px solid var(--edge-lit);
  background: var(--pane); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: transform .45s var(--ease), opacity .45s var(--ease), background-color .3s var(--ease);
  animation: rise .45s var(--ease);
}
.ascend[hidden] { display: none; }
.ascend:hover { transform: translateY(-4px) rotate(-8deg); }
.ascend svg { width: 30px; height: 30px; }
.ascend__swirl { fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; opacity: .65; }
.ascend__arrow { fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; }

/* ── 15. 页脚 ────────────────────────────────────────────────────────── */
.colophon { padding: clamp(40px, 6vh, 74px) 0 clamp(48px, 8vh, 90px); max-width: 62ch; }
.colophon__line {
  height: 3px; margin: 0 0 26px; max-width: 300px;
  background: linear-gradient(90deg, var(--gold), transparent);
  filter: url(#brushSoft);
}
.colophon__body p { margin: 0 0 10px; font-size: 12.8px; line-height: 1.95; color: var(--fg-dim); }
.colophon__muted { color: var(--fg-mute) !important; }
.colophon a { color: var(--gold); border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.colophon a:hover { border-bottom-color: var(--gold); }
.colophon b { color: var(--fg); }

/* ── 16. 路由切换与首屏入场 ──────────────────────────────────────────── */
.view.leaving { pointer-events: none; }

@keyframes liftIn {
  from { opacity: 0; transform: translate3d(0, 22px, -90px); }
  to   { opacity: 1; transform: none; }
}
.hero > *, .sect > .sect__head {
  animation: liftIn .86s var(--ease) both;
}
.hero__eyebrow { animation-delay: .04s; }
.hero__title   { animation-delay: .10s; }
.hero__stroke  { animation-delay: .18s; }
.hero__lede    { animation-delay: .26s; }
.hero__actions { animation-delay: .34s; }
.sect > .sect__head { animation-delay: .06s; }

/* ── 17. 响应式 ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  :root { --rail-w: 200px; }
  .rail__name { font-size: 13.5px; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 0; }
  .stage { padding: 0 var(--gutter); }

  .rail {
    position: sticky; top: var(--head-h); z-index: 30;
    max-height: none; padding: 10px var(--gutter);
    overflow: visible;
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--ink-0) 88%, transparent),
      color-mix(in srgb, var(--ink-0) 40%, transparent));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--edge);
  }
  .rail__constellation, .rail__note { display: none; }
  .rail__list {
    flex-direction: row; gap: 6px;
    overflow-x: auto; overflow-y: visible;
    scrollbar-width: none; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .rail__item { scroll-snap-align: start; }
  .rail__list::-webkit-scrollbar { display: none; }
  .rail__item { margin-left: 0; flex: none; }
  .rail__btn { grid-template-columns: 16px auto; padding: 6px 13px 6px 9px; white-space: nowrap; }
  .rail__star { width: 16px; height: 16px; }
  .rail__num { display: none; }
  .rail__btn[aria-current="true"] { background: color-mix(in srgb, var(--cat, var(--gold)) 22%, transparent); }
  .rail__sep { display: none; }

  .hero { padding-top: clamp(38px, 8vh, 70px); }
  .tool--search span, .tool--search kbd { display: none; }
  .tool--search { width: 38px; padding: 0; justify-content: center; }
  .sect__head { flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; }
  .sect__blurb { max-width: none; flex-basis: 100%; }
  .star-pillar { display: none; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .constellations { grid-template-columns: repeat(2, 1fr); }
  .brand__text i { display: none; }
}

/* ── 18. 动效降级 ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .cnode:hover { transform: none; }
}
