/* 颜色、间距刻度、层级、动效时长都来自三站共享 token（决策 D10），此处不再重复定义 */
@import url("./assets/tokens.css");

/* 关于本文件的「两层」结构（2026-09-30 复核结论，别再误删）
   同一个选择器在文件里出现两次是**有意为之**：前半是基础规则（布局、字体、骨架），
   后半按主题、断点与场景做细化。曾经有过「前半层永不生效、可以整段删掉」的判断，
   逐条算过之后并不成立——按「同一媒体条件下、后文是否覆盖了它的每一条声明」来判定，
   当时只有 12 条真正被完全覆盖（已删），其余 47 处重叠里，前半仍有大量声明在生效。
   想再清理，请先复算（脚本见 reviews/2026-09-29-* 那批工具），确认「完全覆盖」再动手。 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- 滚动条：与主站同一副手艺 ---------- */
:root {
  --sb-thumb: rgba(255, 255, 255, .14);
  --sb-thumb-hover: color-mix(in srgb, var(--orange) 62%, transparent);
}
html.light {
  --sb-thumb: rgba(120, 66, 10, .22);
  --sb-thumb-hover: color-mix(in srgb, var(--orange) 60%, transparent);
}
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
}
html::-webkit-scrollbar { width: 12px; height: 12px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
html::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: content-box; }
html::-webkit-scrollbar-corner { background: transparent; }

/* 软吸附保留，但吸附点对齐到页头下方，区块开头不会被固定导航压住 */
html { scroll-snap-type: y proximity; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  min-width: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  /* 主题切换时底色、字色、描边一起过渡，字不再硬跳 */
  transition: background var(--dur-3) var(--ease-out), color var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out);
}
body::selection { background: var(--orange); color: #000; }
html.light body::selection { color: #fff; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ---------- WebGL 画布：固定在内容之下 ---------- */
#gl {
  position: fixed;
  inset: 0;
  z-index: var(--z-canvas);
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.space-noise {
  position: fixed;
  inset: 0;
  z-index: var(--z-content);
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.light .space-noise { opacity: 0.05; }

/* ---------- 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  padding: 18px clamp(18px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
  transition: background var(--dur-3) var(--ease-out);
}.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-word { color: var(--text); }
.logo-sup {
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--orange);
  font-family: var(--label);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  vertical-align: 2px;
}
.logo-mark { display: inline-flex; width: 28px; height: 28px; flex: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 8px var(--orange-glow)); }
.nav-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-hot);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 20%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
  flex: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 20%, transparent); }
  50% { opacity: 0.7; box-shadow: 0 0 0 7px color-mix(in srgb, var(--orange) 10%, transparent); }
}
.page { position: relative; z-index: 2; }

/* ---------- 首屏：左文右橙，与主站互为镜像 ---------- */
.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding: calc(var(--header-h) + 24px) clamp(20px, 5vw, 48px) 48px;
  overflow: hidden;
  scroll-snap-align: start;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.88fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: min(var(--max), 100%);
  margin: 0 auto;
}
.hero-copy { position: relative; z-index: 2; min-width: 0; max-width: 620px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--text-soft);
  font-family: var(--label);
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  max-width: 100%;
}.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;   /* 中文标题别过度收字距，收到 -0.02em 以内 */
  line-height: 1.02;
  text-wrap: balance;
}
.hero h1 .line { display: block; white-space: nowrap; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #fff 0%, #ffd9a3 42%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.light .hero h1 em {
  background: linear-gradient(120deg, #241407 0%, #b05309 55%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-lede {
  max-width: 40ch;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.75;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #050505;
  font-family: var(--label);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 10px 40px rgba(255,255,255,0.08);
}
html.light .hero-cta {
  background: #241407;
  color: #faf6ef;
  box-shadow: 0 0 0 1px rgba(36,20,7,0.1), 0 12px 36px var(--orange-glow);
}
.hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, var(--orange-glow), transparent);
  transform: translateX(-120%);
  transition: transform var(--dur-3) var(--ease-out);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35), 0 14px 50px color-mix(in srgb, var(--orange) 20%, transparent);
}
html.light .hero-cta:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--orange) 45%, transparent), 0 16px 50px var(--orange-glow); }
.hero-cta:hover::before { transform: translateX(120%); }
.hero-cta span { position: relative; }
.hero-stage {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  width: min(100%, 560px);
  justify-self: end;
  margin-inline: auto;
  pointer-events: none;
}
.hero-stage-caption {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--text-muted);
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-stage-caption::before,
.hero-stage-caption::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.hero-stage-caption::after {
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
body.no-webgl #gl { display: none; }

/* ---------- 通用 section ---------- */
.section {
  position: relative;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 48px) 120px;
  min-height: 100svh;
  scroll-snap-align: start;
}
.section-intro {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}
.section-kicker {
  margin: 0 0 14px;
  color: var(--orange);
  font-family: var(--label);
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-heading {
  margin: 0;
  max-width: 14ch;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
.section-heading em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(120deg, #fff, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
}
html.light .section-heading em {
  background: linear-gradient(120deg, #241407, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
}
.section-summary {
  max-width: 28ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.75;
}    /* ---------- 玩法区：手势说明书 ---------- */
.how-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}
.how-card {
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05), transparent 40%),
    rgba(255,255,255,0.025);
  backdrop-filter: blur(6px);
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}.how-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-hot);
}
html.light .how-key { color: var(--orange); }
.how-key kbd {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--label);
  font-size: 0.7rem;
  color: var(--text);
}
.how-card p { margin: 0; color: var(--text-soft); font-size: 0.88rem; line-height: 1.7; }

