/* =========================================================
   CHAN — Portfolio
   ========================================================= */
:root {
  --ink: #08080a;
  --ink-2: #111115;
  --ink-3: #1a1a20;
  --bone: #ede9e2;
  --bone-2: rgba(237, 233, 226, .62);
  --bone-3: rgba(237, 233, 226, .32);
  --line: rgba(237, 233, 226, .12);
  --accent: #ff3d1f;
  --accent-2: #ffb199;

  --f-display: "Roboto Flex", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --f-sans: "Noto Sans SC", "PingFang SC", "Roboto Flex", system-ui, sans-serif;
  --f-serif: "Noto Serif SC", "Songti SC", serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gut: clamp(16px, 3vw, 44px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; }
::selection { background: var(--accent); color: var(--ink); }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }

@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
}

/* ---------- WebGL 背景 + 颗粒 ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 2.6s ease; }
.grain {
  position: fixed; inset: -10%; will-change: transform; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
main { position: relative; z-index: 2; }

/* ---------- 光标 ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor__ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid rgba(255,255,255,.6);
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .4s, border-color .4s, opacity .3s;
}
.cursor__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: #000; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .5s var(--ease); white-space: nowrap; }
.cursor.is-label .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; border-color: #fff; }
.cursor.is-label .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-label .cursor__dot, .cursor.is-hide .cursor__dot { opacity: 0; }
.cursor.is-hide .cursor__ring { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #fff; border-color: #fff; }
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: #fff; }
.cursor.is-down .cursor__ring { transform: scale(.8); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- 拆字结构 ---------- */
.w { display: inline-block; white-space: nowrap; }
.mask .w, [data-split-rise] .w, [data-split] .w { overflow: hidden; vertical-align: top; padding: .08em .02em .14em; margin: -.08em -.02em -.14em; }
.c { display: inline-block; will-change: transform; }

