/* 语音控件复用聊天主题，所有规则限定在 lc-voice 命名空间内。 */
.lc-voice-toolbar, .lc-voice-panel, .lc-voice-backdrop {
  --voice-panel: var(--panel, #fff);
  --voice-soft: var(--panel-2, #f7f9fc);
  --voice-text: var(--text, #101828);
  --voice-muted: var(--muted, #667085);
  --voice-line: var(--line, #e8edf5);
  --voice-accent: var(--accent, #2f6bff);
  --voice-danger: var(--danger, #c7352a);
  box-sizing: border-box;
  color: var(--voice-text);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif);
}
.lc-voice-toolbar [hidden], .lc-voice-panel[hidden], .lc-voice-panel [hidden], .lc-voice-toolbar[hidden] { display: none !important; }
.lc-voice-toolbar { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.lc-voice-action, .lc-voice-btn, .lc-voice-dismiss, .lc-voice-record-row {
  box-sizing: border-box;
  appearance: none;
  font: inherit;
  cursor: pointer;
  color: var(--voice-text);
  border: 1px solid var(--voice-line);
  background: var(--voice-panel);
}
.lc-voice-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.25; white-space: nowrap; }
.lc-voice-icon { display: inline-flex; }
.lc-voice-icon svg { width: 16px; height: 16px; flex: 0 0 auto; }
.lc-voice-action:hover:not(:disabled), .lc-voice-btn:hover:not(:disabled), .lc-voice-record-row:hover { border-color: var(--voice-accent); background: var(--voice-soft); }
.lc-voice-toolbar :disabled, .lc-voice-backdrop :disabled, .lc-voice-panel :disabled { cursor: not-allowed; opacity: .55; }
.lc-voice-toolbar :focus-visible, .lc-voice-panel :focus-visible, .lc-voice-backdrop :focus-visible { outline: 2px solid var(--voice-accent); outline-offset: 3px; }
.h5-foot > .lc-voice-toolbar { display: flex; padding: 2px 0 9px; }
.h5-foot > .lc-voice-toolbar .lc-voice-action { min-height: 32px; padding: 6px 9px; }
.lc-voice-panel { position: fixed; z-index: 6500; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: min(360px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--voice-line); border-radius: 14px; background: var(--voice-panel); box-shadow: var(--shadow, 0 12px 32px rgba(16, 24, 40, .16)); }
.lc-voice-panel[data-state="active"] { border-color: var(--ok, #12b76a); }
.lc-voice-panel-head { display: flex; align-items: center; gap: 10px; }
.lc-voice-emblem { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft, rgba(47, 107, 255, .08)); color: var(--voice-accent); }
.lc-voice-emblem svg { width: 22px; height: 22px; }
.lc-voice-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; flex: 1; min-width: 0; }
.lc-voice-title { font-size: 14px; font-weight: 650; }
.lc-voice-timer { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--voice-muted); }
.lc-voice-dismiss { display: inline-flex; flex: 0 0 auto; justify-content: center; align-items: center; min-width: 36px; min-height: 36px; border: 0; border-radius: 8px; font-size: 23px; line-height: 1; color: var(--voice-muted); background: transparent; }
.lc-voice-dismiss:hover { background: var(--voice-soft); }
.lc-voice-hint { font-size: 12px; line-height: 1.7; color: var(--voice-muted); overflow-wrap: anywhere; }
.lc-voice-panel > .lc-voice-hint { margin: 12px 0; }
.lc-voice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lc-voice-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.lc-voice-primary { background: var(--voice-accent); color: #fff; border-color: transparent; }
.lc-voice-danger { color: var(--voice-danger); background: var(--danger-soft, rgba(240, 68, 56, .08)); border-color: transparent; }
.lc-voice-primary:hover:not(:disabled) { background: var(--voice-accent); filter: brightness(1.08); }
.lc-voice-danger:hover:not(:disabled) { border-color: var(--voice-danger); }
.lc-voice-backdrop { position: fixed; inset: 0; z-index: 7100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 18, 34, .48); }
.lc-voice-dialog { display: flex; flex-direction: column; width: min(540px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden; border: 1px solid var(--voice-line); border-radius: 14px; background: var(--voice-panel); box-shadow: var(--shadow, 0 16px 48px rgba(16, 24, 40, .24)); }
.lc-voice-dialog-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--voice-line); }
.lc-voice-dialog-head h3 { margin: 0; font-size: 16px; line-height: 1.5; color: var(--voice-text); }
.lc-voice-dialog-body { flex: 1 1 auto; min-height: 0; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.lc-voice-dialog-foot { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--voice-line); }
.lc-voice-consent-notice { border: 1px solid var(--voice-line); border-radius: 10px; padding: 12px; background: var(--voice-soft); font-size: 13px; line-height: 1.8; }
.lc-voice-consent-notice p { margin: 0; }
.lc-voice-consent-notice p + p { margin-top: 10px; }
.lc-voice-english { color: var(--voice-muted); font-size: 12px; line-height: 1.75; }
.lc-voice-server-notice { border-top: 1px solid var(--voice-line); padding-top: 10px; }
.lc-voice-language { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 13px; }
.lc-voice-language select { box-sizing: border-box; width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--voice-line); border-radius: 8px; background: var(--voice-panel); color: var(--voice-text); font: inherit; }
.lc-voice-consent-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 12px; line-height: 1.75; }
.lc-voice-consent-check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--voice-accent); }
.lc-voice-records { width: min(720px, 100%); }
.lc-voice-record-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.lc-voice-record-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.lc-voice-record-filters label { display: flex; flex: 1 1 140px; flex-direction: column; gap: 5px; min-width: 0; font-size: 12px; color: var(--voice-muted); }
.lc-voice-record-filters input { box-sizing: border-box; width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid var(--voice-line); border-radius: 8px; background: var(--voice-panel); color: var(--voice-text); font: inherit; }
.lc-voice-record-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.lc-voice-record-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 8px; text-align: left; font-size: 12px; }
.lc-voice-record-row b { font-weight: 600; }
.lc-voice-record-row span { color: var(--voice-muted); font-size: 11px; }
.lc-voice-record-detail h4 { margin: 18px 0 10px; font-size: 13px; }
.lc-voice-transcripts { display: grid; gap: 9px; }
.lc-voice-transcript { padding: 12px; border: 1px solid var(--voice-line); border-radius: 9px; background: var(--voice-soft); overflow-wrap: anywhere; }
.lc-voice-transcript b { color: var(--voice-muted); font-size: 11px; font-weight: 600; }
.lc-voice-transcript p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.lc-voice-transcript .lc-voice-translation { color: var(--voice-accent); }
.lc-voice-empty { padding: 14px 6px; color: var(--voice-muted); font-size: 12px; line-height: 1.8; text-align: center; }
.lc-voice-error { color: var(--voice-danger); font-size: 12px; line-height: 1.8; }
@media (max-width: 560px) {
  .lc-voice-panel { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); max-height: 44dvh; overflow-y: auto; padding: 13px; }
  .lc-voice-backdrop { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .lc-voice-dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .lc-voice-dialog-body { padding: 13px; }
  .lc-voice-dialog-foot { justify-content: stretch; }
  .lc-voice-dialog-foot .lc-voice-btn { flex: 1 1 130px; min-height: 42px; }
  .lc-voice-record-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .lc-voice-action { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-voice-toolbar *, .lc-voice-panel *, .lc-voice-backdrop * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
