/* =========================================================
   PANJX / UI/UX设计师
   暗色酸性背景 + 人物拖影 + 螺旋上升作品墙
   ========================================================= */
:root {
  --bg: #080a14;
  --text: #eef0fb;
  --muted: #9aa6c4;
  --faint: #828dab;
  --line: rgba(226, 230, 250, .16);
  --teal: #5cc8f5;
  --coral: #e879f9;
  --serif: "Bodoni Moda", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-body: 15px;
  --lh-body: 1.8;
  --spiral-scale: 1.2; /* 螺旋模型整体缩放 */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--teal); color: #080c18; }
:focus-visible { outline: 1px solid var(--teal); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--teal); color: #080c18; padding: 8px 14px;
  font: 500 11px/1 var(--mono); letter-spacing: .1em;
}
.skip-link:focus { top: 16px; }
/* 页面顶部锚点：作品墙置顶后，logo/回到顶部仍指向它，本身不占布局高度 */
#top { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0; font: 400 10.5px/1.6 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* ---------- 背景 ---------- */
#bg-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; display: block;
}
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none;
  background: url("../assets/images/noise.png") repeat;
  opacity: .12; mix-blend-mode: overlay;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  /* 减弱暗角，让酸性荧光团块更透出，同时保留轻微聚焦感 */
  background: radial-gradient(ellipse at 50% 48%, transparent 0%, rgba(6,7,14,.05) 62%, rgba(6,7,14,.42) 100%);
}

/* ---------- 鼠标追随光影 ---------- */
.cursor-follower {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  mix-blend-mode: screen;
}
.cursor-follower.is-visible { opacity: 1; }
.cursor-glow {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  transform: translate3d(-50%, -50%, 0); will-change: transform;
}
/* 光核：柔和的青白色亮点，紧贴鼠标 */
.cursor-glow--core {
  width: 90px; height: 90px;
  background: radial-gradient(circle,
    rgba(202,235,255,.55) 0%, rgba(92,200,245,.28) 22%,
    rgba(92,200,245,.08) 48%, transparent 72%);
}
/* 氛围光：大面积青绿柔光，弹性延迟，营造光晕拖尾 */
.cursor-glow--teal {
  width: 300px; height: 300px;
  background: radial-gradient(circle,
    rgba(92,200,245,.20) 0%, rgba(72,130,255,.10) 32%, transparent 68%);
}
/* 流动光斑：品红/紫，反向延迟，形成色彩流动感 */
.cursor-glow--magenta {
  width: 380px; height: 380px;
  background: radial-gradient(circle,
    rgba(255,0,150,.18) 0%, rgba(150,70,255,.10) 38%, transparent 70%);
}
/* 悬停可交互元素时整体增亮 */
.cursor-follower.is-hover .cursor-glow--core {
  background: radial-gradient(circle,
    rgba(255,255,255,.7) 0%, rgba(92,200,245,.4) 24%,
    rgba(92,200,245,.12) 50%, transparent 74%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 20px; padding: 22px 24px;
  font: 500 13px/1.4 var(--mono); letter-spacing: .1em;
  text-transform: uppercase;
}
.logo { display: inline-flex; align-items: baseline; gap: 10px; justify-self: start; }
.logo__cn { font-family: var(--sans); font-weight: 400; letter-spacing: .08em; color: var(--muted); }
.header-center { color: var(--muted); text-align: center; }
.header-nav { display: flex; justify-content: flex-end; gap: 22px; }
.header-nav a { color: var(--muted); transition: color .3s ease; }
.header-nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
/* hero 为外层容器，内含主视觉舞台 .hero__stage 与融合的联系区 .connect，
   二者共用 1400px 居中容器，与其他模块对齐轴一致 */
.hero {
  position: relative;
  max-width: 1400px; margin-inline: auto;
  overflow: hidden;
}
.hero__stage {
  position: relative; min-height: 100svh;
  padding: 86px 24px clamp(210px, 24vh, 280px);
}
.hero__grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, auto); gap: 12px 16px;
  min-height: calc(100svh - 210px);
  align-content: space-between; align-items: center;
}
.hero__label {
  font: 500 13px/1.7 var(--mono); letter-spacing: .06em;
  color: rgba(232,236,252,.9); text-transform: uppercase;
  white-space: pre-line;
}
.hero__label--a { grid-column: 1 / 4; grid-row: 1; align-self: start; font-weight: 600; color: var(--text); }
.hero__label--b { grid-column: 1 / 4; grid-row: 2; align-self: start; color: var(--muted); }
.hero__label--c { grid-column: 1 / 4; grid-row: 3; align-self: center; color: var(--muted); }
.hero__label--d { grid-column: 1 / 4; grid-row: 4; align-self: end; color: var(--muted); }
.hero__label--e { grid-column: 1 / 4; grid-row: 5; align-self: end; }
.hero__label--f { grid-column: 1 / 4; grid-row: 6; align-self: end; color: var(--muted); }
.hero__figure {
  grid-column: 4 / 10; grid-row: 1 / 7;
  align-self: center; justify-self: center;
  position: relative; z-index: 2;
  width: min(100%, 560px);
  height: min(76svh, 760px);
  pointer-events: none;
}
.hero-figure__stack {
  position: relative; width: 100%; height: 100%;
  isolation: isolate;
}
.hero-figure__stack img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 50%;
}
.hero-figure__main {
  position: relative; z-index: 2;
  filter: drop-shadow(0 28px 44px rgba(3, 8, 9, .45));
}
.hero-figure__ghost {
  position: absolute; inset: 0; z-index: 1;
  opacity: .3; mix-blend-mode: screen;
  filter: blur(1.2px) saturate(1.45) contrast(1.2);
  transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0) scaleX(var(--sx, 1));
  pointer-events: none;
}
.hero-figure__ghost.g1 { opacity: .34; --gx: -12px; --gy: 2px; --sx: 1.012; }
.hero-figure__ghost.g2 { opacity: .22; --gx: 10px; --gy: -3px; --sx: .99; }
.hero-figure__ghost.g3 { opacity: .16; --gx: 22px; --gy: 5px; --sx: 1.02; }

