/* 个人网站样式 · 规则见 DESIGN.md，取值只引用 tokens.css */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
/* 大屏等比放大：≤1500px 保持 16px，1920 约 18px，2560 约 21px（上限 22px），全站 rem 布局随之缩放 */
html { -webkit-text-size-adjust: 100%; font-size: clamp(16px, 0.5vw + 8.5px, 22px); }

body {
  margin: 0;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-style: normal; font-weight: var(--weight-display); }
ul, ol { padding: 0; list-style: none; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }

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

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

code { font-family: var(--font-mono); font-size: 0.85em; color: var(--color-ink); overflow-wrap: anywhere; }

.skip {
  position: absolute; left: var(--space-md); top: -4rem; z-index: 50;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent); color: var(--color-on-accent);
  border-radius: var(--radius-sm);
}
.skip:focus-visible { top: var(--space-md); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 2.875rem; padding: 0 var(--space-lg);
  border-radius: var(--radius-pill);
  font: 600 var(--text-sm) / 1 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 2.25rem; padding: 0 var(--space-md); font-size: var(--text-xs); }
.btn--lg { min-height: 3.25rem; padding: 0 var(--space-xl); font-size: var(--text-base); }

.btn--accent { background: var(--color-accent); color: var(--color-on-accent); }
.btn--accent:hover { background: var(--color-accent-strong); box-shadow: 0 12px 36px -12px var(--color-accent); }

.btn--ghost { background: transparent; color: var(--color-ink); border-color: var(--color-rule-strong); }
.btn--ghost:hover { border-color: var(--color-ink-2); background: var(--color-paper-2); }
.btn[data-state="success"] { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Command line (section opener) ---------- */

.cmd {
  display: flex; align-items: baseline; gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-md);
}
.cmd__caret { color: var(--color-accent); }
.cmd__cursor {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--color-accent); transform: translateY(0.18em);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Nav · floating pill ---------- */

.nav {
  position: fixed; z-index: 40;
  top: var(--space-md); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--space-md)), 60rem);
  display: flex; align-items: center; gap: var(--space-lg);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg);
  border-radius: var(--radius-pill);
  background: var(--color-paper-2);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav[data-hidden="true"] { transform: translate(-50%, calc(-100% - var(--space-xl))); }

.nav__brand {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-md);
  text-decoration: none; letter-spacing: 0.06em; white-space: nowrap;
}
.nav__mark {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--color-accent); color: var(--color-on-accent);
  font-size: var(--text-xs); letter-spacing: 0;
}
.nav__links { display: flex; gap: var(--space-xs); margin-inline: auto; }
.nav__links a {
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm); color: var(--color-muted); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover { color: var(--color-ink); }
.nav__links a[aria-current="true"] { color: var(--color-ink); background: var(--color-paper-3); }
.nav__clock {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.nav__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-wash); }

/* ---------- Layout ---------- */

.section, .contact, .hero {
  width: 100%; max-width: var(--page-max); margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.section { padding-block: var(--space-4xl) var(--space-3xl); }

.section__title {
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-2xl);
  overflow-wrap: anywhere; min-width: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--space-2xl);
  padding-block: calc(var(--space-4xl) + var(--space-md)) var(--space-3xl);
}

.hero__title {
  font-size: var(--text-display);
  line-height: 1.18;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere; min-width: 0;
}
.hero__title .line { display: block; white-space: nowrap; }
.hero__title .ch { display: inline-block; white-space: pre; }
.hero__title .ch--accent, .hero__title em { color: var(--color-accent); font-style: normal; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg);
  margin-top: var(--space-xl);
  font-size: var(--text-md); color: var(--color-ink-2);
}
.hero__meta span + span::before { content: "/"; margin-right: var(--space-lg); color: var(--color-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-2xl); }

