/* =========================================================
   卡塞尔学院 · 数字档案
   core.css — tokens / reset / 全局层 / 导航 / 组件 / 基础页面骨架
   ========================================================= */

:root {
  /* 墨 */
  --void: #050706;
  --ink: #0A0F0C;
  --ink-soft: #111813;
  /* 学院墨绿 */
  --forest-950: #07130F;
  --forest-900: #0B1F18;
  --forest-800: #102B21;
  --forest-700: #16392C;
  --forest-600: #1E4A39;
  --forest-500: #2A5C48;
  --moss: #4F7A63;
  /* 深玫瑰红 */
  --rose-900: #4A1020;
  --rose-800: #64152A;
  --rose-700: #7E1D35;
  --rose-600: #9C2A45;
  --rose-400: #C4566E;
  --rose-200: #E7A9B6;
  /* 暗金 */
  --gold-700: #8C6B1E;
  --gold-600: #A9851F;
  --gold-500: #C9A227;
  --gold-300: #E8CE7B;
  --gold-100: #F5E7BF;
  /* 骨白 */
  --bone-50: #F7F2E7;
  --bone-100: #EFE6D4;
  --bone-200: #E2D6BE;
  --bone-300: #C9BEA8;
  --bone-400: #A99E88;
  /* 冰 / 言灵 */
  --ice-300: #C8E8E3;
  --ice-500: #8FC9C2;
  --ice-700: #4F8C86;
  /* 状态 */
  --success: #6FA88A;
  --warn: #D8A044;
  --error: #D2452F;
  --ember: #E2603C;

  --bg: var(--void);
  --panel: var(--ink);
  --line: rgba(239, 230, 212, 0.10);
  --line-strong: rgba(239, 230, 212, 0.22);
  --line-gold: rgba(201, 162, 39, 0.42);
  --text: var(--bone-100);
  --text-dim: var(--bone-300);
  --text-mute: var(--bone-400);
  --gold: var(--gold-500);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --latin: Georgia, "Times New Roman", "Songti SC", serif;

  --fs-display: clamp(48px, 8.4vw, 138px);
  --fs-h1: clamp(34px, 4.6vw, 64px);
  --fs-h2: clamp(26px, 3.4vw, 44px);
  --fs-h3: clamp(20px, 2.2vw, 28px);
  --fs-lead: clamp(16px, 1.5vw, 19px);
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;
  --fs-micro: 11px;

  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 480ms;
  --dur-5: 720ms;
  --dur-6: 1200ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-heavy: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-ink: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-h: 68px;
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1520px;
  --z-header: 200;
  --z-drawer: 400;
  --z-palette: 600;
  --z-preloader: 900;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
body.is-locked { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold-500); color: var(--forest-950); }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1200;
  padding: 10px 18px; background: var(--gold-500); color: var(--forest-950);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: 12px; }

.mono { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
.serif { font-family: var(--serif); }
.latin { font-family: var(--latin); letter-spacing: .22em; text-transform: uppercase; }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.gold { color: var(--gold-300); }
.rose { color: var(--rose-400); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 全局特效层 ---------- */
.fx-grain {
  position: fixed; inset: -40px; z-index: 1; pointer-events: none; opacity: .07;
  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='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grainShift 0.7s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-6px, 4px, 0); }
  100% { transform: translate3d(4px, -6px, 0); }
}
.fx-vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(5, 7, 6, .34) 74%, rgba(5, 7, 6, .82) 100%);
}
.fx-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .42; }
.fx-fog {
  position: fixed; inset: -10% -20%; z-index: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(40% 30% at 20% 70%, rgba(79, 122, 99, .16), transparent 70%),
    radial-gradient(50% 26% at 80% 40%, rgba(30, 74, 57, .2), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(5, 7, 6, .9), transparent 70%);
  animation: fogDrift 26s var(--ease-ink) infinite alternate;
}
@keyframes fogDrift {
  from { transform: translate3d(-2%, 1%, 0) scale(1.02); }
  to { transform: translate3d(2%, -1.5%, 0) scale(1.06); }
}

