/* 时光之城 · 星语数字人门面
   暗色全息舞台样式 · 零内联（所有样式集中于此文件）
   基于开源项目 TalkingHead (MIT) 构建
   沈阳来电卫士数字软件开发有限公司 */

:root {
  --bg: #030712;
  --bg-2: #060b1a;
  --fg: #e8eefc;
  --muted: #8ea0c8;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --line: rgba(255, 255, 255, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(1200px 720px at 50% -12%, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0) 58%),
    radial-gradient(900px 620px at 84% 4%, rgba(167, 139, 250, 0.14) 0%, rgba(167, 139, 250, 0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 14px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
}
.nav-back {
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-back:hover { background: rgba(34, 211, 238, 0.10); border-color: rgba(34, 211, 238, 0.35); }
.nav-back:active { background: rgba(255, 255, 255, 0.12); }
.nav-tag {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
}

/* ---------- Hero / 霓虹标题 ---------- */
.hero { padding: 2px 2px 0; }
.hero-title {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #eafcff 0%, #a9f0ff 42%, #c9b6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: neonPulse 4.5s ease-in-out infinite;
}
@keyframes neonPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.50)) drop-shadow(0 0 18px rgba(167, 139, 250, 0.35)); }
  50% { filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.90)) drop-shadow(0 0 34px rgba(167, 139, 250, 0.70)); }
}
.hero-sub {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Stage ---------- */
.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(126, 240, 255, 0.16);
  background:
    radial-gradient(60% 55% at 50% 34%, rgba(26, 44, 92, 0.85) 0%, rgba(6, 10, 26, 0.96) 100%),
    linear-gradient(180deg, #050a18 0%, #030712 100%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.55),
    inset 0 0 60px rgba(34, 211, 238, 0.05);
}
.stage {
  position: absolute;
  inset: 0;
  isolation: isolate;
}

/* 数字人宿主（TalkingHead 会把 canvas 追加进来） */
.avatar-host {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.avatar-host canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- 底面光台 ---------- */
.floor {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: 78%;
  height: 26%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
      rgba(34, 211, 238, 0.45) 0%,
      rgba(34, 211, 238, 0.14) 42%,
      rgba(34, 211, 238, 0) 72%);
  filter: blur(14px);
  opacity: 0.72;
  z-index: 1;
  transition: opacity 0.45s ease, filter 0.45s ease;
}

/* ---------- 多层环形能量光环 ---------- */
.ring-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: var(--size);
  height: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) / -2);
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      var(--cyan) 0deg,
      var(--violet) 120deg,
      var(--pink) 200deg,
      var(--cyan) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
  opacity: var(--op);
  animation: ringSpin var(--dur) linear infinite;
  animation-direction: var(--dir, normal);
  will-change: transform;
  transition: opacity 0.45s ease, filter 0.45s ease;
}
.ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(167, 139, 250, 0.32);
  animation: ringSpin var(--dur2, 40s) linear infinite reverse;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.ring-a { --size: 62%; --w: 3px; --dur: 26s; --dur2: 40s; --dir: normal;  --op: 0.62; }
.ring-b { --size: 84%; --w: 2px; --dur: 34s; --dur2: 52s; --dir: reverse; --op: 0.42; }
.ring-c { --size: 106%; --w: 2px; --dur: 46s; --dur2: 66s; --dir: normal; --op: 0.28; }