.hero__portrait {
  position: relative;
  aspect-ratio: 1 / 1.08;
  width: 100%;
  max-width: 34rem;
  justify-self: end;
}
/* 首屏海报与分身画布共用柔和圆形遮罩，让人物「站在」页面里 */
.hero__poster, .char--hero .char__canvas {
  mask-image: radial-gradient(closest-side, black 80%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, black 80%, transparent 100%);
}
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s var(--ease-out); }
.hero__portrait.is-live .hero__poster { opacity: 0; }

.hero__scroll {
  position: absolute; left: var(--page-gutter); bottom: var(--space-xl);
  display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-muted);
}
.hero__scroll span {
  position: relative; width: 1px; height: 2.5rem; background: var(--color-rule-strong); overflow: hidden;
}

.figures dd, .insight__value {
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: var(--text-figure); line-height: 1.1;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums lining-nums;
  margin-top: var(--space-xs);
  overflow-wrap: anywhere;
}
.figures dd small, .insight__value small {
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  color: var(--color-accent); margin-left: 0.25em;
}

/* ---------- Work · cases ---------- */

.case {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: var(--space-3xl);
  align-items: center;
  padding-block: var(--space-3xl);
}
.case + .case { border-top: 1px solid var(--color-rule); }
.case--flip .case__copy { order: 2; }
.case--flip .case__media { order: 1; }

.case__meta {
  display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted);
}
.case__meta span { color: var(--color-accent); }
.case__title {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.15; margin-top: var(--space-md);
  overflow-wrap: anywhere; min-width: 0;
}
.case__lede { margin-top: var(--space-md); color: var(--color-ink-2); font-size: var(--text-md); max-width: 32em; }
.case__points { margin-top: var(--space-xl); display: grid; gap: var(--space-md); }
.case__points li { font-size: var(--text-sm); color: var(--color-ink-2); line-height: 1.85; padding-left: var(--space-lg); position: relative; }
.case__points li::before {
  content: ""; position: absolute; left: 0; top: 0.75em; width: 0.5em; height: 0.5em;
  border-radius: 50%; border: 1px solid var(--color-accent);
}
.case__points b { color: var(--color-ink); font-weight: 600; margin-right: 0.6em; }

.figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-lg);
  margin-top: var(--space-2xl); padding-top: var(--space-lg);
  border-top: 1px solid var(--color-rule);
}
.figures dt { font-size: var(--text-2xs); color: var(--color-muted); }
.figures dd { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }

/* Phones fan */
.phones { position: relative; aspect-ratio: 1 / 1; }
.phone {
  position: absolute; width: 42%;
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--color-rule-strong);
  box-shadow: 0 40px 80px -30px var(--color-shadow);
  background: var(--color-paper-2);
}
.phone img { width: 100%; height: auto; }
.phone--a { left: 2%; top: 12%; rotate: -7deg; }
.phone--b { left: 29%; top: 2%; z-index: 2; }
.phone--c { right: 2%; top: 14%; rotate: 7deg; }

/* Reel */
.reel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); }
.reel figure { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-rule-strong); background: var(--color-paper-2); position: relative; }
.reel__main { grid-column: 1 / -1; }
.reel video, .reel img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reel figcaption {
  position: absolute; left: var(--space-sm); bottom: var(--space-sm);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: oklch(from var(--color-paper) l c h / 0.75);
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-ink-2);
}

/* Insight */
.insight {
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  background: var(--color-paper-3);
}
.insight__label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
.insight__value { font-size: var(--text-statement); margin-top: var(--space-lg); color: var(--color-accent); }
.insight__value small { color: var(--color-accent); }
.insight__note { color: var(--color-ink-2); }
.insight__note b { color: var(--color-ink); }

.figures--board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0; padding: var(--space-2xl); gap: var(--space-2xl) var(--space-xl);
  border-radius: var(--radius-lg); background: var(--color-paper-3);
}
.figures--board dd { font-size: var(--text-figure); }
.figures--board > div:first-child { grid-column: 1 / -1; }

/* ---------- Workflow ---------- */

