/* ============================================================
   styles.css — Grok Bot 头像解剖
   深色文档风：背景近黑 #0c0c10；demo 舞台用浅色纸面卡片 #f9f9f9
   ============================================================ */

:root {
  --bg: #0c0c10;
  --bg-soft: #131318;
  --paper: #f9f9f9;
  --ink: #0a0a0c;
  --text: #e8e8ee;
  --text-dim: #9a9aa8;
  --accent: #2e6bff;
  --accent-bright: #5b8cff;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); font-size: 0.86em; }

/* ---------- 顶部导航 ---------- */
.topnav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 28px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #22222c;
}
.brand { font-weight: 700; letter-spacing: 0.02em; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; margin-left: 18px; font-size: 14px;
}
.nav-links a:hover { color: var(--accent-bright); }

/* ---------- Hero ---------- */
.hero { padding: 90px 28px 70px; }
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.kicker {
  color: var(--accent-bright); font-size: 14px; letter-spacing: 0.04em; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.18; font-weight: 800; letter-spacing: 0.01em;
}
.lede { color: var(--text-dim); margin-top: 22px; max-width: 34em; }
.badges { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.badge {
  font-family: var(--mono); font-size: 13px;
  border: 1px solid #2a2a38; border-radius: 999px;
  padding: 7px 16px; color: var(--text-dim); background: var(--bg-soft);
}
.badge b { color: var(--accent-bright); font-size: 16px; margin-right: 4px; }

.hero-stage-wrap { text-align: center; }
.stage-caption { color: var(--text-dim); font-size: 13px; margin-top: 14px; }

/* ---------- 纸面 demo 卡片 ---------- */
.paper {
  background: var(--paper);
  border-radius: 18px;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px #23232e;
}
.hero-stage.paper {
  width: min(300px, 70vw); aspect-ratio: 1; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}

.demo { padding: 22px; }
.demo .stage {
  width: min(240px, 60vw); aspect-ratio: 1; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 版块布局 ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.section {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px;
  padding: 90px 0; border-top: 1px solid #1c1c26;
  align-items: start;
}
.section:last-of-type { grid-template-columns: 1fr; }
.sec-no {
  font-family: var(--mono); color: var(--accent); font-size: 14px; margin-bottom: 10px;
}
.section h2 { font-size: 30px; font-weight: 800; margin-bottom: 18px; letter-spacing: 0.01em; }
.section p { color: var(--text-dim); margin-bottom: 14px; }
.section p strong, .section li strong { color: var(--text); font-weight: 600; }
/* 浅色纸面卡片里的 strong 不能用亮字色，否则白上写白（决策向导踩过这个坑） */
.section .paper p strong, .section .paper li strong { color: var(--ink); }
code {
  font-family: var(--mono); font-size: 0.86em;
  background: #1b1b24; border: 1px solid #26263a;
  padding: 1px 6px; border-radius: 6px; color: #b9c6ff;
}
pre.code {
  font-family: var(--mono); font-size: 14px;
  background: var(--bg-soft); border: 1px solid #23232f;
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 16px 18px; margin: 16px 0;
  color: #cdd7ff; overflow-x: auto;
}

/* 滚动进场 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.inview { opacity: 1; transform: none; }

/* ---------- 控件 ---------- */
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.controls.col { flex-direction: column; align-items: stretch; gap: 12px; }
.ctl-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.controls button, .wizard button {
  font-family: var(--sans); font-size: 13px; cursor: pointer;
  border: 1px solid #d4d4dd; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 16px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.controls button:hover, .wizard button:hover { border-color: var(--accent); color: var(--accent); }
.controls button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.controls input[type="range"] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.controls input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.controls input[type="text"] {
  font-family: var(--mono); font-size: 13px; padding: 6px 10px; width: 130px;
  border: 1px solid #d4d4dd; border-radius: 8px; background: #fff; color: var(--ink);
}
.controls select {
  font-size: 13px; padding: 5px 8px; border: 1px solid #d4d4dd;
  border-radius: 8px; background: #fff; color: var(--ink);
}
.controls label { font-size: 14px; color: #333; display: inline-flex; gap: 8px; align-items: center; }
.hint { font-size: 13px; color: #777; margin-top: 8px; }

/* ---------- 第 1 节：属性面板 ---------- */
.svg-demo .panel {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  background: #101014; border-radius: 12px; padding: 14px 16px; margin-top: 16px;
  overflow: hidden;
}
.panel-row { display: flex; gap: 12px; padding: 3px 6px; border-radius: 6px; white-space: nowrap; }
.panel-row .k { color: #6a6a80; flex-shrink: 0; width: 128px; }
.panel-row .v { color: #9fe8b1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.panel-row.flash { animation: flash 0.6s ease-out; }
@keyframes flash {
  0% { background: rgba(46, 107, 255, 0.45); }
  100% { background: transparent; }
}
.svg-demo svg [diff-hot] { stroke: var(--accent); stroke-width: 2; }

/* ---------- 第 2 节：morph ---------- */
.morph-canvas { width: 100%; display: block; }
.morph-canvas .rays line { stroke: #b9c6ff; stroke-width: 0.6; }
.morph-canvas .hits circle { fill: var(--accent); }
.morph-canvas .shape { fill: var(--ink); }
.morph-label { text-align: center; color: #555; margin-top: 6px; }
.tick-row { display: flex; justify-content: space-between; color: #999; font-size: 12px; padding: 0 2px; }

/* ---------- 第 3 节：弹簧 ---------- */
.spring-flex { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.ball-stage { width: 100%; background: #fff; border-radius: 12px; border: 1px solid #e4e4ea; }
.ball-stage circle { fill: var(--ink); }
.ball-stage .target-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.graph-stage { width: 100%; background: #fff; border-radius: 12px; border: 1px solid #e4e4ea; }
.graph-stage .axis { stroke: #d0d0da; stroke-width: 1; }
.graph-stage .axis.dashed { stroke-dasharray: 4 4; }
.spring-curve { fill: none; stroke: var(--accent); stroke-width: 2; }
.ease-curve { fill: none; stroke: #c46; stroke-width: 1.5; stroke-dasharray: 6 4; display: none; }

/* ---------- 第 4 节：球面 ---------- */
.sphere-canvas { width: 100%; display: block; cursor: grab; touch-action: none; }
.sphere-canvas:active { cursor: grabbing; }
.sphere-outline { fill: #fff; stroke: #d8d8e2; stroke-width: 1.5; }
.sphere-canvas .wire ellipse { fill: none; stroke: #d8d8e2; stroke-width: 1; }
.sphere-canvas .eye { fill: var(--ink); }
.width-ratio { margin-top: 10px; color: #555; text-align: center; }

/* ---------- 第 5 节：眨眼时刻表 ---------- */
.blink-timeline { width: 100%; display: block; margin-top: 14px; background: #fff; border: 1px solid #e4e4ea; border-radius: 12px; }
.blink-timeline .tick { stroke: #c8c8d4; stroke-width: 1; }
.blink-timeline .tick-label { fill: #999; font-size: 10px; font-family: var(--mono); text-anchor: middle; }
.blink-timeline .mark { fill: var(--accent); }
.blink-timeline .mark.double { fill: #ff8a3d; }
.blink-timeline .playhead { stroke: var(--ink); stroke-width: 1.5; }
.blink-count { color: #555; margin-top: 8px; }
.seed-hash { color: #999; margin-top: 6px; font-size: 12px; }

/* 第 5 节：真实 clip 眨眼时刻表（HTML 版） */
.clip-timelines { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.clip-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: center; }
.clip-name { color: #555; font-size: 12px; }
.clip-track {
  position: relative; height: 22px;
  background: #fff; border: 1px solid #e4e4ea; border-radius: 6px;
}
.blink-mark {
  position: absolute; top: 4px; bottom: 4px; min-width: 3px;
  background: var(--accent); border-radius: 2px; transform: translateX(-50%);
}
.blink-mark.double { background: #ff8a3d; }

/* ---------- 第 3 节：clip 贝塞尔 ---------- */
.bez-canvas {
  width: 100%; display: block; touch-action: none;
  background: #fff; border: 1px solid #e4e4ea; border-radius: 12px;
}
.bez-canvas .grid { stroke: #d8d8e2; stroke-width: 1; }
.bez-canvas .grid.out { stroke-dasharray: 4 4; }
.bez-canvas text { font-family: var(--mono); font-size: 10px; fill: #999; }
.bez-canvas .zone-label { fill: #b8b8c6; }
.bez-curve { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.bez-canvas .handle-line { stroke: #b9c6ff; stroke-width: 1.2; }
.bez-canvas .handle { fill: #fff; stroke: var(--accent); stroke-width: 2; cursor: grab; }
.bez-canvas .handle:active { cursor: grabbing; }
.bez-canvas .anchor { fill: var(--ink); }
.bez-canvas .sweep-dot { fill: var(--ink); }
.bez-canvas .sweep-guide { stroke: #d0d0da; stroke-width: 1; stroke-dasharray: 3 3; }
.bez-readout { color: #555; font-size: 12px; }

.clip-live { margin-top: 18px; }
.clip-live-head { display: flex; gap: 16px; align-items: center; }
.clip-live .clip-stage { width: 110px; flex-shrink: 0; }
.clip-live-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clip-live-name { color: #333; font-size: 12.5px; margin: 0; }
.clip-curve {
  width: 100%; display: block; margin-top: 10px;
  background: #fff; border: 1px solid #e4e4ea; border-radius: 12px;
}
.clip-curve .clip-track-curve { fill: none; stroke: var(--accent); stroke-width: 2; }
.clip-curve .kf-diamond { fill: var(--ink); cursor: help; }
.clip-curve .clip-playhead { stroke: var(--ink); stroke-width: 1.5; }
.clip-curve .clip-playdot { fill: var(--ink); }
.clip-curve text { font-family: var(--mono); font-size: 10px; fill: #999; }
.clip-curve .empty-label { fill: #aaa; font-size: 12px; }

/* ---------- 第 5 节：弹簧分工 ---------- */
.spr-graphs { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.spr-row { }
.spr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.spr-label { font-size: 12.5px; color: #333; }
.spr-label::before {
  content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  background: var(--lane); margin-right: 7px;
}
.spr-val { color: #555; font-size: 12px; }
.spr-graph {
  width: 100%; display: block;
  background: #fff; border: 1px solid #e4e4ea; border-radius: 10px;
}
.spr-graph .spr-axis { stroke: #e2e2ea; stroke-width: 1; }
.spr-graph .spr-target { stroke: #c0c0ce; stroke-width: 1; stroke-dasharray: 5 4; }
.spr-graph .spr-line { fill: none; stroke-width: 2; }
.spr-graph .spr-mark { stroke: #ff8a3d; stroke-width: 1.2; }
.spr-graph .spr-mark-label { font-family: var(--mono); font-size: 9.5px; fill: #ff8a3d; }

/* ---------- 第 8 节：切换解剖时间线 ---------- */
.switch-lab { margin-top: 18px; }
.switch-title { color: #333; font-size: 13px; margin-bottom: 8px; }
.switch-tl {
  width: 100%; display: block;
  background: #fff; border: 1px solid #e4e4ea; border-radius: 12px;
}
.switch-tl .sw-label { font-family: var(--mono); font-size: 11px; fill: #333; }
.switch-tl .sw-note { font-family: var(--mono); font-size: 9.5px; fill: #999; }
.switch-tl .sw-track { fill: #f0f0f5; }
.switch-tl .sw-tick { stroke: #e2e2ea; stroke-width: 1; }

/* grok-player 渲染的 svg（width/height 由内联属性给定） */
.hero-stage svg, .demo .stage svg { max-width: 100%; height: auto; }

/* 第 6 节：状态按钮 */
.state-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.state-buttons button { padding: 6px 4px; font-family: var(--mono); font-size: 12px; }

/* ---------- 第 6 节：状态机 ---------- */
.clip-now { color: #333; margin-top: 14px; }
.clip-pool { color: #777; }

/* ---------- 第 7 节：状态陈列馆 ---------- */
.gallery-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.gallery-tabs button {
  font-family: var(--sans); font-size: 13px; cursor: pointer;
  border: 1px solid #d4d4dd; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 6px 14px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.gallery-tabs button:hover { border-color: var(--accent); color: var(--accent); }
.gallery-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.g-card {
  border: 1px solid #e4e4ea; border-radius: 12px; padding: 12px 10px 10px;
  text-align: center; cursor: pointer; background: #fff;
  transition: border-color 0.15s, transform 0.15s;
}
.g-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.g-card[hidden] { display: none; }
.g-stage { width: 96px; height: 96px; margin: 0 auto; }
.g-name { margin-top: 8px; font-size: 13px; color: var(--ink); }
.g-zh { margin-left: 6px; color: #888; font-family: var(--sans); font-size: 12px; }
.g-tags { margin-top: 4px; font-size: 11px; color: #999; min-height: 14px; font-family: var(--mono); }

/* ---------- 第 8 节：对比 ---------- */
.section .col-demo.wide { grid-column: 1 / -1; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid #e6e6ee; text-align: left; vertical-align: top; }
.cmp-table thead th { color: #333; font-size: 14px; }
.cmp-table thead small { color: #999; font-weight: 400; }
.cmp-table tbody th { color: #666; font-weight: 500; white-space: nowrap; }
.cmp-table td.good { background: #e8f6ec; color: #146c2e; }
.cmp-table td.mid { background: #fdf6e3; color: #8a6d1a; }
.cmp-table td.bad { background: #fdeaea; color: #a13232; }

.wizard { margin-top: 26px; border-top: 1px solid #e6e6ee; padding-top: 20px; }
.wizard h3 { color: var(--ink); margin-bottom: 12px; font-size: 17px; }
.wizard-step p { color: #333; margin-bottom: 12px; }
.wizard-step button { margin-right: 10px; }
.wizard-result .verdict {
  color: var(--ink); background: #eef3ff; border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; line-height: 1.7;
}

/* ---------- 结尾 ---------- */
.checklist { list-style: none; margin: 8px 0 18px; }
.checklist li { color: var(--text-dim); padding: 6px 0 6px 28px; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent-bright); font-weight: 700;
}
.footnote { font-size: 14px; border-top: 1px dashed #2a2a38; padding-top: 16px; }

.footer {
  text-align: center; color: #55556a; font-size: 13px;
  padding: 40px 20px 60px; border-top: 1px solid #1c1c26;
}
.footer a { color: var(--accent-bright); text-decoration: none; }

/* ---------- 动画编辑器（editor.html） ---------- */
.editor2 { max-width: 1440px; display: grid; gap: 22px; padding: 48px 28px; }
.ed2-top { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: stretch; }
/* 固定检查器高度 + 独立滚动：选中/取消选中时时间轴零位移，短内容不留大白块 */
.ed2-inspector { height: 580px; overflow-y: auto; }
.ed-stage { width: 280px; margin: 0 auto; }
.ed-transport { display: flex; gap: 10px 14px; align-items: center; margin-top: 14px; justify-content: center; flex-wrap: wrap; }
#ed-time { white-space: nowrap; flex-shrink: 0; }
.ed-transport label { white-space: nowrap; flex-shrink: 0; }
/* 走带 · 时间轴缩放控件 */
.ed-zoom { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.ed-zoom button {
  width: 26px; height: 26px; border: 1px solid #d4d4dd; background: #fff; color: var(--ink);
  border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.ed-zoom span { font-size: 12px; color: #666; min-width: 40px; text-align: center; }
/* 轻量 toast */
#ed-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px);
  display: flex; gap: 10px; align-items: center; z-index: 50;
  background: #1c1c26; color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
#ed-toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#ed-toast button {
  border: 1px solid #555; background: none; color: #9ec1ff; border-radius: 999px;
  padding: 2px 12px; cursor: pointer; font-size: 12.5px;
}
.ed-transport button {
  font-family: var(--sans); font-size: 13px; cursor: pointer; min-width: 84px;
  border: 1px solid #d4d4dd; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 16px;
}
.ed-transport button:hover { border-color: var(--accent); color: var(--accent); }
.ed-transport .mono { color: #555; font-size: 13px; }
.ed-transport label { font-size: 13px; color: #333; display: inline-flex; gap: 6px; align-items: center; }
.ed-h { color: var(--ink); font-size: 16px; margin: 14px 0 12px; }
.ed-h:first-child { margin-top: 0; }
.ed-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 8px; }
.ed-form label { font-size: 13px; color: #555; display: flex; flex-direction: column; gap: 4px; }
.ed-form input, .ed-form select {
  font-size: 13px; padding: 5px 8px; border: 1px solid #d4d4dd;
  border-radius: 8px; background: #fff; color: var(--ink);
}
.ed-form .ed-check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }

/* 时间轴 */
/* grid 子项默认 min-width:auto 会阻止内滚：必须显式 min-width:0，#ed-tl 才真正 overflow-x 滚动 */
.ed2-timeline { min-width: 0; }
.ed2-tl-scroll { position: relative; overflow-x: auto; padding-bottom: 4px; }
.ed2-tl-ruler { display: flex; height: 26px; user-select: none; cursor: ew-resize; }
.ed2-corner { flex-shrink: 0; }
.ed2-ruler-track { position: relative; flex-shrink: 0; border-bottom: 1px solid #e4e4ea; }
.ed2-ruler-track i {
  position: absolute; bottom: 0; width: 1px; height: 6px; background: #c8c8d4;
}
.ed2-ruler-track i.major { height: 11px; background: #9a9aac; }
.ed2-ruler-track b {
  position: absolute; top: 0; font-size: 10px; font-weight: 400; color: #999;
  font-family: var(--mono);
}
.ed2-lane { display: flex; height: 34px; align-items: stretch; }
.ed2-lane-label {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: #333; padding-right: 8px;
  position: sticky; left: 0; background: #fff; z-index: 2;
}
.ed2-lane-label i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.ed2-add {
  margin-left: auto; border: none; background: none; color: #aaa; font-size: 15px;
  cursor: pointer; padding: 0 2px; line-height: 1;
}
.ed2-add:hover { color: var(--accent); }
.ed2-lane-track {
  position: relative; flex-shrink: 0; cursor: copy;
  background: repeating-linear-gradient(90deg, transparent 0 calc(140px - 1px), #f0f0f5 calc(140px - 1px) 140px);
  border-bottom: 1px solid #f0f0f5;
}
.ed2-kf {
  position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  background: var(--kc, #2e6bff); transform: rotate(45deg); border-radius: 2.5px;
  cursor: ew-resize; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  z-index: 2;
}
/* 表情事件：圆形标记，与数值轨道的菱形区分 */
.ed2-kf.expr { transform: none; border-radius: 50%; }
.ed2-kf.sel { box-shadow: 0 0 0 2px var(--kc, #2e6bff); z-index: 2; }
/* workArea（rest 帧）高亮色带 */
.ed2-workarea {
  position: absolute; top: 26px; bottom: 0; z-index: 1; pointer-events: none;
  background: rgba(46,107,255,0.07); border-left: 1px solid rgba(46,107,255,0.35);
}
/* 框选矩形 */
.ed2-marquee {
  position: absolute; z-index: 4; pointer-events: none;
  border: 1px solid var(--accent, #2e6bff); background: rgba(46,107,255,0.10);
}
.ed2-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #e14a4a;
  pointer-events: none; z-index: 3;
}
.ed2-playhead::before {
  content: ""; position: absolute; top: 0; left: -5px;
  border: 6px solid transparent; border-top: 8px solid #e14a4a;
}

/* 检查器 · 贝塞尔缓动编辑器 */
.ed2-ease-row { display: flex; gap: 18px; align-items: flex-start; }
#ed-bezier {
  width: 200px; flex-shrink: 0; background: #fff; border: 1px solid #e4e4ea;
  border-radius: 10px; touch-action: none;
}
.bz-grid { stroke: #eee; stroke-width: 1; }
.bz-grid.dash { stroke-dasharray: 4 4; }
.bz-arm { stroke: #c8c8d4; stroke-width: 1; }
.bz-curve { stroke: var(--accent); stroke-width: 2; fill: none; }
.bz-handle { fill: #fff; stroke: var(--accent); stroke-width: 2; cursor: grab; }
.ed-ease-nums { display: flex; gap: 6px; margin-top: 8px; }
.ed-ease-nums input { width: 68px; font-size: 12px; padding: 3px 5px; border: 1px solid #d4d4dd; border-radius: 6px; }
.ed2-inspector select {
  font-size: 13px; padding: 5px 8px; border: 1px solid #d4d4dd; border-radius: 8px;
  background: #fff; color: var(--ink); max-width: 100%;
}
.ed-json {
  width: 100%; height: 200px; box-sizing: border-box; resize: vertical;
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  border: 1px solid #d4d4dd; border-radius: 10px; padding: 10px; color: var(--ink);
}
@media (max-width: 960px) { .ed2-top { grid-template-columns: 1fr; } }

/* ---------- 响应式：移动端上下布局 ---------- */
@media (max-width: 860px) {
  .hero-inner, .section { grid-template-columns: 1fr; }
  .hero { padding: 60px 20px 40px; }
  main { padding: 0 20px; }
  .section { padding: 60px 0; gap: 28px; }
  .nav-links { display: none; }
  .spring-flex { grid-template-columns: 1fr; }
  .cmp-table { font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 7px 8px; }
}
