/* =============================================================================
   StepAudio 3 Music · 宣传片 promo.css
   -----------------------------------------------------------------------------
   舞台固定 1920×1080，靠 --k 等比缩放到视口，所有布局都用绝对像素 ——
   这样在任何屏幕、任何录制分辨率下构图完全一致。
   设计语言沿用主站 tokens：Paper & Ink & One Bronze Note。
   ============================================================================= */

/* ── 字体 ──────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url("../../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("../../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  --paper:        #FFFFFF;
  --field:        #F2F2F0;
  --field-sunk:   #EAEAE7;
  --field-hover:  #ECECE9;

  --ink:          #14161A;
  --ink-2:        #5B6068;
  --ink-3:        #676C74;
  --ink-4:        #9AA0A7;
  --ink-on-dark:  #FAFAF9;

  --rule:         #E3E3E0;
  --rule-strong:  #D2D2CE;

  --bronze:       #8A6428;
  --bronze-lift:  #C9A468;
  --bronze-wash:  rgba(138, 100, 40, .10);

  --ok:           #1A7351;
  --ok-wash:      rgba(26, 115, 81, .10);

  --art:          #6B6F76;
  --art-glow:     rgba(107, 111, 118, .22);

  --vinyl-base:   #14151A;
  --vinyl-edge:   #0B0C0F;

  --sh-1: 0 1px 2px rgba(20,22,26,.04),  0 0 0 1px rgba(20,22,26,.05);
  --sh-2: 0 4px 12px rgba(20,22,26,.06), 0 0 0 1px rgba(20,22,26,.05);
  --sh-3: 0 12px 32px rgba(20,22,26,.09), 0 2px 6px rgba(20,22,26,.05);
  --sh-4: 0 28px 70px rgba(20,22,26,.14), 0 4px 12px rgba(20,22,26,.06);
  --sh-5: 0 48px 120px rgba(20,22,26,.16), 0 8px 24px rgba(20,22,26,.07);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --r-2xl: 24px; --r-3xl: 28px; --r-pill: 999px;

  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system,
               "PingFang SC", "Segoe UI", sans-serif;
  --font-flourish: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease:       cubic-bezier(.22, 1, .36, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-soft:  cubic-bezier(.16, .84, .24, 1);
  --spin-period: 4.5s;
}

/* ── 复位 ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--field);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;                     /* 片子里只有虚拟鼠标 */
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
img { display: block; }

/* ── 舞台 ──────────────────────────────────────────────────────────────── */
.viewport {
  position: fixed; inset: 0;
  overflow: hidden;
  background: var(--field);
}
/* 绝对定位居中，而不是 grid place-items —— 舞台比视口宽时，
   grid item 会溢出到右侧而不是两侧对称，构图会整体偏。 */
.stage {
  position: absolute;
  left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--k, 1));
  overflow: hidden;
  background: var(--field);
}

/* ── 背景 ──────────────────────────────────────────────────────────────── */
/* 注意：这里**不用** filter: blur()。整个舞台带 scale 变换，一层 90px 模糊
   会让每次文字重绘都重新栅格化一大块，帧率直接掉一半，打字机就会变慢。
   radial-gradient 本身已经足够柔，边缘一样看不到接缝。                     */
.bg { position: absolute; inset: 0; pointer-events: none; contain: strict; }
.bg-glow { position: absolute; border-radius: 50%; will-change: transform; }
.bg-glow-a {
  left: -22%; top: -34%; width: 86%; height: 108%;
  background: radial-gradient(closest-side, rgba(201,164,104,.20), rgba(201,164,104,.07) 55%, transparent 78%);
  animation: drift-a 34s var(--ease-inout) infinite alternate;
}
.bg-glow-b {
  right: -26%; bottom: -38%; width: 82%; height: 102%;
  background: radial-gradient(closest-side, rgba(107,111,118,.17), rgba(107,111,118,.06) 55%, transparent 78%);
  animation: drift-b 42s var(--ease-inout) infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(90px, 60px, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-80px, -50px, 0) scale(1.1); } }

/* 颗粒：给纯色纸面一点材质，避免大面积渐变出现色带。
   不用 mix-blend-mode —— 混合模式会把整层拉进独立合成，代价和模糊一样贵。 */
.bg-grain {
  position: absolute; inset: 0; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='180' height='180' filter='url(%23n)' opacity='.05'/></svg>");
}
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 46%, transparent 52%, rgba(20,22,26,.055) 100%);
}

