/* ═══════════════════════════════════════════════════════════
   生菜 · 单页 v3   |   styles.css
   手写，零依赖。

   材质系统参照 Apple 的材料分层（Ultra Thin / Thin / Regular /
   Thick / Chrome）：不同厚度承担不同层级的可读性责任。
   正文密集区域一律用 m-thick —— HIG 的结论是「玻璃压密文本
   是易读性灾难」，所以可读性优先于通透感。
   ═══════════════════════════════════════════════════════════ */

/* ───────── 1. 设计令牌 ───────── */
:root {
  --paper:      #EDF0E8;

  --ink:        #0F1417;
  --ink-2:      #3A4441;
  --muted:      #69736C;

  --accent:     #2E7D4F;
  --accent-2:   #E8C46A;

  /* 材质：不透明度随厚度递增 */
  --m-thin:     rgba(255, 255, 255, .24);
  --m-reg:      rgba(255, 255, 255, .44);
  --m-thick:    rgba(255, 255, 255, .68);
  --m-chrome:   rgba(255, 255, 255, .56);

  /* 模糊：厚度越大，模糊越强（与不透明度反相关，符合视觉直觉） */
  --blur-thin:  saturate(170%) blur(18px);
  --blur-reg:   saturate(180%) blur(26px);
  --blur-thick: saturate(180%) blur(32px);

  --brd:        rgba(255, 255, 255, .70);
  --brd-strong: rgba(255, 255, 255, .88);
  --hair:       rgba(15, 20, 23, .10);
  --hi:         rgba(255, 255, 255, .85);   /* 顶部内高光 */
  --lo:         rgba(15, 20, 23, .05);      /* 底部内阴影 */

  --sh-1: 0 1px 1px rgba(15,20,23,.04);
  --sh-2: 0 8px 24px -10px rgba(15,20,23,.16);
  --sh-3: 0 40px 80px -34px rgba(15,20,23,.28);
  --shadow: var(--sh-1), var(--sh-2), var(--sh-3);
  --shadow-lift:
      0 2px 3px rgba(15,20,23,.05),
      0 18px 40px -14px rgba(15,20,23,.22),
      0 60px 110px -40px rgba(15,20,23,.34);

  --tint: linear-gradient(180deg,
          rgba(255,255,255,.34) 0%,
          rgba(255,255,255,.08) 44%,
          rgba(255,255,255,.32) 100%);
  --bk-filter: none;

  /* 中二魔法色 */
  --rune:       #2E7D4F;
  --glow:       rgba(46,125,79,.55);
  --glow-2:     rgba(232,196,106,.45);

  /* 字号阶梯 —— 整体放大 */
  --fs-hero:  clamp(4.8rem, 15.5vw, 13.5rem);
  --fs-h2:    clamp(2.7rem, 6.8vw, 5rem);
  --fs-h3:    clamp(1.4rem, 2.4vw, 1.85rem);
  --fs-lede:  clamp(1.55rem, 3.4vw, 2.5rem);
  --fs-body:  clamp(17px, 1.35vw, 19.5px);
  --fs-note:  clamp(15.5px, 1.15vw, 17px);
  --fs-label: clamp(12.5px, .95vw, 14px);

  --font: "Inter", system-ui, -apple-system, "SF Pro Text", "Segoe UI",
          "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 56px);
  --r-lg: 30px;
  --r-md: 22px;
  --ease: cubic-bezier(.22, 1, .32, 1);
}