.flow__lede { margin-top: calc(-1 * var(--space-lg)); margin-bottom: var(--space-2xl); color: var(--color-ink-2); max-width: 36em; }
.flow__rail { position: relative; }
.flow__track {
  position: absolute; left: 0; right: 0; top: 0.6rem; height: 2px;
  background: var(--color-rule-strong); border-radius: 2px; overflow: hidden;
}
.flow__fill {
  position: absolute; inset: 0;
  background: var(--color-accent);
  transform-origin: left center; transform: scaleX(var(--flow, 0));
}
.flow__steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-lg); }
.flow__step { position: relative; padding-top: var(--space-2xl); }
.flow__node {
  position: absolute; top: 0; left: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--color-paper); border: 2px solid var(--color-rule-strong);
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.flow__step.is-on .flow__node { border-color: var(--color-accent); background: var(--color-accent); box-shadow: 0 0 0 6px var(--color-accent-wash); }
.flow__step h3 { font-size: var(--text-lg); line-height: 1.3; white-space: nowrap; color: var(--color-muted); transition: color var(--dur-base) var(--ease-out); }
.flow__step.is-on h3 { color: var(--color-ink); }
.flow__step p { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); line-height: 1.8; }


/* ---------- Path ---------- */

.path__list li {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--space-lg); padding-block: var(--space-lg);
  border-top: 1px solid var(--color-rule);
}
.path__list li:last-child { border-bottom: 1px solid var(--color-rule); }
.path__time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); padding-top: 0.25em; }
.path__org { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-md); }
.path__role { color: var(--color-ink-2); }
.path__skills { margin-top: var(--space-xl); font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Contact · statement footer ---------- */

.contact { padding-block: var(--space-4xl) var(--space-xl); }
.contact__statement {
  font-size: var(--text-statement);
  line-height: 1.2; letter-spacing: 0.01em;
  overflow-wrap: anywhere; min-width: 0;
}
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-2xl); }

/* ---------- Ask · preset Q&A ---------- */

.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;
}
.cmd { flex-wrap: wrap; }
.ask__hint { color: var(--color-muted); opacity: 0.8; }

.ask__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: start; }
.ask__chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-content: start; }

.chip {
  min-height: 2.75rem; padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-rule-strong);
  background: var(--color-paper-2);
  color: var(--color-ink-2);
  font: 500 var(--text-sm) / 1.4 var(--font-body);
  text-align: left; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--color-accent); color: var(--color-ink); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }

.ask__panel {
  position: relative;
  min-height: 15rem;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--color-paper-3);
}
.ask__q { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
.ask__a {
  margin-top: var(--space-lg);
  font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.75;
  color: var(--color-ink); min-height: 6em;
}
.ask__cursor {
  display: inline-block; width: 0.5em; height: 1em; margin-left: 2px;
  background: var(--color-accent); transform: translateY(0.15em);
  animation: blink 1.05s steps(1) infinite;
}
.ask__panel[data-state="streaming"] .ask__cursor { animation: none; }
.ask__more {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  margin-top: var(--space-lg);
  font-size: var(--text-sm); font-weight: 600; color: var(--color-accent); text-decoration: none;
}
.ask__more[hidden] { display: none; }
.ask__more:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Workflow step hover ---------- */

.flow__step { cursor: default; }
.flow__step:hover .flow__node { border-color: var(--color-accent); }
.flow__step:hover h3 { color: var(--color-ink); }

/* ---------- MG · product principle diagrams ---------- */

.case__mg { grid-column: 1 / -1; order: 3; margin-top: var(--space-md); }
.mg__cap {
  display: flex; gap: var(--space-xs);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted);
  margin-bottom: var(--space-md);
}
.mg__scroll {
  border-radius: var(--radius-lg);
  background: var(--color-paper-3);
  padding: var(--space-xl) var(--space-lg) var(--space-md);
}
.mg__svg { width: 100%; height: auto; overflow: visible; }
.mg__svg text { font-family: var(--font-body); text-anchor: middle; }

.mg__track { fill: none; stroke: var(--color-rule-strong); stroke-width: 2; }
.mg__track--dash { stroke-dasharray: 4 6; }
.mg__path { fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round; }
.mg__dot { fill: var(--color-accent); }
.mg__dot-halo { fill: var(--color-accent); opacity: 0.25; }