/* ── 左上角品牌 ────────────────────────────────────────────────────────── */
.brand {
  position: absolute; top: 52px; left: 64px; z-index: 60;
  display: flex; align-items: center; gap: 13px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.brand.on { opacity: 1; transform: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-size: 20px; font-weight: 600; letter-spacing: -.012em;
}
.brand-rule { width: 1px; height: 17px; background: var(--rule-strong); }
.brand-product {
  font-size: 19px; font-weight: 450; letter-spacing: -.008em; color: var(--ink-2);
}

/* ── 幕 ────────────────────────────────────────────────────────────────── */
.scene { position: absolute; inset: 0; display: none; }
.scene.on { display: block; }

/* =============================================================================
   幕 1 / 4 · 开场与收尾
   ============================================================================= */
.scene-open, .scene-end {
  display: none;
  place-content: center; justify-items: center;
  align-content: center;
}
.scene-open.on, .scene-end.on { display: grid; }

.wordmark {
  display: flex; align-items: baseline; justify-content: center;
  gap: .28em;
  line-height: 1.05;
  white-space: nowrap;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(14px);
  transition: opacity 1000ms var(--ease),
              filter 1500ms var(--ease-soft),
              transform 1500ms var(--ease-soft),
              letter-spacing 2200ms var(--ease-soft);
  letter-spacing: .12em;
}
.wordmark.in { opacity: 1; filter: blur(0); transform: none; letter-spacing: .01em; }
.wordmark.out {
  opacity: 0; filter: blur(6px); transform: translateY(-26px);
  transition: opacity 760ms var(--ease-inout), filter 760ms var(--ease-inout),
              transform 900ms var(--ease-inout);
}
/* 同一行：StepAudio 3 是较细的正体，Music 是青铜花体，字号更大 */
.wm-step {
  font-size: 92px; font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
.wm-main {
  font-family: var(--font-flourish);
  font-style: italic; font-weight: 400;
  font-size: 128px;
  letter-spacing: -.012em;
  background: linear-gradient(96deg, var(--bronze) 8%, #A67C36 42%, var(--bronze-lift) 96%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding: 0 .08em .06em;
}

.wm-sweep {
  position: relative;
  width: 420px; height: 1px;
  margin: 46px 0 0;
  background: rgba(20,22,26,.10);
  overflow: hidden;
  opacity: 0;
  transition: opacity 620ms var(--ease);
}
.wm-sweep.in { opacity: 1; }
.wm-sweep::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--bronze-lift), var(--bronze), transparent);
}
.wm-sweep.in::after { animation: sweep 2.6s var(--ease-soft) .1s both; }
@keyframes sweep { to { transform: translateX(100%); } }

.slogan {
  margin-top: 40px;
  font-size: 46px; font-weight: 400;
  letter-spacing: -.018em;
  color: var(--ink-2);
  opacity: 0; transform: translateY(16px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.slogan.in { opacity: 1; transform: none; }
.slogan.out {
  opacity: 0; transform: translateY(-16px);
  transition: opacity 700ms var(--ease-inout), transform 700ms var(--ease-inout);
}
.slogan em {
  font-family: var(--font-flourish);
  font-style: italic; font-weight: 400;
  font-size: 1.22em;
  color: var(--bronze);
  letter-spacing: -.005em;
  padding: 0 .04em 0 .02em;
}

/* =============================================================================
   幕标语（幕 2 / 3 开头）—— 纯淡入淡出，只带极轻的上浮，不要 blur 那种生硬感
   ============================================================================= */
.headline {
  position: absolute; left: 50%; top: 50%;
  width: 1480px;
  transform: translate(-50%, -50%) translateY(10px);
  text-align: center;
  font-size: 78px; font-weight: 450;
  letter-spacing: -.032em; line-height: 1.1;
  color: var(--ink);
  opacity: 0;
  z-index: 40;
  transition: opacity 1100ms var(--ease), transform 1300ms var(--ease-soft);
}
.headline.in { opacity: 1; transform: translate(-50%, -50%); }
.headline.out {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-10px);
  transition: opacity 900ms var(--ease-inout), transform 1000ms var(--ease-inout);
}
.headline em {
  font-family: var(--font-flourish);
  font-style: italic; font-weight: 400;
  font-size: 1.1em;
  color: var(--bronze);
  /* 斜体衬线的左右侧边距比正体窄，不补一点会和前后的字挤在一起 */
  padding: 0 .05em 0 .03em;
}

/* =============================================================================
   通用卡片 / 表单件
   ============================================================================= */
.stagecard {
  background: var(--paper);
  border-radius: var(--r-3xl);
  box-shadow: var(--sh-4);
}

.field { display: flex; flex-direction: column; gap: 11px; }
.field[hidden] { display: none; }
.field-label {
  display: flex; align-items: baseline; gap: 9px;
  font-size: 14px; font-weight: 600; letter-spacing: -.004em;
}
.field-label .req { color: var(--bronze); font-size: 12px; font-weight: 600; }
.field-label .opt { color: var(--ink-4); font-size: 12px; font-weight: 400; }

/* 假输入框：div + 打字机 caret */
.ta {
  font-size: 16px; line-height: 1.62;
  color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
  min-height: 1.62em;
}
.ta:empty::before,
.ta.ph::before {
  content: attr(data-ph);
  color: var(--ink-4);
  white-space: pre-wrap;
}
.ta-box {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  border-radius: var(--r-lg);
  padding: 13px 15px;
  transition: box-shadow 240ms var(--ease);
}
.ta-box.focus { box-shadow: inset 0 0 0 1.6px var(--ink); }
.ta-box.lyrics {
  height: 132px; min-height: 132px; flex: none;
  overflow-y: auto; scrollbar-gutter: stable;
  font-variant-numeric: tabular-nums;
}
.ta-box.lyrics::-webkit-scrollbar { width: 8px; }
.ta-box.lyrics::-webkit-scrollbar-track { background: var(--field); border-radius: 8px; }
.ta-box.lyrics::-webkit-scrollbar-thumb {
  background: var(--ink-4); border: 2px solid var(--field); border-radius: 8px;
}
.ta-input { min-height: 46px; }

.caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  margin: 0 0 -.18em 1px;
  background: var(--ink);
  animation: blink 1s steps(1) infinite;
  vertical-align: baseline;
}
@keyframes blink { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }

