/* ════════════════════════════════════════════════════════════════
   HSK Master · 门面落地页 · Linear 设计语言
   设计依据：项目根 DESIGN.md（awesome-design-md/linear.app 研究）+ 项目自身
   linear.css（apps/admin 已落地的 --ad-* tokens，亮色为主、暗色跟随系统）
   结构：05 · Workbench macrostructure（hallmark）——产品演示为主角
   纪律：lavender 稀缺使用 · hairline 分层 · 无渐变无阴影 · 负字距大标题 ·
         仅 transform/opacity 动画 · reduced-motion 兜底 · 无内联脚本（CSP）
   ════════════════════════════════════════════════════════════════ */

/* ---- 亮色 tokens（对齐 apps/admin linear.css 的 --ad-*）---- */
:root {
  --canvas: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f5f5f6;
  --surface-3: #ececee;
  --surface-4: #e4e4e7;
  --hairline: #e0e2e8;
  --hairline-strong: #d0d2d9;
  --ink: #18181b;
  --ink-muted: #3f3f46;
  --ink-subtle: #71717a;
  --ink-tertiary: #a1a1aa;
  --primary: #5e6ad2;
  --primary-hover: #4a55c4;
  --primary-focus: #535dc0;
  --on-primary: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  --font: Inter, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 300ms;
  --dur-slow: 600ms;
  --content: 1280px;
}

/* ---- 基础 ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  /* 背景：学生端同款水墨山水 + 宣纸薄纱（锁定亮色主题） */
  background:
    linear-gradient(rgba(250, 248, 243, 0.78), rgba(245, 242, 235, 0.82)),
    url("bg-ink-landscape.webp") center / cover no-repeat fixed;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--dur-slow) var(--ease);
}

.skip-link:focus-visible {
  top: 0;
}

/* ---- 眉题（Linear：13px / 500 / +0.4px 字距）---- */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

/* ---- 按钮（Linear button spec：8px 圆角，lavender 稀缺）---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  background: var(--primary-focus);
}

.btn-ghost {
  background: var(--surface-1);
  border-color: var(--hairline);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

/* ---- 顶栏（Linear top-nav：56px，canvas + hairline）---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}

.nav-links a {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

/* ═══════════════════════════════════════════
   Hero —— 左文右演示（不对称）
   ═══════════════════════════════════════════ */
.hero {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) clamp(16px, 4vw, 40px) clamp(48px, 8vh, 80px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  letter-spacing: -0.035em;
}

.accent {
  color: var(--primary);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-tertiary);
  letter-spacing: 0.02em;
}

/* ---- 演示面板（半透明毛玻璃：水墨山水透出）---- */
.demo-panel {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(245, 245, 246, 0.6);
}

.demo-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.demo-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.demo-body {
  padding: 20px;
}

.demo-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.demo-hint::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.9;
}

/* ── 玩法演示：基于真实游戏视觉的自动动画（画面取自真实对局，非可玩实体）── */

/* 消消乐棋盘：限制宽度居中，卡牌保持游戏内比例（不随面板撑大） */
.mode1-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 300px;
  margin: 0 auto;
}

/* 游戏卡片：精巧玉石牌（移植 GameScreen .card） */
.demo-body .card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 10px 6px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: default;
  background: #f5f0e6;
  color: #333333;
  box-shadow:
    0 4px 0 #d1ccc0,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.8);
  transform: translateY(0);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.2;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.25s ease,
    background 0.2s ease;
}

/* 底部阴影层：模拟玉石物理厚度 */
.demo-body .card::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: -2px;
  height: 5px;
  border-radius: 0 0 8px 8px;
  background: rgba(0, 0, 0, 0.03);
  pointer-events: none;
}

.demo-body .card .card-label {
  display: inline-block;
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
  pointer-events: none;
}

