/* Extracted unchanged from NEST src/chat.html voice controls and transcript styles. */
  /* One voice bubble: controls above a divider, transcript below. */
  .voice-bubble, .voice-unified {
    --voice-bg: var(--non-bubble-bg);
    --voice-ink: var(--non-bubble-text, var(--text));
    --voice-muted: color-mix(in srgb, var(--voice-ink) 70%, var(--voice-bg));
    --voice-play: var(--non-bubble-text, var(--non-accent));
    --voice-shadow: var(--non-bubble-shadow);
  }
  .row.chai .voice-bubble, .row.chai .voice-unified {
    --voice-bg: var(--chai-bubble-bg);
    --voice-ink: var(--chai-bubble-text, var(--text));
    --voice-play: var(--chai-bubble-text, var(--chai-accent));
    --voice-shadow: var(--chai-bubble-shadow);
  }
  .row .group-bubbles .voice-unified {
    display: block; width: fit-content; max-width: calc(100% - 44px); min-width: 124px; /* 播放键36 + 时长 + 展开键36，转写很短时也不挤 */
    padding: 0; border: 0; border-radius: 13px; margin-bottom: 0;
    background: var(--voice-bg) !important; box-shadow: var(--voice-shadow) !important;
  }
  .row .voice-bubble, .row .voice-unified .voice-bubble.voice-inline {
    display: flex; gap: 0; align-items: center; width: var(--voice-width, 124px);
    max-width: calc(100% - 44px); min-width: 0; padding: 0; margin: 0;
    height: 36px; border-radius: 13px; background: var(--voice-bg) !important;
    /* Match the inline bar: legacy speaker borders must not shift the controls by 1px. */
    border: 0 !important; box-shadow: var(--voice-shadow) !important;
    cursor: default; transform: none;
  }
  .row .voice-unified .voice-bubble.voice-inline { width: 100%; max-width: 100%; padding: 0; gap: 0; background: transparent !important; box-shadow: none !important; }
  .row .voice-unified .voice-divider { margin: 0 13px; }
  /* Animate the surface dimensions, never scale the text or playback controls. */
  .voice-motion-surface { overflow: hidden; overflow: clip; }
  .voice-motion-body { display: flow-root; max-width: none; transform-origin: top left; }
  .row .voice-bubble .vb-play {
    position: relative; display: flex; align-items: center; justify-content: center;
    flex: 0 0 36px; width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: 13px 0 0 13px; background: transparent;
    color: var(--voice-play); box-shadow: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .row .voice-bubble .vb-play::before { content: ""; position: absolute; inset: -4px 0; }
  /* One inset in both states, including motion cleanup. Glyphs start 3px inside the SVG,
     so their visible edge aligns with the 13px transcript inset; the tap target stays 36px. */
  .row .voice-bubble .vb-play svg { position: absolute; width: 12px; height: 12px; left: 10px; top: 12px; }
  .voice-bubble .vb-summary {
    flex: 1; min-width: 0; height: 36px; display: flex; align-items: center;
    justify-content: flex-end; gap: 0; padding: 6px 0 6px 5px;
    font: inherit; color: var(--voice-ink); text-align: left;
    border: 0; border-radius: 0 13px 13px 0; background: transparent;
    -webkit-mask-image: none; mask-image: none;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .row .voice-bubble .vb-time { color: var(--voice-muted) !important; font-size: 11px; margin: 0; line-height: 1.3; }
  .row .voice-bubble .vb-toggle, .row .voice-unified .voice-bubble .vb-toggle {
    position: static; display: flex; flex: 0 0 36px; width: 36px; height: 36px !important;
    min-height: 0; opacity: 0.75; transform: none; color: var(--text-faint); padding: 0;
  }
  .row .voice-bubble .vb-toggle::before { content: none; }
  .row .voice-bubble .vb-toggle svg { width: 13px; height: 13px; }
  .voice-bubble button:focus-visible, .voice-word:focus-visible { outline: 2px solid var(--voice-ink); outline-offset: 3px; }
  .voice-bubble button:disabled { cursor: default; }
  .row .voice-unified .voice-seg, .row .voice-unified .singing-lyrics {
    display: block; margin-top: 0; padding: 7px 13px 8px;
    border-radius: 0; background: transparent;
    box-shadow: none; color: var(--voice-ink); line-height: inherit;
    max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box;
  }
  .voice-word {
    display: inline; font: inherit; line-height: inherit; letter-spacing: inherit;
    white-space: pre-wrap; color: var(--voice-muted); padding: 0; margin: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none;
    text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
    -webkit-user-select: text; user-select: text;
  }
  .voice-timed .voice-word.read { color: var(--voice-ink); }
  .voice-word:disabled { cursor: default; opacity: 1; -webkit-text-fill-color: currentColor; }
  .voice-unified .voice-translate-zh { color: var(--voice-muted); padding: 5px 18px 0; }