/* ── 魔女モード ── */
body.theme-witch {
  --paper:      #0A0714;
  --ink:        #F2EDFC;
  --ink-2:      #C8BEE4;
  --muted:      #948EB2;

  --accent:     #B49BFF;
  --accent-2:   #F2A9F8;

  /* 深色下不透明度整体调高：研究结论是深色主题 tint 混合约 50%，
     比浅色的 30% 更重，否则品牌色会发灰 */
  --m-thin:     rgba(30, 22, 48, .38);
  --m-reg:      rgba(28, 20, 46, .56);
  --m-thick:    rgba(26, 18, 42, .76);
  --m-chrome:   rgba(30, 22, 48, .66);

  --brd:        rgba(255, 255, 255, .16);
  --brd-strong: rgba(255, 255, 255, .26);
  --hair:       rgba(242, 237, 252, .13);
  --hi:         rgba(255, 255, 255, .30);
  --lo:         rgba(0, 0, 0, .30);

  --sh-1: 0 1px 1px rgba(0,0,0,.5);
  --sh-2: 0 10px 30px -10px rgba(0,0,0,.6);
  --sh-3: 0 40px 90px -30px rgba(0,0,0,.75);
  --shadow-lift:
      0 2px 4px rgba(0,0,0,.5),
      0 24px 50px -16px rgba(0,0,0,.7),
      0 70px 120px -40px rgba(180,150,255,.30);

  --tint: linear-gradient(180deg,
          rgba(8,5,16,.62) 0%,
          rgba(8,5,16,.42) 46%,
          rgba(8,5,16,.74) 100%);
  --bk-filter: hue-rotate(212deg) saturate(1.35) brightness(.42);

  /* 魔女版标题是「千脆の／魔女」两行、每行 3 个字。
     沿用浅色那档字号（15.5vw≈218px）时，「千脆の」需要 ~620px，
     而拷贝列只有 ~571px —— 会折成三行、把整个视口吃光。
     所以这一档单独压到 12.2vw（实测 ~172px，三字宽 ~490px，留 14% 余量）。 */
  --fs-hero: clamp(4.2rem, 12.2vw, 11rem);

  --rune:       #B49BFF;
  --glow:       rgba(180,155,255,.75);
  --glow-2:     rgba(242,169,248,.6);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 锚点偏移只在这一处定义：吸顶栏（stuck 时 10 + 82 = 92px高）+ 12px 余量。
     不要再给目标元素加 scroll-margin-top —— 两者会叠加（实测 120+96=216px，
     跳转后标题被推到视口 1/3 处，白留一大块）。 */
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: -.005em;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s ease, color .5s ease;
}

h1, h2, h3, p, dl, dd, dt, ul, ol, li, figure, figcaption { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
b { font-weight: 700; }
em { font-style: normal; opacity: .82; }

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--pad);
}

/* 主题互斥 */
.witch-only { display: none !important; }
body.theme-witch .normal-only { display: none !important; }
body.theme-witch .witch-only  { display: revert !important; }
body.theme-witch .spellbook.witch-only { display: block !important; }

.skip {
  position: fixed; top: -80px; left: 20px; z-index: 999;
  padding: 12px 22px; border-radius: 12px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; transition: top .2s;
}
.skip:focus { top: 20px; }

/* ───────── 3. 背景层 ───────── */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }

.bk-img {
  position: absolute; inset: -4%;
  background-image: url("assets/bg-soft.webp");
  background-size: cover; background-position: center;
  filter: var(--bk-filter);
  transition: filter .6s ease;
}
.bk-tint {
  position: absolute; inset: 0;
  background: var(--tint);
  transition: background .6s ease;
}
.bk-grain {
  position: absolute; inset: 0; opacity: .20; mix-blend-mode: multiply;
  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='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.theme-witch .bk-grain { mix-blend-mode: screen; opacity: .09; }

.progress {
  position: fixed; top: 0; left: 0; z-index: 200; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

.dock, main, .foot { position: relative; z-index: 2; }

/* ───────── 4. 材质系统 ───────── */
/* 三层结构：半透明填充 + backdrop 模糊 + 顶部内高光边。
   缺任何一层，"玻璃"就会退化成"脏塑料"。 */
.glass {
  position: relative;
  border: 1px solid var(--brd);
  border-radius: var(--r-lg);
  box-shadow:
      var(--shadow),
      inset 0 1px 0 var(--hi),      /* 上边缘受光 */
      inset 0 -1px 0 var(--lo);     /* 下边缘压暗，制造厚度 */
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .3s ease, background-color .3s ease;
}

.m-thin {
  background: var(--m-thin);
  backdrop-filter: var(--blur-thin);
  -webkit-backdrop-filter: var(--blur-thin);
}
.m-regular {
  background: var(--m-reg);
  backdrop-filter: var(--blur-reg);
  -webkit-backdrop-filter: var(--blur-reg);
}
.m-thick {
  background: var(--m-thick);
  backdrop-filter: var(--blur-thick);
  -webkit-backdrop-filter: var(--blur-thick);
}

/* 顶部镜面高光：模拟 Liquid Glass 的 specular edge */
.glass::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg,
    transparent, var(--hi) 22%, var(--hi) 78%, transparent);
  opacity: .9; pointer-events: none;
}