.mg__disc { fill: var(--color-paper-3); stroke: var(--color-rule-strong); stroke-width: 1.5; }
.mg__disc--key { stroke: var(--color-accent); fill: var(--color-accent-wash); }
.mg__icon { fill: none; stroke: var(--color-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mg__label { fill: var(--color-ink); font-size: 15px; font-weight: 600; }
.mg__svg .mg__sub { fill: var(--color-accent); font-family: var(--font-mono); font-size: 12px; }
.mg__note { fill: var(--color-muted); font-size: 12px; }
.mg__svg .mg__group { fill: var(--color-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.mg__svg .mg__group--accent { fill: var(--color-accent); }

.mg__box { fill: var(--color-paper-3); stroke: var(--color-rule-strong); stroke-width: 1.5; }
.mg__doc { fill: var(--color-paper-2); stroke: var(--color-rule-strong); stroke-width: 1.5; }
.mg__line { fill: var(--color-ink-2); }
.mg__cell { fill: var(--color-accent-wash); stroke: var(--color-accent); stroke-width: 1.5; }
.mg__fig { fill: var(--color-ink-2); }
.mg__tiny { fill: var(--color-muted); font-size: 10px; }
.mg__screen { fill: var(--color-paper-2); stroke: var(--color-accent); stroke-width: 1.5; }
.mg__play { fill: var(--color-accent); }
.mg__bartrack { fill: var(--color-rule-strong); }
.mg__barfill { fill: var(--color-accent); }

.mg__chip { fill: var(--color-paper-3); stroke: var(--color-rule-strong); stroke-width: 1.5; }
.mg__chip--out { stroke: var(--color-accent); fill: var(--color-accent-wash); }
.mg__chiptext { fill: var(--color-ink); font-size: 14px; font-weight: 600; }
.mg__hub { fill: var(--color-accent); }
.mg__svg .mg__hubtext { fill: var(--color-on-accent); font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-display); }
.mg__ring { fill: none; stroke: var(--color-accent); stroke-width: 1.5; stroke-dasharray: 3 9; opacity: 0.7; }
.mg__spin { transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- MG · workflow icons ---------- */

.flow__icon { display: block; width: 3rem; height: 3rem; margin-bottom: var(--space-sm); overflow: visible; opacity: 0.45; transition: opacity var(--dur-base) var(--ease-out); }
.flow__step.is-on .flow__icon, .flow__step:hover .flow__icon { opacity: 1; }
.fi { fill: none; stroke: var(--color-ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fi--a { stroke: var(--color-accent); }
.fi--soft { fill: var(--color-accent-wash); stroke: var(--color-accent); }
.fi--fill { fill: var(--color-accent); stroke: none; }
.fi--ghost { stroke: var(--color-rule-strong); stroke-dasharray: 3 3; }

/* ---------- 区块定位 ---------- */

.section, .contact { position: relative; }

/* ---------- Screenshots + lightbox ---------- */

.case__shots {
  grid-column: 1 / -1; order: 3;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md);
}
.shot { display: none; margin: 0; }
.shot.is-ready, .shot.is-placeholder { display: block; }
.shot__frame {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius-md); border: 1px solid var(--color-rule-strong);
  background: var(--color-paper-2);
}
.shot__frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform var(--dur-slow) var(--ease-out);
}
.shot__frame:hover img { transform: scale(1.04); }
.shot figcaption { margin-top: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }

/* 占位：仅本地预览显示 */
.ph {
  display: grid; place-content: center; gap: var(--space-2xs);
  width: 100%; height: 100%; padding: var(--space-md);
  border: 1.5px dashed var(--color-rule-strong); border-radius: inherit;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--color-accent-wash) 10px 11px);
  text-align: center; font-size: var(--text-2xs); color: var(--color-muted); line-height: 1.6;
}
.ph b { color: var(--color-accent); font-family: var(--font-mono); font-weight: 500; }
.shot.is-placeholder .shot__frame { cursor: default; aspect-ratio: 16 / 10; border: 0; }

.lightbox {
  width: min(92vw, 90rem); max-height: 92vh; padding: 0;
  border: 1px solid var(--color-rule-strong); border-radius: var(--radius-lg);
  background: var(--color-paper-2); color: var(--color-ink);
}
.lightbox::backdrop { background: oklch(from var(--color-paper) l c h / 0.82); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.lightbox__cap { padding: var(--space-sm) var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); }
.lightbox__close {
  position: absolute; top: var(--space-sm); right: var(--space-sm);
  width: 2.5rem; height: 2.5rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--color-rule-strong); background: var(--color-paper); color: var(--color-ink); font-size: var(--text-lg);
}

