:root {
  --text: #0a0a0a;
  --muted: #737373;
  --border: #e5e5e5;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --red: #dc2626;
  --bg: #fcfcfb;
  --card: rgba(255, 255, 255, 0.88);
  --accent: #0a0a0a;
  --accent-hover: #262626;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(circle at 50% 8%, rgba(220, 205, 170, 0.34) 0, rgba(220, 205, 170, 0.12) 18%, transparent 34%),
    radial-gradient(circle at 30% 92%, rgba(224, 180, 120, 0.26) 0, rgba(224, 180, 120, 0.10) 16%, transparent 31%),
    radial-gradient(circle at 78% 82%, rgba(205, 218, 184, 0.22) 0, rgba(205, 218, 184, 0.08) 14%, transparent 30%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(44, 37, 30, 0.12) 0.65px, transparent 0.65px);
  background-size: 4px 4px;
  opacity: 0.18;
}
body > * { position: relative; z-index: 1; }

/* ---- topbar ---- */
.topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(252, 252, 251, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { width: 132px; height: 28px; object-fit: contain; }
.brand-copy { display: grid; gap: 2px; min-width: 0; }
.brand-copy strong { font-size: 16px; font-weight: 800; line-height: 1.2; }
.brand-copy span { font-size: 12px; color: var(--muted); line-height: 1.25; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.voiceprint-manage {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 7px; border-radius: 7px;
  font-size: 13px; font-weight: 800; color: #30323a; text-decoration: none;
  background: transparent; transition: color 150ms ease, background 150ms ease;
}
.voiceprint-manage:hover { color: #111827; background: #f3f4f6; }
.voiceprint-manage:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; }
.voiceprint-manage svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.voiceprint-wave-icon { stroke-width: 1.8; }
.voiceprint-manage-arrow { margin-left: 2px; color: #9297a1; stroke-width: 1.8; }
.topbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }
.status-pill {
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 12px;
  background: #f1f5f9; color: var(--muted); border: 1px solid var(--border);
}
.status-pill[data-state="recording"] { background: #fef2f2; color: var(--red); border-color: rgba(220, 38, 38, 0.3); }
.status-pill[data-state="finalizing"] { background: #fffbeb; color: #b45309; border-color: rgba(180, 83, 9, 0.3); }
.status-pill[data-state="done"] { background: #f0fdf4; color: #15803d; border-color: rgba(21, 128, 61, 0.3); }

/* ---- layout ---- */
.layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 16px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  min-height: calc(100vh - 64px);
  align-content: start;
}
.column { display: grid; gap: 16px; align-content: start; min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-head strong { font-size: 14px; font-weight: 800; }
.card-head-hint { font-size: 11px; color: var(--muted); }
.card-head-copy { min-width: 0; display: grid; gap: 3px; }

/* ---- record control ---- */
.recognition-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; border-radius: 9px; background: #f1f3f5;
}
.recognition-tab {
  min-height: 38px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.recognition-tab.is-active {
  color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.recognition-tab:disabled { opacity: 0.55; cursor: not-allowed; }
.recognition-panel { display: grid; gap: 12px; }
.recognition-panel[hidden] { display: none; }
body:not(.embed) .recognition-panel { height: 134px; position: relative; }
body:not(.embed) #panel-live { grid-template-rows: 96px minmax(0, 1fr); }
body:not(.embed) #panel-file { display: block; }
.waveform {
  width: 100%; height: 96px; border-radius: 10px;
  background: #f8fafc; border: 1px solid var(--border);
}
.record-meta { display: flex; align-items: baseline; gap: 10px; }
.record-timer { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.record-hint { font-size: 12px; color: var(--muted); }
.file-drop {
  width: 100%; height: 100%; min-height: 0; padding: 8px 12px 28px;
  display: grid; place-items: center; align-content: center;
  gap: 3px; text-align: center; border: 1px dashed #9ca3af; border-radius: 9px;
  background: #fafafa; cursor: pointer;
}
.file-drop:hover { background: #f8fafc; border-color: var(--blue); }
.file-drop.is-dragging { background: var(--blue-soft); border-color: var(--blue); }
.file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.file-drop-icon {
  width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 2px;
  border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 18px; font-weight: 900;
}
.file-drop strong { font-size: 14px; }
.file-drop span:not(.file-drop-icon) { color: var(--muted); font-size: 11px; }
.file-selected {
  position: absolute; top: 22px; left: 0; right: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid #dbeafe; border-radius: 8px; background: #f8fbff;
}
.file-selected:not([hidden]) { display: grid; }
.file-kind {
  width: 42px; height: 36px; display: grid; place-items: center; border-radius: 6px;
  color: var(--blue); background: #dbeafe; font-size: 10px; font-weight: 900;
}
.file-selected-copy { min-width: 0; display: grid; gap: 2px; }
.file-selected-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-selected-copy span { color: var(--muted); font-size: 10px; }
.file-clear { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.file-validation {
  position: absolute; left: 8px; right: 8px; bottom: 5px;
  min-height: 16px; max-height: 30px; overflow: hidden;
  color: var(--muted); font-size: 11px; line-height: 15px; text-align: center;
}
.file-validation.is-error { color: var(--red); }
.session-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.model-option { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.model-option select {
  min-height: 34px; border: 1px solid rgba(15, 23, 42, 0.14); border-radius: 8px;
  background: rgba(255, 255, 255, 0.94); color: var(--text); padding: 5px 30px 5px 10px; font: inherit;
}
.model-option select:disabled { color: var(--muted); background: #f8fafc; }
.final-toggle {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer;
}
.final-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.final-toggle input:disabled + span { color: var(--muted); }
.sentence-feature-options {
  display: grid; gap: 9px; padding-top: 11px; border-top: 1px solid var(--border);
}
.sentence-feature-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sentence-feature-head strong { font-size: 12px; font-weight: 800; }
.sentence-feature-head span { color: var(--muted); font-size: 10px; }
.sentence-feature-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sentence-feature-toggles .final-toggle {
  width: 100%; min-height: 36px; justify-content: space-between; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 8px; background: #fafafa;
}
.sentence-feature-toggles .final-toggle span { order: -1; }
.sentence-feature-toggles .final-toggle input {
  width: 28px; height: 16px; appearance: none; -webkit-appearance: none;
  position: relative; flex: 0 0 auto; border-radius: 999px; background: #d4d4d8;
  transition: background 150ms ease;
}
.sentence-feature-toggles .final-toggle input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}
.sentence-feature-toggles .final-toggle input:checked { background: var(--blue); }
.sentence-feature-toggles .final-toggle input:checked::after { transform: translateX(12px); }
.sentence-feature-toggles .final-toggle input:disabled { opacity: 0.55; }
.btn-row { display: grid; }
[hidden] { display: none !important; }
.btn {
  min-height: 52px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 14px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #b91c1c; }

/* ---- hotwords ---- */
.chipbox {
  display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fafafa;
}
.chips-empty { color: var(--muted); font-size: 12px; line-height: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 999px; background: #fff;
  padding: 4px 8px 4px 10px; font-size: 12px; font-weight: 700;
}
.chip span:first-child { overflow: hidden; text-overflow: ellipsis; }
.chip-del {
  display: grid; place-items: center; width: 16px; height: 16px; border: 0;
  border-radius: 999px; background: rgba(15, 23, 42, 0.08); color: var(--muted);
  font-size: 12px; line-height: 1; cursor: pointer;
}
.chip-del:hover { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.hotword-inputrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.hotword-input {
  width: 100%; min-height: 38px; border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px; background: #fff; padding: 8px 10px; font: inherit;
}
.hotword-add {
  min-height: 38px; border: 0; border-radius: 8px; background: var(--accent);
  color: #fff; padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer;
}
.hotword-add:hover { background: var(--accent-hover); }
.hotword-status { min-height: 18px; color: var(--muted); font-size: 12px; }

/* ---- inline voiceprint management ---- */
.voiceprint-card {
  min-width: 0;
  gap: 0;
  overflow: hidden;
  transition: height 160ms ease;
}
.voiceprint-card:not(.is-collapsed) {
  height: 390px;
  grid-template-rows: auto minmax(0, 1fr);
}
.voiceprint-card button,
.voiceprint-card input { font: inherit; }
.voiceprint-card button { cursor: pointer; }
.voiceprint-card button:disabled,
.voiceprint-card input:disabled { cursor: not-allowed; opacity: 0.55; }
.voiceprint-card-head,
.voiceprint-card-title,
.voiceprint-collapse,
.voiceprint-list-toolbar,
.voiceprint-detail-head,
.voiceprint-detail-title,
.voiceprint-speaker-item,
.voiceprint-speaker-copy,
.voiceprint-capture-actions,
.voiceprint-sample-head,
.voiceprint-sample-meta,
.voiceprint-draft-actions {
  display: flex;
  align-items: center;
}
.voiceprint-card-head { min-width: 0; justify-content: space-between; gap: 10px; }
.voiceprint-card-title { min-width: 0; gap: 8px; }
.voiceprint-card-title strong { font-size: 14px; font-weight: 800; }
.voiceprint-count {
  min-width: 24px; height: 24px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue); border-radius: 999px; background: var(--blue-soft);
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.voiceprint-collapse {
  width: 100%; min-width: 0; min-height: 28px; padding: 0;
  justify-content: space-between; gap: 10px;
  color: var(--text); border: 0; background: transparent; text-align: left;
}
.voiceprint-collapse-meta {
  min-width: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.voiceprint-collapse-summary {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 11px;
}
.voiceprint-chevron {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: transform 160ms ease;
}
.voiceprint-collapse[aria-expanded="true"] .voiceprint-chevron { transform: rotate(180deg); }
.voiceprint-collapse:focus-visible,
.voiceprint-back:focus-visible,
.voiceprint-speaker-item:focus-visible,
.voiceprint-action:focus-visible,
.voiceprint-danger:focus-visible,
.voiceprint-record:focus-visible,
.voiceprint-upload:focus-within,
.voiceprint-delete-sample:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.voiceprint-panel { min-height: 0; margin-top: 11px; overflow: hidden; }
.voiceprint-panel[hidden],
.voiceprint-view[hidden],
.voiceprint-card .is-hidden { display: none !important; }
.voiceprint-view { height: 100%; min-height: 0; display: grid; gap: 9px; }
.voiceprint-view-list { grid-template-rows: auto minmax(0, 1fr) auto; }
.voiceprint-view-detail { grid-template-rows: auto minmax(0, 1fr) auto; }
.voiceprint-add-form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px;
}
.voiceprint-input {
  width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px;
  color: var(--text); border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px; background: #fff;
}
.voiceprint-input:focus { border-color: var(--blue); outline: 2px solid rgba(37, 99, 235, 0.12); }
.voiceprint-action {
  min-height: 36px; padding: 7px 12px; justify-content: center;
  color: #fff; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent); font-weight: 800;
}
.voiceprint-action:hover { background: var(--accent-hover); }
.voiceprint-scroll {
  min-width: 0; min-height: 0; padding-right: 3px;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-gutter: stable;
  scrollbar-width: thin; scrollbar-color: #d4d4d8 transparent;
}
.voiceprint-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.voiceprint-speaker-list,
.voiceprint-sample-list { display: grid; align-content: start; gap: 6px; }
.voiceprint-speaker-item {
  width: 100%; min-width: 0; min-height: 54px; padding: 8px 10px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px; text-align: left; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.voiceprint-speaker-item:hover { border-color: #d4d4d8; background: #fafafa; }
.voiceprint-speaker-avatar {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--blue);
  border-radius: 50%; background: var(--blue-soft); font-size: 11px; font-weight: 800;
}
.voiceprint-speaker-copy { min-width: 0; align-items: flex-start; flex-direction: column; gap: 2px; }
.voiceprint-speaker-copy strong {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 800;
}
.voiceprint-speaker-copy small { color: var(--muted); font-size: 10px; }
.voiceprint-speaker-arrow { color: var(--muted); }
.voiceprint-detail-head { min-width: 0; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.voiceprint-detail-title { min-width: 0; gap: 8px; }
.voiceprint-detail-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.voiceprint-back {
  width: 32px; height: 32px; flex: 0 0 auto; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.voiceprint-back:hover { color: var(--blue); border-color: #bfdbfe; background: var(--blue-soft); }
.voiceprint-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voiceprint-danger,
.voiceprint-delete-sample {
  color: var(--red); border: 0; border-radius: 6px; background: transparent;
}
.voiceprint-danger { flex: 0 0 auto; padding: 5px 7px; font-size: 10px; }
.voiceprint-danger:hover,
.voiceprint-delete-sample:hover { background: #fef2f2; }
.voiceprint-detail-body { min-width: 0; display: grid; align-content: start; gap: 10px; }
.voiceprint-selected-copy { min-width: 0; display: grid; gap: 2px; }
.voiceprint-selected-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.voiceprint-selected-copy small { color: var(--muted); font-size: 10px; }
.voiceprint-capture {
  display: grid; gap: 8px; padding: 10px;
  border: 1px dashed #d4d4d8; border-radius: 8px; background: #fff;
}
.voiceprint-capture-copy { display: grid; gap: 2px; }
.voiceprint-capture-copy strong { font-size: 11px; }
.voiceprint-capture-copy small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.voiceprint-capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.voiceprint-record,
.voiceprint-upload {
  min-width: 0; min-height: 32px; padding: 6px 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  color: var(--text); border: 1px solid #d4d4d8; border-radius: 8px;
  background: #fff; font-size: 10px; font-weight: 800;
}
.voiceprint-record:hover,
.voiceprint-upload:hover { background: #fafafa; }
.voiceprint-record.is-recording,
.voiceprint-card.is-recording .voiceprint-record { color: var(--red); border-color: #fecaca; background: #fef2f2; }
.voiceprint-upload { position: relative; cursor: pointer; }
.voiceprint-upload input {
  position: absolute; width: 1px; height: 1px; padding: 0;
  opacity: 0; pointer-events: none;
}
.voiceprint-recording-timer { color: var(--red); font-variant-numeric: tabular-nums; }
.voiceprint-draft {
  display: grid; gap: 7px; padding: 8px;
  border: 1px solid #bfdbfe; border-radius: 8px; background: var(--blue-soft);
}
.voiceprint-draft-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 800; }
.voiceprint-draft-audio,
.voiceprint-sample-audio { width: 100%; height: 30px; }
.voiceprint-draft-actions { justify-content: flex-end; gap: 6px; }
.voiceprint-draft-actions button { min-height: 28px; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.voiceprint-sample-heading { margin: 1px 0 -4px; color: var(--muted); font-size: 10px; }
.voiceprint-sample-item {
  min-width: 0; padding: 7px 8px; display: grid; gap: 5px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
}
.voiceprint-sample-head { min-width: 0; justify-content: space-between; gap: 7px; }
.voiceprint-sample-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.voiceprint-sample-meta { justify-content: space-between; gap: 7px; color: var(--muted); font-size: 9px; }
.voiceprint-delete-sample { flex: 0 0 auto; padding: 4px 6px; font-size: 10px; }
.voiceprint-state {
  min-height: 18px; color: var(--muted); font-size: 11px; line-height: 1.5;
}
.voiceprint-state[data-state="error"] { color: var(--red); }
.voiceprint-state[data-state="success"] { color: #15803d; }
.voiceprint-empty {
  min-height: 54px; padding: 10px; display: grid; place-items: center; text-align: center;
  color: var(--muted); border: 1px dashed var(--border); border-radius: 8px;
  background: rgba(250, 250, 250, 0.7); font-size: 11px;
}
.voiceprint-card.is-disabled .voiceprint-panel { opacity: 0.72; }

/* ---- transcript ---- */
.transcript-card {
  min-height: calc(100vh - 64px - 48px);
  grid-template-rows: auto minmax(0, 1fr);
}
.transcript-card:has(.file-result-summary:not([hidden])) {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.transcript-card:has(.file-result-notices:not([hidden])) {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.file-result-summary {
  padding: 10px 12px; border-radius: 8px; background: #f8fafc;
  color: #374151; font-size: 11px; line-height: 1.5;
}
.file-result-notices {
  padding: 10px 12px; border: 1px solid #fde68a; border-radius: 8px;
  background: #fffbeb; color: #92400e; font-size: 12px; line-height: 1.6;
}
.stream-state { color: var(--blue); font-size: 12px; font-weight: 800; }
.transcript {
  display: grid; gap: 12px; align-content: start;
  overflow-y: auto; max-height: calc(100vh - 220px); padding-right: 4px;
}
.transcript-empty { color: var(--muted); font-size: 13px; padding: 32px 0; text-align: center; }
.row {
  display: grid; gap: 6px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.row.draft { background: #f8fafc; border-style: dashed; }
.row-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.speaker-badge {
  font-weight: 800; font-size: 11px; color: var(--blue);
  background: var(--blue-soft); border-radius: 6px; padding: 2px 8px;
}
.speaker-badge.provisional { text-decoration: underline dashed; text-underline-offset: 3px; }
.utterance-language,
.utterance-emotion {
  border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 800;
}
.utterance-language { color: #6d28d9; background: #f5f3ff; }
.utterance-emotion { color: #b45309; background: #fffbeb; }
.row.draft .speaker-badge { color: var(--muted); background: #f1f5f9; }
.row-time { font-variant-numeric: tabular-nums; }
.row-text { font-size: 16px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.row.draft .row-text { color: var(--muted); }
.row.draft .row-text::after {
  content: "▍"; color: var(--blue); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .transcript-card { min-height: 50vh; }
  .transcript { max-height: 60vh; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 14px; }
  .brand-logo { width: 104px; }
  .brand-copy span { display: none; }
  .sentence-feature-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .voiceprint-card:not(.is-collapsed) { height: 420px; }
  .voiceprint-collapse-summary { display: none; }
}

/* ---- embed 模式（?embed=1）：PK 对比页 iframe 内嵌，只留录音按钮与转写框 ---- */
body.embed .topbar,
body.embed .tabs,
body.embed #panel-file,
body.embed .waveform,
body.embed .hotwords-card,
body.embed .voiceprint-card { display: none; }
body.embed .layout {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  max-width: none;
  padding: 10px;
  gap: 10px;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
body.embed .column { gap: 10px; display: block; }
body.embed .layout > .column:last-child {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
body.embed .control-card { padding: 10px 14px; }
body.embed .transcript-card { flex: 1; height: auto; min-height: 0; overflow: hidden; }
body.embed .transcript { min-height: 0; max-height: none; }