.hero__heading {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  margin: 0; padding: 0 16px 4px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.4rem, 12.8vw, 12.6rem); line-height: 1.02;
  letter-spacing: -.05em; text-align: center; white-space: nowrap;
  pointer-events: none;
}

/* ---------- Work wall / 螺旋上升作品墙 ---------- */
.sphere-wall {
  position: relative; min-height: 300svh; overflow: clip; isolation: isolate;
  /* 与全站共用同一块酸性画布背景：仅叠一层中性暗纱保证封面可读，
     不再用独立的墨绿渐变，避免作品墙与其他模块色系割裂。 */
  background: rgba(5, 9, 10, .18);
}
.sphere-wall::before {
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(9,11,24,0) 9%, rgba(9,11,24,0) 91%, var(--bg) 100%);
}
.sphere-wall__label {
  position: absolute; top: 58px; left: 30px; z-index: 20; margin: 0;
  font: 400 10.5px/1.6 var(--mono); letter-spacing: .14em; color: var(--muted);
}
/* H5 专属操作提示：桌面端隐藏 */
.sphere-wall__hint-h5 { display: none; }
.sphere-wall__glow {
  position: absolute; left: 50%; top: 50%; z-index: 0;
  width: min(62vw, 720px); aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(96,130,255,.17) 0%, rgba(60,64,150,.08) 40%, transparent 70%);
  filter: blur(20px);
  transition: transform .4s ease-out;
}
.sphere-wall__inner {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 205px minmax(0,1fr) 248px;
  gap: clamp(16px, 2.4vw, 44px); align-items: center;
  height: 100svh; padding: 92px 30px 62px;
}

