/**
 * [INPUT]: 依赖 assets/*-ui.webp 真实截图（prepare-shots.py 产出的像素即坐标系）、index.html 的舞台 DOM、demos.js 写入的 data-step / .on / --p
 * [OUTPUT]: 对外提供暗底舞台、截图自适应、像素坐标叠层（.o）、聚光圈、推镜、注解气泡与四款工具的分步视觉状态
 * [POS]: site/ 的演示视觉层；截图保证界面真实，叠层只做两件事——「仿真 App 状态变化」与「旁白注解」
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 *
 * 坐标约定：.shot 声明 --W/--H（截图像素），子元素 .o 用 --x/--y/--w/--h 写截图像素，
 *           字号 --fs 也写截图像素；容器查询单位 cqw 让叠层与截图同比缩放。
 */

/* ════════ 舞台 ════════ */

.stage {
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(12px, 4.5cqmin, 32px);
  position: relative;
  /* 高度取「视口减去舞台外的标题/标签/步骤」与「栏宽 × 比例」中较小者：
     高窗口里舞台跟着长大，宽窗口里不被拉成扁条；两个变量由 page.css 按屏幕档位给出 */
  height: clamp(320px, min(100svh - var(--chrome, 376px), var(--stage-ratio, .78) * 100cqw), 1000px);
  overflow: hidden;
  container-type: size;
  isolation: isolate;
  background: var(--zzm-dark-card, #131316);
  border-radius: var(--zzm-r-4, 16px);
}

@media (max-width: 1023px) {
  .stage { height: auto; aspect-ratio: 4 / 3; }
}

.shot {
  --pad: clamp(16px, 5cqmin, 36px);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(100cqw - 2 * var(--pad), (100cqh - 2 * var(--pad)) * var(--W) / var(--H));
  aspect-ratio: var(--W) / var(--H);
  container-type: inline-size;
  translate: -50% -50%;
  transform: scale(var(--cam, 1));
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  transition: transform 1s var(--ease), transform-origin 1s var(--ease), opacity .3s ease, scale .3s var(--ease);
}

.shot-img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

/* 截图像素 → 百分比 / 容器单位 */
.o {
  position: absolute;
  left: calc(var(--x) / var(--W) * 100%);
  top: calc(var(--y) / var(--H) * 100%);
  width: calc(var(--w) / var(--W) * 100%);
  height: calc(var(--h) / var(--H) * 100%);
  font-size: calc(var(--fs, 12) / var(--W) * 100cqw);
  pointer-events: none;
}

/* 时间轴元素：未到点时隐身；data-mode 的元素自行解释 .on */
[data-on]:not([data-mode]),
[data-off]:not([data-mode]) {
  transition: opacity .28s ease, transform .4s var(--ease), translate .4s var(--ease);
}

[data-on]:not([data-mode]):not(.on),
[data-off]:not([data-mode]):not(.on) {
  opacity: 0;
  transform: translateY(var(--rise, 0px)) scale(var(--pop, 1));
}

/* ── 聚光圈：圈外压暗，视线跟着它走 ── */

.ring {
  z-index: 3;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: calc(var(--ring-r, 10) / var(--W) * 100cqw);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4);
  opacity: var(--ring-o, 1);
  transition: left .75s var(--ease), top .75s var(--ease), width .75s var(--ease), height .75s var(--ease), opacity .3s ease;
}

/* ── 仿真 App 状态：同色底块盖住原像素，再写新值 ── */

.app-cover {
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--cover, #171717);
  font-family: var(--zzm-font);
  line-height: 1.2;
}

/* ── 旁白注解：纸面白底，舞台上最亮的东西 ── */