/* ---------- 自定义光标 ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 1100; pointer-events: none; opacity: 0; transition: opacity var(--dur-3); }
.static-mode .cursor { display: none; }
.cursor.is-on { opacity: 1; }
.cursor__dot {
  position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  background: var(--gold-300); border-radius: 50%;
}
.cursor__ring {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(232, 206, 123, .55); border-radius: 50%;
  transition: width var(--dur-3) var(--ease), height var(--dur-3) var(--ease), margin var(--dur-3) var(--ease), border-color var(--dur-3);
}
.cursor.is-hover .cursor__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--gold-300); }
.cursor__label {
  position: absolute; left: 22px; top: 14px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .16em; color: var(--gold-300); white-space: nowrap; opacity: 0;
  transition: opacity var(--dur-2);
}
.cursor.is-hover .cursor__label { opacity: 1; }
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: auto; } }

/* ---------- 预加载 ---------- */
.preloader {
  position: fixed; inset: 0; z-index: var(--z-preloader);
  background: var(--void); display: grid; place-items: center;
  transition: opacity var(--dur-5) var(--ease), visibility var(--dur-5);
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { width: min(520px, 82vw); text-align: center; }
.preloader__mark { width: 132px; height: 132px; margin: 0 auto 28px; color: var(--gold-300); }
.preloader__mark svg { width: 100%; height: 100%; }
.preloader__mark path, .preloader__mark circle { stroke-dasharray: 240; stroke-dashoffset: 240; animation: drawTree 2.2s var(--ease-ink) forwards; }
@keyframes drawTree { to { stroke-dashoffset: 0; } }
.preloader__meta { display: flex; justify-content: space-between; margin-bottom: 12px; }
.preloader__bar { height: 1px; background: rgba(239, 230, 212, .14); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0; background: var(--gold-300); transition: width .3s var(--ease); }
.preloader__line { margin-top: 16px; font-size: var(--fs-sm); color: var(--text-mute); font-family: var(--serif); letter-spacing: .08em; }
.preloader__skip { position: absolute; right: 28px; bottom: 24px; color: var(--text-mute); padding: 8px; }
.preloader__skip:hover { color: var(--gold-300); }

/* ---------- 页面进出场 ---------- */
.app { transition: opacity .38s var(--ease), transform .38s var(--ease), filter .38s var(--ease); }
.app.is-leaving { opacity: 0; transform: translateY(-16px); filter: blur(4px); pointer-events: none; }
.app.is-entering { animation: pageIn .9s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(26px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.app.is-entering .section, .app.is-entering .page-shell, .app.is-entering .map-stage-wrap, .app.is-entering .portal-login, .app.is-entering .ice-progress { animation: sectionIn 1s var(--ease) both; }
.app.is-entering .section:nth-of-type(2) { animation-delay: .06s; }
.app.is-entering .section:nth-of-type(3) { animation-delay: .12s; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.no-motion .app, .static-mode .app { transition: none !important; }

/* ---------- 转场幕布 ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 800; background: var(--void);
  display: grid; place-items: center; gap: 18px;
  clip-path: inset(0 0 100% 0); pointer-events: none;
  transition: clip-path 680ms cubic-bezier(0.7, 0, 0.2, 1);
}
.curtain::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(201, 162, 39, .03) 3px 4px); opacity: .6; }
.curtain.is-active { clip-path: inset(0 0 0 0); pointer-events: all; }
.curtain__mark { width: 84px; height: 84px; color: var(--gold-300); opacity: .95; position: relative; z-index: 1; }
.curtain__mark svg { width: 100%; height: 100%; }
.curtain__mark svg path, .curtain__mark svg circle { stroke-dasharray: 420; stroke-dashoffset: 420; }
.curtain.is-active .curtain__mark svg path, .curtain.is-active .curtain__mark svg circle { animation: curtainDraw .9s .12s var(--ease) forwards; }
@keyframes curtainDraw { to { stroke-dashoffset: 0; } }
.curtain .mono { position: relative; z-index: 1; color: var(--text-mute); }

/* ---------- 头部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header);
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); gap: 24px;
  background: linear-gradient(to bottom, rgba(5, 7, 6, .82), rgba(5, 7, 6, 0));
  transition: background var(--dur-3), border-color var(--dur-3), backdrop-filter var(--dur-3);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5, 7, 6, .78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand__mark { width: 30px; height: 30px; color: var(--gold-300); transition: transform var(--dur-4) var(--ease); }
.brand:hover .brand__mark { transform: rotate(-3deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__zh { font-family: var(--serif); font-size: 15px; letter-spacing: .18em; color: var(--bone-100); }
.brand__en { font-family: var(--latin); font-size: 8px; letter-spacing: .36em; color: var(--gold-500); margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--text-dim);
  transition: color var(--dur-2);
}
.nav__link .zh { font-family: var(--serif); font-size: 13px; letter-spacing: .1em; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--gold-300); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--gold-500);
}
.nav__panel {
  position: absolute; top: 100%; left: -20px; width: 280px; padding: 16px;
  background: rgba(7, 19, 15, .96); border: 1px solid var(--line);
  display: grid; gap: 2px; opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-3) var(--ease);
  backdrop-filter: blur(12px);
}
.nav__item:hover .nav__panel, .nav__item:focus-within .nav__panel { opacity: 1; transform: none; pointer-events: auto; }
.nav__panel a { display: block; padding: 8px 10px; font-size: 13px; color: var(--text-dim); border-left: 1px solid transparent; transition: all var(--dur-2); }
.nav__panel a:hover { color: var(--bone-100); border-left-color: var(--gold-500); background: rgba(239, 230, 212, .03); }
.nav__panel a span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--text-mute); margin-top: 2px; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  width: 38px; height: 38px; display: grid; place-items: center; color: var(--text-dim);
  border: 1px solid transparent; transition: all var(--dur-2);
}
.tool-btn:hover { color: var(--gold-300); border-color: var(--line); }
.tool-btn svg { width: 17px; height: 17px; }
.eva-dot { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--text-mute); }
.eva-dot i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulseDot 2.4s infinite; }
@keyframes pulseDot { 50% { opacity: .35; } }
.menu-btn { display: none; }

@media (max-width: 1180px) {
  .nav__link .zh { display: none; }
  .nav { gap: 0; }
}
@media (max-width: 920px) {
  .nav, .header-tools .tool-btn--search, .eva-dot { display: none; }
  .menu-btn { display: grid; }
  .site-header { height: 60px; }
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-header); background: rgba(5, 7, 6, .97);
  padding: calc(var(--header-h) + 24px) var(--pad) var(--pad);
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  clip-path: inset(0 0 100% 0); transition: clip-path var(--dur-4) var(--ease-heavy);
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu a { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 26px; letter-spacing: .06em; }
.mobile-menu a span { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--text-mute); }
.mobile-menu a:hover { color: var(--gold-300); }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative; z-index: 5; margin-top: 120px; border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent, rgba(7, 19, 15, .55));
  padding: 56px var(--pad) 28px;
}
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand .brand__mark { width: 40px; height: 40px; }
.footer-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--text-mute); line-height: 1.9; max-width: 30ch; }
.footer-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--gold-500); margin-bottom: 14px; font-weight: 400; }
.footer-col a { display: block; padding: 4px 0; font-size: var(--fs-sm); color: var(--text-dim); transition: color var(--dur-2); }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom {
  max-width: var(--maxw); margin: 44px auto 0; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--text-mute);
}
.footer-bottom .disc { max-width: 70ch; text-transform: none; letter-spacing: .02em; font-family: var(--sans); font-size: 11px; line-height: 1.8; }
.site-footer.is-hidden { display: none; }
body.glitch #app { animation: glitchShift .18s steps(2) 3; }
@keyframes glitchShift { 0% { transform: translate(0); filter: none; } 50% { transform: translate(-3px, 1px); filter: hue-rotate(-12deg) contrast(1.15); } 100% { transform: translate(0); } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 基础排版 ---------- */
.app { position: relative; z-index: 5; min-height: 70vh; outline: none; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { position: relative; padding: clamp(52px, 6.5vw, 104px) var(--pad); }
.section--tight { padding: clamp(34px, 4.5vw, 64px) var(--pad); }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--gold-500); text-transform: uppercase; }
.kicker::before { content: ""; width: 30px; height: 1px; background: var(--gold-700); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(28px, 4vw, 52px); flex-wrap: wrap; }
.section-head__main { max-width: 860px; }
.section-head h2 { font-family: var(--serif); font-weight: 900; font-size: var(--fs-h2); letter-spacing: .04em; line-height: 1.16; margin-top: 12px; }
.section-head .lead { margin-top: 14px; color: var(--text-dim); font-size: var(--fs-lead); font-family: var(--serif); line-height: 1.9; }
.section-head .en { font-family: var(--latin); font-size: 10px; letter-spacing: .3em; color: var(--text-mute); }
.display-1 { font-family: var(--serif); font-weight: 900; font-size: var(--fs-display); line-height: 1.02; letter-spacing: .06em; }
.h1 { font-family: var(--serif); font-weight: 900; font-size: var(--fs-h1); line-height: 1.14; letter-spacing: .05em; }
.h2 { font-family: var(--serif); font-weight: 900; font-size: var(--fs-h2); line-height: 1.2; letter-spacing: .04em; }
.h3 { font-family: var(--serif); font-weight: 700; font-size: var(--fs-h3); line-height: 1.35; letter-spacing: .03em; }
.lead { font-size: var(--fs-lead); line-height: 1.95; color: var(--text-dim); }
.body { color: var(--text-dim); line-height: 1.95; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule--gold { background: linear-gradient(90deg, var(--gold-700), transparent); }

/* ---------- 页面壳 ---------- */
.page-shell { position: relative; padding: calc(var(--header-h) + clamp(40px, 5.5vw, 76px)) var(--pad) clamp(24px, 3vw, 40px); }
.page-shell__inner { max-width: var(--maxw); margin: 0 auto; }
.page-shell .crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--text-mute); }
.page-shell .crumbs a:hover { color: var(--gold-300); }
.page-shell .crumbs i { color: var(--gold-700); font-style: normal; }
.page-shell__grid { display: grid; grid-template-columns: 1.55fr .65fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.page-shell .h1 { max-width: 15em; font-size: clamp(30px, 3.7vw, 52px); line-height: 1.24; letter-spacing: .03em; }
.page-shell .lead { margin-top: 18px; max-width: 64ch; }
.page-shell + .section { padding-top: clamp(34px, 4vw, 58px); }
.page-aside { border-left: 1px solid var(--line); padding-left: 20px; display: grid; gap: 12px; }
.page-aside .mono { line-height: 1.8; }
.page-aside strong { color: var(--gold-300); font-weight: 400; }
@media (max-width: 900px) { .page-shell__grid { grid-template-columns: 1fr; } .page-aside { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; } }

/* ---------- 按钮 / 链接 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 0 24px; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--text);
  overflow: hidden; transition: color var(--dur-3), border-color var(--dur-3);
  background: rgba(239, 230, 212, .02); white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--gold-300);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-4) var(--ease-heavy);
}
.btn > * { position: relative; z-index: 1; white-space: nowrap; }
.btn svg { width: 14px; height: 14px; flex: 0 0 auto; }
.btn:hover { color: var(--forest-950); border-color: var(--gold-300); }
.btn:hover::before { transform: scaleX(1); }
.btn--gold { border-color: var(--line-gold); color: var(--gold-300); }
.btn--solid { background: var(--gold-300); color: var(--forest-950); border-color: var(--gold-300); }
.btn--solid::before { background: var(--bone-50); }
.btn--solid:hover { color: var(--forest-950); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 10px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.link-underline { position: relative; display: inline-block; padding-bottom: 3px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--gold-300); }
.link-underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--gold-300); transition: width var(--dur-3) var(--ease); }
.link-underline:hover::after { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--text-mute); text-transform: uppercase; }
.chip--gold { border-color: var(--line-gold); color: var(--gold-300); }
.chip--rose { border-color: rgba(196, 86, 110, .5); color: var(--rose-400); }
.chip--ice { border-color: rgba(143, 201, 194, .4); color: var(--ice-500); }

/* ---------- 卡片 / 档案 ---------- */
.grid { display: grid; gap: clamp(14px, 1.6vw, 22px); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; padding: clamp(18px, 2vw, 26px); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(16, 43, 33, .34), rgba(10, 15, 12, .5));
  transition: border-color var(--dur-3), transform var(--dur-3) var(--ease), background var(--dur-3);
  overflow: hidden;
}
.card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold), transparent); opacity: 0; transition: opacity var(--dur-3); }
.card:hover { border-color: rgba(201, 162, 39, .34); transform: translateY(-3px); }
.card:hover::after { opacity: 1; }
.card__idx { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--gold-600); }
.card__title { font-family: var(--serif); font-size: 21px; letter-spacing: .05em; margin-top: 12px; }
.card__en { font-family: var(--latin); font-size: 9px; letter-spacing: .28em; color: var(--text-mute); margin-top: 6px; }
.card__text { margin-top: 12px; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.9; }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