/* 左侧作品索引：加柔和暗化衬底，保证在彩色光团背景上文字清晰 */
.work-index {
  display: flex; flex-direction: column; gap: 2px; align-self: center;
  width: max-content; max-width: none;
  padding: 14px 26px 14px 14px; margin: -14px -26px -14px -14px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(6,7,15,.72), rgba(6,7,15,.55) 78%, rgba(6,7,15,0));
  backdrop-filter: blur(3px);
}
.work-index__item {
  appearance: none; border: 0; background: none; cursor: pointer;
  display: grid; grid-template-columns: 3ch minmax(0,1fr); align-items: baseline; gap: 10px;
  padding: 10px 8px 10px 0; text-align: left; color: var(--muted);
  transition: color .3s ease, transform .35s cubic-bezier(.16,1,.3,1);
}
.work-index__item:hover, .work-index__item:focus-visible { color: var(--text); transform: translateX(4px); }
.work-index__item .n { font: 400 11.5px/1.5 var(--serif); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.work-index__item .t { font: 500 16px/1.5 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.work-index__item.is-active { color: var(--teal); }
.work-index__item.is-active .t { font-size: 17.5px; font-weight: 600; }

/* 螺旋舞台：卡片沿竖向螺旋分布，滚动驱动整体旋转 */
.sphere-stage {
  position: relative; width: 100%; max-width: 880px; height: min(86svh, 860px);
  margin: 0 auto; perspective: 1300px; perspective-origin: 50% 48%;
  cursor: grab; touch-action: pan-y; transform-style: preserve-3d;
}
.sphere-stage.is-dragging { cursor: grabbing; }
.sphere-stage::before,
.sphere-stage::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 0; pointer-events: none;
  border: 1px solid rgba(92,200,245,.09); border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(72deg);
}
.sphere-stage::before { width: min(62%, 520px); aspect-ratio: 1; }
.sphere-stage::after { width: min(82%, 700px); aspect-ratio: 1; opacity: .55; }
.sphere {
  position: absolute; inset: 0; z-index: 1; transform-style: preserve-3d;
  transform: scale(var(--spiral-scale, 1)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  will-change: transform;
}
.sphere-card {
  position: absolute; left: 50%; top: 50%; width: var(--w, 150px);
  appearance: none; padding: 0; border: 0; cursor: pointer;
  background: none;
  transform:
    translate3d(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)), var(--z, 0px))
    rotateZ(var(--rz, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transform-style: preserve-3d; backface-visibility: visible;
  will-change: transform;
}
/* 曲面封面：占位图撑开高度，多片竖条沿 Y 轴拼成一段贴在螺旋圆柱上的凸面 */
.cover { position: relative; display: block; transform-style: preserve-3d; }
.cover-sizer { display: block; width: 100%; height: auto; opacity: 0; pointer-events: none; }
.cover-slice {
  position: absolute; top: 0; left: 0;
  width: var(--sw, 12px); height: 100%;
  transform-origin: 50% 50%;
  transform: translateX(var(--sx, 0px)) translateZ(var(--sz, 0px)) rotateY(var(--sa, 0deg));
  background-image: var(--cover-img);
  background-size: var(--bw, 100%) 100%;
  background-position: var(--bx, 0px) 0px;
  background-repeat: no-repeat;
  /* 背面可见：卡片贴着圆柱绕到后方时，背面切片仍能看到，形成绕行纵深；
     若隐藏会让转到背面的封面整片消失，看起来像"绕不到后面"。 */
  backface-visibility: visible;
  /* --fo 是真正的透明度（入场 / 上下边缘），避免用 brightness 淡出时
     亮度降到 0 变成不透明黑块；--fade 只做深度与螺旋两端的压暗，
     稳定后 --fo=1、切片不透明，重叠区不会出现半透明竖纹。 */
  opacity: var(--fo, 1);
  filter: brightness(calc(var(--sb, 1) * var(--br, 1) * var(--fade, 1))) saturate(var(--sat, 1));
}
.sphere-card__text {
  display: block; min-height: 92px; padding: 14px 16px;
  background: rgba(15,18,36,.72); box-shadow: 0 14px 34px rgba(0,0,0,.38);
  color: #dde4f7; font: 400 10px/1.7 var(--mono); letter-spacing: .04em;
}
.sphere-card:hover, .sphere-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.sphere-stage__hint {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0;
  text-align: center; pointer-events: none;
  font: 400 10px/1.6 var(--mono); letter-spacing: .12em; color: var(--faint);
}

/* 右侧当前作品信息 */
.sphere-wall__info {
  align-self: center; min-width: 0;
  /* 液态铬背景较亮，加柔和暗化衬底保证文字清晰 */
  padding: 18px 20px; margin: -18px -20px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(6,7,16,.66), rgba(6,7,16,.5) 80%, rgba(6,7,16,.34));
  backdrop-filter: blur(4px);
}
.sphere-wall__count {
  display: block; font: 400 11px/1.5 var(--mono); letter-spacing: .12em;
  color: var(--teal); font-variant-numeric: tabular-nums;
}
.sphere-wall__name {
  margin: 14px 0 10px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.55rem, 2.3vw, 2.2rem); line-height: 1.25; letter-spacing: -.025em;
  text-wrap: balance;
}
.sphere-wall__tech {
  margin: 0 0 16px; font: 400 10px/1.6 var(--mono); letter-spacing: .1em; color: var(--muted);
}
.sphere-wall__desc {
  margin: 0; font: 400 12px/1.85 var(--sans); letter-spacing: .01em; color: #c3cce4;
}
.sphere-wall__dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.sphere-wall__dots button {
  appearance: none; width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.sphere-wall__dots button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px;
  margin: -2px 0 0 -2px; border-radius: 50%; background: var(--faint);
  transition: background .3s ease, transform .3s ease;
}
.sphere-wall__dots button:hover::after { background: var(--muted); }
.sphere-wall__dots button.is-active::after { background: var(--teal); transform: scale(1.7); }

