/* 声音克隆 · 样式
 * ===========================================================================
 * 设计原则（别改调性）：
 *   · **一屏一件事**：没音色时，首屏只有"照着念 → 按红钮"一件事，别的都收起来。
 *     这个功能的成败就在"用户愿不愿意开口念 15 秒"，屏幕上多一个按钮就少一分意愿。
 *   · **录音钮要像录音钮**：大、圆、有质感、按下有反馈。它是整页的视觉中心。
 *   · **每一步都告诉他"现在在干嘛、大概多久"**：录音/克隆/合成都是黑盒等待，
 *     没有进度感人就会走。文案要写"大概 20 秒"，不要写"请稍候"。
 *   · 品牌橙 #f95901 只用在主动作上。所有类名 .vcl- 前缀，不动站内公共类。
 */

.vcl-root {
  position: relative;
  padding-bottom: 92px;   /* 底部固定 TabBar 的留白，不留最后一块内容会被压住 */
}

/* ============================================================ 页头 */

.vcl-head {
  display: flex; gap: 11px; align-items: center;
  padding: 2px 2px 14px;
}
.vcl-head-ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
  background: linear-gradient(135deg, #ffd9b8, #ffb27a);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.vcl-head-b { flex: 1 1 auto; min-width: 0; }
.vcl-head-b h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.vcl-head-b p { margin: 3px 0 0; font-size: 12.5px; color: var(--text2); line-height: 1.5; }

/* ============================================================ 步骤块 */

.vcl-step {
  background: var(--card); border: 1px solid #f2e2d6; border-radius: 18px;
  padding: 15px 14px; margin-bottom: 13px;
  box-shadow: 0 2px 10px rgba(58, 42, 30, .04);
}
.vcl-step-h {
  display: flex; align-items: center; gap: 8px; margin-bottom: 11px;
}
.vcl-step-n {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  background: #fff1e7; color: var(--primary); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.vcl-step-h b { font-size: 14.5px; color: var(--text); }
.vcl-step-h i {
  font-style: normal; font-size: 12px; color: var(--text2); margin-left: auto;
  white-space: nowrap;
}

/* 照着念的稿子 */
.vcl-script {
  background: #fff8f2; border: 1px dashed #ffd9bd; border-radius: 13px;
  padding: 13px 14px; font-size: 15px; line-height: 1.85; color: #6b4a33;
  letter-spacing: .2px;
}
.vcl-script-ops { display: flex; justify-content: flex-end; margin-top: 8px; }
.vcl-mini {
  border: 1px solid #ecd9c8; background: #fff; color: #8a6a4e;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 11px; border-radius: 10px; cursor: pointer;
}
.vcl-mini:active { opacity: .8; }

/* ============================================================ 录音钮 */

.vcl-rec-wrap { text-align: center; padding: 16px 0 6px; }
.vcl-rec {
  position: relative; width: 96px; height: 96px; border-radius: 50%;
  border: none; cursor: pointer; margin: 0 auto; display: block;
  background: linear-gradient(145deg, #ff8a4d, #f94400);
  box-shadow: 0 8px 22px rgba(249, 89, 1, .34), inset 0 -3px 8px rgba(0,0,0,.12);
  color: #fff; font-size: 30px; line-height: 1;
  transition: transform .12s;
}
.vcl-rec:active { transform: scale(.95); }
.vcl-rec.on {
  background: linear-gradient(145deg, #ff6b6b, #d63031);
  animation: vcPulse 1.6s ease-out infinite;
}
@keyframes vcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(214, 48, 49, .45), 0 8px 22px rgba(214,48,49,.3); }
  70%  { box-shadow: 0 0 0 22px rgba(214, 48, 49, 0), 0 8px 22px rgba(214,48,49,.3); }
  100% { box-shadow: 0 0 0 0 rgba(214, 48, 49, 0), 0 8px 22px rgba(214,48,49,.3); }
}
.vcl-rec-t {
  margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.vcl-rec-s { margin-top: 4px; font-size: 12.5px; color: var(--text2); min-height: 18px; }
.vcl-rec-s.good { color: #2f9e5f; font-weight: 600; }
.vcl-rec-s.warn { color: #c0871f; font-weight: 600; }
.vcl-rec-s.bad  { color: #d63031; font-weight: 600; }

/* 电平条：让人知道"真的在录" */
.vcl-meter {
  height: 4px; border-radius: 2px; background: #f4ece5;
  margin: 12px auto 0; max-width: 260px; overflow: hidden;
}
.vcl-meter i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffb27a, #f94400); border-radius: 2px;
  transition: width .12s;
}

.vcl-audio { width: 100%; margin-top: 12px; }
.vcl-audio-wrap { margin-top: 12px; }

/* ============================================================ 授权 */

.vcl-agree {
  display: flex; gap: 9px; align-items: flex-start;
  background: #fbf8f4; border: 1px solid #efe4d9; border-radius: 13px;
  padding: 11px 12px; margin-top: 12px; cursor: pointer;
}
.vcl-agree input { margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: #f95901; }
.vcl-agree div { font-size: 12.5px; color: #6b5a4a; line-height: 1.6; }
.vcl-agree b { color: #c0392b; }

/* ============================================================ 按钮 */

.vcl-btn {
  border: 1px solid #ecdfd4; background: #fff; border-radius: 13px;
  padding: 12px; font-size: 15px; font-family: inherit; font-weight: 600;
  color: var(--text); cursor: pointer; width: 100%;
}
.vcl-btn.main {
  background: var(--grad); color: #fff; border: none;
  box-shadow: 0 4px 12px rgba(249, 89, 1, .24);
}
.vcl-btn:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }
.vcl-btn.sm { padding: 9px 13px; font-size: 13px; width: auto; }
.vcl-btn.ghost { background: #fff; color: #8a7a6c; }

.vcl-row { display: flex; gap: 8px; margin-top: 12px; }
.vcl-row .vcl-btn { flex: 1 1 0; }

/* ============================================================ 音色卡 */

.vcl-voice {
  display: flex; gap: 11px; align-items: center;
  border: 1px solid #eee5dc; border-radius: 15px; background: #fff;
  padding: 12px; margin-bottom: 9px;
}
.vcl-voice-av {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px;
  background: linear-gradient(135deg, #ffe0c4, #ffc59a);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.vcl-voice-b { flex: 1 1 auto; min-width: 0; }
.vcl-voice-b b { display: block; font-size: 14.5px; color: var(--text); }
.vcl-voice-b span { font-size: 12px; color: var(--text2); }
.vcl-voice-ops { display: flex; gap: 6px; flex: 0 0 auto; }

/* 已回收的音色：灰一点、虚一点 —— 一眼看出"记录还在，但它现在不顶用"。
   不能做成正常的样式，否则用户会一直点它然后一直失败。 */
.vcl-voice.off { background: #faf8f5; border-style: dashed; }
.vcl-voice.off .vcl-voice-av { filter: grayscale(1); opacity: .5; }
.vcl-voice.off .vcl-voice-b b { color: var(--text2); }
.vcl-ico-btn {
  border: 1px solid #eee5dc; background: #fff; border-radius: 10px;
  width: 34px; height: 34px; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.vcl-ico-btn:active { background: #faf6f2; }

.vcl-pick {
  display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 11px;
}
.vcl-pick button {
  border: 1px solid #ecdfd4; background: #fff; border-radius: 11px;
  padding: 8px 12px; font-size: 13.5px; font-family: inherit; color: var(--text2);
  cursor: pointer; font-weight: 600;
}
.vcl-pick button.on { background: #fff1e7; border-color: var(--primary); color: var(--primary); }

/* ============================================================ 输入 */

.vcl-text {
  width: 100%; box-sizing: border-box; border: none; outline: none; resize: vertical;
  background: #fff8f2; border-radius: 13px; padding: 13px 14px;
  font-size: 15px; line-height: 1.7; color: var(--text); font-family: inherit;
  min-height: 108px;
}
.vcl-count { font-size: 12px; color: var(--text2); margin-top: 7px; display: flex; justify-content: space-between; }
.vcl-count b { color: var(--primary); }

.vcl-note {
  font-size: 12px; color: var(--text2); line-height: 1.6; margin-top: 9px;
  background: #faf7f3; border-radius: 10px; padding: 9px 11px;
}
.vcl-note.warn { background: #fff8e8; color: #8a6a1f; }

/* 结果 */
.vcl-out {
  margin-top: 13px; border-top: 1px dashed #efe4d9; padding-top: 13px;
}
.vcl-out-h { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.vcl-out-tip { font-size: 11.5px; color: var(--text2); margin-top: 7px; line-height: 1.6; }

/* ============================================================ 提示 / 空 */

.vcl-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(58, 42, 30, .93); color: #fff;
  border-radius: 12px; padding: 10px 16px; font-size: 13px;
  z-index: 70; max-width: 84vw; text-align: center; line-height: 1.5;
}
.vcl-toast[hidden] { display: none !important; }

.vcl-loading { text-align: center; padding: 26px; color: var(--text2); font-size: 13px; }

.vcl-busy { text-align: center; padding: 14px 0 4px; }
.vcl-busy-t { font-size: 13.5px; color: var(--text); font-weight: 600; }
.vcl-busy-s { font-size: 12px; color: var(--text2); margin-top: 4px; }
.vcl-bar { height: 3px; background: #f4ece5; border-radius: 2px; margin: 12px auto 0; max-width: 240px; overflow: hidden; }
.vcl-bar i {
  display: block; height: 100%; width: 30%; border-radius: 2px;
  background: linear-gradient(90deg, #ffb27a, #f94400);
  animation: vcSlide 1.3s ease-in-out infinite;
}
@keyframes vcSlide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

@media (max-width: 360px) {
  .vcl-script { font-size: 14px; line-height: 1.75; }
  .vcl-rec { width: 84px; height: 84px; font-size: 26px; }
}
