/* AMIQ Voice (/video/ai-voice/): studio + voice library + clone dialog. Uses the site colour tokens (light and dark). */
.vx-head h1 { margin-bottom: 8px; }
.vx-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vx-badges span { font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.vx-wrap { display: grid; gap: 26px; }
.vx { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 980px) { .vx { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } .vx-lib { position: sticky; top: 84px; } }
.vx .tool-panel { display: grid; gap: 14px; min-width: 0; }

/* studio */
.vx-voicebar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), color-mix(in srgb, var(--brand-2) 7%, var(--surface))); }
.vx-current { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.vx-current .vx-av { width: 46px; height: 46px; font-size: 1.15rem; }
.vx-current .vx-cmeta small:first-child { text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.vx-change { white-space: nowrap; padding: 8px 14px; font-size: .88rem; }
.vx-row { display: flex; flex-wrap: wrap; gap: 12px; }
.vx-row .vx-field { flex: 1 1 200px; }
.vx-field { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.vx-field select, .vx-field input:not([type=range]), .vx-search { font: inherit; font-weight: 400; color: var(--text); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); width: 100%; box-sizing: border-box; }
.vx-field select:focus, .vx-field input:focus, .vx-search:focus, .vx-editor textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.vx-range { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.vx-range input { flex: 1; accent-color: var(--brand); }
.vx-range b { min-width: 6ch; font-size: .85rem; color: var(--text); text-align: right; }
.vx-editor { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.vx-editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.vx-editor textarea { display: block; width: 100%; box-sizing: border-box; border: 0; resize: vertical; min-height: 190px; padding: 14px 16px; font: inherit; font-size: 1.02rem; line-height: 1.6; color: var(--text); background: transparent; }
.vx-editor textarea:focus { box-shadow: none; }
.vx-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--bg-2); }
.vx-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vx-tags small { color: var(--muted); margin-right: 2px; }
.vx-tags button { font: inherit; font-size: .78rem; padding: 3px 10px; border-radius: 999px; border: 1px dashed var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.vx-tags button:hover { border-color: var(--brand); color: var(--brand-ink); }
.vx-count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vx-go { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; font-size: 1.02rem; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border: 0; }
.vx-go svg { width: 20px; height: 20px; fill: currentColor; }
.vx-go:disabled { opacity: .7; cursor: progress; }
.vx-engine { margin: -4px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.vx-progress { display: grid; gap: 6px; font-size: .86rem; color: var(--text-2); }
.vx-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); overflow: hidden; }
.vx-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s ease; }
.vx-takes h3 { margin: 4px 0 8px; font-size: 1rem; }
.vx-takes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vx-takes li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.vx-takes li:first-child { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.vx-tmeta { flex: 1; display: grid; gap: 2px; min-width: 0; }
.vx-tmeta b { font-size: .9rem; }
.vx-tmeta small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-dl { padding: 7px 12px; font-size: .85rem; }

/* library */
.vx-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.vx-tabs button { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer; }
.vx-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.vx-tabs em { font-style: normal; font-size: .75rem; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; }
.vx-tabs em:empty { display: none; }
.vx-libbody { display: grid; gap: 12px; }
.vx-filters { display: grid; gap: 8px; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vx-chips button { font: inherit; font-size: .8rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.vx-chips button.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.vx-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 640px; overflow-y: auto; padding: 2px; margin: -2px; }
.vx-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.vx-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); transform: translateY(-1px); }
.vx-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.vx-card.sel { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.vx-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 -6px 12px rgba(0,0,0,.12); flex: none; }
.vx-cmeta { display: grid; gap: 1px; min-width: 0; }
.vx-cmeta b { font-size: .96rem; color: var(--text); }
.vx-cmeta small { font-size: .78rem; color: var(--muted); }
.vx-cmeta em { font-style: normal; font-size: .74rem; color: var(--brand-ink); }
.vx-play { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.vx-play:hover { border-color: var(--brand); color: var(--brand-ink); }
.vx-play svg { width: 16px; height: 16px; fill: currentColor; }
.vx-play .s, .vx-play.on .p { display: none; }
.vx-play.on .s { display: inline; }
.vx-play.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.vx-own { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.vx-mini { font: inherit; font-size: .76rem; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); cursor: pointer; }
.vx-mini:hover { border-color: var(--brand); color: var(--brand-ink); }
.vx-danger:hover { border-color: #e5484d; color: #e5484d; }
.vx-addcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--brand) 40%, var(--border)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); color: var(--text); font: inherit; cursor: pointer; }
.vx-addcard:hover { border-style: solid; }
.vx-addcard span { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.vx-addcard small { color: var(--muted); font-size: .8rem; }

/* clone dialog */
.vx-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.vx-dialog::backdrop { background: rgba(8, 12, 24, .55); backdrop-filter: blur(3px); }
.vx-dlg { display: grid; gap: 14px; padding: 20px; max-height: calc(100vh - 64px); overflow-y: auto; box-sizing: border-box; }
.vx-dlghead { display: flex; align-items: center; justify-content: space-between; }
.vx-dlghead h2 { margin: 0; font-size: 1.2rem; }
.vx-x { font-size: 1.5rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--text-2); cursor: pointer; }
.vx-src { padding: 4px; border-radius: 12px; background: var(--bg-2); display: grid; grid-template-columns: 1fr 1fr; }
.vx-src button { border: 0; border-radius: 9px; padding: 8px; font-size: .88rem; font-weight: 600; background: transparent; }
.vx-src button.active { background: var(--surface); color: var(--text); border-color: transparent; box-shadow: var(--shadow); }
.vx-say { margin: 0; padding: 12px 14px; border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); border-radius: 0 10px 10px 0; line-height: 1.6; font-size: 1rem; }
.vo-recbar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.vo-recbtn { display: inline-flex; align-items: center; gap: 8px; }
.vo-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4d4f; }
.vo-recbtn.rec .vo-dot { border-radius: 2px; animation: vxpulse 1s infinite; }
@keyframes vxpulse { 50% { opacity: .35; } }
.vo-time { font-variant-numeric: tabular-nums; min-width: 4ch; }
.vo-meter { flex: 1; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.vo-meter i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .1s linear; }
.vo-play { width: 100%; margin-top: 10px; }
.vx-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.vx-check input { width: auto; flex: none; margin: 3px 0 0; accent-color: var(--brand); }
.vx-check span, .vx-check { line-height: 1.45; }
#vo-save:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.vx-dlgfoot { display: flex; justify-content: flex-end; gap: 10px; }

/* notes */
.vx-notes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.vx-notes > div { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.vx-notes h3 { margin: 0 0 6px; font-size: 1rem; }
.vx-notes p { margin: 0; font-size: .9rem; color: var(--text-2); line-height: 1.55; }
.vx-credit { margin: 0; }
@media (max-width: 560px) { .vx-voicebar { flex-wrap: wrap; } .vx-change { width: 100%; text-align: center; } .vx-grid { grid-template-columns: 1fr; max-height: none; } }
.vx-speed { width: 100%; box-sizing: border-box; }
.vx-speed button { flex: 1; padding: 10px 6px; font-size: .88rem; }