.dossier { position: relative; border: 1px solid var(--line); background: rgba(10, 15, 12, .6); padding: 20px; }
.dossier__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dossier__no { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--gold-600); }
.dossier__name { font-family: var(--serif); font-size: 20px; margin-top: 8px; }
.dossier__row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-xs); }
.dossier__row dt { color: var(--text-mute); font-family: var(--mono); letter-spacing: .08em; }
.dossier__row dd { margin: 0; color: var(--text-dim); text-align: right; }
.dossier__text { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.9; }

.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-top: 1px solid var(--line); }
.stat__num { font-family: var(--serif); font-size: clamp(34px, 4vw, 56px); line-height: 1; color: var(--gold-300); letter-spacing: .02em; }
.stat__num small { font-size: .36em; letter-spacing: .1em; color: var(--text-mute); margin-left: 6px; }
.stat__label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--text-mute); }

/* 印章 */
.stamp {
  display: inline-grid; place-items: center; width: 74px; height: 74px; border: 2px solid rgba(178, 45, 60, .65);
  border-radius: 50%; color: rgba(214, 88, 102, .85); font-family: var(--serif); font-size: 11px; line-height: 1.2;
  letter-spacing: .1em; transform: rotate(-8deg); text-align: center; opacity: .9;
  box-shadow: inset 0 0 0 1px rgba(178, 45, 60, .25);
}
.stamp--gold { border-color: var(--line-gold); color: var(--gold-300); box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .2); }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--text-mute); text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; background: rgba(239, 230, 212, .03); border: 1px solid var(--line);
  padding: 12px 14px; color: var(--text); font-family: var(--sans); font-size: var(--fs-sm);
  transition: border-color var(--dur-2), background var(--dur-2);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--line-gold); background: rgba(239, 230, 212, .05); }