/* ---------- Audition ---------- */

.audition {
  grid-column: 1 / -1; order: 3;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-2xl); align-items: center;
  padding: var(--space-2xl); border-radius: var(--radius-lg); background: var(--color-paper-3);
}
.audition[hidden] { display: none; }
.audition__title { font-size: var(--text-xl); line-height: 1.3; }
.audition__lede { margin-top: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-sm); }
.audition__styles { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.audition__screen {
  position: relative; aspect-ratio: 9 / 16; width: 100%; max-width: 16rem; justify-self: center;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-rule-strong); background: var(--color-paper);
}
.audition__screen video { width: 100%; height: 100%; object-fit: cover; }
.audition__ph { position: absolute; inset: 0; }
.audition__ph[hidden] { display: none; }
.audition__sound {
  position: absolute; right: var(--space-sm); bottom: var(--space-sm);
  min-height: 2rem; padding: 0 var(--space-sm); border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--color-rule-strong); background: oklch(from var(--color-paper) l c h / 0.7);
  color: var(--color-ink); font: 500 var(--text-2xs) / 1 var(--font-body);
}
.audition__sound[hidden] { display: none; }

/* ---------- Character · 数字分身（嵌入首屏、问答、联系三处） ---------- */

.char { position: relative; aspect-ratio: 1; }
.char[hidden] { display: none; }
.char__body, .char__breath { position: absolute; inset: 0; }
.char__body { transition: opacity 0.9s var(--ease-out); }
.char__canvas { display: block; width: 100%; height: 100%; }
.char__props { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.char__props [data-prop] { opacity: 0; }
.char__say {
  position: absolute; z-index: 2;
  max-width: 15rem; padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-ink); color: var(--color-paper);
  font-size: var(--text-xs); line-height: 1.6;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.char.is-saying .char__say { opacity: 1; transform: none; }
.char .ph { position: absolute; inset: 8%; border-radius: 50%; }

/* 首屏：静态海报先显示，分身就绪后接管 */
.char--hero { position: absolute; inset: 0; aspect-ratio: auto; cursor: pointer; }
.char--hero .char__say { left: -4%; top: 6%; border-bottom-left-radius: 4px; }

/* 问答：她是回答者 */
.ask__speaker { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
.char--ask {
  flex: none; width: clamp(5.5rem, 9vw, 7.5rem);
  border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-rule-strong);
}
.ask__panel[data-state="streaming"] .char--ask { box-shadow: 0 0 0 2px var(--color-accent), 0 0 24px -4px var(--color-accent); }
.ask__who { display: flex; flex-direction: column; font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.ask__who b { font-family: var(--font-display); font-size: var(--text-md); color: var(--color-ink); }

/* 联系：收尾时站在结束语旁边 */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); column-gap: var(--space-3xl); align-items: center; }
.contact > :not(.char) { grid-column: 1; }
.char--contact { grid-column: 2; grid-row: 1 / span 3; width: 100%; align-self: center; }
.char--contact .char__canvas {
  mask-image: radial-gradient(closest-side, black 78%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, black 78%, transparent 100%);
}
.char--contact .char__say { right: 62%; top: 4%; border-bottom-right-radius: 4px; }

/* 原理图里的她 */
.mg__me { pointer-events: none; }
.mg__sheet { pointer-events: none; }