.promptbox {
  background: var(--paper);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-2);
  padding: 16px 16px 10px;
  transition: box-shadow 300ms var(--ease);
}
.promptbox.focus { box-shadow: var(--sh-3), 0 0 0 1.6px var(--ink); }
.promptbox .ta { min-height: 76px; }
.promptbox-row {
  display: flex; align-items: center; gap: 11px; margin-top: 8px;
}
.promptbox-count {
  margin-left: auto;
  font-size: 12px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.icon-btn {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-3);
}
.icon-btn-outline { box-shadow: inset 0 0 0 1px var(--rule); }
.icon, .icon-sm { display: block; }
.icon { width: 22px; height: 22px; }
.icon-sm { width: 17px; height: 17px; }

.switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-3);
}
.switch-inline { margin-left: auto; flex-direction: row-reverse; }
.switch input { display: none; }
.switch i {
  width: 30px; height: 18px; flex: none; border-radius: 99px;
  background: var(--field-sunk);
  box-shadow: inset 0 0 0 1px var(--rule);
  position: relative;
}
.switch i::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; letter-spacing: -.006em;
  transition: transform 160ms var(--ease), box-shadow 220ms var(--ease),
              opacity 220ms var(--ease);
}
.btn-primary {
  background: var(--ink); color: var(--ink-on-dark);
  box-shadow: 0 4px 14px rgba(20,22,26,.18);
}
.btn-primary.press { transform: scale(.975); box-shadow: 0 2px 8px rgba(20,22,26,.2); }
.btn-block { width: 100%; height: 52px; font-size: 16px; }
.btn.busy { opacity: .55; }
.btn.busy span::after {
  content: ""; display: inline-block;
  width: 14px; height: 14px; margin-left: 9px; vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(250,250,249,.35);
  border-top-color: var(--ink-on-dark);
  animation: spin .78s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.disclosure {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 6px 2px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.disclosure .icon-sm { color: var(--ink-4); }

.dropzone {
  display: flex; align-items: center; gap: 15px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--rule);
  transition: box-shadow 320ms var(--ease), background 320ms var(--ease);
}
.dropzone .icon { color: var(--ink-2); flex: none; transition: color 320ms var(--ease); }
.dropzone b { display: block; font-size: 14px; font-weight: 600; }
.dropzone small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.dropzone.over { box-shadow: inset 0 0 0 1.8px var(--ink); background: var(--field-hover); }
.dropzone.filled { box-shadow: inset 0 0 0 1.6px var(--ok); }
.dropzone.filled .icon { color: var(--ok); }

.eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4);
}

/* =============================================================================
   幕 2 · 创作编辑栏
   ============================================================================= */
.compose {
  position: absolute;
  display: flex; flex-direction: column; gap: 20px;
  padding: 34px 34px 30px;
}
/* 从右侧滑入后停在右侧，与左边的播放面板共用同一个画框（top 96 / 高 888），
   上下对齐。不再先居中再移动。 */