/* 不支持 backdrop-filter 时退回更实的底，否则文字读不清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .m-thin  { background: color-mix(in srgb, var(--paper) 80%, #fff); }
  .m-regular, .m-chrome { background: color-mix(in srgb, var(--paper) 86%, #fff); }
  .m-thick { background: color-mix(in srgb, var(--paper) 93%, #fff); }
}

/* ───────── 5. 悬浮导航 ───────── */
.dock {
  position: sticky; top: 0; z-index: 150;
  padding: 16px var(--pad) 0;
  transition: padding .3s ease;
}
.dock.is-stuck { padding-top: 10px; }

.dock-inner {
  display: flex; align-items: center; gap: 18px;
  max-width: var(--wrap); margin-inline: auto;
  padding: 9px 10px 9px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background .35s ease, border-color .35s ease,
              box-shadow .35s ease, backdrop-filter .35s ease;
}
/* Chrome 材质：导航是"功能性涂层"，用最高不透明度保证任何背景下都可读 */
.dock.is-stuck .dock-inner {
  background: var(--m-chrome);
  border-color: var(--brd-strong);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  backdrop-filter: var(--blur-thick);
  -webkit-backdrop-filter: var(--blur-thick);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 26px; line-height: 1; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.03em; }

.dock-nav { display: flex; gap: 2px; margin-left: auto; }
.dock-nav a {
  padding: 10px 16px; border-radius: 999px;
  font-size: 16px; font-weight: 500; color: var(--ink-2);
  transition: color .2s, background-color .2s;
}
.dock-nav a:hover { color: var(--ink); background: var(--m-thin); }

/* ───────── 6. 中二觉醒按钮 ───────── */
.awaken {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 20px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--brd);
  background: var(--m-thin);
  backdrop-filter: var(--blur-reg);
  -webkit-backdrop-filter: var(--blur-reg);
  box-shadow: inset 0 1px 0 var(--hi);
  font-family: inherit; color: var(--ink-2);
  cursor: pointer; overflow: hidden;
  transition: color .3s, box-shadow .4s, border-color .3s, transform .3s var(--ease);
}
/* 扫光 */
.awaken::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(112deg,
    transparent 34%, rgba(255,255,255,.55) 50%, transparent 66%);
  transform: translateX(-130%);
  transition: transform .75s var(--ease);
  pointer-events: none;
}
.awaken:hover::after { transform: translateX(130%); }
.awaken:hover { transform: translateY(-1px); border-color: var(--rune); color: var(--ink); }

.sigil {
  position: relative; flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
}
.sigil-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed var(--rune);
  opacity: .55;
  animation: spin 11s linear infinite;
}
.sigil-ring.r2 {
  inset: 6px; border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  opacity: .9;
  animation: spin 4.2s linear infinite reverse;
}
.sigil-core {
  font-size: 21px; line-height: 1;
  filter: drop-shadow(0 0 6px var(--glow));
  transition: transform .4s var(--ease), filter .4s;
}
.awaken:hover .sigil-core { transform: scale(1.12) rotate(-8deg); }

