/* ============================================================
   Muzium · 藏声馆 — 设计系统
   现代 / 简洁 / 直角（与方正锐利的图标素材保持一致）
   ============================================================ */

:root {
  --topbar-h: 64px;
  --dock-h: 76px;
  --maxw: 1280px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .28s;
}

/* ---------- 暗色（默认） ---------- */
:root,
:root[data-theme="dark"] {
  --bg:        #0b0b0d;
  --bg-1:      #111114;
  --bg-2:      #17171c;
  --bg-3:      #1e1e25;
  --line:      #2a2a33;
  --line-2:    #3a3a46;
  --fg:        #f2f2f5;
  --fg-1:      #b6b6c2;
  --fg-2:      #7c7c8c;
  --accent:    #c9a227;          /* 由角色代表色在运行时覆盖 */
  --accent-2:  #6a7fbf;
  --accent-ink:#0b0b0d;

  /* 卡片底部渐变遮罩用的基色（跟随主题） */
  --scrim: 8, 8, 10;
  --shadow-s: 0 12px 32px rgba(0, 0, 0, .55);
  --shadow-l: 0 18px 48px rgba(0, 0, 0, .6);

  color-scheme: dark;
}

/* ---------- 亮色 ---------- */
:root[data-theme="light"] {
  --bg:        #f7f7f4;
  --bg-1:      #ffffff;
  --bg-2:      #f0f0ec;
  --bg-3:      #e5e5e0;
  --line:      #dcdcd6;
  --line-2:    #c2c2ba;
  --fg:        #16161a;
  --fg-1:      #4a4a55;
  --fg-2:      #83838f;
  --accent:    #9c7b12;
  --accent-2:  #4a5da8;
  --accent-ink:#ffffff;

  --scrim: 255, 255, 255;
  --shadow-s: 0 12px 30px rgba(30, 30, 40, .14);
  --shadow-l: 0 18px 44px rgba(30, 30, 40, .18);

  color-scheme: light;
}

/* 主题切换时的整体淡入淡出 */
html.theme-anim,
html.theme-anim body,
html.theme-anim .topbar,
html.theme-anim .footer,
html.theme-anim .player,
html.theme-anim .engine-sticky,
html.theme-anim .engine-body,
html.theme-anim .track,
html.theme-anim .char-card {
  transition: background-color .45s var(--ease), color .45s var(--ease),
              border-color .45s var(--ease);
}

/* ---------- 复位 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "GenWanMin", "Source Han Serif SC", "Noto Serif CJK SC",
               "Songti SC", serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  /* 关闭字形描边类渲染：某些字重下 -webkit-font-smoothing 会让数字出现内描边 */
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeSpeed;
  padding-bottom: calc(var(--dock-h) + 24px);
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* 全站直角 */
input, button, textarea, select, img, div, section, article { border-radius: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--fg-2); }

/* ---------- 排版 ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; letter-spacing: .02em; }
p { margin: 0 0 1em; }

/* 数字统一用无衬线，避免明朝体数字在小字号下的描边感 */
.num, .stat .n, .track-idx, .p-time, .p-q-idx, .pmax-bar .t {
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  paint-order: fill;
}

.eyebrow {
  font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--fg-2); font-weight: 600;
}