.input::placeholder { color: var(--text-mute); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.form-note { font-size: 11px; color: var(--text-mute); line-height: 1.8; }
.form-error { color: var(--rose-400); font-size: 12px; border-left: 2px solid var(--rose-600); padding-left: 10px; display: none; }
.form-error.is-on { display: block; }

/* ---------- 抽屉 ---------- */
.drawer-root { position: relative; z-index: var(--z-drawer); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: rgba(7, 19, 15, .98); border-left: 1px solid var(--line);
  z-index: var(--z-drawer); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur-4) var(--ease-heavy);
  box-shadow: -40px 0 80px rgba(0, 0, 0, .5);
}
.drawer.is-open { transform: none; }
.drawer__head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.drawer__kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--gold-600); }
.drawer__title { font-family: var(--serif); font-size: 26px; margin-top: 8px; letter-spacing: .04em; }
.drawer__body { padding: 24px; overflow-y: auto; flex: 1; }
.drawer__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.drawer-close { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-dim); }
.drawer-close:hover { color: var(--gold-300); border-color: var(--line-gold); }
.drawer-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: calc(var(--z-drawer) - 1); opacity: 0; transition: opacity var(--dur-3); }
.drawer-scrim.is-on { opacity: 1; }
@media (max-width: 640px) { .drawer { width: 100%; top: auto; height: 86vh; border-left: 0; border-top: 1px solid var(--line); transform: translateY(100%); } .drawer.is-open { transform: none; } }