#compose2 {
  right: 100px; top: 96px; width: 560px; height: 888px;
  opacity: 0; transform: translateX(72px);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease-soft);
}
/* 翻唱多一个上传字段：收紧间距，为上传栏、歌词和底部按钮保留空间。 */
#compose2 > * { flex-shrink: 0; }
#compose2:has(.upload-field:not([hidden])) { gap: 12px; }
#compose2:has(.upload-field:not([hidden])) .field { gap: 8px; }
#compose2:has(.upload-field:not([hidden])) .promptbox .ta { min-height: 52px; }
#compose2.in { opacity: 1; transform: none; }
#compose2.out {
  opacity: 0; transform: translateX(72px);
  transition: opacity 560ms var(--ease-inout), transform 640ms var(--ease-inout);
}

.tabs {
  display: flex; gap: 2px; position: relative;
  border-bottom: 1px solid var(--rule);
}
.tab {
  padding: 8px 15px 14px;
  font-size: 15px; font-weight: 500; color: var(--ink-3);
  white-space: nowrap;
  transition: color 220ms var(--ease);
}
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tab-ink {
  position: absolute; bottom: -1px; left: 0; width: 0; height: 2px;
  background: var(--ink); border-radius: 2px 2px 0 0;
  transition: left 420ms var(--ease), width 420ms var(--ease);
}
.cap-about {
  font-size: 14px; color: var(--ink-2); line-height: 1.55;
  margin-top: -8px;
  transition: opacity 300ms var(--ease);
}
.compose-foot { margin-top: auto; padding-top: 14px; }
.compose-note {
  margin-top: 12px; text-align: center;
  font-size: 12.5px; color: var(--ink-4);
}

/* 上传字段展开动画 */
.upload-field {
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height 560ms var(--ease), opacity 380ms var(--ease);
}
.upload-field.show { max-height: 200px; opacity: 1; }

/* 飞入的音频文件卡片 */
.filechip {
  position: absolute; left: 0; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 13px;
  padding: 16px 22px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  color: var(--ink);
  opacity: 0;
  transform-origin: center;
  pointer-events: none;
}
.filechip .icon { color: var(--bronze); }
.filechip b { display: block; font-size: 16px; font-weight: 600; }
.filechip small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* =============================================================================
   幕 2 · 播放面板（黑胶 + 右侧作品信息 + 音浪）
   与右侧编辑栏共用同一个画框：top 96 / 高 888，上下对齐。
   ============================================================================= */
.player-card {
  position: absolute;
  left: 100px; top: 96px;
  width: 1000px; height: 888px;
  padding: 40px 44px 34px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateX(-64px) scale(.98);
  transition: opacity 700ms var(--ease), transform 860ms var(--ease-soft);
}
.player-card.in { opacity: 1; transform: none; }
.player-card.out {
  opacity: 0; transform: translateX(-64px) scale(.98);
  transition: opacity 540ms var(--ease-inout), transform 640ms var(--ease-inout);
}

/* 上半：左黑胶 + 右信息 */
.pc-main {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 470px 1fr;
  gap: 20px; align-items: center;
}
.pc-info { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pc-done {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--ok-wash); color: var(--ok);
}
.pc-done .icon-sm { width: 15px; height: 15px; }

/* 黑胶唱盘：几何沿用主站 player.css（viewBox 400×400，盘心偏左上） */
.tt {
  --dia: 340px; --sw: 6; --groove: 3px; --down: 0; --p: 0;
  position: relative; flex: none;
  width: calc(var(--dia) / .75);
  height: calc(var(--dia) / .75);
  margin: 0 auto;
}
.tt-plate, .tt-sheen, .tt-rim {
  position: absolute; border-radius: 50%;
  width: var(--dia); height: var(--dia);
  left: calc(var(--dia) * .1);
  top: calc(var(--dia) * .16667);
}
.tt-plate {
  background:
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255,255,255,.055) 0 1px, rgba(0,0,0,0) 1px var(--groove)),
    radial-gradient(circle at 50% 50%,
      #1b1d23 0 29%, var(--vinyl-base) 62%, var(--vinyl-edge) 100%);
  animation: ttspin var(--spin-period) linear infinite;
  animation-play-state: paused;
  will-change: transform;
}
.tt-plate::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%,
    rgba(0,0,0,0) 0 8.4%, rgba(255,255,255,.05) 8.4% 9%);
}
.tt[data-state="playing"] .tt-plate { animation-play-state: running; }
@keyframes ttspin { to { transform: rotate(360deg); } }