/* ---------- 作品区：橙瓣菜单 + 信息面板 ---------- */
.panel--segments { overflow: visible; }
.seg-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  min-height: 52vh;
  align-items: center;
}.seg-info {
  position: relative;
  z-index: 3;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05), transparent 40%),
    rgba(10, 6, 2, 0.55);
  backdrop-filter: blur(14px);
  transition: border-color var(--dur-2) var(--ease-out);
  min-height: 240px;
}.seg-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seg-name {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.seg-index {
  color: var(--orange);
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}
.seg-desc {
  margin: 12px 0 16px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.75;
  min-height: 3.4em;
}
.seg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.seg-tag {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--label);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.seg-tag.web { color: var(--orange-hot); border-color: color-mix(in srgb, var(--orange) 40%, transparent); }
html.light .seg-tag.web { color: var(--orange); }
.seg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: var(--label);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.seg-link:hover { color: var(--orange-hot); border-color: var(--orange); }
html.light .seg-link:hover { color: var(--orange); }

/* ---------- 卡片栅格：移动端与降级时启用，血统沿用主站 ---------- */
.project-grid {
  display: none;
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.project-card {
  position: relative;
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05), transparent 40%),
    rgba(255,255,255,0.025);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
html.light .project-card {
  background: rgba(255,255,255,0.66);
  box-shadow: 0 10px 30px rgba(150, 84, 20, 0.06);
}
.project-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--orange) 20%, transparent), transparent 68%);
  opacity: 0.75;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
  pointer-events: none;
}
.project-card:hover {
  border-color: color-mix(in srgb, var(--orange) 40%, transparent);
  transform: translateY(-4px);
}
.project-card:hover::before { opacity: 1; transform: translate(14%, 10%) scale(1.15); }
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--label);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
}
.card-name { margin: 0; font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.card-desc {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
}
.card-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--dur-2) var(--ease-out);
}
/* 橙底偏亮，字色要白（实算 5.14:1），黑字只有 4.09:1 */
.card-btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---------- 关于 ---------- */
.about-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-copy p { color: var(--text-soft); line-height: 1.85; margin: 0 0 18px; max-width: 52ch; }
.about-copy p strong { color: var(--text); font-weight: 600; }

/* ---------- 页脚 ---------- */
.panel--footer {
  position: relative;
  padding: 120px clamp(20px, 5vw, 48px) 40px;
  min-height: 62svh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(var(--max), 100%);
  margin: 0 auto;
}
.footer-big {
  margin: 0 0 40px;
  font-family: var(--label);
  font-weight: 700;
  font-size: clamp(2rem, 7.2vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  transition: color var(--dur-3) var(--ease-out);
}
.footer-big:hover { color: color-mix(in srgb, var(--orange) 30%, transparent); }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-links { display: flex; gap: 20px; }
/* 页脚那行版权文字自带边距会顶乱基线，这里统一压掉，不再用行内 style */
.footer-row > .footer-note { margin: 0; }
.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--dur-2) var(--ease-out);
}
.footer-links a:hover { color: var(--orange-hot); }
html.light .footer-links a:hover { color: var(--orange); }    /* ---------- HUD 与气泡 ---------- */
.hud {
  position: fixed;
  left: clamp(18px, 4vw, 40px);
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  color: var(--text-soft);
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
}
html.light .hud { background: rgba(250, 246, 239, 0.7); }
body.ready .hud { opacity: 1; }
.hud.bump { animation: hudBump var(--dur-3) var(--ease-out); }
@keyframes hudBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); border-color: var(--orange-glow); }
  100% { transform: scale(1); }
}
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 46;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 5, 2, 0.78);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  animation: toastIn var(--dur-2) var(--ease-out);
}
html.light .toast { background: rgba(36, 20, 7, 0.86); color: #faf6ef; }
.toast.out { animation: toastOut var(--dur-2) var(--ease-out) forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}
.toast b { color: var(--orange-on-dark); font-weight: 600; }
.ghost-hint {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 28;
  padding: 14px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: none;
  pointer-events: none;
}
html.light .ghost-hint { background: rgba(250,246,239,0.75); }
.ghost-hint kbd {
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--label);
  font-size: 0.74rem;
  color: var(--orange-hot);
}
html.light .ghost-hint kbd { color: var(--orange); }