.note {
  --rise: 6px;
  z-index: 5;
  width: auto;
  max-width: calc(var(--w, 420) / var(--W) * 100%);
  height: auto;
  padding: .5em .75em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25em .6em;
  color: var(--zzm-ink, #161616);
  background: #FFFFFF;
  border-radius: max(8px, calc(12 / var(--W) * 100cqw));
  font-size: max(12px, calc(var(--nfs, 15) / var(--W) * 100cqw));
  line-height: 1.45;
}

.note > span {
  min-width: 0;
  flex: 1 1 10em;
}

.note-who {
  padding: .1em .55em;
  color: #FFFFFF;
  background: var(--zzm-ink-strong, #1D1D1B);
  border-radius: 999px;
  font-size: .8em;
  font-weight: 600;
  white-space: nowrap;
}

.note--muted {
  color: rgba(255, 255, 255, .78);
  background: #2A2A2E;
}

.note--muted .note-who {
  color: #2A2A2E;
  background: rgba(255, 255, 255, .78);
}

.note-stamp {
  --pop: .9;
  padding: .15em .6em;
  color: var(--zzm-ink, #161616);
  background: #FFFFFF;
  border-radius: 999px;
  font-size: .82em;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

/* 被声纹门拦下的话：划掉 */
.note--muted:has(.note-stamp.on) > span {
  opacity: .55;
  text-decoration: line-through;
}

.note--file {
  right: calc((var(--W) - var(--rx)) / var(--W) * 100%);
  left: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-family: var(--zzm-mono);
  font-size: max(11px, calc(13 / var(--W) * 100cqw));
}

.ico-file {
  width: .8em;
  height: 1em;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.wave {
  height: 1em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.wave i {
  width: 2px;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
  opacity: .55;
  animation: wave .9s ease-in-out infinite;
}

.wave i:nth-child(2) { animation-delay: -.2s; }
.wave i:nth-child(3) { animation-delay: -.45s; }
.wave i:nth-child(4) { animation-delay: -.1s; }
.wave i:nth-child(5) { animation-delay: -.6s; }

.toast {
  --rise: 8px;
  position: absolute;
  bottom: max(16px, 5cqh);
  left: 50%;
  z-index: 6;
  max-width: calc(100% - 32px);
  padding: 8px 16px;
  overflow: hidden;
  color: var(--zzm-ink, #161616);
  background: #FFFFFF;
  border-radius: 999px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  translate: -50% 0;
}

.stage--jot .toast {
  color: #FFFFFF;
  background: var(--zzm-ink-strong, #1D1D1B);
}

/* ── 暂停键（WCAG 2.2.2：自动播放超过 5 秒须可暂停）── */

.stage-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 7;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #FFFFFF;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--zzm-r-2, 8px);
  cursor: pointer;
  opacity: .72;
  transition: opacity .16s ease, background-color .16s ease;
}

.stage-toggle:hover,
.stage-toggle:focus-visible { opacity: 1; background: rgba(255, 255, 255, .18); }
.stage-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .28); }

.stage-toggle::before {
  width: 8px;
  height: 10px;
  content: "";
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.stage-toggle[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  border-right: 0;
}

.stage-toggle[hidden] { display: none; }

/* ════════ 言壤 VoxTerra ════════ */

.stage--vox .shot { --ring-r: 14; }
.stage--vox[data-step="0"] .ring { --x: 20; --y: 72; --w: 842; --h: 93; }
.stage--vox[data-step="1"] .ring { --x: 20; --y: 297; --w: 842; --h: 85; }
.stage--vox[data-step="2"] .ring { --x: 233; --y: 181; --w: 203; --h: 100; }
.stage--vox[data-step="3"] .ring { --x: 446; --y: 240; --w: 416; --h: 34; --ring-r: 8; }
.stage--vox[data-step="1"] .shot { --cam: 1.06; --ox: 50%; --oy: 72%; }
.stage--vox[data-step="2"] .shot { --cam: 1.06; --ox: 28%; --oy: 30%; }
.stage--vox[data-step="3"] .shot { --cam: 1.06; --ox: 76%; --oy: 38%; }

.vx-pulse {
  z-index: 4;
  border-radius: 50%;
}

.vx-pulse.on { animation: listen 1.6s ease-out infinite; }

/* 列表下移一行：叠一份同图并整体下推 40px，露出新的一行 */
.vx-rows {
  z-index: 2;
  overflow: hidden;
}

.vx-rows img {
  position: absolute;
  top: calc(-341 / 292 * 100%);
  left: calc(-21 / 824 * 100%);
  width: calc(882 / 824 * 100%);
  max-width: none;
  transition: transform .6s var(--ease);
}

.vx-rows.on img { transform: translateY(calc(40 / 654 * 100%)); }

.vx-row {
  --fs: 14;
  --h: 40;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-left: calc(19 / var(--W) * 100cqw);
  color: #DCDCDC;
  background: #171717;
  border-bottom: 1px solid #1F1F1F;
  font-weight: 600;
  white-space: nowrap;
}

.vx-row.on { animation: rowLit 2.6s ease-out; }

.vx-row time {
  width: calc(58 / var(--W) * 100cqw);
  flex: 0 0 auto;
  color: #686868;
  font-family: var(--zzm-mono);
  font-size: .91em;
  font-weight: 500;
}

.vx-tally {
  justify-content: flex-end;
  padding-right: calc(9 / var(--W) * 100cqw);
  color: #999999;
}

.vx-num {
  padding-left: calc(6 / var(--W) * 100cqw);
  color: #F9F9F9;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.vx-num--red { color: #DB4A3F; }

/* ════════ 兜网 JotNet ════════ */

.jt-app {
  position: absolute;
  inset: 9% 9% 0;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 12px 12px 0 0;
}

.jt-app-bar {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F2F2EF;
  border-bottom: 1px solid var(--zzm-hairline-2, rgba(0, 0, 0, .09));
}

.jt-app-bar i {
  width: 10px;
  height: 10px;
  background: #D6D6D1;
  border-radius: 50%;
}

.jt-app-bar span {
  margin: 0 auto;
  padding-right: 40px;
  color: var(--zzm-text-5, #72726E);
  font-size: 12px;
  line-height: 16px;
}

.jt-app-body {
  padding: 8% 12%;
  display: grid;
  gap: 14px;
}

.jt-app-body i {
  height: 8px;
  background: #EBEBE7;
  border-radius: 4px;
}

.jt-app-body i:nth-child(1) { width: 42%; height: 14px; background: #DADAD5; }
.jt-app-body i:nth-child(3) { width: 88%; }
.jt-app-body i:nth-child(4) { width: 64%; }
.jt-app-body i:nth-child(6) { width: 92%; }
.jt-app-body i:nth-child(7) { width: 48%; }

.jt-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 10, 12, .55);
}

/* 键帽：与 .zzm-btn 同一套「光从正上方来」，按下即内陷 */
.jt-keys {
  --rise: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 8px;
  translate: -50% -50%;
}

.jt-keys kbd,
.jt-enter {
  min-width: clamp(40px, 11cqw, 64px);
  height: clamp(40px, 11cqw, 64px);
  padding: 0 .6em;
  display: grid;
  place-items: center;
  color: var(--zzm-text-2, #3F3F3B);
  background: linear-gradient(180deg, #FFFFFF 0%, #F2F2EF 100%);
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: var(--zzm-r-3, 12px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 2px 0 #C9C9C3, 0 6px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .92);
  font: 600 clamp(16px, 4.5cqw, 26px) / 1 var(--zzm-font);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.jt-keys kbd.on {
  background: linear-gradient(180deg, #ECECE9 0%, #F4F4F1 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 0 0 #C9C9C3, inset 0 2px 4px rgba(0, 0, 0, .13), inset 0 1px 2px rgba(0, 0, 0, .09);
  transform: translateY(2px);
}

.jt-shot {
  z-index: 3;
  --pad: 0px;
  width: min(80cqw, (100cqh - 64px) * var(--W) / var(--H));
}

.jt-shot:not(.on) { opacity: 0; scale: .96; }

.jt-input {
  align-items: flex-start;
  padding: calc(6 / var(--W) * 100cqw) calc(6 / var(--W) * 100cqw);
  color: #ECECEC;
  background: #2D2D31;
  line-height: 1.2;
}

.caret {
  width: 1px;
  height: 1.2em;
  margin-left: 1px;
  flex: 0 0 auto;
  background: #ECECEC;
  animation: caret 1s steps(1, end) infinite;
}

.jt-enter {
  --pop: .9;
  position: absolute;
  bottom: 12%;
  left: 50%;
  z-index: 4;
  min-width: 0;
  height: clamp(36px, 9cqw, 52px);
  padding: 0 1em;
  font-size: clamp(13px, 3cqw, 17px);
  translate: -50% 0;
}

.jt-enter.on { animation: keyTap .9s ease both; }

.jt-note {
  --rise: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: min(80cqw, 460px);
  padding: clamp(14px, 3.6cqw, 24px);
  color: var(--zzm-ink, #161616);
  background: #FFFFFF;
  border-radius: var(--zzm-r-3, 12px);
  translate: -50% -50%;
  font-size: clamp(12px, 2.9cqw, 15px);
  line-height: 1.6;
}

.jt-note-path {
  margin-bottom: .8em;
  display: flex;
  align-items: center;
  gap: .5em;
  color: var(--zzm-text-5, #72726E);
  font: .8em/1.4 var(--zzm-mono);
}

.jt-note-path img {
  width: 1.6em;
  height: 1.6em;
  border-radius: 4px;
}

.jt-note-h { font-weight: 700; }
.jt-note-li { margin-top: .3em; color: var(--zzm-text-3, #4A4A46); }

.jt-note-li.is-new {
  margin-inline: -.4em;
  padding: .1em .4em;
  color: var(--zzm-ink, #161616);
  background: var(--zzm-tier-free-bg, rgba(22, 163, 74, .12));
  border-radius: 6px;
  font-weight: 600;
}

/* ════════ 声锚 MicTether ════════ */

.stage--mic .shot {
  --ring-r: 9;
  right: max(var(--pad), 7cqw);
  left: auto;
  width: min(44cqw, (100cqh - 2 * var(--pad)) * var(--W) / var(--H));
  translate: 0 -50%;
  -webkit-mask-image: linear-gradient(#000 90%, transparent);
  mask-image: linear-gradient(#000 90%, transparent);
}

.stage--mic[data-step="0"] .ring { --x: 18; --y: 182; --w: 314; --h: 38; }
.stage--mic[data-step="1"] .ring,
.stage--mic[data-step="2"] .ring { --x: 16; --y: 263; --w: 318; --h: 30; }
.stage--mic[data-step="3"] .ring { --x: 14; --y: 310; --w: 322; --h: 156; --ring-r: 12; }

.mc-cur {
  --cover: #1E1E1E;
  gap: calc(9 / var(--W) * 100cqw);
  padding-left: calc(5 / var(--W) * 100cqw);
  color: #9A9A9A;
}

.mc-cur i {
  width: calc(7 / var(--W) * 100cqw);
  height: calc(7 / var(--W) * 100cqw);
  background: var(--zzm-tier-member, #E0920A);
  border-radius: 50%;
}

/* 网格排布：标题 + 三行设备；「正在用」框与首选设备同占一格，天然对齐 */
.mc-devices {
  --row: clamp(40px, 11cqh, 52px);
  --gap: 8px;
  position: absolute;
  top: 50%;
  left: max(var(--pad), 7cqw);
  z-index: 2;
  width: min(40cqw, 320px);
  display: grid;
  grid-template-rows: auto repeat(3, var(--row));
  row-gap: var(--gap);
  translate: 0 -50%;
  color: #FFFFFF;
  transition: opacity .3s ease;
}

.mc-devices.on { opacity: .35; }

.mc-devices-h {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
  line-height: 16px;
}

.mc-dev {
  min-width: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  font-size: clamp(12px, 2.4cqw, 14px);
  line-height: 20px;
  white-space: nowrap;
}

.mc-dev span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* 显式落位：标记框占第 2 行时，自动排布会把设备挤下一行，所以每行都写死 */
.mc-devices > * { grid-column: 1; }
.mc-devices-h { grid-row: 1; }
.mc-dev:nth-of-type(1) { grid-row: 2; }
.mc-dev:nth-of-type(2) { grid-row: 3; }
.mc-dev:nth-of-type(3) { grid-row: 4; }

/* 16 网格线性图标，墨灰描边（mask 着色，跟随 currentColor） */
.ico-mic,
.ico-pods,
.ico-laptop {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: .78;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

.ico-mic { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='1.5' width='5' height='8' rx='2.5'/%3E%3Cpath d='M3 7.5a5 5 0 0 0 10 0M8 12.5v2'/%3E%3C/svg%3E"); }
.ico-pods { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 11V8a5.5 5.5 0 0 1 11 0v3'/%3E%3Crect x='1.5' y='9.5' width='3' height='4.5' rx='1'/%3E%3Crect x='11.5' y='9.5' width='3' height='4.5' rx='1'/%3E%3C/svg%3E"); }
.ico-laptop { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='10' height='7.5' rx='1'/%3E%3Cpath d='M1.5 13h13'/%3E%3C/svg%3E"); }

.mc-dev em {
  margin-left: auto;
  padding: 2px 8px;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  font-size: 11px;
  line-height: 16px;
  font-style: normal;
}

.mc-dev--late { opacity: .35; transition: opacity .3s ease; }
.mc-dev--late.on { opacity: 1; }
.mc-plug { visibility: hidden; }
.mc-dev--late.on .mc-plug { visibility: visible; color: #1D1D1B; background: var(--zzm-tier-member, #E0920A); }

/* 「正在用」框：默认框住首选，被抢时跳到 AirPods */
.mc-marker {
  position: relative;
  grid-area: 2 / 1;
  margin: -4px;
  border: 2px solid #30D158;
  border-radius: 12px;
  transition: transform .45s var(--ease), border-color .2s ease;
}

.mc-marker b {
  position: absolute;
  top: -10px;
  left: 10px;
  padding: 0 6px;
  color: #0B0B0C;
  background: #30D158;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  transition: background-color .2s ease;
}

.mc-marker.on {
  border-color: var(--zzm-tier-member, #E0920A);
  transform: translateY(calc(var(--row) + var(--gap)));
}

.mc-marker.on b { background: var(--zzm-tier-member, #E0920A); }

.mc-wait {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 16px;
}

/* ════════ 墨封 Kindlink ════════ */

.stage--kind .shot { --ring-r: 10; }
.stage--kind[data-step="0"] .ring { --x: 9; --y: 730; --w: 224; --h: 57; }
.stage--kind[data-step="1"] .ring { --x: 386; --y: 96; --w: 188; --h: 36; }
.stage--kind[data-step="2"] .ring { --x: 324; --y: 142; --w: 872; --h: 218; --ring-o: 0; }
.stage--kind[data-step="3"] .ring { --x: 352; --y: 396; --w: 816; --h: 80; }
.stage--kind[data-step="0"] .shot { --cam: 1.12; --ox: 0%; --oy: 100%; }
.stage--kind[data-step="1"] .shot { --cam: 1.14; --ox: 34%; --oy: 12%; }
.stage--kind[data-step="2"] .shot { --cam: 1.1; --ox: 62%; --oy: 40%; }
.stage--kind[data-step="3"] .shot { --cam: 1.1; --ox: 62%; --oy: 50%; }

.kd-glow {
  z-index: 2;
  background: rgba(242, 145, 58, .1);
  border: 2px dashed #F2913A;
  border-radius: calc(14 / var(--W) * 100cqw);
}

.kd-empty { --cover: #1C1C1C; }

.kd-task {
  --rise: 8px;
  z-index: 2;
  padding: 0 calc(16 / var(--W) * 100cqw);
  display: flex;
  align-items: center;
  gap: calc(14 / var(--W) * 100cqw);
  color: #EDEDED;
  background: #212124;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: calc(10 / var(--W) * 100cqw);
}

.kd-cover {
  width: calc(36 / var(--W) * 100cqw);
  height: calc(48 / var(--W) * 100cqw);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #F5EADD;
  background: linear-gradient(145deg, #466E72, #1E3944);
  border-radius: 2px 4px 4px 2px;
  font: .52em/1.15 serif;
  letter-spacing: .1em;
  text-align: center;
}

.kd-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: .25em;
}

.kd-copy b { font-size: 1em; font-weight: 600; }

.kd-state {
  grid-area: 2 / 1;
  color: #9A9A9A;
  font-size: .8em;
  white-space: nowrap;
}

.kd-bar {
  height: calc(4 / var(--W) * 100cqw);
  margin-top: .2em;
  overflow: hidden;
  background: #3A3A3D;
  border-radius: 2px;
}

.kd-bar i {
  height: 100%;
  display: block;
  background: #F2913A;
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.kd-task:has(.kd-done.on) .kd-bar i { background: #30D158; }

.kd-done {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: .4em;
  color: #8BDAAA;
  font-size: .85em;
  font-style: normal;
}

.kd-done i,
.kd-device i {
  width: calc(8 / var(--W) * 100cqw);
  height: calc(8 / var(--W) * 100cqw);
  background: #30D158;
  border-radius: 50%;
}

.kd-done span { grid-area: 1 / 2; }

.kd-device {
  --cover: #1F201F;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: calc(10 / var(--W) * 100cqw);
  row-gap: calc(4 / var(--W) * 100cqw);
  padding-left: calc(9 / var(--W) * 100cqw);
  border-radius: calc(9 / var(--W) * 100cqw);
}

.kd-device i { grid-row: 1 / 3; }
.kd-device b { color: #E8E8E8; font-weight: 600; }
.kd-device small { color: #919192; font-size: .91em; }

.kd-drag { z-index: 6; }

.kd-file {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .45em .75em;
  color: var(--zzm-ink, #161616);
  background: #FFFFFF;
  border-radius: 8px;
  font-size: max(12px, calc(16 / var(--W) * 100cqw));
  line-height: 1.3;
  white-space: nowrap;
  transition: transform 1.3s var(--ease);
}

.kd-file b {
  color: #D86A12;
  font-size: .78em;
  letter-spacing: .04em;
}

.kd-file.on { transform: translate(calc(240 / var(--W) * 100cqw), calc(-420 / var(--W) * 100cqw)); }

.cursor {
  position: absolute;
  right: -10px;
  bottom: -16px;
  width: 18px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Cpath d='M1.5 1.5v16.2l4.3-4 2.9 6.6 3-1.3-2.9-6.5h5.9z' fill='%23161616' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ════════ 窄舞台：声锚改上下叠放前的压缩 ════════ */

@container (max-width: 560px) {
  .mc-devices { width: 46cqw; left: 4cqw; }
  .stage--mic .shot { right: 4cqw; width: min(42cqw, (100cqh - 2 * var(--pad)) * var(--W) / var(--H)); }
  .mc-dev { padding: 0 8px; gap: 6px; }
  .mc-dev em { display: none; }
  .mc-dev--late.on .mc-plug { display: none; }
  .mc-devices-h { margin-bottom: 0; }

  /* 窄屏看不清捕获窗里的字：打字时推近到输入区 */
  .jt-shot { width: min(92cqw, (100cqh - 48px) * var(--W) / var(--H)); }
  .stage--jot[data-step="1"] .jt-shot { --cam: 1.35; --ox: 0%; --oy: 0%; }
}

/* ════════ 关键帧 ════════ */

@keyframes listen {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, .55); }
  80%, 100% { box-shadow: 0 0 0 1.4em rgba(48, 209, 88, 0); }
}

@keyframes rowLit {
  0%, 35% { background: #24352A; }
  100% { background: #171717; }
}

@keyframes wave {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

@keyframes caret { 50% { opacity: 0; } }

@keyframes keyTap {
  0%, 30% { transform: translateY(0); }
  45%, 60% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .stage *,
  .stage *::before,
  .stage *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