/* 道具（纯 SVG MG） */
.tp-spark { fill: var(--color-accent); }
.tp-card__bg { fill: var(--color-ink); }
.tp-card__bar { fill: var(--color-accent); }
.tp-card__name { fill: var(--color-paper); font-family: var(--font-display); font-size: 5.2px; font-weight: var(--weight-display); }
.tp-card__role { fill: var(--color-muted); font-family: var(--font-body); font-size: 3.4px; }

/* ---------- Hive · PRD 节选 + 可交互标注原型 ---------- */

.prd {
  position: relative; align-self: start;
  padding: var(--space-xl); border-radius: var(--radius-lg); background: var(--color-paper-3);
  font-size: var(--text-sm); color: var(--color-ink-2);
}
.prd__head {
  display: flex; justify-content: space-between; gap: var(--space-md);
  padding-bottom: var(--space-sm); margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-muted);
}
.prd__head span:first-child { color: var(--color-accent); }
.prd__h { font-size: var(--text-md); color: var(--color-ink); margin: var(--space-md) 0 var(--space-xs); }
.prd__list { display: grid; gap: var(--space-xs); padding-left: var(--space-md); list-style: disc; line-height: 1.75; }
.prd__list li::marker { color: var(--color-accent); }
.prd__list b { color: var(--color-ink); font-weight: 600; }
.prd__list--check { list-style: none; padding-left: 0; }
.prd__list--check li { position: relative; padding-left: var(--space-lg); }
.prd__list--check li::before {
  content: ""; position: absolute; left: 0.1em; top: 0.55em; width: 0.8em; height: 0.45em;
  border-left: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(-45deg);
}
.prd__ref { margin-left: var(--space-xs); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-muted); }
.prd__note { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: 1px dashed var(--color-rule-strong); font-size: var(--text-xs); color: var(--color-muted); }

.proto { grid-column: 1 / -1; order: 3; }
.proto__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-sm); }
.proto__hint { font-size: var(--text-xs); color: var(--color-muted); }
.proto__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-xl); align-items: start; }
.proto__shot {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-rule-strong); box-shadow: 0 40px 80px -40px var(--color-shadow);
}
.proto__shot img { width: 100%; height: auto; }
.proto__pin {
  position: absolute; width: 2.4%; min-width: 1.4rem; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: transparent;
  box-shadow: 0 0 0 0 var(--color-accent);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.proto__pin:hover { box-shadow: 0 0 0 4px var(--color-accent-wash), 0 0 0 2px var(--color-accent); }
.proto__pin[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--color-accent), 0 0 18px 4px var(--color-accent); animation: pin-pulse 1.8s var(--ease-in-out) infinite; }
@keyframes pin-pulse { 50% { box-shadow: 0 0 0 3px var(--color-accent), 0 0 4px 1px var(--color-accent); } }
.proto__note {
  position: sticky; top: calc(var(--space-4xl) + var(--space-md));
  padding: var(--space-xl); border-radius: var(--radius-lg); background: var(--color-paper-3);
}
.proto__card { min-height: 15rem; }
.proto__no { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-accent); line-height: 1; }
.proto__title { margin-top: var(--space-sm); font-size: var(--text-lg); line-height: 1.4; color: var(--color-ink); }
.proto__text { margin-top: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.85; }
.proto__src { margin-top: var(--space-md); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-accent); }
.proto__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.proto__count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }

/* ---------- AI 工具箱 + 项目结构 ---------- */

