/* 语音录入（全站一套，public/voice.js；照金聚诚 PromptVoiceInput.vue、VoiceHoldButton.vue）。
   电脑上：「语音输入」按钮，录音时变成「结束并转文字」，旁边一小排跳动的音量条、录音中几秒、取消。手机上：从底下升起一块，按住说话。
   字都用深色，不放小灰字；颜色只用品牌蓝，取消滑动时才用一点红。 */
.xv { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; vertical-align: middle; }
.xv-toggle { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 1px solid #dfe1e6; border-radius: 9px;
  color: var(--ink, #1d2129); background: #fff; font: inherit; font-size: 14px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.xv-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xv-toggle:hover:not(:disabled) { border-color: #c5c9d1; background: #f7f8fa; }
.xv-toggle:disabled { cursor: progress; }
.xv[data-state="recording"] .xv-toggle { border-color: var(--blue, #1274a5); color: #fff; background: var(--blue, #1274a5); }
.xv[data-state="recording"] .xv-toggle:hover { background: var(--blue-hover, #106590); }
.xv[data-state="transcribing"] .xv-toggle svg { animation: xv-blink 1s ease-in-out infinite; }
.xv-status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink, #1d2129); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.xv-status[hidden] { display: none; }
.xv-meter { height: 16px; display: inline-flex; align-items: center; gap: 2px; }
.xv-meter i { width: 3px; height: 16px; border-radius: 2px; background: var(--blue, #1274a5); transform: scaleY(.15); transition: transform .12s linear; }
.xv-cancel { padding: 0; border: 0; color: var(--blue, #1274a5); background: none; font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
/* 只放一个圆图标的（助手对话框里） */
.xv.compact .xv-toggle { width: 36px; padding: 0; border-radius: 50%; }
.xv.compact .xv-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes xv-blink { 50% { opacity: .35; } }
/* 助手对话框里那颗：和旁边几个圆按钮一样不带边框 */
.mic-host .xv.compact .xv-toggle { border-color: transparent; color: #4e515c; }
.mic-host .xv.compact[data-state="recording"] .xv-toggle { color: #fff; }

/* 手机：底下升起来的一块（按住说话、松开转文字、往上滑取消） */
.xv-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; background: rgb(20 21 28 / 0%); transition: background .2s; }
.xv-sheet.on { background: rgb(20 21 28 / 32%); }
.xv-sheet-card { width: 100%; display: grid; justify-items: center; gap: 12px; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff;
  box-shadow: 0 -12px 32px rgb(20 21 28 / 14%); transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.xv-sheet.on .xv-sheet-card { transform: none; }
.xv-sheet-tip { margin: 0; color: var(--ink, #1d2129); font-size: 16px; font-weight: 600; }
.xv-wave { height: 44px; display: flex; align-items: center; gap: 5px; }
.xv-wave i { width: 5px; height: 44px; border-radius: 3px; background: var(--blue, #1274a5); transform: scaleY(.12); transition: transform .12s linear; }
.xv-sheet time { color: var(--ink, #1d2129); font-size: 14px; font-variant-numeric: tabular-nums; }
.xv-hold-btn { width: 100%; min-height: 56px; border: 1px solid #dce2ea; border-radius: 14px; color: var(--ink, #1d2129); background: #f3f6fa; font: inherit; font-size: 16px; font-weight: 600;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.xv-sheet .xv-hold-btn:active, .xv-sheet:not(.cancelling) .xv-hold-btn:disabled { color: #fff; border-color: var(--blue, #1274a5); background: var(--blue, #1274a5); }
.xv-sheet.cancelling .xv-hold-btn { color: #b42318; border-color: #f3c3bd; background: #fdecec; }
.xv-sheet.cancelling .xv-wave i { background: #d5453b; }
.xv-sheet small { color: var(--ink, #1d2129); font-size: 13px; }
.xv-sheet-close { padding: 6px 12px; border: 0; color: var(--blue, #1274a5); background: none; font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .xv-sheet, .xv-sheet-card, .xv-meter i, .xv-wave i { transition: none; } .xv[data-state="transcribing"] .xv-toggle svg { animation: none; } }