@keyframes spin { to { transform: rotate(360deg); } }

/* 觉醒态：整体发光 */
body.theme-witch .awaken {
  border-color: var(--rune);
  box-shadow:
      inset 0 1px 0 var(--hi),
      0 0 0 1px rgba(180,155,255,.35),
      0 0 26px -4px var(--glow);
}
body.theme-witch .sigil-ring { opacity: .85; animation-duration: 6s; }
body.theme-witch .sigil-ring.r2 { animation-duration: 2.6s; }
body.theme-witch .sigil-core { filter: drop-shadow(0 0 10px var(--glow)) drop-shadow(0 0 22px var(--glow-2)); }

.awaken-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.awaken-txt b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.awaken-txt em {
  font-size: 11.5px; font-style: normal; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* ───────── 7. 觉醒演出 ───────── */
.cast {
  position: fixed; inset: 0; z-index: 500;
  display: none; place-items: center;
  pointer-events: none;
}
.cast.on { display: grid; }

.cast-flash {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 52%,
    rgba(190,165,255,.92) 0%, rgba(120,90,220,.55) 34%,
    rgba(10,6,20,.92) 66%, rgba(10,6,20,1) 100%);
}
.cast.on .cast-flash { animation: flash 1.7s var(--ease) forwards; }
@keyframes flash {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 0; }
}