/* ---------- Generic sections ---------- */
.section {
  max-width: 1400px; margin: 0 auto;
  padding: clamp(110px, 17vh, 190px) 24px;
}
.section-title {
  margin: 0 0 28px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.3vw, 4.2rem); line-height: 1.12; letter-spacing: -.03em;
  text-wrap: balance;
}
.about__grid {
  display: grid; grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
  gap: clamp(40px, 7vw, 110px); align-items: start;
}
.about__portrait { margin: 0; }
.about__portrait img { width: 100%; height: auto; filter: saturate(.8) contrast(1.03); }
.about__portrait figcaption {
  margin-top: 12px; font: 400 10px/1.6 var(--mono);
  letter-spacing: .12em; color: var(--faint);
}
/* 介绍文字占满 about__body 宽度，与下方 .about__meta 的白色间隔线（border-top）左右持平 */
.about__body > p {
  max-width: none; margin: 0 0 1.15em;
  color: #d6dcf0; font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.85; letter-spacing: .01em;
}
.about__meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 36px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line);
}
.about__meta p {
  margin: 10px 0 0; font: 400 12px/1.8 var(--sans);
  letter-spacing: .01em; color: #c3cce4;
}

/* 已并入 hero 主视觉：作为人物右侧的窄栏，垂直居中对齐 */
.connect {
  grid-column: 10 / 13; grid-row: 1 / 7;
  align-self: center; justify-self: stretch;
  min-width: 0; padding: 0;
}
.connect__heading {
  margin: 16px 0 clamp(24px, 3vw, 36px);
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 2.1vw, 2.1rem); line-height: 1.15; letter-spacing: -.03em;
  text-wrap: balance;
}
.connect__rows { border-top: 1px solid var(--line); width: 100%; }
.connect__row {
  appearance: none; width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr 20px;
  align-items: center; gap: 4px 8px; padding: 16px 0;
  transition: padding-left .45s cubic-bezier(.16,1,.3,1);
}
.connect__row:hover { padding-left: 10px; }
.connect__row span {
  grid-column: 1 / -1; font: 400 10px/1.4 var(--mono);
  letter-spacing: .12em; color: var(--muted);
}
.connect__row strong {
  grid-column: 1; font-weight: 500; font-size: clamp(.95rem, 1.25vw, 1.15rem);
  line-height: 1.4; letter-spacing: -.01em; overflow-wrap: anywhere;
}
.connect__row i { grid-column: 2; font-style: normal; text-align: right; color: var(--muted); }