/* ---------- 粒子星尘 ---------- */
.dust {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}
.dust i {
  position: absolute;
  left: calc(var(--x, 50) * 1%);
  top: calc(var(--y, 50) * 1%);
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: radial-gradient(circle, #e6faff 0%, var(--cyan) 55%, rgba(34, 211, 238, 0) 100%);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.85);
  opacity: 0;
  animation: twinkle var(--dur, 7s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * -1s);
}
.dust i:nth-child(3n) {
  background: radial-gradient(circle, #f6ecff 0%, var(--violet) 55%, rgba(167, 139, 250, 0) 100%);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.85);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.7); }
  50% { opacity: 0.92; transform: translateY(-11px) scale(1.15); }
}

/* 星尘散点定位（纯 CSS，零内联） */
.dust i:nth-child(1)  { --x: 8;  --y: 18; --dur: 7.5s; --d: 1.1; --s: 2px; }
.dust i:nth-child(2)  { --x: 16; --y: 42; --dur: 8.5s; --d: 2.4; --s: 2.5px; }
.dust i:nth-child(3)  { --x: 6;  --y: 66; --dur: 6.5s; --d: 3.2; --s: 2px; }
.dust i:nth-child(4)  { --x: 12; --y: 82; --dur: 9s;   --d: 0.6; --s: 2px; }
.dust i:nth-child(5)  { --x: 22; --y: 12; --dur: 7s;   --d: 2.9; --s: 2.5px; }
.dust i:nth-child(6)  { --x: 28; --y: 58; --dur: 8s;   --d: 1.7; --s: 2px; }
.dust i:nth-child(7)  { --x: 34; --y: 88; --dur: 6.8s; --d: 3.6; --s: 2px; }
.dust i:nth-child(8)  { --x: 40; --y: 16; --dur: 9.5s; --d: 0.9; --s: 2.5px; }
.dust i:nth-child(9)  { --x: 46; --y: 72; --dur: 7.2s; --d: 2.1; --s: 2px; }
.dust i:nth-child(10) { --x: 52; --y: 10; --dur: 8.2s; --d: 3.9; --s: 2.5px; }
.dust i:nth-child(11) { --x: 58; --y: 34; --dur: 6.6s; --d: 1.4; --s: 2px; }
.dust i:nth-child(12) { --x: 64; --y: 84; --dur: 9.2s; --d: 2.7; --s: 2px; }
.dust i:nth-child(13) { --x: 70; --y: 20; --dur: 7.8s; --d: 0.4; --s: 2.5px; }
.dust i:nth-child(14) { --x: 76; --y: 50; --dur: 8.8s; --d: 3.3; --s: 2px; }
.dust i:nth-child(15) { --x: 82; --y: 74; --dur: 6.9s; --d: 1.9; --s: 2.5px; }
.dust i:nth-child(16) { --x: 88; --y: 30; --dur: 9.8s; --d: 2.2; --s: 2px; }
.dust i:nth-child(17) { --x: 92; --y: 58; --dur: 7.4s; --d: 3.7; --s: 2px; }
.dust i:nth-child(18) { --x: 86; --y: 88; --dur: 8.6s; --d: 1.2; --s: 2px; }
.dust i:nth-child(19) { --x: 18; --y: 72; --dur: 7.1s; --d: 2.6; --s: 2px; }
.dust i:nth-child(20) { --x: 44; --y: 40; --dur: 9.1s; --d: 0.8; --s: 2.5px; }
.dust i:nth-child(21) { --x: 60; --y: 62; --dur: 6.7s; --d: 3.4; --s: 2px; }
.dust i:nth-child(22) { --x: 78; --y: 12; --dur: 8.4s; --d: 1.6; --s: 2.5px; }
.dust i:nth-child(23) { --x: 24; --y: 30; --dur: 7.6s; --d: 2.8; --s: 2px; }
.dust i:nth-child(24) { --x: 68; --y: 68; --dur: 9.4s; --d: 0.5; --s: 2px; }
.dust i:nth-child(25) { --x: 96; --y: 44; --dur: 7s;   --d: 1.3; --s: 2px; }
.dust i:nth-child(26) { --x: 4;  --y: 40; --dur: 8s;   --d: 3.1; --s: 2px; }
.dust i:nth-child(27) { --x: 54; --y: 52; --dur: 6.5s; --d: 2.3; --s: 2.5px; }
.dust i:nth-child(28) { --x: 38; --y: 64; --dur: 8.9s; --d: 3.8; --s: 2px; }

/* ---------- 扫描线 ---------- */
.scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(100deg,
      rgba(34, 211, 238, 0) 0%,
      rgba(34, 211, 238, 0.06) 38%,
      rgba(160, 246, 255, 0.20) 50%,
      rgba(167, 139, 250, 0.06) 64%,
      rgba(167, 139, 250, 0) 100%);
  animation: scanX 7s linear infinite;
}
@keyframes scanX {
  from { transform: translateX(-115%); }
  to { transform: translateX(330%); }
}

/* ---------- 字幕气泡 ---------- */
.bubble {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 12px);
  max-width: 88%;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(9, 16, 36, 0.62);
  border: 1px solid rgba(126, 240, 255, 0.28);
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.45),
    inset 0 0 22px rgba(34, 211, 238, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 5;
}
.bubble.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.bubble-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: #e9f7ff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* ---------- 降级态（3D 不可用时） ---------- */
.fallback {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  pointer-events: none;
}
.stage.fallback .fallback { display: flex; }
.stage.fallback .avatar-host { display: none; }
.fallback-orb {
  width: 38%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #c4f8ff 0%, var(--cyan) 42%, var(--violet) 78%, #2a1548 100%);
  box-shadow:
    0 0 44px rgba(34, 211, 238, 0.65),
    0 0 96px rgba(167, 139, 250, 0.50),
    inset 0 0 40px rgba(255, 255, 255, 0.25);
  animation: orbFloat 5s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(-7px) scale(1); }
  50% { transform: translateY(7px) scale(1.04); }
}
.fallback-text {
  margin: 0;
  color: #cfe9ff;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

/* ---------- 加载态 ---------- */
.stage-loading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.stage-loading.is-hidden { opacity: 0; }
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 说话态：光环加速脉动 + 辉光增强 ---------- */
.stage.speaking .ring { filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.55)); }
.stage.speaking .ring-a { --dur: 9s;  --dur2: 14s; --op: 0.85; }
.stage.speaking .ring-b { --dur: 12s; --dur2: 19s; --op: 0.62; }
.stage.speaking .ring-c { --dur: 16s; --dur2: 25s; --op: 0.46; }
.stage.speaking .floor {
  opacity: 1;
  filter: blur(18px);
  background: radial-gradient(ellipse at center,
      rgba(34, 211, 238, 0.62) 0%,
      rgba(167, 139, 250, 0.22) 46%,
      rgba(34, 211, 238, 0) 74%);
}
.stage.speaking .scan { animation-duration: 1.7s; }

/* ---------- Controls ---------- */
.controls {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 8px;
}
.btn {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 10px;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: transform 0.06s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  color: #04121a;
  background: linear-gradient(90deg, var(--cyan), #7cd8ff 45%, var(--violet) 100%);
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.35), 0 4px 18px rgba(167, 139, 250, 0.30);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(34, 211, 238, 0.10); border-color: rgba(34, 211, 238, 0.32); }