/* ---------- 开屏：从事件视界到果实 ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-panel);
  background: #000;
  display: grid;
  place-items: center;
  transition: opacity var(--dur-3) var(--ease-out);
}
html.light #intro { background: #faf6ef; }
html.light .intro-line { color: #7a6553; }
html.light .intro-skip { color: #6b5a4b; border-color: #d9cbb8; }
#intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
#intro.never { display: none; }
#introFx { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-line {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(244, 245, 247, 0.5);
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}
.intro-skip {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(244, 245, 247, 0.28);
  font-family: var(--label);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: skipBlink 2.2s ease-in-out infinite;
}
@keyframes skipBlink { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Shared gutters keep the fruit stage aligned with the editorial grid. */
:root {
  --max: 1328px;
  --gutter: clamp(24px, 4.5vw, 64px);
  /* Panel heights follow the viewport WIDTH. The old rule tied every section
     to 100svh, so a tall narrow window stretched each one into a mostly empty
     band. Deriving the height from the content width keeps the composition
     proportional, and the viewport height only caps it on short windows. */
  --hero-h: min(100svh, calc(100vw * 0.78));
  --panel-h: min(100svh, calc(100vw * 0.5));
  --footer-h: min(58svh, calc(100vw * 0.42));
}
.hero { min-height: var(--hero-h); }
.section { min-height: var(--panel-h); }button { font: inherit; }
a, button, summary { touch-action: manipulation; }
[hidden] { display: none !important; }
/* 焦点环只有这一条（范式 2.3）：需要贴合形状的例外单独写，不许再来第四套 */
:focus-visible { outline: 2px solid var(--orange-hot); outline-offset: 3px; }
.hero-stage:focus-visible { outline-offset: -4px; }   /* 例外：3D 舞台是圆角热区，外扩会切到相邻控件 */
.skip-link { position: fixed; z-index: var(--z-overlay); left: 24px; top: 12px; padding: 12px 18px; color: var(--void); background: var(--text); transform: translateY(-160%); border-radius: 8px; }
.skip-link:focus { transform: none; }
.skip-link {
  left: max(24px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  transition: transform var(--dur-1) var(--ease-out);
}
.skip-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.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;
}
/* 章节导航平时不占版面；键盘走到这里时整条浮出来，焦点不会落在看不见的地方 */
nav.sr-only:focus-within {
  position: fixed;
  z-index: var(--z-overlay);
  left: max(24px, env(safe-area-inset-left));
  top: calc(max(12px, env(safe-area-inset-top)) + 60px);
  width: auto; height: auto;
  margin: 0; padding: 8px 10px;
  overflow: visible;
  clip: auto;
  display: flex;
  gap: 6px;
  white-space: normal;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
nav.sr-only a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
}
nav.sr-only a:hover { color: var(--orange); }
.site-header { padding: 12px var(--gutter); background: rgba(0,0,0,.76); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
html.light .site-header { background: rgba(250,246,239,.85); }
.logo { white-space: nowrap; }
.logo-sup { font-size: var(--fs-xs); }
.hero { padding: 112px var(--gutter) 96px; }
.hero-grid { grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); gap: 28px; max-width: 1200px; }
.hero h1 { font-size: clamp(42px, 4.7vw, 68px); line-height: 1.16; font-weight: 600; letter-spacing: -.055em; }
.hero h1 em { background: none; color: var(--orange); }
html.light .hero h1 em { background: none; color: var(--orange); }
.eyebrow { border: 0; border-radius: 0; padding: 0; background: none; backdrop-filter: none; font-size: var(--fs-xs); letter-spacing: .18em; margin-bottom: 28px; }
html.light .eyebrow { background: none; }
.hero-lede { font-size: 1rem; line-height: 1.95; margin-top: 26px; }
.hero-actions { margin-top: var(--space-4); gap: var(--space-3); }
.hero-cta { background: var(--orange); color: #170d05; box-shadow: none; min-height: 50px; font-size: 0.8125rem; letter-spacing: .01em; }
.hero-cta:hover { box-shadow: 0 10px 32px color-mix(in srgb, var(--orange) 18%, transparent); }
/* 深橙底配深字（实算 4.78:1），白字在这块底色上只有 4.39:1 */
html.light .hero-cta { background: var(--orange-cta); color: #050505; box-shadow: none; }
.hero-cta:disabled { opacity: .45; cursor: default; }
.text-link { font-size: 0.8125rem; text-decoration: none; min-height: 44px; display: inline-flex; gap: 18px; align-items: center; }
.text-link:hover { color: var(--orange-hot); }
.hero-playground { min-width: 0; touch-action: none; }
.hero-stage { width: 100%; height: auto; max-width: 540px; aspect-ratio: 1.12; position: relative; inset: auto; pointer-events: auto; touch-action: none; outline-offset: -4px; border-radius: 50%; }
.stage-orbit { position: absolute; inset: 4%; border: 1px solid var(--line); border-radius: 50%; transform: rotate(-22deg); pointer-events: none; }
.stage-orbit::after { content: ''; position: absolute; top: 15%; left: 14%; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px color-mix(in srgb, var(--orange) 60%, transparent); }
.hero-stage-caption { font-size: var(--fs-xs); letter-spacing: .15em; bottom: 3%; }
.fruit-controls { position: relative; z-index: 3; display: flex; width: fit-content; max-width: 100%; margin: 8px auto 0; border: 1px solid var(--line-strong); border-radius: 100px; padding: 3px; background: rgba(10,8,6,.76); backdrop-filter: blur(12px); }
html.light .fruit-controls { background: rgba(255,252,247,.9); }
.fruit-controls button { display: inline-flex; gap: 10px; align-items: center; justify-content: center; border: 0; border-radius: 100px; padding: 0 15px; min-height: 44px; color: var(--text-soft); background: transparent; cursor: pointer; font-size: 0.75rem; transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.fruit-controls button:hover { color: var(--text); background: var(--surface); }
.fruit-controls button span { color: var(--orange); font-size: 1rem; }
.fruit-controls button:disabled { opacity: .4; cursor: default; }
.fruit-help { text-align: center; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.8; margin: 12px 0 0; }
.hero-bottom { position: absolute; bottom: 30px; left: var(--gutter); right: var(--gutter); max-width: 1200px; margin: auto; display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: .06em; }
.hero-bottom a { display: inline-flex; align-items: center; gap: 28px; color: var(--text-soft); text-decoration: none; min-height: 32px; margin-top: -8px; }
.section { padding: 104px var(--gutter) 96px; scroll-snap-align: start; }
.section-heading { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.2; letter-spacing: -.04em; }
.section-heading em { background: none; color: var(--orange); }
html.light .section-heading em { background: none; color: var(--orange); }
.section-kicker { font-size: var(--fs-xs); letter-spacing: .15em; margin-bottom: 18px; }
.section-summary { font-size: 0.875rem; line-height: 1.9; max-width: 30ch; }
.section-intro { margin-bottom: 40px; }
/* 玩法区：标题在左上，六条说明在右，橙子单独占一条居中的玩台 */
.how-top { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.how-head { position: relative; }
.how-summary { margin: clamp(18px, 2.4vw, 30px) 0 0; color: var(--text-soft); font-size: 0.875rem; line-height: 1.9; }
.how-stage {
  position: relative;
  width: min(880px, 96%);
  margin: clamp(18px, 2.6vw, 38px) auto clamp(26px, 3.6vw, 52px);
  aspect-ratio: 1.95;
  min-height: 0;
}
/* 玩法区底部的分界条：和首屏那条同款，只有翻页切开的时候亮一下 */
.how-bottom {
  position: relative;
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  transition: border-color var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out);
}
.how-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  color: var(--text-soft);
  text-decoration: none;
}
.how-bottom.glowing {
  border-top-color: var(--orange);
  box-shadow: 0 -2px 22px var(--orange-glow);
}

/* 玩法区把上边距收窄，整块更矮，留给玩台；用 flex 列让底栏能钉到最底部 */
#how.section { display: flex; flex-direction: column; padding-top: clamp(56px, 5.5vw, 84px); }
#how .section-heading { font-size: clamp(30px, 3.2vw, 46px); }
#how .how-summary { margin-top: clamp(14px, 1.8vw, 22px); }
/* 两行三列，比原来的两列更矮，给下面的玩台让出高度 */
.how-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 24px; max-width: none; }
.how-card { border: 0; border-top: 1px solid var(--line-strong); border-radius: 0; padding: 22px 0 26px; background: none; backdrop-filter: none; }
html.light .how-card { background: none; box-shadow: none; }
.how-card:hover { transform: none; border-color: var(--orange); }
.how-key { font-size: 0.75rem; }
.how-key kbd { font-size: var(--fs-xs); }
.how-card p { font-size: 0.8125rem; line-height: 1.85; }
.about-stage { position: relative; min-height: 340px; }
.stage-caption { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: var(--fs-xs) var(--label); letter-spacing: .16em; color: var(--text-muted); }
.touch-hint { display: none; }
.seg-wrap { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 64px; min-height: 390px; }
.seg-stage { position: relative; min-height: 360px; height: 390px; pointer-events: none; }
.seg-info { border-radius: 4px; background: rgba(12,10,8,.84); backdrop-filter: blur(12px); border-color: var(--line); padding: 30px; min-height: 268px; }
html.light .seg-info { background: rgba(255,252,247,.85); box-shadow: none; }
.seg-info.hot { border-color: var(--line-strong); }
.seg-meta, .seg-index { font-size: var(--fs-xs); }
.seg-name { font-size: 1.625rem; margin-top: 14px; }
.seg-desc { font-size: 0.875rem; margin-bottom: 20px; line-height: 1.9; min-height: 3.8em; }
.seg-tags { margin-bottom: 14px; }
.seg-tag { font-size: var(--fs-xs); letter-spacing: .06em; }
.seg-link { min-height: 44px; font-size: 0.75rem; gap: 24px; }
#segmentNumbers { position: absolute; inset: 0; overflow: hidden; }
.segment-number { position: absolute; left: calc(50% + var(--x) * var(--seg-ring, 163px)); top: calc(50% + var(--y) * var(--seg-ring, 163px)); transform: translate(-50%,-50%); font: var(--fs-xs) var(--label); color: var(--text-muted); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; transition: background var(--dur-1) var(--ease-out); }
.segment-number.active { color: #120a04; background: var(--orange); }
/* 亮色下橙底更深，改白字保住对比（实算约 5.1:1） */
html.light .segment-number.active { color: #fff; }
.project-index { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 0 20px; margin-top: 28px; border-top: 1px solid var(--line-strong); }
.project-choice { display: flex; gap: 14px; align-items: center; padding: 14px 0; min-height: 48px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text-soft); font-size: 0.75rem; text-align: left; cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
.project-choice span { font: var(--fs-xs) var(--label); color: var(--text-muted); }
.project-choice[aria-pressed="true"], .project-choice:hover { color: var(--orange-hot); }
.project-choice[aria-pressed="true"] { border-bottom-color: var(--orange); }
.project-choice[aria-pressed="true"] span { color: var(--orange-hot); }

/* 桌面标题与信息留白收紧，为实际作品预览留出空间。 */
@media (min-width: 861px) {
  #projects.section { padding-top: 56px; }
  #projects .section-heading { font-size: 44px; max-width: none; }
  #projects .section-heading em { display: inline; margin-left: .25em; }
  #projects .project-title-break { display: none; }
  #projects .section-intro { margin-bottom: 14px; }
  #projects .section-kicker { margin-bottom: 10px; }
  #projects .project-index { margin: 0 0 20px; }
  .seg-wrap { min-height: 330px; }
  .seg-stage { min-height: 0; height: clamp(300px, 44vh, 390px); }
  #projects .seg-info { padding: 24px; }
  #projects .seg-meta { margin-bottom: 10px; }
  #projects .project-preview { margin-bottom: 16px; }
  .how-stage { height: clamp(240px, 32vh, 320px); aspect-ratio: auto; margin-block: 20px 28px; }
  #how.section { padding-bottom: 64px; }
}
.colophon > summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; list-style: none; cursor: pointer; color: var(--text-soft); font-size: 0.75rem; border-bottom: 1px solid var(--line); }
.colophon > summary::-webkit-details-marker { display: none; }
details[open] > summary > span { transform: rotate(45deg); }
.project-grid { display: none; grid-template-columns: repeat(3,minmax(0,1fr)); }
.project-card { border-radius: 8px; min-height: 220px; }
.project-card::before { display: none; }
.card-meta { font-size: var(--fs-xs); }
.card-btn { min-height: 44px; }
.about-grid { align-items: center; }
#about { min-height: auto; }
.about-copy p { font-size: 0.9375rem; line-height: 2; }
.about-copy a { color: var(--orange-hot); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.colophon { margin-top: 32px; max-width: 48ch; }
.colophon p { margin-top: 16px; font-size: 0.8125rem; }
.about-stage { min-height: 340px; }
.panel--footer { padding: 100px var(--gutter) 110px; min-height: 58svh; scroll-snap-align: none; }
.footer-big { font-size: clamp(40px,7vw,100px); line-height: 1.07; -webkit-text-stroke-color: var(--text-muted); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.75rem; }
/* 备案号：按规定展示在页脚最下面 */
.footer-icp { margin: 10px 0 0; font-size: var(--fs-xs); letter-spacing: .04em; }
.footer-icp a { color: var(--text-muted); text-decoration: none; }
.footer-icp a:hover { color: var(--text-soft); }
.hud { transition: opacity var(--dur-2) var(--ease-out), visibility var(--dur-2) var(--ease-out); bottom: 18px; left: 24px; padding: 3px 4px 3px 14px; gap: 12px; pointer-events: auto; font: 11px var(--body); letter-spacing: .01em; background: rgba(12,10,8,.9); }
.hud-divider { width: 1px; height: 12px; background: var(--line-strong); }
.hud button { min-height: 34px; padding: 0 12px; border-radius: 40px; border: 0; color: var(--text-soft); background: var(--surface); cursor: pointer; font-size: var(--fs-xs); }
.hud button:hover { color: var(--orange-hot); }
.hud button:disabled { cursor: default; }
body.hero-away .hud { opacity: 0; visibility: hidden; pointer-events: none; }
.toast-wrap { bottom: 78px; max-width: calc(100% - 32px); width: max-content; }
.toast { white-space: normal; text-align: center; line-height: 1.8; border-radius: 14px; font-size: 0.75rem; }
.ghost-hint { top: auto; bottom: 144px; transform: translateX(-50%); font-size: 0.75rem; max-width: calc(100% - 32px); width: max-content; }
.intro-line { font-size: var(--fs-xs); letter-spacing: .18em; }
.intro-skip { color: #b7aca2; background: transparent; border: 1px solid #4c3c30; border-radius: 40px; padding: 0 20px; min-height: 44px; cursor: pointer; font: 12px var(--body); animation: none; }
.space-noise { opacity: .025; }
body.no-webgl .seg-wrap, body.no-webgl .project-index, body.no-webgl .how-stage, body.no-webgl .about-stage { display: none; }
body.no-webgl .project-grid { display: grid; margin-top: 24px; }
body.no-webgl .hero { min-height: 68svh; }
body.no-webgl .hero-grid { grid-template-columns: 1fr; }
body.no-webgl .hero-playground, body.no-webgl #how { display: none; }
.no-script { padding: 20px var(--gutter); }
/* 杀光动画的唯一权威实现（范式 4.1）：系统偏好与手动暂停都由 ui.js 挂 .motion-paused，
   媒体查询只负责 JS 还没跑起来的那几帧，用 :not(.motion-paused) 保证两者不同时生效。 */
.motion-paused { scroll-behavior: auto; scroll-snap-type: none; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation: none !important; transition-duration: .01ms !important; }

@media (max-width: 1100px) {
  .seg-wrap { gap: 28px; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .desktop-hint { display: none; }
  .touch-hint { display: inline; }
  html { scroll-snap-type: none; }
  .hero { padding-top: 104px; padding-bottom: 90px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { max-width: 580px; }
  .hero h1 { font-size: clamp(40px,7vw,60px); }
  .hero-playground { width: min(440px, 100%); justify-self: center; }
  .hero-stage { width: 100%; height: auto; aspect-ratio: 1.1; }
  .hero-stage-caption { display: flex; }
  .hero-bottom { bottom: 24px; }
  .section { min-height: auto; padding-top: 80px; padding-bottom: 80px; }
  .how-top { grid-template-columns: 1fr; gap: 28px; }
  .seg-wrap { grid-template-columns: minmax(0, .9fr) minmax(0,1.1fr); gap: 24px; }  .segment-number { left: calc(50% + var(--x) * var(--seg-ring, 112px)); top: calc(50% + var(--y) * var(--seg-ring, 112px)); }  .about-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .about-stage { min-height: 280px; }
}
@media (max-width: 600px) {
  :root { --gutter: 22px; }
  .site-header { padding: 10px 16px; }
  .logo { font-size: 0.875rem; gap: 7px; }
  .logo-mark { width: 24px; height: 24px; }
  .logo-sup { display: none; }
  .nav-right { gap: 4px; }
  .theme-btn { border: 0; }
  .hero { padding-top: 108px; min-height: auto; }
  .hero-grid { gap: 20px; }
  .eyebrow { font-size: var(--fs-xs); letter-spacing: .13em; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(35px,9.7vw,54px); }
  .hero-lede { font-size: 0.875rem; line-height: 1.85; margin-top: 20px; }
  .hero-actions { margin-top: var(--space-3); gap: var(--space-3); }
  .hero-cta { min-height: 48px; padding-inline: 20px; font-size: 0.75rem; }
  .hero-stage { aspect-ratio: 1.08; }
  .stage-orbit { inset: 4% 8%; }
  .hero-stage-caption { bottom: 0; font-size: var(--fs-xs); }
  .fruit-controls { margin-top: 10px; }
  .fruit-controls button { padding-inline: 12px; gap: 7px; }
  .fruit-help { font-size: var(--fs-xs); margin-top: 9px; }
  .hero-bottom { font-size: var(--fs-xs); }
  .hero-bottom a { min-height: 44px; margin-top: -14px; gap: 12px; }
  .section-intro { flex-direction: column; align-items: start; gap: 20px; margin-bottom: 28px; }
  .section-heading { font-size: 2.125rem; }
  .section-kicker { font-size: var(--fs-xs); margin-bottom: 16px; }
  .section-summary { font-size: 0.8125rem; }
  .how-grid { grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .how-card { padding: 18px 0 22px; }
  .how-card p { font-size: 0.875rem; }
  .how-key { gap: 4px; font-size: var(--fs-xs); }
  .how-key kbd { font-size: var(--fs-xs); padding: 3px 5px; }
  .seg-wrap { display: flex; flex-direction: column; gap: 24px; min-height: auto; }
  .seg-stage { width: 100%; height: 300px; min-height: 300px; }
  .segment-number { left: calc(50% + var(--x) * var(--seg-ring, 132px)); top: calc(50% + var(--y) * var(--seg-ring, 132px)); }
  .seg-info { width: 100%; min-height: 282px; padding: 24px; }
  .seg-desc { font-size: 0.875rem; }
  .project-index { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin-top: 20px; }
  .project-choice { font-size: 0.8125rem; gap: 8px; padding-block: 12px; }
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stage { display: none; }
  .about-copy p { font-size: 0.875rem; }
  .panel--footer { min-height: 420px; padding-top: 50px; padding-bottom: 108px; }
  .footer-big { font-size: clamp(32px,8.6vw,52px); }
  .footer-row { font-size: var(--fs-xs); gap: 8px; }
  .footer-links { gap: 24px; }
  .hud { left: 50%; transform: translateX(-50%); bottom: max(10px,env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 24px); padding-left: 12px; gap: 9px; font-size: var(--fs-xs); }
  .hud button { min-height: 44px; font-size: var(--fs-xs); }
  .toast-wrap { bottom: 74px; }
  .intro-line { font-size: var(--fs-xs); letter-spacing: .08em; }
}
@media (max-width: 360px) {
  .logo-mark { display: none; }
  :root { --gutter: 18px; }
  .hero { padding-top: 96px; }
  .hero-grid { gap: 12px; }
  .hero-lede { margin-top: 14px; }
  .hero-actions { margin-top: var(--space-2); }
  .hero-stage { aspect-ratio: 1.18; }
  .hero-bottom { display: none; }
  .fruit-controls button { padding-inline: 11px; }
}
@media (min-width: 600px) and (max-width: 1000px) and (max-height: 500px) {
  .hero { padding-top: 100px; padding-bottom: 36px; }
  .hero-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
  .hero h1 { font-size: clamp(30px,4.7vw,42px); }
  .eyebrow { margin-bottom: 18px; font-size: var(--fs-xs); }
  .hero-lede { margin-top: 16px; font-size: 0.8125rem; line-height: 1.8; }
  .hero-actions { margin-top: var(--space-2); gap: var(--space-2); }
  .hero-playground { width: min(320px,100%); }
  .hero-stage { aspect-ratio: 1.65; }
  .hero-bottom { display: none; }
  .fruit-controls button { padding-inline: 10px; }
  /* 矮横窗：帮助文字让位。选择器带上 .hero-playground，免得被 860 断点的 visible 反盖（范式 5.4） */
  .hero-playground .fruit-help { font-size: var(--fs-xs); visibility: hidden; }
  .hud { left: auto; right: var(--gutter); bottom: 6px; }
  .hud-divider, #clipboardStatus { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-paused) { scroll-behavior: auto; scroll-snap-type: none; }
  html:not(.motion-paused) *,
  html:not(.motion-paused) *::before,
  html:not(.motion-paused) *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* The catalogue is the baseline; 3D progressively replaces it once usable. */
[hidden] { display: none !important; }
#intro { display: none; }
.intro-running #intro:not(.never) { display: grid; }
body:not(.scene-ready) .project-grid { display: grid; }
body:not(.scene-ready) .seg-wrap,
body:not(.scene-ready) .project-index { display: none; }
body.no-webgl #splitBtn,
body.no-webgl .fruit-controls,
body.no-webgl .hud,
body.no-webgl .mobile-play-guide,
body.no-webgl .keyboard-help,
body.no-webgl .how-grid { display: none; }
body:not(.scene-ready) #splitBtn,
body:not(.scene-ready) .fruit-controls { visibility: hidden; }
.hero-playground, .hero-stage, .how-stage, .seg-stage { touch-action: pan-y pinch-zoom; }
#segmentNumbers { visibility: hidden; }
.project-index { margin: 0 0 28px; }
.project-choice { min-height: 48px; }
.mobile-play-guide, .keyboard-help { display: none; }

/* One persistent settings entry avoids crowding the phone header. */
.site-settings { position: relative; color: var(--text); }
.site-settings > summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 0.75rem; cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 50%; }.settings-panel { position: absolute; right: 0; top: calc(100% + 12px); width: 230px; max-height: min(74svh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-bg); box-shadow: 0 12px 36px #0003; }
.settings-action { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 6px; text-align: left; color: var(--text); background: transparent; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.settings-action:hover { background: var(--surface); }
.settings-action:disabled { color: var(--text-muted); cursor: default; }
#liteControls, #tiltControls, #capControls { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
#tiltStatus, #capStatus { margin: 6px 12px; font-size: 0.75rem; line-height: 1.7; color: var(--text-soft); }
.settings-desc { margin: -4px 12px 10px; font-size: 0.75rem; line-height: 1.6; color: var(--text-muted); }
.mobile-play-note { display: none; }

/* 页头两只按钮并成一枚胶囊，和玩法区的控件同一种语言；常态同色，指到或展开才点亮橙色 */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(12, 10, 8, .58);
  backdrop-filter: blur(12px);
}
html.light .header-actions { background: rgba(255, 255, 255, .62); }
.icon-control {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  transition: color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
button.icon-control { cursor: pointer; }
.icon-control:hover,
.icon-control[open] { color: var(--orange); background: var(--surface); }
.theme-glyph,
.settings-glyph { display: grid; place-items: center; width: 19px; height: 19px; }
.theme-glyph svg,
.settings-glyph svg { display: block; width: 100%; height: 100%; }
.theme-glyph svg { transform: none; }   /* 曾经上移 1px 做视觉补偿，会让两个图标差一像素 */
.site-settings { position: relative; }
.site-settings > summary {
  /* 绝对定位铺满父级：details 作为 grid 子项时 height:100% 会退化成内容高度，
     实测比旁边的主题键矮 9px（38×29 vs 38×38），图标因此高出一截 */
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  list-style: none;
  cursor: pointer;
}
.site-settings > summary::-webkit-details-marker { display: none; }
.settings-glyph { display: grid; place-items: center; width: 20px; height: 20px; }
.settings-glyph svg { display: block; width: 100%; height: 100%; }

@media (max-width: 430px) {
  .logo { font-size: 0.9375rem; }
}

@media (max-width: 860px) {
  .nav-right { gap: 10px; }
  .hero { padding-bottom: 52px; }
  .hero-grid { gap: 20px; }
  .fruit-help { font-size: 0.75rem; line-height: 1.7; }
  #how.section { padding-top: 48px; padding-bottom: 56px; }
  #how .how-grid, #how .how-stage, #how .how-bottom, #how .how-summary { display: none; }
  #how .how-top { display: block; }
  #how .section-heading { font-size: 1.75rem; }
  #how .section-heading br { display: none; }
  .mobile-play-guide { display: grid; gap: 0; margin-top: 24px; }
  .mobile-play-guide article { border-top: 1px solid var(--line); padding: 18px 0; }
  .mobile-play-guide h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 500; }
  .mobile-play-guide p { margin: 0; color: var(--text-soft); font-size: 0.875rem; line-height: 1.8; }
  .mobile-play-note { display: block; margin: 8px 0 0; color: var(--text-muted); font-size: 0.75rem; line-height: 1.7; }
  .keyboard-help { display: block; font-size: 0.75rem; color: var(--text-soft); }
  .keyboard-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
  .keyboard-help p { line-height: 1.8; }
  /* 触控目标：小屏上可点元素至少 44 像素（2026-09-29 体检后补） */
  .logo,
  .footer-links a,
  .footer-icp a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .header-actions .icon-control,
  .header-actions .icon-control > summary { width: 44px; height: 44px; min-height: 44px; }
  #projects { padding-top: 28px; padding-bottom: 44px; }
  #projects .section-intro { display: block; margin-bottom: 18px; }
  #projects .section-kicker { margin-bottom: 10px; }
  #projects .section-heading { font-size: clamp(26px, 6.8vw, 32px); line-height: 1.3; }
  .project-title-break { display: none; }
  #projects .section-summary { margin-top: 10px; font-size: 0.8125rem; }
  .project-index { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
  .project-choice { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 2px; font-size: 0.75rem; line-height: 1.5; overflow-wrap: anywhere; }
  .seg-wrap { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
  .seg-stage { width: 100%; height: clamp(220px, 65vw, 280px); min-height: 0; }
  .seg-info { width: 100%; min-height: 0; padding: 20px; }
  .seg-name { font-size: 1.5rem; margin-top: 10px; }
  .seg-desc { font-size: 0.875rem; min-height: 0; margin-bottom: 12px; }
  .seg-tags { margin-bottom: 8px; }
  .seg-link { min-height: 44px; }
  .about-stage { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .hud { font-size: var(--fs-xs); }
  .stage-caption { font-size: var(--fs-xs); letter-spacing: .08em; }
}
@media (max-width: 860px) and (max-height: 500px) {
  .seg-stage { height: 180px; }
  .hero-stage { aspect-ratio: 1.3; }
}

/* 移动端竖屏：文字收紧，橙子与操作进入一个视口；运动仍由全视口物理边界负责。 */
@media (max-width: 860px) and (orientation: portrait) {
  html, body { overflow-x: hidden; overflow-x: clip; }
  .hero {
    min-height: 100svh;
    padding: 88px var(--gutter) 22px;
    overflow: visible;
  }
  .hero-grid {
    display: grid;
    grid-template-rows: auto minmax(240px,1fr);
    align-items: stretch;
    gap: 12px;
    min-height: calc(100svh - 110px);
    width: 100%;
    max-width: none;
  }
  .hero-copy { max-width: none; }
  .hero .eyebrow { margin-bottom: 12px; }
  .hero-lede { margin-top: 12px; line-height: 1.65; }
  .hero-actions { margin-top: 18px; }
  .hero-playground {
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin-top: 0;
    padding: 0 0 112px;
  }
  .hero-stage {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 220px;
    aspect-ratio: auto;
    border-radius: 0;
    margin: 0 auto;
  }
  .stage-orbit {
    inset: auto;
    left: 50%;
    top: 50%;
    width: min(92vw, 560px);
    height: min(92vw, 560px);
    transform: translate(-50%, -50%) rotate(-22deg);
  }
  .hero-stage-caption { bottom: 14px; }
  .fruit-controls {
    position: absolute;
    left: 50%;
    bottom: max(68px, calc(env(safe-area-inset-bottom) + 54px));
    transform: translateX(-50%);
    margin: 0;
    z-index: 3;
  }
  .fruit-controls button {
    padding-inline: 8px;
    gap: 4px;
    font-size: var(--fs-xs);
    white-space: nowrap;
  }
  .fruit-controls button span { font-size: 0.875rem; }
  .fruit-help {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px));
    margin: 0;
    text-align: center;
    z-index: 3;
  }
  .hero-bottom { display: none; }
  .mobile-play-guide { margin-top: 18px; }
  .mobile-play-guide article { padding: 12px 0; }
  .mobile-play-guide h3 { margin-bottom: 4px; }
  .mobile-play-note { margin-top: 6px; }
}

/* ---------- 门橙锚点：页脚右上区，三维门橙的落位与提示 ---------- */
@media (min-width: 600px) and (max-width: 860px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 100svh; padding: 88px var(--gutter) 16px; }
  .hero .eyebrow { margin-bottom: 12px; }
  .hero h1 { font-size: 30px; }
  .hero-lede { margin-top: 12px; }
  .hero-stage { height: max(180px, calc(100svh - 170px)); aspect-ratio: auto; }
  .hero-playground .fruit-help { display: none; }
}
.gate-anchor {
  position: absolute;
  top: clamp(40px, 8vh, 100px);
  right: clamp(20px, 7vw, 90px);
  width: clamp(150px, 21vw, 250px);
  aspect-ratio: 1;
  pointer-events: none;
}
.gate-hint {
  position: absolute;
  left: 50%;
  bottom: -6px;
  /* 提示做成小胶囊：它会落在页脚底色上，不再压在橙球上，两套主题都能读清楚 */
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-bg);
  white-space: nowrap;
  font-family: var(--label);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  color: var(--text);
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.gate-anchor.is-lit .gate-hint { opacity: 1; transform: translate(-50%, 0); }
/* 中小屏：种子挪到页脚顶部居中，独占一行，不再压住 EVERY COPY 那行大字 */
@media (max-width: 860px) {
  .gate-anchor {
    left: 50%;
    right: auto;
    top: 0;
    transform: translateX(-50%);
    width: min(30vw, 132px);
    min-width: 92px;
  }
  .panel--footer { padding-top: 148px; }
  .gate-hint { bottom: -10px; }
}

/* ---------- 滚动中的让位：整屏混合层与毛玻璃都停下，手机上才跟得上手指 ---------- */
@media (hover: none) {
  html.is-scrolling .space-noise,
  html.light.is-scrolling .space-noise {
    mix-blend-mode: normal;
    opacity: .02;
  }
  html.is-scrolling .site-header {
    backdrop-filter: none;
    background: rgba(8, 6, 5, .9);
    transition: background var(--dur-1) var(--ease-out);
  }
  html.light.is-scrolling .site-header { background: rgba(250, 246, 239, .94); }
  html.is-scrolling .header-actions,
  html.is-scrolling .fruit-controls,
  html.is-scrolling .seg-info { backdrop-filter: none; }
}

/* iOS 上整屏混合与页头毛玻璃是滚动最贵的两项，这里换成等价观感的实底 */
@supports (-webkit-touch-callout: none) {
  .space-noise,
  html.light .space-noise { mix-blend-mode: normal; }
  .space-noise { opacity: .03; }
  html.light .space-noise { opacity: .035; }
  .site-header { backdrop-filter: none; background: rgba(8, 6, 5, .88); }
  html.light .site-header { background: rgba(250, 246, 239, .93); }
  .header-actions,
  .fruit-controls,
  .seg-info { backdrop-filter: none; }
  .header-actions { background: rgba(12, 10, 8, .72); }
  html.light .header-actions { background: rgba(255, 255, 255, .74); }
}

/* ---------- 精简画质：老机器在设置里亲手关掉噪点与毛玻璃 ---------- */
html.lite .space-noise,
html.light.lite .space-noise {
  mix-blend-mode: normal;
  opacity: .02;
}
html.lite .site-header {
  backdrop-filter: none;
  background: rgba(8, 6, 5, .9);
}
html.light.lite .site-header { background: rgba(250, 246, 239, .94); }
html.lite .header-actions,
html.lite .fruit-controls,
html.lite .seg-info { backdrop-filter: none; }
html.lite .header-actions { background: rgba(12, 10, 8, .72); }
html.light.lite .header-actions { background: rgba(255, 255, 255, .74); }

/* ---------- 按下即反馈：全站此前零个 :active，手机上点下去完全没有回声 ---------- */
@media (hover: hover) {
  :where(.hero-cta, .card-btn, .icon-control, .project-choice, .fruit-controls button, .seg-link, .footer-links a, .settings-action, .cat-tab):active {
    transform: scale(.97);
  }
}

/* ---------- 刘海屏：页头也得吃安全区，否则横屏时 logo 与图标顶到切口里 ---------- */
.site-header {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
@media (max-width: 600px) {
  .site-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* 开场 3 秒还没就绪：跳过按钮点亮，别让人对着灰按钮干等 */
#intro.slow .intro-skip {
  color: var(--text);
  border-color: color-mix(in srgb, var(--orange) 55%, transparent);
  background: color-mix(in srgb, var(--orange) 12%, transparent);
}

/* 作品预览与橙瓣共用选择状态，图片预留比例，切换时版面保持稳定。 */
.project-preview { margin: 0 0 20px; }
.project-preview img, .card-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.project-preview figcaption { margin-top: 8px; color: var(--text-muted); font-size: var(--fs-xs); }
.card-preview { margin-bottom: 20px; }
.seg-index { display: none; }
.seg-tag.web { display: none; }
@media (max-width: 640px) {
  .project-preview { margin-bottom: 16px; }
}