.kit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); margin-top: var(--space-3xl); }
.kit__card {
  position: relative; padding: var(--space-xl); border-radius: var(--radius-lg); background: var(--color-paper-3);
}
.kit__title { font-size: var(--text-xl); line-height: 1.35; margin-bottom: var(--space-lg); }
.kit__list { display: grid; gap: var(--space-md); margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); line-height: 1.85; }
.kit__list b { display: inline-block; min-width: 2.6em; color: var(--color-accent); font-weight: 600; margin-right: var(--space-xs); }
.kit__list code { margin-right: 0.3em; }
.tree { font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.6; }
.tree li { display: grid; grid-template-columns: minmax(0, 15.5em) minmax(0, 1fr); gap: var(--space-md); padding-block: 0.3em; border-bottom: 1px dashed var(--color-rule); }
.tree li:first-child code { color: var(--color-accent); }
.tree code { background: none; padding: 0; color: var(--color-ink); white-space: pre; overflow-wrap: normal; }
.tree span { font-family: var(--font-body); color: var(--color-muted); }
.kit__tags { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); margin-top: var(--space-lg); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--color-accent); }
.kit__tags li + li::before { content: "/"; margin-right: var(--space-md); color: var(--color-muted); }
.kit__foot { margin-top: var(--space-md); font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- 状态标签 · 展开控件 ---------- */

.status-tag {
  display: inline-block; margin-left: var(--space-sm); padding: 0.1em 0.6em; vertical-align: middle;
  border-radius: var(--radius-pill); background: var(--color-accent-wash);
  font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 500; line-height: 1.5; color: var(--color-accent);
}
.figures dd + .status-tag { margin-left: 0; margin-top: var(--space-2xs); }

.more-toggle {
  display: inline-flex; align-items: center; gap: 0.4em;
  margin-top: var(--space-lg); padding: 0 0 2px; border: 0; border-bottom: 1px solid var(--color-rule-strong);
  background: none; cursor: pointer;
  font: 500 var(--text-sm) / 1.5 var(--font-body); color: var(--color-ink-2);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.more-toggle::after { content: "+"; color: var(--color-accent); }
.more-toggle[aria-expanded="true"]::after { content: "−"; }
.more-toggle:hover { color: var(--color-ink); border-color: var(--color-accent); }
.case [hidden] { display: none; }
.case__shots[data-empty], .audition[data-empty] { display: none; }

/* ---------- Motion preferences ---------- */

/* JS 未加载或未启用动效时，内容保持完全可见 */
.js-motion [data-fade] { opacity: 0; transform: translateY(var(--rise-distance)); }

@media (prefers-reduced-motion: reduce) {
  .cmd__cursor, .ask__cursor, .mg__spin { animation: none; }
  .js-motion [data-fade] { opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 63.98rem) {
  .nav__clock { display: none; }
  .flow__track { left: 0.6rem; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow__fill { transform-origin: center top; transform: scaleY(var(--flow, 0)); }
  .flow__steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .flow__step { padding-top: 0; padding-left: var(--space-2xl); }
}

@media (max-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding-top: calc(var(--space-4xl) + var(--space-lg)); gap: var(--space-xl); }
  .hero__portrait { justify-self: center; max-width: 24rem; order: -1; }
  .hero__scroll { display: none; }
  .case, .case--flip, .ask__body { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .ask__body { gap: var(--space-xl); }
  .case--flip .case__copy, .case--flip .case__media { order: 0; }
  .audition { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg); }
  .proto__body, .kit { grid-template-columns: minmax(0, 1fr); }
  .proto__note { position: static; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .char--contact { grid-column: 1; grid-row: auto; width: min(18rem, 70%); justify-self: center; margin-top: var(--space-2xl); }
  .phones { max-width: 30rem; width: 100%; justify-self: center; }
  .path__list li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
}

@media (max-width: 40rem) {
  .nav { gap: var(--space-sm); padding-left: var(--space-md); }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight, .figures--board { padding: var(--space-lg); }
  .reel { grid-template-columns: minmax(0, 1fr); }
  /* MG 图在窄屏保持可读字号，容器内横向滑动 */
  .mg__scroll { overflow-x: auto; padding-inline: var(--space-md); -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .mg__svg { min-width: 640px; }
  .mg__cap::after { content: "← 左右滑动 →"; margin-left: auto; }
  .case__shots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tree li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .prd, .kit__card, .proto__note { padding: var(--space-lg); }
  .hero__actions .btn, .contact__actions .btn { flex: 1 1 auto; }
}