/* ---------- 星语衣柜 ---------- */
.wardrobe {
  border: 1px solid rgba(126, 240, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(9, 16, 36, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wardrobe.is-hidden { display: none; }
.wardrobe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wardrobe-title {
  font-size: 15px;
  font-weight: 700;
  color: #d9f6ff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.wardrobe-close {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}
.wardrobe-close:hover { color: var(--fg); border-color: rgba(34, 211, 238, 0.4); }
.wardrobe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.look {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.look.is-current {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.08);
}
.look-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.look-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.look-tag {
  flex: none;
  font-size: 11px;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  padding: 1px 8px;
  letter-spacing: 0.04em;
}
.look-ops {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.look-current {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.chip {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.06s ease;
  white-space: nowrap;
}
.chip:hover { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.4); }
.chip:active { transform: scale(0.96); }
.chip-danger:hover {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.wardrobe-add {
  display: flex;
  gap: 8px;
}
.wardrobe-input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--fg);
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.7);
  outline: none;
  transition: border-color 0.2s ease;
}
.wardrobe-input:focus { border-color: rgba(34, 211, 238, 0.5); }
.wardrobe-input::placeholder { color: rgba(142, 160, 200, 0.65); }
.wardrobe-add-btn { padding: 11px 16px; font-size: 13.5px; border-radius: 12px; }
.wardrobe-file-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.wardrobe-file { color: var(--muted); font-size: 12px; max-width: 200px; }

/* ---------- 造型速选（卡片） ---------- */
.look-section { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.section-title {
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em;
  color: #d9f6ff; text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}
.section-hint { font-size: 11.5px; color: var(--muted); }
.look-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(74px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}
.look-row::-webkit-scrollbar { display: none; }
.look-card {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.06s ease;
}
.look-card:active { transform: scale(0.97); }
.look-card-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #04121a;
  background: radial-gradient(circle at 36% 30%, #ffffff 0%, var(--accent, #22d3ee) 78%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.10), 0 6px 16px rgba(0, 0, 0, 0.35);
}
.look-card-name { font-size: 11.5px; font-weight: 600; color: var(--fg); white-space: nowrap; }
.look-card.is-current {
  border-color: var(--accent, #22d3ee);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14) 0%, rgba(34, 211, 238, 0.04) 100%);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.10);
}
.look-card.is-current .look-card-name { color: #eafcff; }

/* ---------- 商用交付锁：冻结造型样式 ---------- */
.look-card.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.4);
  position: relative;
}
.look-card.is-locked:active { transform: none; }
.look-card.is-locked .look-card-avatar {
  background: radial-gradient(circle at 36% 30%, #8aa0b8 0%, #46566b 78%);
}
.look-card.is-locked .look-card-name { color: #8aa0b8; }
.look-card-lock { position: absolute; top: 6px; right: 8px; font-size: 11px; line-height: 1; }
.look-note {
  font-size: 11.5px; line-height: 1.6; color: #9fb0c8;
  background: rgba(126, 240, 255, 0.06);
  border: 1px dashed rgba(126, 240, 255, 0.22);
  border-radius: 10px; padding: 8px 11px; margin: 4px 0 0;
}
.look-note b { color: #cfe9ff; }
.look-locked-tag {
  font-size: 11px; font-weight: 600; color: #9fb0c8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(159, 176, 200, 0.4);
  border-radius: 8px; padding: 3px 8px; white-space: nowrap;
}
.look.is-locked { opacity: 0.7; }

/* ---------- 商用交付锁：冻结造型（研发中 · 即将上线） ---------- */
.look-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 6px 2px 0; }
.look-note b { color: #eafcff; }
.look-card.is-locked {
  position: relative;
  cursor: not-allowed;
  opacity: 0.55;
  border-style: dashed;
  filter: grayscale(0.2);
}
.look-card.is-locked .look-card-avatar { filter: grayscale(0.7); opacity: 0.85; }
.look-card.is-locked .look-card-name { color: var(--muted); }
.look-card-lock { position: absolute; top: 5px; right: 6px; font-size: 10px; line-height: 1; }
.look.is-locked { opacity: 0.6; }
.look-locked-tag { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ---------- 动作库面板 ---------- */
.act-panel {
  border: 1px solid rgba(126, 240, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(9, 16, 36, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  padding: 12px 12px 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.act-panel.is-hidden { display: none; }
.act-sec { display: flex; flex-direction: column; gap: 7px; }
.act-sec-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--cyan); text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}
.act-items { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- 舞台调校（打光 / 视角） ---------- */
.stage-tune {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}
.tune-row { display: flex; align-items: center; gap: 10px; }
.tune-label { flex: none; width: 30px; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.tune-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tune-chips .chip.is-on {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.55);
  color: #eafcff;
  box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.12);
}

/* 造型许可标签 */
.look-dot {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent, #22d3ee);
  box-shadow: 0 0 8px var(--accent, #22d3ee);
}
.look-lic {
  flex: none; font-size: 10.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 7px; letter-spacing: 0.02em;
}

/* ---------- Status ---------- */
.status-line {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  min-height: 1.2em;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.footer p { margin: 3px 0; }
.footer-org { color: #c7d2ee; font-weight: 600; }
.footer-icp { letter-spacing: 0.02em; }

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .hero-title { font-size: 32px; }
}

/* ---------- 尊重系统减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .ring, .ring::after, .dust i, .scan, .hero-title, .fallback-orb, .spinner {
    animation-duration: 20s;
    animation-iteration-count: 1;
  }
}

/* ---------- 声音开关与解锁提示（v3.1 修复没有声音） ---------- */
.sound-btn {
  position: absolute; top: 52px; right: 14px; z-index: 30;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(126, 240, 255, 0.28);
  background: rgba(9, 16, 36, 0.62);
  color: #bfe9ff; font-size: 17px; line-height: 1;
  cursor: pointer; backdrop-filter: blur(6px);
  transition: transform 0.08s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.sound-btn:hover { border-color: rgba(126, 240, 255, 0.6); }
.sound-btn:active { transform: scale(0.92); }
.sound-btn.is-muted { opacity: 0.55; }
.sound-hint {
  position: absolute; left: 50%; top: 54px; transform: translateX(-50%);
  z-index: 31; pointer-events: none;
  font-size: 12.5px; font-weight: 600; color: #04121a;
  background: linear-gradient(135deg, #7df0ff, #4cc9f0);
  border-radius: 999px; padding: 7px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: soundHintPulse 1.6s ease-in-out infinite;
}
@keyframes soundHintPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .sound-hint { animation: none; }
}

/* ============================================================
   v4.0 自主产线（XT-STAR-V4 20261011）：大舞台 + 左右 dock + 台词输入条
   ============================================================ */
@media (min-width: 900px) {
  .page { max-width: 1320px; }
  .hero { text-align: center; }
  .stage-wrap { aspect-ratio: auto; height: min(82vh, 900px); }
}
.v4-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 9;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(126, 240, 255, 0.35);
  background: rgba(10, 18, 40, 0.55); color: #bfe9ff;
  font-size: 26px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px); transition: all .2s;
}
.v4-nav:hover { border-color: #7ef0ff; color: #fff; box-shadow: 0 0 14px rgba(126, 240, 255, 0.35); }
.v4-nav-prev { left: 90px; }
.v4-nav-next { right: 90px; }
@media (max-width: 899px) { .v4-nav-prev { left: 84px; } .v4-nav-next { right: 84px; } }
@media (max-width: 640px) { .v4-nav-prev { left: 8px; } .v4-nav-next { right: 8px; } }
/* v4.1 左右对称玻璃 dock（贴舞台边缘） */
.dk-dock { position: absolute; z-index: 9; display: flex; flex-direction: column; gap: 10px; top: 50%; transform: translateY(-50%); }
.dk-left { left: 14px; }
.dk-right { right: 14px; }
.dk-btn {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 64px; padding: 9px 6px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-radius: 14px;
  border: 1px solid rgba(126, 240, 255, 0.30);
  background: rgba(10, 18, 40, 0.48);
  color: #cfe9ff;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(34, 211, 238, 0.06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .1s ease, background .2s ease;
}
.dk-btn:hover { border-color: #7ef0ff; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(34, 211, 238, 0.28), inset 0 0 18px rgba(34, 211, 238, 0.12); }
.dk-btn:active { transform: translateY(0) scale(0.96); }
.dk-ico { font-size: 18px; line-height: 1; }
.dk-tx { font-size: 10.5px; letter-spacing: .06em; color: #a9c2e6; }
/* 移动端：dock 收为底部横条，不遮挡数字人主体 */
@media (max-width: 640px) {
  .dk-dock { flex-direction: row; top: auto; bottom: 10px; transform: none; gap: 6px; }
  .dk-left { left: 8px; }
  .dk-right { right: 8px; }
  .dk-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; gap: 0; }
  .dk-btn .dk-tx { display: none; }
  .dk-ico { font-size: 17px; }
}
@media (max-width: 899px) and (min-width: 641px) { .dk-dock { gap: 8px; } }

.tts-bar {
  margin-top: 14px; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(180deg, rgba(24, 16, 52, 0.72), rgba(10, 14, 32, 0.85));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.12) inset;
}
.tts-bar textarea {
  width: 100%; resize: vertical; min-height: 56px; max-height: 140px;
  background: rgba(6, 10, 26, 0.8); border: 1px solid rgba(126, 240, 255, 0.22);
  border-radius: 10px; color: #e8f2ff; padding: 10px 12px;
  font: inherit; font-size: 14px; outline: none;
}
.tts-bar textarea:focus { border-color: #7ef0ff; box-shadow: 0 0 12px rgba(126, 240, 255, 0.18); }
.tts-bar-ops { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tts-voice {
  background: rgba(6, 10, 26, 0.85); color: #cfe9ff;
  border: 1px solid rgba(126, 240, 255, 0.22); border-radius: 10px;
  padding: 9px 10px; font: inherit; font-size: 13px; outline: none;
}
.tts-send { min-width: 150px; }
.tts-hint { font-size: 12px; color: #8fa8c9; }

/* ============================================================
   v4.1「AI 高科技」界面重构（XT-STAR-V4.1 20261011d）
   深空渐变 · 网格粒子 · 玻璃拟态 · 霓虹描边/光晕
   ============================================================ */

/* 全屏观感：body 深空底（原有 radial 渐变）+ 网格点缀 */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(126, 240, 255, 0.060) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 240, 255, 0.060) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 8%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 82%);
  mask-image: radial-gradient(120% 90% at 50% 8%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 82%);
  opacity: 0.55;
}
.page { position: relative; z-index: 1; }

/* 顶部状态条（舞台内浮层） */
.topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.72) 0%, rgba(3, 7, 18, 0) 100%);
  pointer-events: none;
}
.topbar-brand {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #d9f6ff;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
  white-space: nowrap;
}
.topbar-look {
  font-size: 11.5px; color: #eafcff;
  border: 1px solid rgba(126, 240, 255, 0.35); border-radius: 999px;
  padding: 2px 10px; letter-spacing: .04em;
  background: rgba(34, 211, 238, 0.10);
  white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis;
}
.topbar-status {
  margin-left: auto;
  font-size: 11.5px; color: #9fe8ff; letter-spacing: .04em;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  white-space: nowrap;
}

/* 导出菜单（浮层，默认隐藏） */
.export-menu {
  position: absolute; right: 88px; top: 50%; transform: translateY(-50%);
  z-index: 12; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; border-radius: 14px;
  border: 1px solid rgba(126, 240, 255, 0.32);
  background: rgba(8, 14, 32, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(34, 211, 238, 0.08);
}
.export-menu.is-hidden { display: none; }
.ex-item {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #e6f6ff; text-align: left;
  padding: 9px 14px; border-radius: 10px;
  border: 1px solid rgba(126, 240, 255, 0.20);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap; transition: border-color .2s ease, background .2s ease, transform .06s ease;
}
.ex-item:hover { border-color: #7ef0ff; background: rgba(34, 211, 238, 0.14); }
.ex-item:active { transform: scale(0.97); }

/* 抽屉面板（玻璃拟态，默认隐藏，从左滑入） */
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
  width: min(430px, 92vw);
  display: flex; flex-direction: column;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-right: 1px solid rgba(126, 240, 255, 0.28);
  background: linear-gradient(180deg, rgba(9, 16, 36, 0.92) 0%, rgba(4, 8, 20, 0.94) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.55), inset -1px 0 0 rgba(126, 240, 255, 0.10);
  transform: translateX(-102%);
  transition: transform .32s cubic-bezier(.22, .8, .3, 1);
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(126, 240, 255, 0.16);
}
.drawer-title {
  font-size: 15px; font-weight: 800; letter-spacing: .06em; color: #d9f6ff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}
.drawer-close {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(126, 240, 255, 0.28);
  background: rgba(255, 255, 255, 0.05); color: #bfe9ff;
  font-size: 18px; line-height: 1;
}
.drawer-close:hover { border-color: #7ef0ff; color: #fff; box-shadow: 0 0 12px rgba(126, 240, 255, 0.35); }
.drawer-body { display: flex; flex-direction: column; gap: 12px; }
.shell-note {
  font-size: 12.5px; color: #9fb0c8; line-height: 1.6;
  background: rgba(126, 240, 255, 0.06);
  border: 1px dashed rgba(126, 240, 255, 0.24);
  border-radius: 12px; padding: 12px 14px;
}

/* 抽屉内布局：造型/换装/配饰/对话 */
#drawer-look .look-row { grid-auto-columns: minmax(84px, 1fr); }
.outfit-grid, .acc-grid, .custom-panel, .chat-log { display: flex; flex-direction: column; gap: 8px; }
.outfit-grid:empty, .acc-grid:empty, .custom-panel:empty { display: none; }
.chat-log {
  min-height: 180px; max-height: 46vh; overflow-y: auto;
  padding: 12px; border-radius: 12px;
  border: 1px solid rgba(126, 240, 255, 0.16);
  background: rgba(6, 10, 26, 0.55);
}
.chat-input {
  width: 100%; resize: vertical; min-height: 52px; max-height: 120px;
  background: rgba(6, 10, 26, 0.8); border: 1px solid rgba(126, 240, 255, 0.22);
  border-radius: 10px; color: #e8f2ff; padding: 10px 12px; font: inherit; font-size: 14px; outline: none;
}
.chat-input:focus { border-color: #7ef0ff; box-shadow: 0 0 12px rgba(126, 240, 255, 0.18); }
.chat-ops { display: flex; gap: 10px; align-items: center; }
.chat-voice {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  border: 1px solid rgba(126, 240, 255, 0.28);
  background: rgba(255, 255, 255, 0.05); color: #cfe9ff; font-size: 18px;
}
.chat-send { flex: 1; }
/* v4.1 P2：对话消息气泡 */
.chat-msg {
  max-width: 88%; padding: 9px 12px; border-radius: 12px;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.chat-msg.user {
  align-self: flex-end; border-bottom-right-radius: 4px;
  background: rgba(56, 189, 248, 0.18); border: 1px solid rgba(126, 240, 255, 0.32); color: #eaf6ff;
}
.chat-msg.bot {
  align-self: flex-start; border-bottom-left-radius: 4px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(126, 240, 255, 0.16); color: #dbe9ff;
}
.chat-msg.notice {
  align-self: center; text-align: center; font-size: 13px;
  background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.30); color: #ffe9a8;
}
.chat-msg.typing::after { content: '…'; animation: chatDots 1.2s steps(1) infinite; }
@keyframes chatDots { 0% { content: '·'; } 33% { content: '··'; } 66% { content: '···'; } }
.chat-input:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-send:disabled { opacity: 0.55; cursor: not-allowed; }

/* v4.1 P6：虚拟场景平台抽屉 */
.scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.scene-card {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  cursor: pointer; text-align: left; padding: 10px; border-radius: 12px;
  border: 1px solid rgba(126, 240, 255, 0.16); background: rgba(255, 255, 255, 0.04);
  color: #dbe9ff; font: inherit;
}
.scene-card:hover { border-color: rgba(126, 240, 255, 0.36); }
.scene-card.is-on {
  border-color: #7ef0ff; background: rgba(34, 211, 238, 0.10);
  box-shadow: 0 0 0 1px rgba(126, 240, 255, 0.40), 0 0 18px rgba(34, 211, 238, 0.25);
}
.scene-thumb { display: block; height: 54px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.08); }
.scene-name { font-size: 13px; line-height: 1.3; }
.scene-thumb.sc-studio    { background: linear-gradient(135deg, #0a1a4a, #5ad1ff); }
.scene-thumb.sc-classroom { background: linear-gradient(135deg, #2a1a08, #ffb347); }
.scene-thumb.sc-newsroom  { background: linear-gradient(135deg, #03122e, #22d3ee); }
.scene-thumb.sc-hologram  { background: linear-gradient(135deg, #03040c, #36e0ff); }
.scene-thumb.sc-palace    { background: linear-gradient(135deg, #3a1010, #c9a227); }
.scene-thumb.sc-lounge    { background: linear-gradient(135deg, #3a2a1a, #ffd9a0); }
.scene-thumb.sc-skyline   { background: linear-gradient(135deg, #060913, #ff8fb0); }
.scene-thumb.sc-green     { background: linear-gradient(135deg, #004d1a, #00b140); }
.scene-screen {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(126, 240, 255, 0.18);
}
.scene-screen.is-hidden { display: none; }
.scene-screen-title { font-size: 13px; color: #9fd8ff; }
.scene-input {
  width: 100%; background: rgba(6, 10, 26, 0.8); border: 1px solid rgba(126, 240, 255, 0.22);
  border-radius: 10px; color: #e8f2ff; padding: 9px 12px; font: inherit; font-size: 14px; outline: none;
}
.scene-input:focus { border-color: #7ef0ff; box-shadow: 0 0 12px rgba(126, 240, 255, 0.18); }
.scene-ops { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scene-file-label { position: relative; overflow: hidden; display: inline-block; }
.scene-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.scene-file-label > span {
  display: inline-block; padding: 8px 14px; border-radius: 10px;
  border: 1px solid rgba(126, 240, 255, 0.28); background: rgba(255, 255, 255, 0.05); color: #cfe9ff; cursor: pointer;
}
.scene-chroma-btn { padding: 8px 16px; }
.scene-hint { font-size: 12px; color: #7fa8cf; }

/* 底部控制条 */
.bottom-bar {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 8px;
  margin-top: 14px; padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(126, 240, 255, 0.18);
  background: rgba(9, 16, 36, 0.48);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.05);
}

@media (max-width: 640px) {
  .bottom-bar { grid-template-columns: 1fr 1fr; }
  .stage-wrap { border-radius: 14px; }
  .topbar { padding: 8px 10px; }
}

/* ============================================================
   v4.1 P3 · 换装 / 配饰 / 配色调色（outfit.js 生成的 DOM）
   ============================================================ */
.p3-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.p3-sec { display: flex; flex-direction: column; gap: 7px; }
.p3-sec-title {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--cyan);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}
.p3-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p3-card {
  display: flex; flex-direction: column; gap: 7px;
  padding: 9px 10px; border-radius: 12px;
  border: 1px solid rgba(126, 240, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}
.p3-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.p3-name { font-size: 12.5px; font-weight: 600; color: #e8f2ff; }
.p3-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.p3-sw {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 18px; height: 18px; border-radius: 50%; padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: transform .08s ease, border-color .15s ease;
}
.p3-sw:hover { transform: scale(1.12); }
.p3-sw.is-on { border-color: #7ef0ff; box-shadow: 0 0 10px rgba(126, 240, 255, 0.6); }
.p3-color {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 10px; border-radius: 12px;
  border: 1px solid rgba(126, 240, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}
.p3-color-name { flex: none; width: 40px; font-size: 12.5px; color: #cfe9ff; font-weight: 600; }
.p3-reset { margin-top: 4px; width: 100%; }
@media (max-width: 480px) { .p3-grid { grid-template-columns: 1fr; } }

/* ===== v4.1 P7a：照片 → 成片 工作台 ===== */
.ph-lead { margin: 0 0 12px; font-size: 12.5px; line-height: 1.65; color: #b9d4ec; }
.ph-step { display: flex; gap: 10px; padding: 11px 10px; border-radius: 12px; border: 1px solid rgba(126, 240, 255, 0.16); background: rgba(255, 255, 255, 0.035); margin-bottom: 10px; }
.ph-no { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #04121f; background: linear-gradient(135deg, #7ef0ff, #57a8ff); }
.ph-step-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-file-label { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 12px; border-radius: 10px; border: 1px dashed rgba(126, 240, 255, 0.42); color: #cfe9ff; font-size: 12.5px; background: rgba(126, 240, 255, 0.06); width: fit-content; }
.ph-file-label:hover { border-color: #7ef0ff; background: rgba(126, 240, 255, 0.12); }
.ph-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ph-prev-note { font-size: 12px; color: #8fb4d6; }
.ph-prev { max-width: 100%; max-height: 168px; border-radius: 10px; border: 1px solid rgba(126, 240, 255, 0.22); object-fit: contain; background: rgba(0, 0, 0, 0.25); align-self: flex-start; }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-lbl { flex: none; width: 40px; font-size: 12.5px; color: #cfe9ff; font-weight: 600; }
.ph-select, .ph-text { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(126, 240, 255, 0.20); background: rgba(6, 18, 32, 0.72); color: #e8f2ff; font-size: 12.5px; font-family: inherit; }
.ph-select:focus, .ph-text:focus { outline: none; border-color: #7ef0ff; box-shadow: 0 0 12px rgba(126, 240, 255, 0.18); }
.ph-text { resize: vertical; min-height: 62px; }
.ph-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #cfe9ff; cursor: pointer; }
.ph-check input { accent-color: #57a8ff; }
.ph-go { width: 100%; }
.ph-status { font-size: 12px; color: #7ef0ff; min-height: 16px; }
.ph-hint { font-size: 11.5px; color: #7f9db8; line-height: 1.6; }

/* ============================================================
   v4.3 P-U1/P-U2（20261012a）：布局避让 + dock 联动高亮
   ============================================================ */
/* 桌面端：抽屉打开 → 舞台列避让（引擎 ResizeObserver 自动重排 3D 画布） */
@media (min-width: 769px) {
  .page {
    max-width: 880px;
    transition: margin-left .32s cubic-bezier(.22, .8, .3, 1), max-width .32s cubic-bezier(.22, .8, .3, 1);
  }
  body.drawer-open .page {
    margin-left: 446px;
    max-width: min(880px, calc(100vw - 480px));
  }
}
/* dock 按键：与抽屉/菜单状态双向联动高亮 */
.dk-btn.is-on {
  border-color: #7ef0ff;
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.45), inset 0 0 10px rgba(126, 240, 255, 0.12);
}
.dk-btn.is-on .dk-ico { filter: drop-shadow(0 0 6px rgba(126, 240, 255, 0.8)); }
/* busy 统一禁用态 */
.dk-btn[disabled], .btn[disabled], .ph-go[disabled] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
/* 移入抽屉后的老区块去外壳 */
.drawer .stage-tune { border: none; background: transparent; padding: 0; }
.drawer .tts-bar { margin: 0; }

/* ===== v4.3 P-V：视频 → 成片 工作台 ===== */
.vd-prev {
  width: 100%; max-height: 220px; border-radius: 10px;
  border: 1px solid rgba(126, 240, 255, 0.22); background: rgba(0, 0, 0, 0.35);
  object-fit: contain; outline: none;
}
.vd-frame-title { font-size: 12px; color: #9fd8ff; letter-spacing: .04em; }
.vd-frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vd-frames:empty { display: none; }
.vd-frame {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding: 0;
  border: 2px solid rgba(126, 240, 255, 0.18); border-radius: 10px;
  overflow: hidden; background: rgba(0, 0, 0, 0.25); line-height: 0;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.vd-frame:hover { transform: translateY(-1px); border-color: rgba(126, 240, 255, 0.5); }
.vd-frame.is-on {
  border-color: #7ef0ff;
  box-shadow: 0 0 0 1px rgba(126, 240, 255, 0.5), 0 0 14px rgba(34, 211, 238, 0.4);
}
.vd-frame img { display: block; width: 100%; height: auto; }
@media (max-width: 480px) { .vd-frames { grid-template-columns: repeat(3, 1fr); } }


/* ============================================================
   v4.4 P-U3（20261012b）：场景联动 —— 顶栏可点入口 + 推荐造型徽标
   ============================================================ */
.topbar-look, .topbar-status {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  font: inherit; color: inherit; background: transparent;
  border: 1px solid transparent; border-radius: 8px; padding: 2px 7px;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.topbar-look:hover, .topbar-status:hover {
  border-color: rgba(126, 240, 255, 0.45);
  background: rgba(34, 211, 238, 0.10);
  color: #eafcff;
}
.topbar-suggest {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  margin-left: auto; font: inherit; font-size: 12px; font-weight: 700;
  color: #04121f; border: none; border-radius: 999px; padding: 4px 11px;
  background: linear-gradient(135deg, #7ef0ff, #a78bfa);
  box-shadow: 0 0 14px rgba(126, 240, 255, 0.45);
  animation: sugPulse 2.2s ease-in-out infinite;
}
.topbar-suggest.is-hidden { display: none; }
.topbar-suggest.is-loading {
  background: linear-gradient(135deg, #7ef0ff33, #a78bfa33);
  color: #dff6ff; cursor: progress; animation: none;
}
.topbar-suggest:active { transform: scale(0.97); }
@keyframes sugPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(126, 240, 255, 0.35); }
  50% { box-shadow: 0 0 18px rgba(167, 139, 250, 0.60); }
}
/* 场景卡副信息（打光 / 机位联动展示） */
.scene-meta { font-size: 11px; color: #8fb4d6; letter-spacing: .02em; }


/* ============================================================
   v4.5（20261012d）：造型横滑 / 数字人调节 / 成片预览 / 自定义场景
   ============================================================ */
/* P1 造型行左右箭头 */
.look-strip { display: flex; align-items: stretch; gap: 6px; }
.look-strip .look-row { flex: 1 1 auto; min-width: 0; }
.look-arrow {
  -webkit-appearance: none; appearance: none; cursor: pointer; flex: none;
  width: 30px; border-radius: 10px; font-size: 20px; line-height: 1;
  color: #cfe9ff; background: rgba(126, 240, 255, 0.08);
  border: 1px solid rgba(126, 240, 255, 0.28);
}
.look-arrow:hover { border-color: #7ef0ff; background: rgba(34, 211, 238, 0.16); color: #fff; }
.look-arrow:active { transform: scale(0.95); }

/* P3 数字人调节 */
.av-row { display: flex; align-items: center; gap: 10px; }
.av-slider { flex: 1 1 auto; accent-color: #57a8ff; }
.av-val { flex: none; width: 52px; text-align: right; font-size: 12px; color: #9fd8ff; font-variant-numeric: tabular-nums; }
.cus-color { width: 46px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid rgba(126,240,255,0.28); background: rgba(6,18,32,0.72); cursor: pointer; }

/* P2 成片预览弹层（舞台内，先看后存） */
.clip-modal {
  position: absolute; z-index: 70; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92%);
  max-height: 92%;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 16px;
  border: 1px solid rgba(126, 240, 255, 0.35);
  background: linear-gradient(180deg, rgba(9, 16, 36, 0.96), rgba(4, 8, 20, 0.97));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 211, 238, 0.15);
}
.clip-modal.is-hidden { display: none; }
.clip-head { display: flex; align-items: center; justify-content: space-between; }
.clip-title { font-size: 14px; font-weight: 800; letter-spacing: .05em; color: #d9f6ff; text-shadow: 0 0 12px rgba(34, 211, 238, 0.4); }
.clip-close {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(126, 240, 255, 0.28); background: rgba(255,255,255,0.05); color: #bfe9ff; font-size: 17px; line-height: 1;
}
.clip-close:hover { border-color: #7ef0ff; color: #fff; }
.clip-video { width: 100%; max-height: 52vh; border-radius: 10px; background: rgba(0,0,0,0.4); outline: none; }
.clip-ops { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clip-note { font-size: 11.5px; color: #8fb4d6; line-height: 1.5; flex: 1 1 auto; min-width: 160px; }

/* ============================================================
   v4.6（20261012e）：数字人精修面板 —— 页签 / 五官滑杆 / 视线盘 / 色板
   ============================================================ */
.av-tabs { display: flex; gap: 6px; background: rgba(6,16,30,0.6); border: 1px solid rgba(126,240,255,0.18); border-radius: 12px; padding: 4px; }
.av-tab {
  -webkit-appearance: none; appearance: none; cursor: pointer; flex: 1 1 0;
  border: none; background: transparent; color: #9fb8d6;
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 8px 4px; border-radius: 9px; transition: all .18s ease;
}
.av-tab:hover { color: #d9f6ff; }
.av-tab.is-on { background: linear-gradient(180deg, rgba(34,211,238,0.24), rgba(34,211,238,0.10)); color: #eafcff; box-shadow: inset 0 0 0 1px rgba(126,240,255,0.35); }
.av-panel { display: flex; flex-direction: column; gap: 9px; }
.av-panel.is-hidden { display: none; }
.av-sec {
  margin-top: 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  color: #6fd8ff; text-transform: none;
  border-left: 3px solid rgba(111,216,255,0.6); padding-left: 8px;
}
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.av-chips .chip { font-size: 12px; padding: 6px 11px; }
.av-chips .chip.is-on { border-color: #7ef0ff; background: rgba(34,211,238,0.2); color: #eafcff; }
.av-gaze {
  display: grid; grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(3, 42px);
  gap: 5px; justify-content: center; align-self: center; margin: 4px 0;
}
.av-gbtn {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  border: 1px solid rgba(126,240,255,0.3); background: rgba(126,240,255,0.07);
  color: #cfe9ff; border-radius: 11px; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.av-gbtn:nth-child(1) { grid-area: 1 / 2; }
.av-gbtn:nth-child(2) { grid-area: 2 / 1; }
.av-gbtn:nth-child(3) { grid-area: 2 / 2; }
.av-gbtn:nth-child(4) { grid-area: 2 / 3; }
.av-gbtn:nth-child(5) { grid-area: 3 / 2; }
.av-gbtn:hover { border-color: #7ef0ff; background: rgba(34,211,238,0.2); color: #fff; }
.av-gbtn.av-gc { font-size: 20px; color: #8fb4d6; }
.av-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #bcd4ea; line-height: 1.5; }
.av-check input { accent-color: #57a8ff; width: 15px; height: 15px; }
.av-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.av-sw {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.22); box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset;
  transition: transform .15s ease, border-color .15s ease;
}
.av-sw:hover { transform: scale(1.08); }
.av-sw.is-on { border-color: #7ef0ff; box-shadow: 0 0 10px rgba(126,240,255,0.6); }