.section-title {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-title h2 { font-size: clamp(20px, 3vw, 28px); }
.section-title .count { color: var(--fg-2); font-size: 13px; letter-spacing: .1em; }

/* ---------- 布局 ---------- */
.view { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.section { padding: clamp(48px, 8vw, 96px) 0; }

/* 展厅页：全部作品列表与各引擎分组之间的间距收敛，避免大段空白 */
.engine-sub { margin-top: clamp(28px, 4vw, 44px); }
.engine-sub .section-title { margin-bottom: 18px; }

/* 首页收尾的「作品展厅」是页面最后一块，下内边距不必再留满 */
.view > * > .section:last-child { padding-bottom: clamp(36px, 6vw, 64px); }

/* 路由切换缓动：淡出上移 → 淡入下移 */
.view { transition: opacity .17s var(--ease), transform .17s var(--ease); }
.view > * { animation: pageIn .55s var(--ease-out) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.view.leaving { opacity: 0; transform: translateY(-10px); }

/* 首屏各区块依次入场 */
.view > * > .section:nth-child(1),
.view > * > section:nth-child(1) { animation-delay: .02s; }
.view > * > section:nth-child(2) { animation-delay: .07s; }
.view > * > section:nth-child(3) { animation-delay: .12s; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 300;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* LOGO 左吸附：字标是 6:1 长条，给足高度与宽度余量 */
.brand { display: flex; align-items: center; height: 100%; flex: 0 0 auto;
  margin-right: auto; color: var(--fg); }
.brand-mark { display: block; height: 24px; color: var(--fg); flex: 0 0 auto;
  max-width: 220px; }
.brand-mark svg { height: 100%; width: auto; max-width: 100%; display: block; fill: currentColor; }

.nav { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }

.nav a {
  position: relative;
  padding: 8px 13px;
  font-size: 14px; letter-spacing: .08em;
  color: var(--fg-1); white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav a:hover { color: var(--fg); background: var(--bg-2); }
.nav a.active { color: var(--fg); }
.nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2px; background: var(--accent);
}

.nav-sep { width: 1px; height: 18px; background: var(--line); margin: 0 8px; }

/* 主题切换：顶栏最右 */
.theme-toggle {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--fg-1);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--fg); background: var(--bg-2); border-color: var(--fg-2); }
.theme-toggle svg { width: 17px; height: 17px; fill: currentColor;
  transition: transform .5s var(--ease-out); }
.theme-toggle:hover svg { transform: rotate(35deg); }

.nav-toggle { display: none; width: 40px; height: 40px; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px; order: 3; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--fg);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--topbar-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 16px;
    background: var(--bg-1); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    max-height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px clamp(16px, 4vw, 40px); font-size: 15px; }
  .nav a.active::after { left: clamp(16px, 4vw, 40px); right: auto; width: 18px; bottom: 8px; }
  .nav-sep { width: auto; height: 1px; margin: 8px clamp(16px, 4vw, 40px); }
}

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--line-2);
  font-size: 13px; letter-spacing: .1em; color: var(--fg);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg);
  transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.12); background: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 7px 13px; font-size: 12px; }

/* 不可下载（已下架等）：不可点击，但保留 hover/focus 的反色填充效果 */
.btn.is-disabled {
  cursor: not-allowed;
  color: var(--fg-1);
  border-style: dashed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.btn.is-disabled:hover,
.btn.is-disabled:focus-visible {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
  transform: none;
}

.tag {
  display: inline-block; padding: 4px 10px;
  border: 1px solid var(--line-2); color: var(--fg-1);
  font-size: 11px; letter-spacing: .12em;
}
.tag-accent { border-color: var(--accent); color: var(--accent); }

/* 入场动画（IntersectionObserver 触发）；初始透明，保底逻辑确保不会永久留白 */
.reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* 网格内元素依次浮现 */
.char-grid .char-card { opacity: 0; transform: translateY(20px);
  animation: cardIn .7s var(--ease-out) both; }
.char-grid .char-card:nth-child(1) { animation-delay: .04s; }
.char-grid .char-card:nth-child(2) { animation-delay: .11s; }
.char-grid .char-card:nth-child(3) { animation-delay: .18s; }
.char-grid .char-card:nth-child(4) { animation-delay: .25s; }
.char-grid .char-card:nth-child(5) { animation-delay: .32s; }
.char-grid .char-card:nth-child(n+6) { animation-delay: .38s; }
@keyframes cardIn { to { opacity: 1; transform: none; } }

/* ============================================================
   首页
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(78vh - var(--topbar-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  /* 铺满整个视口宽度，突破 .view 的 1280px 限宽，避免两侧留白 */
  top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background:
    radial-gradient(60% 50% at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 50% at 90% 20%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}
.hero-title {
  font-size: clamp(40px, 9vw, 92px); line-height: 1.04; letter-spacing: .04em;
  margin: 18px 0 20px;
  /* 防止大字（尤其 i/j 等细笔画）在部分浏览器下出现内描边 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-shadow: none;
  paint-order: fill;
}
.hero-sub { max-width: 54ch; color: var(--fg-1); font-size: clamp(15px, 1.6vw, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); margin-top: clamp(40px, 7vw, 72px); }
.stat .n { font-size: clamp(26px, 4vw, 40px); font-weight: 600; color: var(--accent); line-height: 1; }
.stat .l { font-size: 12px; letter-spacing: .22em; color: var(--fg-2); margin-top: 8px; }

/* 角色卡片网格 */
.char-grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: var(--line); border: 1px solid var(--line);
}
.char-card {
  position: relative; display: block; background: var(--bg-1);
  aspect-ratio: 3 / 4; overflow: hidden;
}
/* 取景：取景框上边界比图片顶部「往外（向下）50px」，
   即头部始终落在框内距上沿 50px 处，聚焦放大也不会把头顶出框外。 */
.char-card img {
  position: absolute;
  left: 0; width: 100%;
  top: 50px; height: calc(100% - 50px);
  object-fit: cover; object-position: center top;
  opacity: .5;
  transform-origin: center top;
  transition: transform .85s var(--ease-out), filter .6s var(--ease);
}
.char-card:hover img { transform: scale(1.05); opacity: 1; }
/* 暗色从底部一直盖到歌手名下方，名字稳妥压在暗底上 */
.char-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(var(--scrim), .98) 0%, rgba(var(--scrim), .92) 32%,
    rgba(var(--scrim), .4) 56%, rgba(var(--scrim), 0) 80%);
}
.char-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 20px; }
.char-card-name { display: block; font-size: 22px; letter-spacing: .06em; }
.char-card-tag { font-size: 12px; color: var(--fg-1); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.char-card-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 1; background: var(--c, var(--accent));
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease-out); }
.char-card:hover .char-card-bar { transform: scaleY(1); }

