/* Text to speech voiceover. Bloom tokens from ../shared/theme.css, shared pieces from ../video/media.css. */
.vo h2 { font-size: 18px; margin: 0 0 10px; }
.vo h2 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.vo h3 { font-size: 15px; margin: 0 0 4px; }
.vo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.vo-grid > * { min-width: 0; }
.vo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.vo-head label { font-weight: 700; }
#script, .vo-reader { width: 100%; min-height: 250px; font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Nastaliq Urdu", "Noto Sans Devanagari", sans-serif; }
.vo-reader { border: 1px solid #d9dcea; border-radius: 10px; padding: 8px 10px; background: #fcfcff; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; max-height: 60vh; cursor: pointer; }
.vo-reader .s { border-radius: 6px; transition: background .2s; }
.vo-reader .s:hover { background: #f1efff; }
.vo-reader .s.on { background: #e7e3ff; box-shadow: 0 0 0 2px #e7e3ff; }
.vo-reader mark.w { background: #ffd84d; color: inherit; border-radius: 4px; box-shadow: 0 0 0 2px #ffd84d; }
.vo-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.vo-state { margin-left: auto; }
.vo-note { color: #8a5a00; }
.vo-settings .btn { width: 100%; margin-bottom: 8px; }
.vo-settings select { width: 100%; }
.vo-save, .vo-ai { margin-top: 14px; }
.vo-honest { margin-top: 0; }
.vo-save-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vo-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; align-content: start; background: #fff; }
.vo-card p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.vo-card .btn { justify-self: start; }
.vo-card-main { border-color: #cfc9ff; background: linear-gradient(180deg, #fff, #f8f7ff); }
.vo-rec { margin-top: 14px; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.vo-prompter { height: 190px; overflow-y: auto; border-radius: 14px; background: #1b2133; color: #fff; padding: 18px 20px; font: 600 22px/1.6 system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.vo-rec-status { gap: 12px; }
.vo-dot { width: 12px; height: 12px; border-radius: 50%; background: #c9cddc; }
.vo-rec.recording .vo-dot { background: #ef4444; animation: vo-blink 1s steps(2) infinite; }
.vo-rec.paused .vo-dot { background: #f59e0b; }
@keyframes vo-blink { 50% { opacity: .25; } }
.vo-level { flex: 1 1 120px; height: 8px; border-radius: 999px; background: #eceafd; overflow: hidden; min-width: 80px; }
.vo-level i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .08s; }
.vo-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.vo-ai .ai-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.vo-ai .ai-form .btn { grid-column: 1 / -1; justify-self: start; }
.vo-ai .ai-form select { width: 100%; }
.vo-ai .ai-out { margin-top: 12px; }
.vo-ai .ai-links { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .vo-grid { grid-template-columns: minmax(0, 1fr); }
  .vo-save-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mx-main.vo { padding-bottom: 96px; }
  #script, .vo-reader { min-height: 200px; font-size: 15.5px; }
  .vo-controls { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; flex-wrap: nowrap; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(27, 33, 51, .08); }
  .vo-controls .btn { flex: 1; }
  .vo-state { display: none; }
  .vo-ai .ai-form { grid-template-columns: minmax(0, 1fr); }
  .vo-prompter { font-size: 19px; height: 170px; }
}

/* ---------- Inside the shared editor frame (html.ad-shell-on): old header and hero hidden, the work area scrolls. */
html.ad-shell-on .ad-bar, html.ad-shell-on .vo .mx-hero { display: none; }
html.ad-shell-on main.vo { overflow: auto; max-width: none; margin: 0; padding: 6px 20px 28px; box-sizing: border-box; }
html.ad-shell-on .vo-grid, html.ad-shell-on .vo-save, html.ad-shell-on .vo-ai { max-width: 1040px; margin-inline: auto; }
html.ad-shell-on .vo-grid { grid-template-columns: minmax(0, 1fr) 240px; }
html.ad-shell-on .vo-script { box-shadow: 0 8px 28px rgba(27, 33, 51, .08); }
html.ad-shell-on #script, html.ad-shell-on .vo-reader { font-size: calc(16px * var(--vo-zoom, 1)); min-height: 300px; }
.vo-pill { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.vo-pill .vo-pf { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; }
.vo-pill .vo-pf > span { display: inline-flex; gap: 4px; align-items: baseline; }
.vo-pill .vo-pf small { font-weight: 500; color: var(--muted); min-width: 2.6em; }
.vo-pill select { max-width: 190px; min-height: 34px; padding: 4px 8px; }
.vo-pill input[type=range] { width: 84px; }
.vo-pill .vo-controls { margin: 0; flex-wrap: nowrap; gap: 6px; }
.vo-pill .vo-controls .btn, .vo-pill .vo-pdl { min-height: 34px; padding: 6px 12px; }
.vo-pill .vo-state { margin-left: 4px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.vo-pnote { color: var(--muted, #5b6275); font-size: 13px; margin: 0 0 10px; line-height: 1.45; }
.vo-ph3 { font-size: 13px; margin: 14px 0 6px; text-transform: none; }
.vo-snips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vo-snip, .vo-voice { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line, #e3e5ef); background: #fff; border-radius: 10px; padding: 9px 10px; cursor: pointer; font: inherit; color: inherit; }
.vo-snip:hover, .vo-voice:hover { border-color: #cfc9ff; background: #f8f7ff; }
.vo-snip b, .vo-voice b { font-size: 13px; }
.vo-snip small, .vo-voice small { font-size: 11.5px; color: var(--muted, #5b6275); }
.vo-vlist { display: grid; gap: 6px; }
.vo-vrow { display: flex; gap: 6px; align-items: stretch; }
.vo-voice { flex: 1; min-width: 0; }
.vo-voice.on { border-color: #5b4cf0; box-shadow: 0 0 0 2px #e7e3ff; }
.vo-prev { align-self: center; }
.vo-pblock { display: block; width: 100%; margin: 0 0 8px; }
@media (max-width: 760px) {
  html.ad-shell-on main.vo { padding: 6px 10px 24px; }
  html.ad-shell-on .vo-grid { grid-template-columns: minmax(0, 1fr); }
  html.ad-shell-on .vo-controls { position: static; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  html.ad-shell-on .mx-main.vo { padding-bottom: 24px; }
  html.ad-shell-on #script, html.ad-shell-on .vo-reader { min-height: 220px; }
  .vo-pill select { max-width: 140px; }
}
@media (max-width: 760px) { .vo-pill .vo-controls { order: -1; } }