.cast-rings { position: absolute; inset: 0; }
.cast-rings span {
  position: absolute; left: 50%; top: 52%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0;
}
.cast-rings span:nth-child(2) { border-color: var(--accent-2); border-style: dashed; }
.cast-rings span:nth-child(3) { border-color: #fff; }
.cast.on .cast-rings span { animation: expand 1.5s var(--ease) forwards; }
.cast.on .cast-rings span:nth-child(2) { animation-delay: .14s; }
.cast.on .cast-rings span:nth-child(3) { animation-delay: .28s; }
@keyframes expand {
  0%   { opacity: .95; transform: scale(.25) rotate(0deg); }
  100% { opacity: 0;   transform: scale(30) rotate(200deg); }
}

.cast-copy { position: relative; text-align: center; padding: 0 24px; opacity: 0; }
.cast.on .cast-copy { animation: slam 1.7s var(--ease) forwards; }
@keyframes slam {
  0%   { opacity: 0; transform: scale(1.55) skewX(-15deg); filter: blur(14px); }
  16%  { opacity: 1; transform: none; filter: blur(0); }
  74%  { opacity: 1; }
  100% { opacity: 0; transform: scale(.95); }
}
.cast-kicker {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .34em;
  color: rgba(255,255,255,.62); margin-bottom: 18px;
}
.cast-title {
  font-size: clamp(2.6rem, 9vw, 6.6rem);
  font-weight: 900; letter-spacing: -.045em; line-height: 1;
  color: #fff;
  text-shadow: 0 0 34px rgba(180,155,255,.9), 0 0 90px rgba(180,155,255,.6);
}
.cast-sub {
  margin-top: 22px; font-size: clamp(15px, 2.2vw, 19px);
  color: rgba(255,255,255,.86);
}
.cast-sub em { display: block; margin-top: 10px; font-size: .86em; color: rgba(255,255,255,.55); }

/* 屏幕震动：只震内容层，避免 body 变形导致 fixed 元素错位 */
body.casting main,
body.casting .foot { animation: shake .6s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

/* ───────── 8. Hero ───────── */
.hero { padding: clamp(52px, 7.5vw, 104px) 0 clamp(64px, 8vw, 116px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}

.chip-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: clamp(22px, 3.4vw, 38px);
}
.pipe { opacity: .45; }

.dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--accent); display: inline-block;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--glow); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-size: var(--fs-hero);
  line-height: .86; font-weight: 800; letter-spacing: -.05em;
  margin-bottom: clamp(22px, 3.6vw, 38px);
}
.hero-title span { display: block; }
body.theme-witch .hero-title {
  background: linear-gradient(104deg, var(--ink) 22%, var(--accent) 66%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lede {
  font-size: var(--fs-lede); line-height: 1.4;
  font-weight: 650; letter-spacing: -.025em; max-width: 24ch;
}
.hero-lede::after {
  content: ""; display: block; width: 88px; height: 4px; margin-top: 28px;
  border-radius: 3px; background: var(--accent);
}

.hero-desc {
  margin-top: 30px; max-width: 44ch;
  font-size: var(--fs-body); line-height: 1.78; color: var(--ink-2);
}
.hero-desc b { color: var(--accent); }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: clamp(30px, 4.5vw, 48px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 32px; border-radius: 999px;
  font-family: inherit; font-size: 17px; font-weight: 650;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .25s, color .25s, border-color .25s;
}
.btn-solid { background: var(--ink); color: #fff; box-shadow: 0 10px 26px -12px rgba(15,20,23,.6); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(15,20,23,.55); }
.btn-glass {
  background: var(--m-reg); border-color: var(--brd); color: var(--ink);
  backdrop-filter: var(--blur-reg); -webkit-backdrop-filter: var(--blur-reg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
}
.btn-glass:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
body.theme-witch .btn-solid { background: var(--accent); color: #150A28; }

.showcase {
  position: relative; padding: 22px;
  border-radius: var(--r-lg);
  background: var(--m-reg);
  border: 1px solid var(--brd);
  box-shadow: var(--shadow-lift), inset 0 1px 0 var(--hi);
  backdrop-filter: var(--blur-reg); -webkit-backdrop-filter: var(--blur-reg);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.showcase:hover { transform: translateY(-6px) scale(1.012); }
.showcase-glow {
  position: absolute; inset: 14% 14% 0 14%; z-index: -1;
  border-radius: 50%; filter: blur(48px); opacity: .72;
  background: radial-gradient(circle at 50% 40%, rgba(46,125,79,.5), transparent 70%);
  transition: background .5s ease;
}
body.theme-witch .showcase-glow {
  background: radial-gradient(circle at 50% 40%, rgba(180,155,255,.62), transparent 70%);
}
.showcase-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.35);
}
.showcase-cap {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 0 4px;
  font-size: var(--fs-note); font-weight: 600; color: var(--ink-2);
}
.sc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--accent-2); }

/* ───────── 9. 区块骨架 ───────── */
.sec { padding: clamp(66px, 9vw, 122px) 0; }

.sec-head {
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.sec-num {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; color: var(--accent); font-weight: 600;
}
.sec-head h2 {
  font-size: var(--fs-h2); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.02;
}
.sec-sub { flex: 1 1 260px; text-align: right; font-size: var(--fs-note); color: var(--muted); }

/* ───────── 10. 关于 ───────── */
.grid-about {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .95fr);
  gap: clamp(20px, 2.4vw, 28px); align-items: start;
}
.about-card { padding: clamp(30px, 3.6vw, 46px); }
.about-card p {
  font-size: var(--fs-body); line-height: 1.88; color: var(--ink-2);
  margin-bottom: 20px; max-width: 60ch;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card .lead {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem); font-weight: 750;
  letter-spacing: -.025em; color: var(--ink); line-height: 1.4;
}
.about-card .kicker {
  font-size: clamp(1.45rem, 2.9vw, 2.05rem); font-weight: 800;
  letter-spacing: -.03em; color: var(--ink);
  margin: 34px 0 20px; padding-left: 24px;
  border-left: 4px solid var(--accent);
}
.about-card b { color: var(--accent); }

.spec { padding: clamp(26px, 3vw, 36px); }
.spec-title {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.spec dl > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--hair);
}
.spec dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt { font-size: var(--fs-note); color: var(--muted); white-space: nowrap; }
.spec dd {
  font-size: var(--fs-body); font-weight: 650; text-align: right;
  display: flex; align-items: center; gap: 8px;
}

/* ───────── 11. 技能 ───────── */
.skills-panel { padding: clamp(10px, 1.4vw, 20px) clamp(20px, 3vw, 42px); }

.skill {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 40px); align-items: center;
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--hair);
}
.skill:last-child { border-bottom: 0; }