/* 展厅 / 歌单表格 */
.tracks { border: 1px solid var(--line); border-bottom: 0; }
.track {
  display: grid;
  grid-template-columns: 44px 3fr 2fr 1.2fr 96px;
  align-items: center; gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.track:hover { background: var(--bg-2); }
.track.playing { background: var(--bg-3); }
.track.playing .track-title { color: var(--accent); }
.track-idx { color: var(--fg-2); font-size: 13px; display: grid; place-items: center; }
.track.playing .track-idx { color: var(--accent); }
.track-idx > * { grid-area: 1 / 1; }
.track-idx .n[hidden] { display: none; }
.track-eq[hidden] { display: none; }
.track-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-artist, .track-timbre { color: var(--fg-1); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 歌手索引：有详情页的可点击跳转，无详情页的（如澄琮）保持纯文本 */
.artist-link { color: inherit; text-decoration: none;
  border-bottom: 1px solid transparent; transition: color var(--dur) var(--ease),
  border-color var(--dur) var(--ease); }
.artist-link:hover, .artist-link:focus-visible {
  color: var(--accent); border-bottom-color: currentColor; }
.artist-sep { color: var(--fg-2); }
.track-engine { justify-self: end; }
.track-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.track-eq i { width: 2px; background: var(--accent); animation: eq .9s var(--ease) infinite alternate; }
.track-eq i:nth-child(2) { animation-delay: .3s; }
.track-eq i:nth-child(3) { animation-delay: .6s; }
@keyframes eq { from { height: 3px; } to { height: 13px; } }

@media (max-width: 760px) {
  .track { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px 14px; }
  .track-timbre, .track-engine { display: none; }
  .track-artist { grid-column: 2; font-size: 12px; }
  .track-title { grid-column: 2; }
  .track-idx { grid-row: span 2; }
}

/* ============================================================
   角色详情页
   ============================================================ */
.char-hero { position: relative; padding: clamp(32px, 5vw, 56px) 0 clamp(32px, 5vw, 48px); }
.char-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -80px -50vw 0;
  background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 72%);
}

.char-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .char-layout { grid-template-columns: 1fr; } }

/* 立绘展示 */
.illust-stage {
  position: relative; background: var(--bg-1); border: 1px solid var(--line);
  aspect-ratio: 3 / 4; overflow: hidden;
}
.illust-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(.985);
  transition: opacity .55s var(--ease-out), transform .8s var(--ease-out);
}
.illust-stage img.on { opacity: 1; transform: none; }

.illust-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.illust-thumb {
  position: relative; width: 62px; height: 62px; flex: 0 0 auto;
  border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}
.illust-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .5;
  transition: opacity var(--dur) var(--ease); }
.illust-thumb:hover { transform: translateY(-2px); }
.illust-thumb:hover img { opacity: 1; }
.illust-thumb.on { border-color: var(--accent); }
.illust-thumb.on img { opacity: 1; }
.illust-thumb.on::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--accent); }