/* ---------- 加载层 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gut);
}
.loader__top { display: flex; justify-content: space-between; color: var(--bone-2); }
.loader__bottom { display: flex; align-items: flex-end; gap: 24px; }
.loader__count { font-family: var(--f-display); font-variation-settings: "wght" 200, "wdth" 100; font-size: clamp(56px, 9vw, 140px); line-height: .8; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.loader__count small { font-size: .28em; margin-left: .2em; vertical-align: top; color: var(--accent); }
.loader__bar { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; margin-bottom: 10px; }
.loader__bar i { position: absolute; inset: 0; background: var(--bone); transform-origin: left; transform: scaleX(0); }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--gut) * .7) var(--gut); pointer-events: none; color: var(--bone); text-shadow: 0 1px 12px rgba(0,0,0,.45); transition: color .6s var(--ease);
}
.nav > * { pointer-events: auto; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-variation-settings: "wght" 800, "wdth" 120; font-size: 18px; letter-spacing: .02em; }
.nav__logo-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.nav__logo-txt { display: inline-block; overflow: hidden; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 44px); font-size: 13px; letter-spacing: .1em; }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
body.menu-open .nav__links { opacity: 0; pointer-events: none; }
.nav__links { transition: opacity .5s; }
.nav__menu { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.nav__menu-txt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; min-width: 6ch; text-align: right; }
.nav__menu-icon { position: relative; width: 26px; height: 10px; }
.nav__menu-icon i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .7s var(--ease), top .7s var(--ease); }
.nav__menu-icon i:nth-child(1) { top: 1px; }
.nav__menu-icon i:nth-child(2) { top: 7px; left: 8px; }
body.menu-open .nav__menu-icon i:nth-child(1) { top: 4px; transform: rotate(45deg); }
body.menu-open .nav__menu-icon i:nth-child(2) { top: 4px; left: 0; transform: rotate(-45deg); }
@media (max-width: 760px) { .nav__links { display: none; } }

/* ---------- 菜单 ---------- */
.menu { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.menu__bg { position: absolute; inset: 0; background: var(--bone); clip-path: circle(0% at 100% 0%); }
.menu__inner { position: relative; height: 100%; display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gut); padding: calc(var(--gut) * 3) var(--gut) var(--gut); color: var(--ink); }
.menu__list { list-style: none; align-self: center; }
.menu__list a { display: flex; align-items: baseline; gap: 20px; padding: .08em 0; }
.menu__num { font-family: var(--f-mono); font-size: 12px; opacity: .5; width: 2.4em; }
.menu__txt { font-family: var(--f-sans); font-size: clamp(44px, 8vw, 120px); line-height: 1.08; font-variation-settings: "wght" 300; transition: font-variation-settings .6s var(--ease), transform .6s var(--ease); letter-spacing: -.02em; }
.menu__en { font-family: var(--f-serif); font-style: italic; font-size: clamp(14px, 1.4vw, 20px); opacity: 0; transform: translateX(-12px); transition: opacity .5s, transform .6s var(--ease); }
.menu__list a:hover .menu__txt { font-variation-settings: "wght" 900; transform: translateX(16px); }
.menu__list a:hover .menu__en { opacity: .7; transform: none; }
.menu__side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.menu__preview { width: min(100%, 420px); aspect-ratio: 4/5; position: relative; overflow: hidden; border-radius: 4px; background: var(--ink); }
.menu__preview .cover { position: absolute; inset: 0; clip-path: inset(100% 0 0 0); }
.menu__preview .cover.is-on { clip-path: inset(0 0 0 0); }
.menu__foot { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.menu__foot a:hover { color: var(--accent); }
@media (max-width: 760px) { .menu__inner { grid-template-columns: 1fr; } .menu__preview { display: none; } .menu__side { justify-content: flex-end; align-items: flex-start; } }

/* ---------- 通用封面（图片 + 生成式占位） ---------- */
.cover { position: relative; overflow: hidden; background: var(--ink-2); }
.cover img, .cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover video { opacity: 0; transition: opacity .6s; }
.cover.is-playing video { opacity: 1; }
.gen {
  position: absolute; inset: 0; overflow: hidden; container-type: size;
  background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--h) 95% 58% / .85), transparent 55%),
    radial-gradient(90% 80% at 10% 100%, hsl(calc(var(--h) + 40) 80% 40% / .7), transparent 60%),
    linear-gradient(160deg, hsl(var(--h) 40% 10%), #060608 70%);
}
.gen__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 8cqw 8cqw; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); }
.gen__glyph { position: absolute; left: 6cqw; bottom: 2cqh; font-family: var(--f-display), var(--f-serif); font-variation-settings: "wght" 900, "wdth" 80; font-size: 34cqw; line-height: .9; letter-spacing: -.04em; color: rgba(255,255,255,.92); mix-blend-mode: overlay; white-space: nowrap; }
.gen__glyph.is-long { font-size: 22cqw; }
.gen__tag { position: absolute; top: 5cqw; left: 6cqw; font-family: var(--f-mono); font-size: max(9px, 2.4cqw); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.gen__ring { position: absolute; right: -14cqw; top: -14cqw; width: 70cqw; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 0 0 6cqw rgba(255,255,255,.03); }

/* ---------- 区块标签 ---------- */
.sec-label { display: flex; gap: 18px; color: var(--bone-2); }
.sec-label span:first-child { color: var(--accent); }

/* ---------- 01 HERO ---------- */
.hero { position: relative; height: 100vh; min-height: 640px; display: grid; place-items: center; padding: var(--gut); overflow: hidden; }
.hero__title {
  position: relative; z-index: 65;
  display: flex; font-family: var(--f-display); font-size: clamp(110px, 27vw, 520px);
  line-height: .78; letter-spacing: -.02em; user-select: none; will-change: transform;
}
.hl {
  --w: 100; --wd: 100; --o: 144;
  display: inline-block; font-variation-settings: "wght" var(--w), "wdth" var(--wd), "opsz" var(--o);
  will-change: transform; transform-origin: 50% 70%;
}
.hl { -webkit-text-stroke: 1px var(--stroke, transparent); }
.hero__meta { position: absolute; top: calc(var(--gut) * 3); display: flex; flex-direction: column; gap: 8px; color: var(--bone-2); }
.hero__meta--l { left: var(--gut); }
.hero__meta--r { right: var(--gut); text-align: right; }
.hero__sub { position: absolute; left: var(--gut); bottom: calc(var(--gut) * 1.4); }
.hero__tag { font-family: var(--f-serif); font-weight: 600; font-size: clamp(20px, 2.4vw, 38px); letter-spacing: .02em; }
.hero__tag-en { margin-top: 10px; color: var(--bone-2); }
.hero__ticker { position: absolute; right: var(--gut); bottom: calc(var(--gut) * 1.4); display: flex; gap: 16px; color: var(--bone-3); flex-wrap: wrap; justify-content: flex-end; max-width: 44vw; }
.hero__scroll { position: absolute; left: 50%; bottom: calc(var(--gut) * 1.2); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--bone-2); }
.hero__scroll-line { width: 1px; height: 54px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--bone); animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }
[data-reveal] { display: inline-block; }
@media (max-width: 760px) { .hero__ticker { display: none; } .hero__scroll { display: none; } }

/* ---------- 02 宣言 ---------- */
.manifesto { position: relative; }
.manifesto__pin { min-height: 100vh; padding: calc(var(--gut) * 3.5) var(--gut) var(--gut); display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 5vh, 64px); }
.manifesto__text {
  font-family: var(--f-sans); font-size: clamp(26px, 4.3vw, 76px); line-height: 1.32; letter-spacing: -.01em; max-width: 18em;
}
.manifesto__text .c { --w: 160; font-variation-settings: "wght" var(--w); opacity: .14; }
.chip { display: inline-block; vertical-align: middle; width: 2.2em; height: 1.05em; margin: 0 .18em; border-radius: 999px; overflow: hidden; transform: scale(0); transform-origin: center; position: relative; top: -.06em; }
.chip .cover { position: absolute; inset: 0; }
.chip .gen__glyph { font-size: 30cqw; left: 10cqw; bottom: 8cqh; }
.chip .gen__tag, .chip .gen__ring { display: none; }
.manifesto__stats { display: flex; gap: clamp(28px, 6vw, 100px); border-top: 1px solid var(--line); padding-top: 26px; }
@media (max-width: 760px) { .manifesto__stats { gap: 22px; flex-wrap: wrap; } }
.stat { display: flex; align-items: flex-start; gap: 14px; }
.stat b { font-family: var(--f-display); font-variation-settings: "wght" 250, "wdth" 75; font-size: clamp(44px, 6vw, 96px); line-height: .8; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--f-mono); font-size: 11px; color: var(--bone-2); letter-spacing: .08em; line-height: 1.6; }

