/* Queen TTS · Tạo giọng (voice.html): the main page's keys and screens (app.css), on a page that scrolls (guide.css). */
.vd-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; }
@media (min-width: 1000px) { .vd-body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.vd-col { display: flex; flex-direction: column; min-width: 0; }
.vd .block { flex: none; margin-bottom: 28px; }
.vd .block-body { padding-top: 12px; }
.vd .tabs button { border: 0; background: none; cursor: pointer; padding: 4px 0 4px 14px; text-transform: uppercase; color: var(--faint); }
.vd .tabs button[aria-selected="true"] { color: var(--foreground); }

.vd-pane { display: flex; flex-direction: column; gap: 10px; }
.vd-label { text-transform: uppercase; color: var(--dim); font-size: 12px; margin-top: 4px; }
.vd-hint { text-transform: none; color: var(--faint); margin-left: 6px; }
.vd-field { position: relative; }
.vd-ta { display: block; resize: vertical; outline: none; font: inherit; font-size: 14px; line-height: 1.5; padding: 12px 14px 22px; min-height: 64px; }
.vd-ta::placeholder { color: var(--faint); opacity: 1; }
.vd-count { position: absolute; right: 12px; bottom: 6px; font-size: 11px; color: var(--faint); }
.vd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.vd-sel { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; font-size: 12px; color: var(--dim); }
.vd-sel select { font: inherit; font-size: 12px; text-transform: none; padding: 7px 8px; border: 0; border-radius: var(--radius-md);
  background: var(--screen); box-shadow: var(--shadow-textarea); color: var(--foreground); }
.vd-auto { flex: 1; min-width: 140px; font-size: 12px; color: var(--faint); }
.vd-auto b { color: var(--dim); font-weight: 400; }
.vd-go { flex: none; min-width: 150px; padding: 11px 18px; text-transform: uppercase; }
.vd-go .bars { width: 30px; height: 12px; left: 0; }
.vd-err { font-size: 12.5px; min-height: 0; }
.vd-err:empty { display: none; }
.vd .note { margin-top: 0; }

/* the clip: drop zone, file / record keys, its player */
.vd-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px; text-align: center;
  border: 1.5px dashed rgb(34 34 34 / 0.14); transition: border-color 0.15s, background-color 0.15s; }
.vd-drop[data-over] { border-color: var(--primary); background: #fff3ec; }
.vd-drop-main { margin: 0; color: var(--dim); }
.vd-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.vd-acts .key { flex: none; padding: 9px 16px; text-transform: uppercase; font-size: 12px; }
.vd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9c9c9; }
#rec[aria-pressed="true"] { color: var(--primary); }
#rec[aria-pressed="true"] .vd-dot { background: var(--primary); animation: vd-blink 1s steps(2) infinite; }
@keyframes vd-blink { 50% { opacity: 0.25; } }
.vd-file { margin: 0; font-size: 12px; color: var(--dim); min-height: 1em; overflow-wrap: anywhere; }
.vd-file:empty { display: none; }
.vd-file .warn { color: var(--primary); }
.vd-drop audio { width: 100%; max-width: 460px; height: 36px; }

/* example descriptions */
.vd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-chips .key { flex: none; padding: 6px 11px; font-size: 12px; min-height: 0; }

/* the voices being tried */
.vd-temps { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.vd-empty { margin: 4px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.vd-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; animation: ln-in 0.3s ease both; }
.vd-card[data-state="gone"] { opacity: 0.55; }
.vd-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.vd-card-head .nm { font-weight: 700; }
.vd-card-head .tg { font-size: 11px; text-transform: uppercase; color: var(--dim); background: rgba(0, 0, 0, 0.06); padding: 1px 6px; border-radius: 4px; }
.vd-card-head .tg.saved { color: #fff; background: #2f7d4f; }
.vd-card-head .ttl { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.vd-card-head .ttl.low { color: var(--primary); }
.vd-quote { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.5; overflow-wrap: anywhere; }
.vd-quote i { color: var(--faint); font-style: normal; }
.vd-card .gd-row .key { min-width: 0; }
.vd-card .gd-row .key.key-primary { min-width: 108px; }
.vd-out { font-size: 11.5px; color: var(--faint); line-height: 1.5; overflow-wrap: anywhere; }
.vd-out:empty { display: none; }
.vd-out .err { font-size: 12px; }
.vd-out .v { color: var(--dim); }

/* save form inside a card */
.vd-save { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--radius-md); background: rgba(0, 0, 0, 0.035); }
.vd-save label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); flex-wrap: wrap; }
.vd-save input[type="text"], .vd-save select { font: inherit; font-size: 13px; padding: 7px 9px; border: 0; border-radius: var(--radius-md);
  background: var(--screen); box-shadow: var(--shadow-textarea); color: var(--foreground); min-width: 0; flex: 1 1 180px; outline: none; }
.vd-save input[type="text"]:disabled, .vd-save select:disabled { opacity: 0.45; }
.vd-save .slug { font-size: 11.5px; color: var(--faint); }
.vd-save .acts { display: flex; gap: 8px; justify-content: flex-end; }
.vd-save .acts .key { flex: none; padding: 7px 14px; font-size: 12px; text-transform: uppercase; }

/* saved voices */
.vd-saved { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .vd-saved { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vd-sv { padding: 11px 13px; display: flex; flex-direction: column; gap: 7px; animation: ln-in 0.3s ease both; }
.vd-sv-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.vd-sv-head .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-sv-head .fam { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.vd-sv .langs { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-sv .langs .key { flex: none; padding: 5px 9px; font-size: 11.5px; min-height: 0; gap: 6px; }
.vd-sv .langs .key svg { width: 10px; height: 10px; }
.vd-sv .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-sv .acts .key { flex: none; padding: 5px 10px; font-size: 11px; text-transform: uppercase; min-height: 0; }
.vd-sv .acts .key.danger { color: var(--primary); }
.vd-sv .vd-out { margin: 0; }

@media (max-width: 640px) {
  .vd-go { flex: 1 1 100%; }
  .vd-card-head .ttl { margin-left: 0; flex-basis: 100%; }
}