/* ---------- 命令面板 ---------- */
.palette-scrim { position: fixed; inset: 0; z-index: var(--z-palette); background: rgba(0, 0, 0, .68); backdrop-filter: blur(6px); display: grid; justify-items: center; align-items: start; padding-top: 14vh; opacity: 0; pointer-events: none; transition: opacity var(--dur-2); }
.palette-scrim.is-on { opacity: 1; pointer-events: auto; }
.palette { width: min(640px, 92vw); background: rgba(7, 19, 15, .98); border: 1px solid var(--line-gold); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.palette__bar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette__bar svg { width: 16px; height: 16px; color: var(--gold-300); flex: 0 0 auto; }
.palette__input { flex: 1; background: none; border: 0; outline: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--text); }
.palette__hint { font-family: var(--mono); font-size: 9px; color: var(--text-mute); }
.palette__list { max-height: 54vh; overflow-y: auto; padding: 8px; }
.palette__group { padding: 12px 10px 6px; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--gold-600); }
.palette__item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; padding: 10px; border: 1px solid transparent; color: var(--text-dim); font-size: var(--fs-sm); }
.palette__item small { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--text-mute); }
.palette__item.is-active, .palette__item:hover { background: rgba(239, 230, 212, .05); border-color: var(--line); color: var(--bone-50); }
.palette__empty { padding: 28px 16px; color: var(--text-mute); font-size: var(--fs-sm); text-align: center; }