/* ---------- 03 横向画廊 ---------- */
.works { position: relative; }
.works__pin { position: relative; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.works__bgword {
  position: absolute; top: 50%; left: 0; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  font-family: var(--f-display); font-variation-settings: "wght" 900, "wdth" 151; font-size: 34vw; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(237,233,226,.07); letter-spacing: -.03em;
}
.works__head { position: absolute; top: calc(var(--gut) * 3); left: var(--gut); right: var(--gut); display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.works__counter { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.works__cur { display: inline-block; min-width: 2ch; color: var(--bone); }
.works__sep { width: 40px; height: 1px; background: var(--bone-3); }
.works__tot { color: var(--bone-3); }
.works__track { display: flex; align-items: center; gap: clamp(28px, 4vw, 72px); padding: 0 var(--gut) 0 calc(var(--gut) + 6vw); will-change: transform; width: max-content; }
.card { position: relative; flex: none; width: clamp(260px, 30vw, 520px); }
.card:nth-child(3n+2) { width: clamp(240px, 24vw, 420px); transform: translateY(8vh); }
.card:nth-child(3n) { width: clamp(280px, 34vw, 600px); transform: translateY(-6vh); }
.card__skew { will-change: transform; }
.card__media { position: relative; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; clip-path: inset(0 0 0 0 round 6px); transition: clip-path .9s var(--ease); background: var(--ink-2); }
.card:nth-child(3n+2) .card__media { aspect-ratio: 4/5; }
.card__media .cover { position: absolute; inset: 0 -12%; }
.card__media .cover > * { transition: transform 1.2s var(--ease); }
.card__media .gen__tag, .card__media .gen__glyph { left: calc(9.7% + 4cqw); }
.card:hover .card__media { clip-path: inset(3% 3% 3% 3% round 14px); }
.card:hover .card__media .cover > * { transform: scale(1.08); }
.card__num { position: absolute; top: -26px; left: 0; font-family: var(--f-mono); font-size: 11px; color: var(--bone-3); letter-spacing: .1em; }
.card__info { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; }
.card__title { font-family: var(--f-sans); font-size: clamp(22px, 2.2vw, 36px); line-height: 1.1; font-variation-settings: "wght" 400; transition: font-variation-settings .7s var(--ease), letter-spacing .7s var(--ease); }
.card:hover .card__title { font-variation-settings: "wght" 900; letter-spacing: .02em; }
.card__en { font-family: var(--f-serif); font-style: italic; color: var(--bone-2); font-size: 14px; margin-top: 6px; }
.card__cat { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; color: var(--bone-2); transition: background .5s, color .5s, border-color .5s; }
.card:hover .card__cat { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.card.is-hidden-src .card__media { opacity: 0; }
.card--end { width: clamp(260px, 26vw, 420px); display: flex; flex-direction: column; gap: 16px; }
.card--end:nth-child(n) { transform: none; }
.card--end h3 { font-family: var(--f-serif); font-weight: 800; font-size: clamp(36px, 4vw, 72px); line-height: 1.05; }
.card--end a { display: inline-flex; gap: 10px; align-items: center; color: var(--accent); }
.works__progress { position: absolute; left: var(--gut); right: var(--gut); bottom: calc(var(--gut) * 1.4); height: 1px; background: var(--line); }
.works__progress i { position: absolute; inset: 0; background: var(--bone); transform-origin: left; transform: scaleX(0); }

/* ---------- 04 索引 ---------- */
.archive { position: relative; padding: calc(var(--gut) * 4) var(--gut) calc(var(--gut) * 3); }
.archive__head { display: grid; gap: 28px; margin-bottom: clamp(30px, 5vw, 70px); }
.big-title { font-family: var(--f-serif); font-weight: 900; font-size: clamp(56px, 10vw, 180px); line-height: 1; letter-spacing: -.02em; }
.filters { position: relative; display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; }
.filters__pill { position: absolute; left: 0; top: 0; height: 0; width: 0; border-radius: 999px; background: var(--bone); z-index: 0; }
.filter { position: relative; z-index: 1; padding: 10px 16px; border-radius: 999px; font-size: 13px; letter-spacing: .06em; color: var(--bone-2); transition: color .5s var(--ease); display: inline-flex; gap: 6px; align-items: flex-start; }
.filter sup { font-family: var(--f-mono); font-size: 9px; opacity: .6; }
.filter:hover { color: var(--bone); }
.filter.is-active { color: var(--ink); }
@media (max-width: 760px) { .filters { border-radius: 22px; width: auto; } }

.archive__list { border-top: 1px solid var(--line); }
.row {
  position: relative; display: grid; grid-template-columns: 70px 1.5fr 1.2fr 1fr 40px; align-items: center; gap: 20px;
  padding: clamp(18px, 2.4vw, 34px) 0; border-bottom: 1px solid var(--line); overflow: hidden;
}
.row::before { content: ""; position: absolute; inset: 0; background: var(--bone); transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--ease); z-index: 0; }
.row:hover::before { transform: scaleY(1); transform-origin: top; }
.row > * { position: relative; z-index: 1; transition: color .5s var(--ease), transform .7s var(--ease); }
.row:hover > * { color: var(--ink); }
.row__idx { font-family: var(--f-mono); font-size: 12px; color: var(--bone-3); }
.row__title { font-family: var(--f-sans); font-size: clamp(26px, 3.6vw, 60px); line-height: 1.05; font-variation-settings: "wght" 300; transition: font-variation-settings .7s var(--ease), color .5s, transform .7s var(--ease) !important; }
.row:hover .row__title { font-variation-settings: "wght" 900; transform: translateX(18px); }
.row__en { font-family: var(--f-serif); font-style: italic; color: var(--bone-2); font-size: clamp(14px, 1.3vw, 19px); }
.row__cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--bone-2); }
.row__arrow { font-size: 22px; justify-self: end; transform: rotate(-45deg); }
.row:hover .row__arrow { transform: rotate(0deg) translateX(-6px); }
.row.is-gone { display: none; }
@media (max-width: 760px) { .row { grid-template-columns: 40px 1fr 30px; } .row__en, .row__cat { display: none; } }

.float { position: fixed; left: 0; top: 0; width: clamp(220px, 22vw, 380px); aspect-ratio: 4/3; z-index: 40; pointer-events: none; visibility: hidden; }
.float__inner { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; transform: scale(0); }
.float .cover { position: absolute; inset: 0; clip-path: inset(100% 0 0 0); }
.float .cover.is-on { clip-path: inset(0 0 0 0); z-index: 2; }

/* ---------- 05 跑马灯 ---------- */
.marquee { padding: clamp(40px, 8vw, 120px) 0; overflow: hidden; border-block: 1px solid var(--line); }
.marquee__row { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__item { display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 50px); padding-right: clamp(20px, 3vw, 50px); font-family: var(--f-display); font-size: clamp(56px, 10vw, 170px); line-height: 1.05; font-variation-settings: "wght" 900, "wdth" 110; letter-spacing: -.02em; }
.marquee__item i { width: .32em; height: .32em; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.marquee__row--out .marquee__item { color: transparent; -webkit-text-stroke: 1.5px var(--bone-2); font-variation-settings: "wght" 200, "wdth" 140; }

/* ---------- 06 联系 + 页脚 ---------- */
.contact { position: relative; padding: calc(var(--gut) * 4) var(--gut) 0; min-height: 100vh; display: flex; flex-direction: column; gap: clamp(30px, 6vh, 70px); }
.contact__title { display: flex; flex-direction: column; font-family: var(--f-serif); font-weight: 900; font-size: clamp(44px, 8vw, 150px); line-height: 1.12; letter-spacing: -.02em; }
.contact__title .line--accent { color: var(--accent); }
.contact__row { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.contact__mail { position: relative; overflow: hidden; padding: clamp(18px, 2vw, 30px) clamp(28px, 3.4vw, 54px); border-radius: 999px; border: 1px solid var(--bone-3); font-family: var(--f-display); font-variation-settings: "wght" 500, "wdth" 100; font-size: clamp(20px, 2.6vw, 42px); }
.contact__mail-fill { position: absolute; inset: 0; background: var(--accent); border-radius: 50%; transform: translateY(170%) scale(1.4); transition: transform .8s var(--ease), border-radius .8s var(--ease); }
.contact__mail:hover .contact__mail-fill { transform: translateY(0) scale(1.4); border-radius: 0; }
.contact__mail-txt { position: relative; display: inline-block; transition: color .5s; }
.contact__mail:hover .contact__mail-txt { color: var(--ink); }
.contact__socials { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.contact__socials a { display: inline-flex; gap: 8px; align-items: center; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; letter-spacing: .06em; transition: background .5s var(--ease), color .5s var(--ease), border-color .5s; }
.contact__socials a span { display: inline-block; transition: transform .6s var(--ease); }
.contact__socials a:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.contact__socials a:hover span { transform: rotate(45deg); }
.foot { margin-top: auto; }
.foot__giant { overflow: hidden; line-height: .74; margin: 0 calc(var(--gut) * -.3); }
.foot__giant span { display: block; font-family: var(--f-display); --w: 100; --wd: 151; font-variation-settings: "wght" var(--w), "wdth" var(--wd); font-size: 23.5vw; letter-spacing: -.04em; text-align: center; background: linear-gradient(180deg, var(--bone) 30%, rgba(237,233,226,.15)); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translateY(30%); }
.foot__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--bone-2); flex-wrap: wrap; }
.foot__top:hover { color: var(--accent); }

/* ---------- 详情 ---------- */
.detail { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.detail__media { position: absolute; inset: 0; clip-path: inset(0 0 0 0); will-change: clip-path; background: var(--ink); }
.detail__layers, .detail__layer { position: absolute; inset: 0; }
.detail__layer { overflow: hidden; }
.detail__layer .cover { position: absolute; inset: 0; will-change: transform; }
.detail .gen__tag { display: none; }
.detail .gen__glyph { left: auto; right: 4cqw; bottom: 8cqh; font-size: 26cqw; opacity: .55; }
.detail .gen__glyph.is-long { font-size: 17cqw; }
.detail__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0; visibility: hidden; }
.detail.is-video .detail__video { visibility: visible; }
.detail__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.55) 0%, rgba(8,8,10,0) 30%, rgba(8,8,10,.25) 55%, rgba(8,8,10,.92) 100%); opacity: 0; pointer-events: none; }
.detail__ui { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; padding: var(--gut); pointer-events: none; }
.detail__ui > * { pointer-events: auto; }
.detail__top { display: flex; justify-content: space-between; align-items: center; }
.detail__idx { display: flex; gap: 8px; font-size: 13px; }
.detail__idx-roll { display: inline-block; height: 1.3em; overflow: hidden; line-height: 1.3; }
.detail__idx-roll span { display: block; }
.detail__close { display: flex; gap: 14px; align-items: center; padding: 12px 20px; border: 1px solid rgba(237,233,226,.3); border-radius: 999px; font-size: 13px; letter-spacing: .1em; backdrop-filter: blur(10px); background: rgba(8,8,10,.25); transition: background .5s, color .5s; }
.detail__close:hover { background: var(--bone); color: var(--ink); }
.detail__close i { width: 12px; height: 12px; position: relative; }
.detail__close i::before, .detail__close i::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: currentColor; transform: rotate(45deg); transition: transform .6s var(--ease); }
.detail__close i::after { transform: rotate(-45deg); }
.detail__close:hover i::before { transform: rotate(135deg); }
.detail__close:hover i::after { transform: rotate(45deg); }
.detail__body { align-self: end; max-width: min(1100px, 80vw); padding-bottom: 10px; }
.detail__cat { color: var(--accent); margin-bottom: 18px; display: flex; gap: 14px; }
.detail__title { font-family: var(--f-serif); font-weight: 900; font-size: clamp(60px, 12vw, 220px); line-height: .98; letter-spacing: -.03em; }
.detail__en { font-family: var(--f-display); font-variation-settings: "wght" 300, "wdth" 120; font-size: clamp(18px, 2vw, 30px); margin-top: 14px; color: var(--bone-2); }
.detail__desc { font-size: clamp(15px, 1.25vw, 19px); line-height: 1.75; max-width: 34em; margin-top: 22px; color: rgba(237,233,226,.82); }
.detail__actions { margin-top: 30px; display: flex; gap: 14px; }
.detail__play { display: inline-flex; align-items: center; gap: 14px; padding: 8px 26px 8px 8px; border-radius: 999px; background: var(--bone); color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: .06em; transition: background .5s, color .5s; }
.detail__play:hover { background: var(--accent); color: var(--bone); }
.detail__play-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); position: relative; transition: transform .7s var(--ease); }
.detail__play-ico::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -4px; border-left: 12px solid var(--bone); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.detail__play:hover .detail__play-ico { transform: rotate(120deg) scale(1.08); }
.detail__play.is-off { display: none; }
.detail__nav { position: absolute; right: var(--gut); bottom: var(--gut); display: flex; gap: 10px; }
.detail__arrow { width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(237,233,226,.3); font-size: 20px; backdrop-filter: blur(10px); background: rgba(8,8,10,.25); transition: background .5s, color .5s; }
.detail__arrow:hover { background: var(--bone); color: var(--ink); }
.detail.is-video .detail__body, .detail.is-video .detail__nav, .detail.is-video .detail__shade { opacity: 0 !important; pointer-events: none; }
@media (max-width: 760px) { .detail__body { max-width: 100%; padding-bottom: 80px; } .detail__arrow { width: 52px; height: 52px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 150; transform: translate(-50%, 140%); padding: 14px 22px; border-radius: 999px; background: var(--bone); color: var(--ink); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__scroll-line::after { animation: none; }
}

/* =========================================================
   3D 世界层
   ========================================================= */
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.flash { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle at 50% 50%, #fff, rgba(255,120,80,.4) 40%, transparent 75%); opacity: 0; visibility: hidden; }
.has-world .hero__title { opacity: 0 !important; pointer-events: none; }
.has-world .works__track, .has-world .works__bgword { display: none; }
body:not(.has-world) .works__caption, body:not(.has-world) .works__num, body:not(.has-world) .works__hint { display: none; }
.has-world .works__pin { pointer-events: none; }
.has-world .works__pin a, .has-world .works__pin button { pointer-events: auto; }
body.plane-hover .works { cursor: none; }

.works__caption { position: absolute; left: var(--gut); bottom: calc(var(--gut) * 2.4); z-index: 2; max-width: 60vw; }
.works__cat { display: flex; gap: 14px; color: var(--accent); margin-bottom: 14px; }
.works__cat span:last-child { color: var(--bone-2); }
.works__title { font-family: var(--f-sans); font-size: clamp(48px, 7.4vw, 128px); line-height: 1; letter-spacing: -.02em; }
.works__title .c { --w: 900; font-variation-settings: "wght" var(--w); }
.works__en { font-family: var(--f-serif); font-style: italic; font-size: clamp(16px, 1.6vw, 24px); color: var(--bone-2); margin-top: 12px; }
.works__num { position: absolute; right: var(--gut); bottom: calc(var(--gut) * 2); overflow: hidden; line-height: .8; z-index: 2; }
.works__num span { display: block; font-family: var(--f-display); font-variation-settings: "wght" 100, "wdth" 151; font-size: clamp(90px, 16vw, 280px); color: transparent; -webkit-text-stroke: 1px rgba(237,233,226,.55); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.works__hint { position: absolute; left: 50%; top: calc(var(--gut) * 3); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: var(--bone-2); z-index: 2; }
.works__hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.has-world .works__caption, .has-world .works__num, .has-world .works__hint, .has-world .works__head, .has-world .works__progress { transition: opacity .8s var(--ease); }
.has-world body:not(.in-works) .works__caption { opacity: 0; }
body.has-world:not(.in-works) .works__caption, body.has-world:not(.in-works) .works__num, body.has-world:not(.in-works) .works__hint { opacity: 0; }
@media (max-width: 760px) { .works__hint { display: none; } .works__caption { max-width: 80vw; bottom: calc(var(--gut) * 3); } }

/* =========================================================
   领域世界 HUD
   ========================================================= */
:root { --flight: 1; --wc: #19e3ff; }
.dom { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
body:not(.has-world) .dom { display: none; }
.dom > * { pointer-events: auto; }
.dom__head, .dom__works { transition: opacity .6s var(--ease); }
body:not(.in-works) .dom, body:not(.in-domain) .dom__head, body:not(.in-domain) .dom__works { opacity: 0 !important; pointer-events: none; }
.dom__head {
  position: absolute; left: var(--gut); top: calc(var(--gut) * 4.2); max-width: min(560px, 46vw);
  opacity: calc(1 - var(--flight) * 1.6); transform: translate3d(calc(var(--flight) * -40px), 0, 0); filter: blur(calc(var(--flight) * 8px));
}
.dom__idx { display: flex; align-items: center; gap: 10px; color: var(--bone-2); }
.dom__k { color: var(--wc); font-size: 13px; }
.dom__line { width: 34px; height: 1px; background: var(--wc); box-shadow: 0 0 10px var(--wc); }
.dom__name { margin-top: 18px; font-family: var(--f-sans); font-size: clamp(54px, 8.4vw, 150px); line-height: 1; letter-spacing: -.02em; }
.dom__name .c { --w: 900; font-variation-settings: "wght" var(--w); }
.dom__world { margin-top: 14px; font-family: var(--f-serif); font-weight: 700; font-size: clamp(18px, 1.8vw, 28px); letter-spacing: .14em; color: var(--wc); text-shadow: 0 0 24px color-mix(in srgb, var(--wc) 60%, transparent); }
.dom__desc { margin-top: 16px; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.8; color: rgba(237,233,226,.72); max-width: 30em; }
.dom__works {
  position: absolute; left: var(--gut); bottom: calc(var(--gut) * 2.2); list-style: none; display: flex; flex-direction: column; gap: 4px;
  opacity: calc(1 - var(--flight) * 1.6); transform: translate3d(0, calc(var(--flight) * 30px), 0);
}
.dom__work { display: grid; grid-template-columns: 34px auto auto 20px; align-items: baseline; gap: 14px; padding: 8px 14px 8px 0; text-align: left; border-bottom: 1px solid var(--line); min-width: min(380px, 80vw); transition: padding .6s var(--ease), border-color .5s; }
.dom__work .mono { color: var(--bone-3); }
.dom__work b { font-family: var(--f-sans); font-size: clamp(18px, 1.6vw, 24px); font-variation-settings: "wght" 400; font-weight: 400; transition: font-variation-settings .6s var(--ease), color .4s; }
.dom__work em { font-family: var(--f-serif); font-style: italic; font-size: 13px; color: var(--bone-2); }
.dom__work i { font-style: normal; justify-self: end; color: var(--wc); opacity: 0; transform: translate(-8px, 8px); transition: opacity .4s, transform .6s var(--ease); }
.dom__work:hover { padding-left: 14px; border-color: var(--wc); }
.dom__work:hover b { font-variation-settings: "wght" 900; color: var(--wc); }
.dom__work:hover i { opacity: 1; transform: none; }
.dom__nav { position: absolute; right: var(--gut); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dom__dot { display: flex; align-items: center; gap: 12px; padding: 6px 0; color: var(--bone-3); }
.dom__dot-l { font-size: 13px; letter-spacing: .1em; opacity: 0; transform: translateX(10px); transition: opacity .5s, transform .6s var(--ease), color .4s; }
.dom__dot i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--c); transition: transform .6s var(--ease), background .4s, box-shadow .4s; }
.dom__dot:hover .dom__dot-l, .dom__dot.is-on .dom__dot-l { opacity: 1; transform: none; }
.dom__dot.is-on { color: var(--bone); }
.dom__dot.is-on .dom__dot-l { color: var(--c); }
.dom__dot.is-on i, .dom__dot:hover i { background: var(--c); transform: scale(1.5); box-shadow: 0 0 14px var(--c); }
.dom__card {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) scale(calc(.92 + var(--flight) * .08)); text-align: center; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: calc(var(--flight) * 1.2 - .25);
}
.dom__card-k, .dom__card-en { color: var(--wc); letter-spacing: .3em; }
.dom__card-name { font-family: var(--f-serif); font-weight: 900; font-size: clamp(64px, 11vw, 200px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(237,233,226,.85); letter-spacing: .06em; text-shadow: 0 0 40px color-mix(in srgb, var(--wc) 40%, transparent); }
.dom__hint { position: absolute; left: 50%; bottom: calc(var(--gut) * 2.2); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; color: var(--bone-2); opacity: calc(1 - var(--flight) * 2); }
.dom__hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--wc); box-shadow: 0 0 12px var(--wc); animation: blink 1.6s ease-in-out infinite; }
.has-world .works__progress i { background: var(--wc); box-shadow: 0 0 12px var(--wc); }
@media (max-width: 760px) {
  .dom__head { max-width: 80vw; top: calc(var(--gut) * 5); }
  .dom__desc { display: none; }
  .dom__nav { right: 8px; }
  .dom__dot-l { display: none; }
  .dom__hint { display: none; }
}

/* =========================================================
   互动实验室
   ========================================================= */
.lab { position: fixed; inset: 0; z-index: 140; visibility: hidden; }
.lab__portal {
  position: absolute; inset: 0; overflow: hidden; clip-path: circle(0% at 50% 50%);
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(60,240,255,.22), transparent 70%),
    radial-gradient(40% 40% at 50% 50%, rgba(255,79,163,.18), transparent 70%),
    #04050d;
}
.lab__grid {
  position: absolute; inset: -30%;
  background-image:
    linear-gradient(rgba(60,240,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,240,255,.16) 1px, transparent 1px),
    linear-gradient(rgba(60,240,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,240,255,.06) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 62%);
  animation: labZoom 6s linear infinite;
}
@keyframes labZoom { from { background-position: 0 0, 0 0, 0 0, 0 0; } to { background-position: 0 120px, 120px 0, 0 24px, 24px 0; } }
.lab__core {
  position: absolute; left: 50%; top: 50%; width: min(34vmin, 300px); aspect-ratio: 1; margin: calc(min(34vmin, 300px) / -2) 0 0 calc(min(34vmin, 300px) / -2);
  border-radius: 14px; border: 1px solid rgba(60,240,255,.55);
  background: linear-gradient(135deg, rgba(60,240,255,.12), rgba(255,79,163,.08));
  box-shadow: 0 0 60px rgba(60,240,255,.35), inset 0 0 40px rgba(60,240,255,.18);
  transform: rotate(45deg);
}
.lab__core::before, .lab__core::after { content: ""; position: absolute; inset: 18%; border: 1px solid rgba(255,191,74,.6); border-radius: 8px; animation: labPulse 2.2s ease-in-out infinite; }
.lab__core::after { inset: 36%; border-color: rgba(255,79,163,.7); animation-delay: .5s; }
@keyframes labPulse { 50% { transform: scale(1.12); opacity: .4; } }
.lab__load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; pointer-events: none; padding: 0 var(--gut); }
.lab__ring { width: 64px; height: 64px; border-radius: 50%; position: relative; margin-bottom: 8px; }
.lab__ring span { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 60%, #3cf0ff 85%, #ff4fa3); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lab__k { color: #3cf0ff; letter-spacing: .3em; }
.lab__k b { font-weight: 600; color: #fff; }
.lab__t { font-family: var(--f-sans); font-weight: 900; font-size: clamp(44px, 7vw, 120px); line-height: 1; letter-spacing: -.01em; text-shadow: 0 0 40px rgba(60,240,255,.45); }
.lab__s { color: rgba(237,240,255,.7); letter-spacing: .12em; }
.lab__bar { width: min(360px, 70vw); height: 2px; background: rgba(255,255,255,.12); margin-top: 18px; overflow: hidden; }
.lab__bar i { display: block; height: 100%; background: linear-gradient(90deg, #3cf0ff, #ff4fa3); box-shadow: 0 0 12px #3cf0ff; transform-origin: left; transform: scaleX(0); }
.lab__pct { color: rgba(237,240,255,.5); font-variant-numeric: tabular-nums; }
.lab__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #04050d; clip-path: circle(0% at 50% 50%); }

/* 入口：徽标 / 领域 CTA / 详情按钮 */
.lab-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(60,240,255,.5); color: #3cf0ff; font-size: 9px; letter-spacing: .14em; vertical-align: middle; font-weight: 500; position: relative; top: -.2em; }
.lab-badge i { width: 5px; height: 5px; border-radius: 50%; background: #3cf0ff; box-shadow: 0 0 8px #3cf0ff; animation: blink 1.4s ease-in-out infinite; }
.row:hover .lab-badge { color: var(--ink); border-color: var(--ink); }
.row:hover .lab-badge i { background: var(--ink); box-shadow: none; }
.row__title .lab-badge { font-size: 10px; }
.dom__lab {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-radius: 999px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--wc) 55%, transparent); background: color-mix(in srgb, var(--wc) 10%, transparent);
  transition: background .5s var(--ease), border-color .5s, transform .6s var(--ease);
}
.dom__lab b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.dom__lab small { display: block; font-size: 10px; color: var(--bone-2); margin-top: 3px; letter-spacing: .08em; text-transform: none; }
.dom__lab em { font-style: normal; color: var(--wc); font-size: 18px; transition: transform .6s var(--ease); }
.dom__lab:hover { background: var(--wc); border-color: var(--wc); transform: translateX(6px); }
.dom__lab:hover b, .dom__lab:hover small, .dom__lab:hover em { color: var(--ink-2, #08080a); }
.dom__lab:hover em { transform: rotate(45deg); }
.dom__lab-ico, .detail__lab-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; background: rgba(8,8,10,.6); flex: none; }
.dom__lab-ico i, .detail__lab-ico i { position: absolute; border: 1px solid #3cf0ff; border-radius: 3px; transform: rotate(45deg); }
.dom__lab-ico i:nth-child(1), .detail__lab-ico i:nth-child(1) { width: 18px; height: 18px; }
.dom__lab-ico i:nth-child(2), .detail__lab-ico i:nth-child(2) { width: 10px; height: 10px; border-color: #ffbf4a; animation: labPulse 2s ease-in-out infinite; }
.dom__lab-ico i:nth-child(3), .detail__lab-ico i:nth-child(3) { width: 3px; height: 3px; background: #ff4fa3; border: 0; }
.detail__lab {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border-radius: 999px;
  border: 1px solid rgba(60,240,255,.6); background: rgba(60,240,255,.08); color: var(--bone); font-size: 14px; font-weight: 600; letter-spacing: .06em;
  backdrop-filter: blur(10px); transition: background .5s, color .5s, box-shadow .5s;
}
.detail__lab-sub { color: #3cf0ff; font-size: 10px; }
.detail__lab:hover { background: #3cf0ff; color: #04050d; box-shadow: 0 0 40px rgba(60,240,255,.45); }
.detail__lab:hover .detail__lab-sub { color: #04050d; }
.detail__lab.is-off { display: none; }
@media (max-width: 760px) { .dom__lab small { display: none; } }
body.lab-open .cursor { opacity: 0 !important; }
.dom__work .lab-badge, .row .lab-badge { color: #3cf0ff; }

/* 实验室实时背景 */
.labbg { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; pointer-events: none; background: #04050d; clip-path: circle(0% at 50% 50%); }
.labbg-veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease);
  background: linear-gradient(90deg, rgba(4,5,13,.82) 0%, rgba(4,5,13,.35) 38%, rgba(4,5,13,0) 60%), linear-gradient(0deg, rgba(4,5,13,.7) 0%, rgba(4,5,13,0) 35%); }
body.labbg-on .labbg-veil { opacity: 1; }
body.labbg-on .archive .row:not(:hover) { opacity: .35; transition: opacity .6s; }
.labbg-tag { position: fixed; right: var(--gut); bottom: calc(var(--gut) * 1.1); z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 10px; color: #3cf0ff; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .8s var(--ease); }
.labbg-tag i { width: 6px; height: 6px; border-radius: 50%; background: #ff3d1f; box-shadow: 0 0 10px #ff3d1f; animation: blink 1.2s ease-in-out infinite; }
body.labbg-on .labbg-tag { opacity: 1; transform: none; }

/* 背景就地升格为完整实验室 */
.labbg.is-live { z-index: 145; pointer-events: auto; }
.lab-scan { position: fixed; inset: 0; z-index: 146; pointer-events: none; opacity: 0; visibility: hidden;
  background: linear-gradient(180deg, transparent 0%, transparent 42%, rgba(60,240,255,.08) 47%, rgba(60,240,255,.55) 50%, rgba(255,255,255,.9) 50.3%, rgba(60,240,255,.08) 53%, transparent 58%, transparent 100%);
  }

/* 导航：不用差值混合（每帧都要和 3D 画布重新合成），菜单打开时改为深色 */
body.menu-open .nav { color: var(--ink); text-shadow: none; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -4%); }
  60% { transform: translate(-2%, 5%); } 80% { transform: translate(5%, 1%); } 100% { transform: translate(0, 0); }
}
