    /* Floating bubble UI */
    .tts-bubble {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 999999;
      width: 56px;
      height: 56px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,.12);
      box-shadow: 0 12px 30px rgba(0,0,0,.18);
      background: white;
      display: grid;
      place-items: center;
      cursor: pointer;
      user-select: none;
    }
    .tts-bubble:active { transform: translateY(1px); }
    .tts-icon { font-size: 24px; }

    .tts-panel {
      position: fixed;
      right: 18px;
      bottom: 86px;
      z-index: 999999;
      width: 360px;
  max-width: calc(100vw - 40px);
      border: 1px solid rgba(0,0,0,.12);
      box-sizing: border-box;
      box-shadow: 0 12px 30px rgba(0,0,0,.18);
      border-radius: 16px;
      background: white;
      padding: 12px;
      display: none;
    }
    .tts-panel.open { display: block; }

    .tts-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; width: 100%;}
    .tts-row label { font-size: 12px; color: #333; min-width: 62px; }
    .tts-row select, .tts-row input[type="range"] {
      flex: 1;
    }

    .tts-btns { display: flex; gap: 8px; margin-top: 10px; }
    .tts-btn {
      flex: 1;
      padding: 10px 10px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,.12);
      background: #fff;
      cursor: pointer;
      font-weight: 600;
    }
    .tts-btn.primary {
  background: #08B8A9;
  color: #fff;
  border-color: #08B8A9;
}
    .tts-btn:disabled { opacity: .45; cursor: not-allowed; }

    .tts-meta { font-size: 12px; color: #555; margin-top: 8px; }
    .tts-toast {
      position: fixed;
      right: 18px;
      bottom: 420px;
      z-index: 999999;
      background: rgba(17,17,17,.92);
      color: white;
      padding: 10px 12px;
      border-radius: 12px;
      font-size: 12px;
      display: none;
      max-width: 320px;
    }
    .tts-toast.show { display: block; }

    /* Optional highlight for the active chunk */
    .tts-highlight {
      outline: 3px solid rgba(255, 214, 10, .85);
      border-radius: 8px;
      scroll-margin-top: 90px;
    }

    .tts-row select {
  flex: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ttsRate {
  accent-color: #08B8A9;
}