.site-footer {
  max-width: 1400px; margin: 0 auto; padding: 26px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px;
  font: 400 10.5px/1.6 var(--mono); letter-spacing: .1em; color: var(--faint);
}
.site-footer a:hover { color: var(--text); }

/* ---------- Dialog ---------- */
.project-dialog {
  position: relative;
  width: min(1100px, calc(100% - 28px)); max-height: 90vh;
  margin: auto; padding: 0; border: 1px solid var(--line);
  background: #0c0e1a; color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
  overflow: visible; /* 悬浮翻页按钮需显示在弹窗两侧外部 */
}
.project-dialog::backdrop { background: rgba(3,4,12,.9); backdrop-filter: blur(10px); }
.project-dialog__inner {
  max-height: 90vh; overflow-y: auto; padding: clamp(22px, 4vw, 52px);
  /* Firefox 自定义滚动条：暗轨 + 青色滑块 */
  scrollbar-width: thin; scrollbar-color: rgba(92,200,245,.55) rgba(232,236,252,.06);
}
/* Chrome / Safari 自定义滚动条：细轨、青色发光滑块，呼应酸性风格 */
.project-dialog__inner::-webkit-scrollbar { width: 8px; }
.project-dialog__inner::-webkit-scrollbar-track {
  background: rgba(232,236,252,.05); border-radius: 8px;
}
.project-dialog__inner::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(92,200,245,.75), rgba(92,200,245,.35));
  border-radius: 8px; border: 2px solid #0c0e1a;
}
.project-dialog__inner::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--teal), rgba(92,200,245,.6));
}
.project-dialog__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
/* 关闭按钮：悬浮固定在弹窗右上角内侧（inner 外，不随长图滚动），
   PC 与 H5 位置统一；与顶部翻页按钮、eyebrow 均错开 */
.dialog-close {
  position: absolute; z-index: 6;
  right: 14px; top: 14px;
  appearance: none; cursor: pointer; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(13,15,32,.92); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  font: 400 20px/1 var(--sans); color: var(--text);
  transition: border-color .25s ease, color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.dialog-close:hover {
  border-color: var(--teal); color: var(--teal); background: rgba(92,200,245,.1);
  transform: rotate(90deg); box-shadow: 0 0 24px rgba(69,216,196,.18);
}
.project-dialog h2 {
  margin: 26px 0 8px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem); line-height: 1.16; letter-spacing: -.03em;
  text-wrap: balance;
}
.dialog-meta { margin: 0 0 14px; font: 400 10.5px/1.6 var(--mono); letter-spacing: .1em; color: var(--muted); }
/* 项目描述放在标题区、长图之前，避免插在多张长图之间遮挡画面；
   宽度与长图一致，尽量不换行 */