.skill-name {
  font-size: clamp(1.5rem, 3.1vw, 2.2rem); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.15;
}
.skill-note { font-size: var(--fs-note); color: var(--muted); margin-top: 6px; }
.skill-bar {
  display: block; height: 4px; margin-top: 18px; border-radius: 3px;
  background: var(--hair); overflow: hidden; max-width: 560px;
}
.skill-bar i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.15s var(--ease);
}
.skill.in .skill-bar i { width: var(--v); }
.skill-score {
  font-family: var(--font-mono); font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  font-weight: 700; letter-spacing: -.04em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.spellbook { margin-top: 24px; padding: clamp(28px, 3vw, 40px); }
.spell-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}
.spell { padding-left: 20px; border-left: 3px solid var(--accent); }
.spell b { display: block; font-size: clamp(1.08rem, 1.5vw, 1.28rem); margin-bottom: 6px; }
.spell span { font-size: var(--fs-note); color: var(--muted); line-height: 1.72; }

/* ───────── 12. 生长图鉴 ───────── */
.grow-intro {
  padding: clamp(24px, 2.8vw, 34px) clamp(26px, 3vw, 40px);
  font-size: var(--fs-body); line-height: 1.85; color: var(--ink-2);
  max-width: 76ch; margin-bottom: clamp(28px, 4vw, 46px);
}
.grow-intro b { color: var(--accent); }

.stages { display: grid; gap: clamp(22px, 3vw, 36px); }

.stage {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: stretch;
}
/* 偶数阶段左右互换，形成"之"字阅读节奏 */
.stage:nth-child(even) .stage-fig { order: 2; }

.stage-fig {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--brd);
  box-shadow: var(--shadow);
  background: var(--m-thin);
}
.stage-fig img {
  width: 100%; height: 100%; min-height: 240px;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.stage:hover .stage-fig img { transform: scale(1.045); }

.stage-day {
  position: absolute; left: 16px; top: 16px;
  padding: 7px 15px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; color: var(--ink);
  background: var(--m-thick);
  border: 1px solid var(--brd-strong);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  backdrop-filter: var(--blur-reg);
  -webkit-backdrop-filter: var(--blur-reg);
}

.stage-body { padding: clamp(26px, 3vw, 38px); display: flex; flex-direction: column; }
.stage-no {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .14em; color: var(--accent); font-weight: 600;
  margin-bottom: 8px;
}
.stage-body h3 {
  font-size: clamp(1.5rem, 2.9vw, 2.1rem); font-weight: 800;
  letter-spacing: -.035em; margin-bottom: 14px;
}
.stage-body > p {
  font-size: var(--fs-body); line-height: 1.85; color: var(--ink-2);
}
.stage-body b { color: var(--accent); }

.stage-points {
  margin-top: auto; padding-top: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.stage-points li {
  position: relative; padding-left: 22px;
  font-size: var(--fs-note); color: var(--muted); line-height: 1.7;
}
.stage-points li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
}

.grow-specs { margin-top: clamp(28px, 4vw, 48px); padding: clamp(28px, 3vw, 40px); }
.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 clamp(20px, 3vw, 44px);
}
.spec-grid > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--hair);
}
.spec-grid dt { font-size: var(--fs-note); color: var(--muted); white-space: nowrap; }
.spec-grid dd { font-size: var(--fs-note); font-weight: 700; text-align: right; color: var(--ink); }