/* ---------- 设置面板 ---------- */
.settings-scrim {
  position: fixed; inset: 0; z-index: 750; background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-2);
}
.settings-scrim.is-on { opacity: 1; pointer-events: auto; }
.settings {
  width: min(620px, 94vw); max-height: 86vh; overflow-y: auto;
  background: rgba(7, 19, 15, .98); border: 1px solid var(--line-gold);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  transform: translateY(10px); transition: transform var(--dur-3) var(--ease);
}
.settings-scrim.is-on .settings { transform: none; }
.settings__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.settings__title { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: .06em; margin-top: 6px; }
.settings__body { padding: 8px 22px 22px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting > div:first-child { display: grid; gap: 5px; }
.setting b { font-family: var(--serif); font-weight: 400; font-size: 16px; letter-spacing: .04em; }
.setting span { font-size: 11px; line-height: 1.7; color: var(--text-mute); max-width: 42ch; }
.seg { display: flex; border: 1px solid var(--line); flex: 0 0 auto; }
.seg button { padding: 7px 12px; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--text-mute); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.is-on { background: var(--gold-300); color: var(--forest-950); }
.switch { position: relative; flex: 0 0 auto; width: 62px; height: 32px; border: 1px solid var(--line-strong); }
.switch i { position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; background: var(--bone-400); border-radius: 50%; transition: all var(--dur-3) var(--ease); }
.switch.is-on { border-color: var(--line-gold); }
.switch.is-on i { left: 34px; background: var(--gold-300); box-shadow: 0 0 12px rgba(232, 206, 123, .5); }
.settings__note { padding-top: 18px; display: grid; gap: 8px; }
.settings__note .mono { color: var(--gold-600); font-size: 8px; }
.settings__note p { font-size: 11px; line-height: 1.8; color: var(--text-mute); }
@media (max-width: 520px) { .setting { flex-direction: column; align-items: flex-start; gap: 10px; } .settings { max-height: 92vh; } }

/* 关闭动效 */
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
.no-motion .hero__title span { opacity: 1 !important; transform: none !important; }
.no-motion .fx-grain, .no-motion .fx-fog { animation: none !important; }

/* ---------- EVA 对话终端 ---------- */
.eva-orb {
  position: fixed; right: 26px; bottom: 26px; z-index: 640; width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--line-gold); color: var(--gold-300);
  background: radial-gradient(circle at 34% 28%, rgba(30, 74, 57, .92), rgba(5, 7, 6, .97) 70%);
  box-shadow: 0 0 34px rgba(201, 162, 39, .18), inset 0 0 18px rgba(0, 0, 0, .6);
  display: grid; place-items: center; transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3);
}
.eva-orb:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 0 46px rgba(201, 162, 39, .3); }
.eva-orb__core { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 8px rgba(232, 206, 123, .35)); }
.eva-orb__ring { position: absolute; inset: -7px; border: 1px solid rgba(201, 162, 39, .18); border-radius: 50%; animation: evaPulse 3.4s ease-in-out infinite; }
@keyframes evaPulse { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.12); opacity: .15; } }
.eva-orb__tag { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); font-size: 8px; letter-spacing: .24em; color: var(--gold-600); }
.eva-orb__dot { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulseDot 2.4s infinite; }
body[data-route="portal"] .eva-orb { display: none; }