.dialog-desc {
  max-width: none; width: 100%; margin: 0 0 22px; color: #d6dcf0;
  font-size: 14px; line-height: 1.9; letter-spacing: .01em;
}
.dialog-hero, .dialog-details img { width: 100%; height: auto; background: #111528; }
.dialog-details { display: grid; gap: 0; margin-top: 0; }
.dialog-details img { display: block; }
/* 悬浮翻页按钮：绝对定位到弹窗左右两侧、垂直居中 */
.dialog-nav { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.dialog-nav__btn {
  /* 置于弹窗上部两侧：避免垂直居中时悬浮文字压在长图中间 */
  position: absolute; top: 92px;
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 58px; padding: 12px 8px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(13,15,32,.92); backdrop-filter: blur(8px);
  color: var(--muted);
  transition: color .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.dialog-nav__btn--prev { left: -74px; }
.dialog-nav__btn--next { right: -74px; }
.dialog-nav__arrow { font: 400 24px/1 var(--sans); }
.dialog-nav__label { font: 400 10px/1.4 var(--mono); letter-spacing: .1em; white-space: nowrap; color: #FFFFFF; }
.dialog-nav__btn:hover {
  color: var(--teal); border-color: var(--teal);
  background: rgba(92,200,245,.1);
  box-shadow: 0 0 24px rgba(69,216,196,.18);
}
/* 窄屏：弹窗几乎占满宽度，按钮改为悬浮在弹窗内顶部两侧，避免超出视口 */
@media (max-width: 1300px) {
  .dialog-nav__btn {
    top: 14px; transform: none; min-width: 0;
    width: 44px; height: 44px; padding: 0; border-radius: 50%;
    justify-content: center; gap: 0;
    background: rgba(13,15,32,.96);
  }
  /* 顶部中间并排，避开左侧 eyebrow 与右侧关闭按钮 */
  .dialog-nav__btn--prev { left: auto; right: calc(50% + 8px); top: 14px; }
  .dialog-nav__btn--next { right: auto; left: calc(50% + 8px); top: 14px; }
  .dialog-nav__arrow { font-size: 20px; }
  .dialog-nav__label { display: none; }
  /* 关闭按钮悬浮在弹窗右上角内侧，与中间翻页按钮错开 */
  .dialog-close {
    right: 14px; top: 14px; transform: none;
    width: 44px; height: 44px;
  }
  .dialog-close:hover { transform: rotate(90deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; padding: 18px; font-size: 14px; }
  .header-center { display: none; }
  .hero__stage { padding: 34px 18px 150px; }
  .hero__grid { display: flex; flex-direction: column; gap: 26px; min-height: auto; }
  .hero__label--c, .hero__label--d, .hero__label--f { display: none; }
  .hero__label--a, .hero__label--b, .hero__label--e { max-width: 60%; }
  .hero__figure { width: 100%; height: min(58svh, 560px); margin-top: 4px; }
  .hero__heading { font-size: 11.2vw; padding: 0 8px 2px; }
  /* H5：联系区作为独立区块撑满宽度，恢复三列行布局 */
  .connect { align-self: stretch; width: 100%; }
  .connect__heading { font-size: clamp(1.9rem, 8vw, 2.8rem); margin: 18px 0 30px; }
  .connect__row { grid-template-columns: 88px minmax(0, 1fr) 22px; gap: 10px; padding: 20px 0; }
  .connect__row span { grid-column: 1; font-size: 13px; }
  .connect__row strong { grid-column: 2; font-size: 1.25rem; }
  .connect__row i { grid-column: 3; }

  /* H5：保留 3D 螺旋，按窄屏宽度重排布局 */
  .sphere-wall { min-height: 260svh; overflow: clip; }
  .sphere-wall__label { top: 62px; left: 16px; font-size: 14px; }
  .sphere-wall__glow { width: 120vw; }
  /* 舞台铺满整屏；标题与信息栏改为绝对定位浮在螺旋之上，
     让同一时刻能看到约两圈封面，螺旋形状才看得出来。 */
  .sphere-wall__inner {
    position: sticky; height: 100svh; min-height: 0;
    grid-template-columns: 1fr; grid-template-rows: 1fr;
    gap: 0; padding: 0 16px; align-content: stretch;
  }
  /* 左侧 tab 交互已取消，H5 上隐藏，避免与标题重叠 */
  .work-index { display: none; }
  /* 暗化衬底：即使螺旋封面从标题后方经过，文字依然清晰可读 */
  .sphere-wall__label {
    top: 66px; padding: 6px 14px 6px 10px; margin: -6px -14px -6px -10px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(6,7,15,.82), rgba(6,7,15,.5) 76%, rgba(6,7,15,0));
  }
  /* 操作提示：标题下方，12px，提亮蓝白色更醒目，无背景。
     padding 清零 + left:16px，使文字起点与 SELECTED WORK（16px）精确对齐。 */
  .sphere-wall__hint-h5 {
    display: block;
    position: absolute; top: 106px; left: 16px; right: 16px; z-index: 20;
    margin: 0; padding: 0;
    font: 400 12px/1.5 var(--sans); letter-spacing: 0; color: #d3dcf5;
    pointer-events: none;
  }
  /* 父级 grid 用了 align-content:center，1fr 行会塌缩成 0，
     height:100% 会随之失效；这里给出明确高度，让卡片以可视区中心为基准分布。 */
  .sphere-stage {
    width: 100%; max-width: none;
    height: 100svh;
    perspective: 900px; perspective-origin: 50% 48%;
    transform-style: preserve-3d; cursor: grab; touch-action: pan-y;
  }
  .sphere-stage::before, .sphere-stage::after { display: none; }
  .sphere { transform: scale(var(--spiral-scale, 1)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transform-style: preserve-3d; }
  .sphere-stage__hint { display: none; }
  .sphere-wall__info {
    position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 20;
    text-align: center;
    padding: 12px 16px; margin: 0;
    background: linear-gradient(to top, rgba(6,7,16,.92), rgba(6,7,16,.74) 62%, rgba(6,7,16,.32) 100%);
    border-radius: 14px 14px 0 0;
    backdrop-filter: blur(5px);
    cursor: pointer; /* H5：整卡可点击打开当前作品详情 */
    transition: background .25s ease;
  }
  .sphere-wall__info:hover {
    background: linear-gradient(to top, rgba(6,7,16,.96), rgba(6,7,16,.82) 62%, rgba(6,7,16,.44) 100%);
  }
  .sphere-wall__count { font-size: 13px; }
  .sphere-wall__name { margin: 6px 0 4px; font-size: 2rem; }
  .sphere-wall__tech { margin-bottom: 8px; font-size: 12.5px; }
  .sphere-wall__desc { display: none; }
  .sphere-wall__dots { justify-content: center; margin-top: 8px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__portrait { max-width: 300px; }
  .about__portrait figcaption { font-size: 13px; }
  .about__body p { font-size: 1.2rem; }
  .about__meta p { font-size: 15px; }
  .about__meta { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; }
  /* 收紧 about 底部与 hero 顶部之间的空白 */
  .about { padding-bottom: 56px; }
}

@media (max-width: 560px) {
  .site-header { font-size: 13px; }
  .logo__cn { display: none; }
  .header-nav { gap: 14px; }
  .hero__label--a, .hero__label--b, .hero__label--e { font-size: 13px; }
  .hero__heading { font-size: 9.2vw; letter-spacing: -.055em; }
  .hero__figure { height: min(54svh, 460px); }
  .connect__row { grid-template-columns: 76px minmax(0,1fr) 18px; }
  .site-footer { flex-direction: column; gap: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hero-figure__ghost { display: none; }
  .sphere-wall { min-height: auto; overflow: visible; }
  .sphere-wall__inner { position: relative; height: auto; min-height: 100svh; }
  .sphere-card, .sphere-wall__glow { transition: none !important; }
  .sphere-stage {
    height: auto; aspect-ratio: 1.15; max-width: 560px; cursor: default;
    perspective: none; overflow: hidden;
  }
  .sphere-stage::before, .sphere-stage::after { display: none; }
  .sphere { transform: none !important; }
  .sphere-card {
    left: 50%; top: 50%; display: none; width: min(60vw, 460px); max-width: 100%;
    transform: translate(-50%, -50%) !important;
  }
  /* 减少动效时降级为完整单图，不拼接曲面切片 */
  .cover-slice { display: none !important; }
  .cover-sizer { opacity: 1; }
  .sphere-card.is-active { display: block; }
  .sphere-stage__hint { display: none; }
}