.demo-body .card .card-sub {
  font-size: clamp(0.5rem, 1vw, 0.66rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 3px;
  opacity: 0.4;
  white-space: nowrap;
  pointer-events: none;
}

/* 汉字卡：宣纸白 · 深墨字 */
.demo-body .card.hanzi {
  background: #faf6ee;
  color: #2c1810;
  font-family: "PingFang SC", "Microsoft YaHei", "SimSun", serif;
  box-shadow:
    0 4px 0 #d8d0c0,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.85);
}

.demo-body .card.hanzi .card-label {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

/* 拼音卡：浅青玉色 */
.demo-body .card.pinyin {
  background: #e8f0ed;
  color: #2a4a42;
  font-family: Georgia, "KaiTi", "STKaiti", serif;
  box-shadow:
    0 4px 0 #b8ccc4,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.65);
}

.demo-body .card.pinyin .card-label {
  font-size: clamp(0.95rem, 2.4vw, 1.5rem);
}

/* 英文卡：浅木色 */
.demo-body .card.english {
  background: #f0e8d8;
  color: #4a3a20;
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  box-shadow:
    0 4px 0 #c8bca0,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.65);
}

.demo-body .card.english .card-label {
  font-size: clamp(0.95rem, 2.4vw, 1.5rem);
}

/* 选中态：浮起描金 */
.demo-body .card.selected {
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 15px 25px rgba(0, 0, 0, 0.15),
    0 0 0 2px rgba(212, 175, 55, 0.8),
    0 0 15px rgba(212, 175, 55, 0.4);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
}

/* 已消除：取消入场动画的 forwards 填充，opacity 才能真正归零 */
.demo-body .card.removed {
  animation: none;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

/* 入场：物理下落 + 错落延迟 */
.demo-body .card.entering {
  animation: demo-drop-in 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: calc(var(--deal-index, 0) * 0.05s);
  opacity: 0;
}

@keyframes demo-drop-in {
  0% {
    transform: translateY(-80px) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateY(10px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.m1-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 300px;
  width: 100%;
  margin: 12px auto 0;
  font-size: 13px;
  color: var(--ink-subtle);
}

.m1-status strong {
  font-weight: 600;
  color: var(--ink-muted);
}

.m1-done {
  color: var(--success);
  font-weight: 600;
}

/* ── 模式二 · 句子连连看动画：温润玉牌 + 流式托盘 + 词元合成（移植 GameScreen）── */
.m2-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 62px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

.m2-tray.is-correct {
  border-color: rgba(128, 203, 196, 0.8);
  background: rgba(232, 245, 233, 0.4);
}

/* 合并中：旧卡淡出缩小（让位给组合卡） */
.demo-merging {
  opacity: 0;
  transform: scale(0.7);
}

/* 合并组合卡弹入 */
@keyframes demo-merge-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 飞行落点占位（隐形，只撑出目标尺寸） */
.demo-fly-target {
  width: 54px;
  height: 46px;
  visibility: hidden;
}

.linkup-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  font-family: "KaiTi", "STKaiti", "SimSun", "FangSong", serif;
  background: #f5f0e6;
  color: #333333;
  box-shadow:
    0 4px 0 #d1ccc0,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.8);
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: 0.04em;
}

/* 托盘内的词元：小卡尺寸（合成后由 tray-merged 变宽） */
.m2-tray .linkup-card {
  padding: 6px 12px;
}

/* 合并组合卡：青玉渐变（移植 GameScreen .tray-merged） */
.linkup-card.tray-merged {
  white-space: nowrap;
  padding: 6px 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f0f7ee 50%, #e2efe3 100%);
  border-color: rgba(128, 203, 196, 0.45);
  box-shadow:
    0 4px 0 rgba(128, 203, 196, 0.35),
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 12px rgba(255, 255, 255, 0.9);
}

/* 词库里的词元：内容宽度（否则会占满整行） */
.m2-pool .linkup-card {
  width: auto;
  min-width: 52px;
  padding: 8px 14px;
}

/* 词库：nth-child 微旋转装饰（同真实对局） */
.m2-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 54px;
}

.m2-pool .bank-card:nth-child(3n + 1) {
  transform: rotate(-1.5deg);
}

.m2-pool .bank-card:nth-child(3n + 2) {
  transform: rotate(1deg);
}

.m2-pool .bank-card:nth-child(3n + 3) {
  transform: rotate(-0.5deg);
}

.m2-pool .bank-card {
  cursor: default;
  transition: opacity 0.3s ease;
}

.m2-pool .bank-card.demo-used {
  opacity: 0;
  pointer-events: none;
}

/* 句槽卡：微暖宣纸白 */
.linkup-card.tray-card {
  background: #faf6ee;
  color: #2c1810;
  box-shadow:
    0 4px 0 #d8d0c0,
    0 5px 10px rgba(0, 0, 0, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.85);
  animation: demo-token-in 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes demo-token-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 词元飞行克隆：以目标槽尺寸渲染（布局位置=槽位），transform 只负责起点偏移归零 */
.demo-fly-clone {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  margin: 0;
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.m2-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.m2-status strong {
  font-weight: 600;
  color: var(--ink-muted);
}

.m2-done {
  color: var(--success);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   区块通用（Linear：canvas 大留白 + hairline 分隔）
   ═══════════════════════════════════════════ */
.section {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(64px, 10vh, 104px) clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--hairline);
}

.section-head {
  margin-bottom: clamp(28px, 5vh, 48px);
}

.section-head.left .eyebrow {
  margin-bottom: 10px;
  display: block;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
}

.section-desc {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-subtle);
  max-width: 60ch;
}

/* 滚动渐显已移除：内容恒可见（可靠性优先——快速滚动/截图/IO 时机偏差
   都曾导致下方区块整片空白，门面不允许这种不确定性） */

/* ── Workbench 演示帧 ── */
.frame {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.frame--right {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.frame--right > .frame-caption {
  order: -1;
}

.frame + .frame {
  margin-top: clamp(40px, 7vh, 72px);
}

.frame-caption {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frame-caption p:first-child {
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.frame-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-tertiary);
}

/* 模式三插槽（未开放） */
.frame--coming .demo-body--empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px 24px;
  text-align: left;
  color: var(--ink-subtle);
  font-size: 14px;
}

/* ── 三端入口（changelog-row 风格）── */
.entry-list {
  border-top: 1px solid var(--hairline);
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--dur) var(--ease);
}

.entry-row:hover {
  background: var(--surface-2);
}

.entry-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.entry-desc {
  margin-top: 3px;
  font-size: 14px;
  color: var(--ink-subtle);
}

.entry-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-tertiary);
}

.entry-arrow {
  font-size: 16px;
  color: var(--ink-subtle);
  transition:
    transform var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.entry-row:hover .entry-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ── 项目细节 ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-card {
  padding: 22px 24px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.detail-card:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

.detail-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.detail-text {
  font-size: 14px;
  color: var(--ink-subtle);
  line-height: 1.6;
}

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
}

.tech-dot {
  color: var(--ink-tertiary);
}

/* ── 数字一览（Linear stat bar：大数字负字距 + mono 注脚）── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 28px);
}

.stat {
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.stat-num {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.stat-label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.stat-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-subtle);
  line-height: 1.5;
}

/* ── 更多玩法卡（模式三/四：已上线的真实玩法介绍）── */
.more-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.more-mode-card {
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
}

.more-mode-card .demo-head {
  background: var(--surface-2);
}

.more-mode-desc {
  padding: 18px 20px 20px;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ── CTA banner（Linear cta-banner：surface-1 + headline）── */
.cta-banner {
  border-top: 1px solid var(--hairline);
}

.cta-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 96px) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.cta-inner h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

.cta-inner p {
  font-size: 15px;
  color: var(--ink-subtle);
  margin-bottom: 6px;
}

/* ── 底部粘性 CTA（Workbench：三个演示后出现）── */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 140%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: transform 0.5s var(--ease);
}

.sticky-cta.is-visible {
  transform: translate(-50%, 0);
}

/* ═══════════════════════════════════════════
   落款 Footer（Linear footer：canvas + hairline）
   ═══════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(40px, 6vh, 56px) clamp(16px, 4vw, 40px) 36px;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  min-width: 200px;
}

.footer-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.footer-slogan {
  font-size: 13px;
  color: var(--ink-subtle);
}

.footer-links {
  display: flex;
  gap: 20px;
  padding-top: 4px;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color var(--dur) var(--ease);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-meta {
  max-width: var(--content);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-tertiary);
}

/* ═══════════════════════════════════════════
   响应式
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 640px;
  }

  .frame,
  .frame--right {
    grid-template-columns: 1fr;
  }

  .frame--right > .frame-caption {
    order: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .entry-meta {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .more-modes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-actions .btn-ghost {
    display: none;
  }

  .m1-card {
    min-height: 56px;
    font-size: 13px;
  }

  .m1-card--hanzi {
    font-size: 22px;
  }

  .sticky-cta {
    max-width: calc(100vw - 24px);
  }
}

/* ---- 动效偏好：关闭非必要动画 ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .m1-card,
  .m2-tray,
  .m2-token,
  .entry-arrow,
  .btn,
  .sticky-cta {
    transition: none;
  }

  .m1-card.is-wrong,
  .m2-tray.is-wrong {
    animation: none;
  }
}