.eva-console {
  position: fixed; right: 26px; bottom: 104px; z-index: 660; width: min(392px, 92vw);
  height: min(566px, calc(100vh - 150px)); display: flex; flex-direction: column;
  background: rgba(5, 10, 8, .985); border: 1px solid var(--line-gold);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .75), inset 0 0 60px rgba(30, 74, 57, .12);
  opacity: 0; transform: translateY(18px) scale(.985); pointer-events: none;
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-4) var(--ease);
}
.eva-console.is-on { opacity: 1; transform: none; pointer-events: auto; }
.eva-console.is-glitch { animation: evaGlitch .5s steps(2); }
@keyframes evaGlitch { 0% { filter: none; } 35% { filter: hue-rotate(-14deg) contrast(1.2); transform: translateX(-2px); } 70% { filter: none; transform: translateX(2px); } 100% { transform: none; } }
.eva-console__head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(143, 201, 194, .03); }
.eva-console__id { display: flex; align-items: center; gap: 10px; flex: 1; }
.eva-orb__dot.is-live { position: static; flex: 0 0 auto; }
.eva-console__id b { font-family: var(--serif); font-weight: 400; font-size: 15px; letter-spacing: .18em; color: var(--gold-300); }
.eva-console__id .mono { display: block; font-size: 7px; letter-spacing: .16em; }
.eva-console__status { font-size: 8px; letter-spacing: .16em; color: var(--success); }
.eva-console__close { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-mute); }
.eva-console__close:hover { color: var(--gold-300); border-color: var(--line-gold); }
.eva-console__log { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; background-image: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(143, 201, 194, .02) 3px 4px); scrollbar-width: thin; }
.eva-msg { display: grid; gap: 4px; font-size: 13px; line-height: 1.75; }
.eva-msg__who { font-size: 8px; letter-spacing: .18em; color: var(--gold-600); }
.eva-msg p { color: var(--text-dim); white-space: pre-wrap; }
.eva-msg--me { justify-items: end; }
.eva-msg--me .eva-msg__who { color: var(--ice-700); }
.eva-msg--me p { color: var(--ice-300); text-align: right; max-width: 86%; background: rgba(143, 201, 194, .06); border: 1px solid rgba(143, 201, 194, .16); padding: 7px 10px; }
.eva-msg--sys p { color: var(--text-mute); font-family: var(--mono); font-size: 10px; }
.eva-msg--typing p { display: flex; gap: 4px; padding-top: 8px; }
.eva-msg--typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-300); animation: evaDot 1s infinite; }
.eva-msg--typing i:nth-child(2) { animation-delay: .15s; }
.eva-msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes evaDot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.eva-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; border-top: 1px solid var(--line); }
.eva-chips button { padding: 5px 9px; border: 1px solid var(--line); font-size: 10px; color: var(--text-mute); transition: all var(--dur-2); }
.eva-chips button:hover { border-color: var(--line-gold); color: var(--gold-300); }
.eva-console__form { display: flex; gap: 8px; padding: 10px 14px; }
.eva-console__form input { flex: 1; min-width: 0; background: rgba(143, 201, 194, .04); border: 1px solid var(--line); padding: 10px 12px; color: var(--text); font-family: var(--sans); font-size: 13px; }
.eva-console__form input:focus { outline: 0; border-color: var(--line-gold); }
.eva-console__form button { width: 42px; border: 1px solid var(--line-gold); color: var(--gold-300); font-family: var(--mono); font-size: 16px; }
.eva-console__form button:hover { background: var(--gold-300); color: var(--forest-950); }
.eva-console__foot { padding: 0 14px 12px; font-size: 7px; letter-spacing: .14em; color: var(--text-mute); }
.eva-bubble {
  position: fixed; right: 100px; bottom: 36px; z-index: 645; max-width: 300px;
  background: rgba(7, 19, 15, .96); border: 1px solid var(--line-gold); padding: 10px 13px;
  display: grid; gap: 4px; cursor: pointer; opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-3), transform var(--dur-3) var(--ease); pointer-events: none;
}
.eva-bubble.is-on { opacity: 1; transform: none; pointer-events: auto; }
.eva-bubble b { font-size: 8px; letter-spacing: .18em; color: var(--gold-500); }
.eva-bubble span { font-size: 12px; line-height: 1.7; color: var(--text-dim); }
@media (max-width: 620px) {
  .eva-orb { width: 54px; height: 54px; right: 16px; bottom: 16px; }
  .eva-orb__core { width: 25px; height: 25px; }
  .eva-console { left: 10px; right: 10px; bottom: 82px; width: auto; height: calc(100dvh - 100px); }
  .eva-bubble { right: 80px; bottom: 24px; max-width: 220px; }
}

/* ---------- Toast ---------- */
.toast-root { position: fixed; left: 24px; bottom: 24px; z-index: 700; display: grid; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 240px; max-width: 380px; padding: 12px 16px;
  background: rgba(7, 19, 15, .97); border: 1px solid var(--line-gold);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--text-dim);
  transform: translateY(12px); opacity: 0; transition: all var(--dur-3) var(--ease);
}
.toast.is-on { transform: none; opacity: 1; }
.toast strong { color: var(--gold-300); font-weight: 400; display: block; margin-bottom: 3px; font-family: var(--sans); letter-spacing: .04em; }

/* ---------- 通用状态 / 工具 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.noscript { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--void); color: var(--gold-300); font-family: var(--serif); }
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-5) var(--ease), transform var(--dur-5) var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .fx-grain, .fx-fog { animation: none; }
}

/* ---------- 移动端微调 ---------- */
@media (max-width: 640px) {
  :root { --fs-body: 15px; --header-h: 60px; }
  .section { padding: 56px 18px; }
  .page-shell { padding: calc(var(--header-h) + 36px) 18px 32px; }
  .site-footer { padding: 40px 18px 22px; }
  .toast-root { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