.illust-meta { margin-top: 12px; font-size: 12px; color: var(--fg-2); letter-spacing: .04em; }
.illust-meta strong { color: var(--fg-1); font-weight: 400; }

/* 角色资料 */
.char-name { font-size: clamp(34px, 6vw, 60px); letter-spacing: .06em; margin: 10px 0 6px; }
.char-tagline { color: var(--accent); font-size: clamp(15px, 2vw, 19px); letter-spacing: .1em; }
.char-subtitle { color: var(--fg-1); margin-top: 12px; }

.profile-list { margin-top: 30px; border-top: 1px solid var(--line); }
.profile-row { display: grid; grid-template-columns: 108px 1fr; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row dt { color: var(--fg-2); letter-spacing: .1em; }
.profile-row dd { margin: 0; color: var(--fg); }

.swatches { display: flex; gap: 10px; margin-top: 22px; }
.swatch { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--fg-1); letter-spacing: .06em; }
.swatch i { width: 30px; height: 30px; border: 1px solid var(--line-2); display: block; }

/* ---------- 引擎子版块（吸附悬停 + 右侧跳转条） ---------- */
.engines { margin-top: clamp(40px, 6vw, 72px); position: relative; }

/* 主体与右侧导航并排；导航自身吸附 */
.engines-layout { display: grid; grid-template-columns: minmax(0, 1fr) 188px;
  gap: clamp(24px, 3vw, 44px); align-items: start; }
@media (max-width: 1080px) { .engines-layout { grid-template-columns: 1fr; } }

/* 引擎之间留出更大的间隙 */
.engine-block { margin-bottom: clamp(48px, 7vw, 88px); scroll-margin-top: calc(var(--topbar-h) + 12px); }
.engine-block:last-child { margin-bottom: 0; }

.engine-sticky {
  position: sticky; top: var(--topbar-h); z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(14px, 2vw, 22px);
  background: color-mix(in srgb, var(--bg-1) 94%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.engine-sticky.stuck {
  box-shadow: var(--shadow-s);
  background: color-mix(in srgb, var(--bg-2) 96%, transparent);
}
.engine-name { font-size: clamp(17px, 2.4vw, 22px); letter-spacing: .04em; }
.engine-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.engine-body {
  border: 1px solid var(--line); border-top: 0;
  padding: clamp(18px, 3vw, 32px);
  background: var(--bg-1);
}
.engine-intro { color: var(--fg-1); font-size: 14px; max-width: 78ch; }
.engine-intro a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* 右侧吸附跳转条 */
.engine-rail {
  position: sticky; top: calc(var(--topbar-h) + 28px);
  border-left: 1px solid var(--line);
  padding: 2px 0;
}
@media (max-width: 1080px) { .engine-rail { display: none; } }
.engine-rail-title { font-size: 11px; letter-spacing: .22em; color: var(--fg-2);
  padding: 0 0 10px 16px; }
.engine-rail a {
  position: relative; display: block;
  padding: 9px 0 9px 16px;
  font-size: 13px; letter-spacing: .06em; color: var(--fg-2);
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease-out);
}
.engine-rail a::before {
  content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: center;
  transition: transform .4s var(--ease-out);
}
.engine-rail a:hover { color: var(--fg-1); padding-left: 20px; }
.engine-rail a.on { color: var(--accent); }
.engine-rail a.on::before { transform: scaleY(1); }

.notice {
  margin: 16px 0; padding: 12px 16px;
  border-left: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  font-size: 13px; color: var(--fg-1);
}

.engine-grid { display: grid; gap: clamp(16px, 2.4vw, 28px); margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.spec-title { font-size: 12px; letter-spacing: .22em; color: var(--fg-2); margin-bottom: 12px; }

.timbre-card { border: 1px solid var(--line); background: var(--bg-2); padding: 16px; }
.timbre-card + .timbre-card { margin-top: 10px; }
.timbre-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timbre-name { font-size: 16px; letter-spacing: .06em; }
.timbre-intro { font-size: 13px; color: var(--fg-1); margin: 8px 0 12px; }
.timbre-specs { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--fg-2); }
.timbre-specs b { color: var(--fg-1); font-weight: 400; }

.lang-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-chip { display: flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--line-2); font-size: 12px; color: var(--fg-1); }
/* 语言图标内联为 currentColor：暗色随 --fg 显示白色，亮色显示黑色 */
/* 图标 viewBox 有 50x50 与 90x50 两种，固定高度、宽度自适应，保证所有图标视觉高度一致且不变形 */
.lang-chip .lang-ico { height: 15px; display: inline-flex; align-items: center; color: var(--fg); flex: 0 0 auto; }
.lang-chip .lang-ico svg { height: 100%; width: auto; display: block; fill: currentColor; }