.tt-label {
  position: absolute; inset: 29%; border-radius: 50%; overflow: hidden; z-index: 2;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 0 3px rgba(255,255,255,.07);
  background: #23252c;
}
.tt-label img { width: 100%; height: 100%; object-fit: cover; }
.tt-hole {
  position: absolute; left: 50%; top: 50%; width: 5%; height: 5%;
  transform: translate(-50%,-50%); z-index: 3; border-radius: 50%;
  background: #050506; box-shadow: 0 0 0 2px #2a2a30;
}
.tt-sheen {
  pointer-events: none; z-index: 4;
  background: linear-gradient(125deg,
    rgba(0,0,0,0) 33%, rgba(255,255,255,.10) 44%,
    rgba(255,255,255,.03) 48%, rgba(0,0,0,0) 54%);
}
.tt-rim {
  pointer-events: none; z-index: 5;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.09),
    inset 0 0 calc(var(--dia) * .05) rgba(0,0,0,.55),
    0 calc(var(--dia) * .02) calc(var(--dia) * .07) rgba(20,22,26,.28);
}
.tt-arm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; overflow: visible; }
.tt-arm .arm {
  transform-box: view-box; transform-origin: 352px 52px;
  rotate: calc(-8deg + 18deg * var(--down) + 22deg * var(--p) * var(--down));
  translate: 0 calc(-9px * (1 - var(--down)));
  transition: rotate 900ms var(--ease), translate 900ms var(--ease);
}
.tt-arm .tube { stroke: url(#armMetal); stroke-width: var(--sw); stroke-linecap: round;
  stroke-linejoin: round; fill: none; }
.tt-arm .tube-hi { stroke: rgba(255,255,255,.5); stroke-width: calc(var(--sw) * .2);
  stroke-linecap: round; fill: none; }
.tt-arm .bearing-o { fill: #4a4d55; }
.tt-arm .bearing-i { fill: var(--bronze-lift); }
.tt-arm .cw { fill: #31343b; }
.tt-arm .head { fill: #3a3d44; }
.tt-arm .styl { stroke: var(--bronze-lift); stroke-width: calc(var(--sw) * .55); stroke-linecap: round; }

.pc-title {
  font-size: 40px; font-weight: 550; letter-spacing: -.026em;
  line-height: 1.08;
}
.pc-tags {
  font-size: 15px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
/* 右侧信息卡：描述 + 歌词，让左半边饱满 */
.pc-card {
  background: #FBFBFA;
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 14px 16px;
}
.pc-card-h {
  display: block;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 7px;
}
.pc-desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.pc-lyrics {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.62; color: var(--ink-2);
  white-space: pre-wrap;
  max-height: 168px; overflow: hidden;
}

/* 音浪 */
.spectrum {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; height: 56px; width: 100%;
  margin: 18px 0 16px;
  flex: none;
}
.spectrum i {
  flex: 1; max-width: 7px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--bronze-lift), var(--art));
  height: 12%;
  opacity: .5;
  transform-origin: bottom;
  transition: height 110ms linear, opacity 110ms linear;
}
.spectrum.live i { opacity: .92; }

/* 播放条：上一首 / 播放 / 下一首 · 时间 · 进度 · 时间 · 下载，一整行 */
.pc-transport {
  display: flex; align-items: center; gap: 16px;
  flex: none;
}
.pc-t { font-size: 13px; color: var(--ink-4); font-variant-numeric: tabular-nums;
  flex: none; width: 42px; text-align: center; }
.pc-line {
  position: relative; flex: 1; height: 4px;
  border-radius: 2px; background: var(--field-sunk);
}
.pc-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  border-radius: 2px; background: var(--ink);
}
.pc-dot {
  position: absolute; top: 50%; left: 0;
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--paper);
  box-shadow: 0 0 0 1.5px var(--ink), var(--sh-1);
}
.pc-btns { display: flex; align-items: center; gap: 16px; flex: none; }
.pl-btn { color: var(--ink-3); display: grid; place-items: center; }
.pc-big {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: var(--ink-on-dark);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(20,22,26,.22);
}

/* =============================================================================
   幕 3 · ABC 可控性
   ============================================================================= */
#compose3 {
  left: 90px; top: 96px; width: 520px; height: 888px;
  opacity: 0;
  /* 从左侧切入后停在固定位置，与第二幕编辑栏保持一致。 */
  transform: translateX(-72px);
  transition: opacity 760ms var(--ease), transform 1000ms var(--ease-soft);
}
#compose3.in { opacity: 1; transform: none; }
#compose3.out {
  opacity: 0; transform: translateX(-72px);
  transition: opacity 560ms var(--ease-inout), transform 640ms var(--ease-inout);
}
.compose-head { display: flex; flex-direction: column; gap: 7px; padding-bottom: 4px;
  border-bottom: 1px solid var(--rule); }