.grow-pitfalls { margin-top: clamp(20px, 2.6vw, 28px); padding: clamp(28px, 3vw, 40px); }
.pitfalls {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 2.6vw, 34px);
}
.pitfalls li { padding-left: 20px; border-left: 3px solid var(--accent-2); }
.pitfalls b { display: block; font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin-bottom: 6px; }
.pitfalls span { font-size: var(--fs-note); color: var(--muted); line-height: 1.72; }

/* ───────── 13. 作品 ───────── */
.works {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 30px);
}
.work { overflow: hidden; display: flex; flex-direction: column; }
.work:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }

.work-cover {
  position: relative; height: clamp(150px, 19vw, 210px);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 22px; overflow: hidden;
}
.work-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.4) 1.5px, transparent 1.5px);
  background-size: 16px 16px; opacity: .5;
  transition: transform .7s var(--ease);
}
.work:hover .work-cover::after { transform: scale(1.16); }

.cover-1 { background: linear-gradient(140deg, #1C5334, #6FB98A); }
.cover-2 { background: linear-gradient(140deg, #1F5065, #8CC0D2); }
.cover-3 { background: linear-gradient(140deg, #83641C, #E8C46A); }
.cover-4 { background: linear-gradient(140deg, #C9C7BE, #E6E3DA); }
body.theme-witch .cover-1 { background: linear-gradient(140deg, #38206B, #9B7BFF); }
body.theme-witch .cover-2 { background: linear-gradient(140deg, #472058, #CE97FF); }
body.theme-witch .cover-3 { background: linear-gradient(140deg, #672A6B, #F2A9F8); }
body.theme-witch .cover-4 { background: linear-gradient(140deg, #2A2238, #3A2F4E); }

.work-glyph {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 3.6rem); letter-spacing: -.05em;
  color: rgba(255,255,255,.92);
}
.work-empty .work-glyph { color: rgba(30,34,30,.35); }
body.theme-witch .work-empty .work-glyph { color: rgba(242,237,252,.36); }

.work-body { padding: clamp(22px, 2.4vw, 30px); flex: 1; display: flex; flex-direction: column; }
.work-body h3 { font-size: var(--fs-h3); font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.work-body p { font-size: var(--fs-note); line-height: 1.78; color: var(--ink-2); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 20px; }
.tags span {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--brd); background: var(--m-thin);
  color: var(--muted);
}

/* ───────── 14. 联系 ───────── */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 2.2vw, 26px);
}
.contact-tile {
  display: flex; flex-direction: column; gap: 8px;
  padding: clamp(26px, 2.8vw, 36px); min-height: 158px;
}
a.contact-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
a.contact-tile:hover .ct-v { color: var(--accent); }
a.contact-tile:hover .ct-a { transform: translateX(6px); opacity: 1; }
.ct-k {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.ct-v {
  font-size: clamp(1.12rem, 1.8vw, 1.45rem); font-weight: 750;
  letter-spacing: -.02em; line-height: 1.4;
  overflow-wrap: anywhere; transition: color .25s;
}
.ct-a {
  /* 推到卡片右下角：整张卡是可点的，箭头贴左下会像掉了个字符 */
  margin-top: auto; align-self: flex-end;
  color: var(--accent); opacity: .5; font-size: 20px;
  transition: transform .3s var(--ease), opacity .3s;
}

.contact-note {
  margin-top: clamp(26px, 3.4vw, 40px);
  font-size: var(--fs-body); color: var(--ink-2); max-width: 52ch;
}

/* ───────── 15. 页脚 ───────── */
.foot { padding: clamp(28px, 4vw, 46px) 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.foot-line { display: flex; align-items: center; gap: 12px; font-size: var(--fs-note); color: var(--muted); }
.foot-leaf {
  border: 1px solid var(--brd); background: var(--m-reg);
  backdrop-filter: var(--blur-reg); -webkit-backdrop-filter: var(--blur-reg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  font-size: 28px; line-height: 1; padding: 12px 14px; border-radius: 18px;
  cursor: pointer;
  transition: transform .34s var(--ease), box-shadow .3s;
}
.foot-leaf:hover { transform: scale(1.1) rotate(-8deg); box-shadow: var(--shadow-lift); }
.foot-leaf:active { transform: scale(.94); }

.bubble {
  position: fixed; left: 50%; bottom: 96px; z-index: 400;
  transform: translate(-50%, 12px);
  padding: 13px 26px; border-radius: 999px;
  background: var(--m-thick); color: var(--ink);
  border: 1px solid var(--brd);
  backdrop-filter: var(--blur-reg); -webkit-backdrop-filter: var(--blur-reg);
  box-shadow: var(--shadow-lift);
  font-size: 15.5px; white-space: nowrap; max-width: 90vw;
  overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.bubble.on { opacity: 1; transform: translate(-50%, 0); }

/* ───────── 16. 滚动淡入 ───────── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ───────── 17. 响应式 ───────── */
@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: 1fr; }
  .showcase { max-width: 480px; }
  .grid-about { grid-template-columns: 1fr; }
  .sec-sub { text-align: left; flex-basis: 100%; }
}

@media (max-width: 900px) {
  .works { grid-template-columns: 1fr; }
  .awaken { margin-left: auto; }

  /* 移动端导航：不再整条隐藏，折成可横向滚动的胶囊行 */
  .dock-inner {
    flex-wrap: wrap; row-gap: 2px;
    border-radius: 26px; padding: 10px 12px;
  }
  .dock.is-stuck .dock-inner { border-radius: 22px; }
  .dock-nav {
    order: 3; width: 100%; margin-left: 0; gap: 0;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  .dock-nav::-webkit-scrollbar { display: none; }
  .dock-nav a { padding: 7px 11px; font-size: 15px; white-space: nowrap; }
  .dock-nav a:first-child { padding-left: 2px; }
  .dock-nav a:last-child { padding-right: 2px; }

  /* 吸顶栏变两行，锚点偏移跟着长（实测栏底 136px，留 14px 余量）。
     仍然只改 scroll-padding-top 这一处，绝不加 scroll-margin-top——两者会叠加。 */
  html { scroll-padding-top: 150px; }

  /* 生长图鉴改单列，图片统一在上 */
  .stage { grid-template-columns: 1fr; }
  .stage:nth-child(even) .stage-fig { order: 0; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero-title { letter-spacing: -.04em; }
  .hero-lede { max-width: none; }
  .awaken-txt em { display: none; }
  .awaken { padding: 6px 14px 6px 6px; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .skill-score { font-size: 1.55rem; }
  .stage-day { left: 12px; top: 12px; font-size: 12px; }
  .dock-nav a { padding: 7px 9px; font-size: 14.5px; }
  html { scroll-padding-top: 146px; }
}

/* ───────── 18. 无障碍 ───────── */
/* 降低动效 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .skill-bar i { width: var(--v); }
  .dot { animation: none; }
  .sigil-ring { animation: none; }
  body.casting main, body.casting .foot { animation: none; }
}

/* 降低透明度：材质转为不透明，牺牲通透换可读性 */
@media (prefers-reduced-transparency: reduce) {
  .m-thin, .m-regular, .m-thick, .m-chrome,
  .dock.is-stuck .dock-inner, .awaken, .foot-leaf, .btn-glass, .bubble, .stage-day {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--paper) !important;
    color: var(--ink) !important;
  }
  .glass::before { display: none; }
  .bk-img { filter: none; }
  .bk-tint { background: var(--paper); opacity: .82; }
}

/* 提高对比度 */
@media (prefers-contrast: more) {
  .glass, .dock.is-stuck .dock-inner, .awaken, .foot-leaf {
    border-color: var(--ink);
    border-width: 2px;
  }
  .m-thin, .m-regular, .m-thick { background: var(--paper); }
  .muted, .sec-sub, .skill-note, .ct-k { color: var(--ink-2); }
}