.sample-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sample-row { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--bg-2); cursor: pointer; transition: background var(--dur) var(--ease); }
/* 进度填充：与容器同大小的矩形，左→右按播放进度推进，色为歌手代表色 50% 透明 */
.sample-row::before {
  content: ""; position: absolute; inset: 0; z-index: 0; width: var(--progress, 0%);
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  transition: width .12s linear;
}
.sample-row > * { position: relative; z-index: 1; }
.sample-row:hover { background: var(--bg-3); }
.sample-row.playing { background: var(--bg-3); }
.sample-row.playing .sample-label { color: var(--accent); }
.sample-play { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid var(--line-2); }
.sample-row:hover .sample-play { border-color: var(--accent); }
.sample-play svg { width: 10px; height: 10px; fill: var(--fg); }
.sample-row.playing .sample-play { border-color: var(--accent); }
.sample-row.playing .sample-play svg { fill: var(--accent); }
.sample-label { font-size: 13px; }

.dl-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.credits { display: grid; gap: 6px 18px; grid-template-columns: auto 1fr;
  font-size: 12.5px; color: var(--fg-1); }
.credits dt { color: var(--fg-2); letter-spacing: .06em; }
.credits dd { margin: 0; }

/* 制作人员：提级展示，置于支持语言之前 */
.engine-staff { margin-top: 24px; }
.engine-staff .credits { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.engine-staff .credits > div { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; }

/* 获取与下载：整个引擎板块的收尾区域 */
.engine-download { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ============================================================
   文档页（markdown）
   ============================================================ */
.doc { max-width: 78ch; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 0; }
.doc h1 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
/* 章节（h2）作为视觉锚点：顶部分隔线 + 左侧 accent 竖条 + 更大留白，让分章清晰 */
.doc h2 {
  position: relative;
  font-size: clamp(20px, 3.2vw, 27px);
  letter-spacing: .05em;
  margin: 56px 0 18px;
  padding: 22px 0 14px;
  border-top: 1px solid var(--line);
}
.doc h2::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.1em; background: var(--accent);
}
.doc h3 {
  position: relative;
  font-size: 17px; letter-spacing: .03em;
  margin: 32px 0 12px; padding-left: 14px;
  color: var(--fg);
  border-left: 2px solid var(--line-2);
}
.doc p, .doc li { color: var(--fg-1); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.doc li { margin: .35em 0; }
.doc a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.doc strong { color: var(--fg); font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
/* 引用块（规范里的强调/补充说明）更醒目：accent 左边线 + 浅底 */
.doc blockquote { margin: 22px 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-1)); color: var(--fg-1);
  border-radius: 0; }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; font-size: .9em; }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.doc th { background: var(--bg-2); color: var(--fg); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); margin-top: clamp(56px, 9vw, 110px); background: var(--bg-1); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px);
  display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
/* 字标是 6:1 的长条，给足宽度否则会被压缩或与文案挤在一起换行 */
.footer-mark { display: block; height: 26px; color: var(--fg-1); opacity: .85;
  flex: 0 0 auto; max-width: 100%; }
.footer-mark svg { height: 100%; width: auto; max-width: 100%; display: block; fill: currentColor; }
.footer-note { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--fg-2);
  flex: 1 1 420px; min-width: 0; }
@media (max-width: 720px) {
  .footer-inner { align-items: flex-start; }
  .footer-mark { height: 22px; }
}
.footer-note a { color: var(--fg-1); border-bottom: 1px solid var(--line-2);
  transition: color var(--dur) var(--ease); }
.footer-note a:hover { color: var(--accent); }

/* ---------- 404 / 加载 ---------- */
.center-note { padding: clamp(64px, 14vw, 160px) 0; text-align: center; color: var(--fg-2); }
.center-note h1 { font-size: clamp(48px, 12vw, 96px); color: var(--line-2); margin-bottom: 12px; }