.compose-head h3 { font-size: 26px; font-weight: 600; letter-spacing: -.022em;
  padding-bottom: 12px; }

/* 作品条（右上）：最多三首 v1 / v2 / v3，与下方 ABC 区顶部留出固定间距 */
.worklist {
  position: absolute; left: 650px; top: 96px; width: 1180px;
  display: flex; flex-direction: column; gap: 10px;
}
.workcard {
  display: flex; align-items: center; gap: 18px;
  height: 72px; padding: 0 22px 0 14px;
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  opacity: 0; transform: translateY(-14px) scale(.985);
  transition: opacity 620ms var(--ease), transform 720ms var(--ease-soft),
              box-shadow 300ms var(--ease);
  position: relative; overflow: hidden;
}
.workcard.in { opacity: 1; transform: none; }
.workcard[data-state="playing"] { box-shadow: var(--sh-3), 0 0 0 1.6px rgba(138,100,40,.4); }
.wc-art {
  width: 54px; height: 54px; border-radius: var(--r-md); flex: none;
  object-fit: cover; box-shadow: 0 6px 18px rgba(20,22,26,.14);
}
.wc-body { min-width: 0; flex: 1; }
.wc-body b {
  display: block; font-size: 17px; font-weight: 600; letter-spacing: -.016em;
}
.wc-body small {
  display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.wc-ver {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--bronze-wash); color: var(--bronze);
  margin-right: 9px; vertical-align: 2px;
}
.wc-wave { display: flex; align-items: center; gap: 3px; height: 26px; width: 260px; flex: none; }
.wc-wave i {
  flex: 1; border-radius: 2px; background: var(--ink-4); opacity: .45;
  transition: height 120ms linear, background 300ms var(--ease), opacity 300ms var(--ease);
}
.workcard[data-state="playing"] .wc-wave i { background: var(--bronze); opacity: .85; }
.wc-time { font-size: 13px; color: var(--ink-4); font-variant-numeric: tabular-nums;
  width: 46px; text-align: right; flex: none; }
.wc-play {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--ink-on-dark);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(20,22,26,.2);
  transition: transform 160ms var(--ease);
}
.wc-play.press { transform: scale(.92); }
.wc-play .icon-sm { margin-left: 1px; }
.workcard[data-state="playing"] .wc-play .icon-sm { margin-left: 0; }

/* 生成中：卡片上的一道扫光 */
.workcard.gen::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(201,164,104,.22) 50%, transparent 80%);
  animation: shimmer 1.35s var(--ease-inout) infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ABC 区（右下）：底部与左侧编辑栏对齐到 984（= top 96 + 高 888） */
.abcwrap {
  position: absolute; left: 650px; top: 352px; width: 1180px; height: 632px;
  display: flex; flex-direction: column; gap: 18px;
  opacity: 0; transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 860ms var(--ease-soft);
}
.abcwrap.in { opacity: 1; transform: none; }
.abcgrid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 470px 1fr; gap: 22px;
}
.abcpane, .scorepane {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 18px 20px 18px;
  border-radius: var(--r-2xl);
}
.pane-head {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 13px; margin-bottom: 13px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  flex: none;
}
.pane-head b { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -.008em; }
.pane-badge {
  margin-left: auto;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--field-sunk); color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}
.pane-badge.hot { background: var(--bronze-wash); color: var(--bronze); }

/* ABC 代码 */
.abccode {
  position: relative;
  flex: 1; min-height: 0; overflow: hidden;
  border-radius: var(--r-md);
  background: #FBFBFA;
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 14px 15px;
}
.abccode::after {           /* 底部渐隐，暗示还有内容 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(180deg, transparent, #FBFBFA);
  pointer-events: none;
}
.abccode-inner {
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.72;
  color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  transition: transform 700ms var(--ease);
}
.abc-l { display: block; border-radius: 3px; padding: 0 3px; margin: 0 -3px; }
.abc-hdr  { color: var(--ink); font-weight: 600; }
.abc-cmt  { color: var(--ink-4); font-style: italic; }
.abc-cmt-b{ color: var(--bronze); font-style: normal; font-weight: 600; }
.abc-chord{ color: var(--bronze); font-weight: 600; }
.abc-bar  { color: var(--ink-4); }

/* 改写高亮 */
.abc-l.ins {
  background: rgba(26,115,81,.11);
  box-shadow: inset 0 0 0 1px rgba(26,115,81,.26);
  color: #14432F;
  animation: insPop 620ms var(--ease) both;
}
.abc-l.ins .abc-chord { color: #1A7351; }
.abc-l.man {
  background: rgba(138,100,40,.13);
  box-shadow: inset 0 0 0 1px rgba(138,100,40,.30);
  color: #4A3512;
  animation: insPop 620ms var(--ease) both;
}
.abc-l.man .abc-chord { color: var(--bronze); }
@keyframes insPop {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}
.abc-caret {
  position: absolute; width: 2px; height: 15px;
  background: var(--ink); opacity: 0;
  animation: blink 1s steps(1) infinite;
}
.abc-caret.on { opacity: 1; }

/* 乐谱纸 */
.scorepaper {
  position: relative;
  flex: 1; min-height: 0; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 10px 12px 4px;
}
.scorepaper svg { display: block; overflow: visible; }
.scorepaper .abcjs-note, .scorepaper .abcjs-rest,
.scorepaper .abcjs-staff, .scorepaper .abcjs-bar { fill: var(--ink); }
.scorepaper .abcjs-chord { fill: var(--bronze); }
.scorepaper #scoreHost { transition: opacity 380ms var(--ease); }
.scorepaper.swap #scoreHost { opacity: 0; }

/* 谱面游标：跟随小节 / 音符。left 的过渡时长由 JS 按事件间隔动态设置，
   让它匀速滑过每一拍而不是一跳一跳（这里给个兜底值）。 */
.score-cursor {
  position: absolute; left: 0; top: 0;
  width: 2.5px; height: 0;
  border-radius: 2px;
  background: var(--bronze);
  box-shadow: 0 0 0 3px rgba(138,100,40,.14);
  opacity: 0;
  transition: opacity 200ms var(--ease),
              left 200ms linear, top 240ms var(--ease-soft), height 240ms var(--ease-soft);
  pointer-events: none;
  will-change: left, top, height;
}
.score-cursor.on { opacity: 1; }

.scorebar {
  display: flex; align-items: center; gap: 14px;
  padding-top: 14px; margin-top: 12px;
  border-top: 1px solid var(--rule);
  flex: none;
}
.score-play {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--ink-on-dark);
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(20,22,26,.2);
  transition: transform 160ms var(--ease);
}
.score-play.press { transform: scale(.92); }
.score-line {
  position: relative; flex: 1; height: 4px;
  border-radius: 2px; background: var(--field-sunk);
}
.score-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  border-radius: 2px; background: var(--bronze);
}
.score-time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
  width: 42px; flex: none; }
.score-note { font-size: 11.5px; color: var(--ink-4); letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600; flex: none; }

/* 改写对话框 */
.chatbar {
  flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 13px 13px 13px 20px;
  background: var(--paper);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-3);
  transition: box-shadow 300ms var(--ease);
}
.chatbar.focus { box-shadow: var(--sh-3), 0 0 0 1.6px var(--ink); }
.chat-ico { color: var(--bronze); flex: none; width: 20px; height: 20px; }
.chat-input { flex: 1; min-width: 0; font-size: 16px; }
.chat-send { height: 44px; padding: 0 20px; flex: none; }

/* =============================================================================
   虚拟鼠标
   ============================================================================= */
.cursor {
  position: absolute; left: 0; top: 0; z-index: 90;
  width: 30px; height: 30px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -3px);
  transition: opacity 320ms var(--ease);
  will-change: left, top;
}
.cursor.on { opacity: 1; }
.cursor svg {
  width: 30px; height: 30px;
  fill: var(--ink);
  stroke: #fff; stroke-width: 1.1px; stroke-linejoin: round;
  filter: drop-shadow(0 3px 7px rgba(20,22,26,.32));
}
.cursor.click svg { animation: cursorPress 340ms var(--ease); }
@keyframes cursorPress { 40% { transform: scale(.8); } }
.cursor-ring {
  position: absolute; left: 2px; top: 1px;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 2px solid var(--bronze);
  opacity: 0;
}
.cursor.click .cursor-ring { animation: ring 620ms var(--ease) forwards; }
@keyframes ring {
  0%   { opacity: .9; transform: scale(.4); }
  100% { opacity: 0;  transform: scale(3.6); }
}

/* ── 音符粒子画布：铺满舞台，打字时从光标附近冒出（参考 stepaudio3music-demo） ── */
.notes {
  position: absolute; inset: 0; z-index: 80;
  width: 1920px; height: 1080px;
  pointer-events: none;
}

/* =============================================================================
   嵌入模式（?embed=1）：点击播放 · 右下角全屏 · 空格暂停 · Esc 退出全屏
   控件不随舞台缩放，挂在 body 上盖住整个 iframe 视口。
   ============================================================================= */
body.embed { cursor: auto; }
body.embed .soundhint { display: none !important; }

.embed-ui { position: fixed; inset: 0; z-index: 300; }
.embed-ui button { cursor: pointer; }

/* 封面：未播放时盖住空舞台，给一个体面的起始画面 */
.embed-poster {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  background:
    radial-gradient(120% 100% at 30% 24%, rgba(201,164,104,.16), transparent 62%),
    radial-gradient(120% 100% at 78% 88%, rgba(107,111,118,.12), transparent 62%),
    #F2F2F0;
  transition: opacity 460ms var(--ease), visibility 460ms;
}
.embed-poster.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.embed-poster-brand {
  display: flex; align-items: baseline; gap: .26em;
  font-size: clamp(24px, 4.4vw, 46px); line-height: 1;
  color: var(--ink); letter-spacing: -.01em; font-weight: 500;
}
.embed-poster-brand em {
  font-family: var(--font-flourish); font-style: italic; font-weight: 400;
  font-size: 1.32em;
  background: linear-gradient(96deg, var(--bronze), var(--bronze-lift));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 .06em;
}
.embed-poster-cap {
  font-size: clamp(12px, 1.5vw, 15px); color: var(--ink-3); letter-spacing: .01em;
}
.embed-play-big {
  width: clamp(64px, 8vw, 92px); height: clamp(64px, 8vw, 92px);
  border-radius: 50%;
  background: var(--ink); color: var(--ink-on-dark);
  display: grid; place-items: center;
  box-shadow: 0 14px 40px rgba(20,22,26,.28);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.embed-play-big svg { width: 44%; height: 44%; margin-left: 6%; }
.embed-play-big:hover { transform: scale(1.06); box-shadow: 0 18px 50px rgba(20,22,26,.34); }

/* 播放中点一下暂停时浮现的中央按钮 */
.embed-center-play {
  position: absolute; left: 50%; top: 50%;
  width: clamp(58px, 7vw, 82px); height: clamp(58px, 7vw, 82px);
  transform: translate(-50%, -50%) scale(.9);
  border-radius: 50%;
  background: rgba(20,22,26,.62); color: #fff;
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 260ms;
}
.embed-center-play svg { width: 42%; height: 42%; }
.embed-ui.paused .embed-center-play { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

/* 右下角展开 / 收起全屏 */
.embed-expand {
  position: absolute; right: 16px; bottom: 16px;
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(20,22,26,.55); color: #fff;
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 260ms var(--ease), background 200ms var(--ease);
}
.embed-expand svg { width: 20px; height: 20px; }
.embed-expand:hover { background: rgba(20,22,26,.78); }
/* 悬停视口或暂停时才显示右下角按钮，播放时淡出不挡画面 */
.embed-ui:hover .embed-expand,
.embed-ui.paused .embed-expand,
.embed-ui.idle .embed-expand { opacity: 1; }
.embed-ui.idle .embed-expand { display: none; }   /* 封面上不显示，避免和播放按钮抢注意 */


/* =============================================================================
   页面外壳：声音提示 / 调试条
   ============================================================================= */
.soundhint {
  position: fixed; right: 30px; bottom: 26px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: var(--sh-3);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  /* 没人点也会自己退场 —— 录制时不该有一颗提示胶囊挂在成片里 */
  animation: hintIn 700ms var(--ease) 1.2s both, hintOut 900ms var(--ease) 11s both;
}
.soundhint svg { width: 17px; height: 17px; color: var(--bronze); }
.soundhint[hidden] { display: none; }
@keyframes hintIn  { from { opacity: 0; transform: translateY(12px); }
                     to   { opacity: 1; transform: none; } }
@keyframes hintOut { to { opacity: 0; transform: translateY(8px); visibility: hidden; } }

.devbar {
  position: fixed; left: 20px; bottom: 20px; z-index: 220;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,.94);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-3);
  font-size: 13px; color: var(--ink-2);
}
.devbar[hidden] { display: none; }
.devbar button {
  min-width: 30px; height: 28px; padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--field-sunk); color: var(--ink-2);
  font-size: 13px; font-weight: 600;
}
.devbar button:hover { background: var(--ink); color: var(--ink-on-dark); }
.dev-clock { margin-left: 8px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.dev-label { color: var(--ink-4); max-width: 260px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

.progress {
  position: fixed; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(20,22,26,.07); z-index: 210;
}
.progress[hidden] { display: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--bronze); }

/* 打印/降级：不需要，但别让减少动效把整片停掉 —— 这是宣传片，动效即内容 */
