/* ==========================================================================
   声汇 VoiceFuse — styles.css
   Dark studio UI. No external fonts, no build step.
   ========================================================================== */

:root {
  --bg: #0b0c0e;
  --bg-soft: #0e1013;
  --panel: #121419;
  --panel-2: #15181e;
  --panel-3: #191d24;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eceef1;
  --text-soft: #c6cad1;
  --muted: #8b919c;
  --faint: #626873;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --accent-line: rgba(91, 140, 255, 0.34);
  --teal: #38bdf8;
  --amber: #fbbf24;
  --red: #fb7185;
  --blue: #93c5fd;
  --violet: #c4b5fd;
  --green: #86efac;
  --pink: #f472b6;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-xs: 8px;
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
::selection { background: rgba(91, 140, 255, 0.25); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- shell ---------- */

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(760px 420px at 12% -12%, rgba(56, 189, 248, 0.075), transparent 64%),
    radial-gradient(620px 380px at 92% -6%, rgba(91, 140, 255, 0.06), transparent 66%),
    linear-gradient(180deg, #0c0d10 0%, var(--bg) 46%);
}
.topbar {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 14, 0.72);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 6px 18px rgba(91,140,255,.08); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-word { font-weight: 700; font-size: 16px; letter-spacing: 0.04em; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.brand-word small { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--faint); font-weight: 500; text-transform: uppercase; }
.topbar-divider { width: 1px; height: 22px; background: var(--line-strong); }
.project-block { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.crumb { color: var(--faint); }
.crumb-sep { color: var(--faint); }
.project-block strong { font-weight: 550; max-width: 36vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.privacy-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.privacy-pill .icon { width: 14px; height: 14px; color: var(--teal); }
.icon-text-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 9px; height: 34px; padding: 0 11px;
  color: var(--text-soft); font-size: 12.5px;
  transition: background .16s var(--ease), border-color .16s;
}
.icon-text-btn:hover { background: rgba(255,255,255,.05); border-color: var(--line-strong); }
.icon-text-btn .icon { width: 16px; height: 16px; color: var(--muted); }

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr) 376px;
}
.rail {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
.rail-left { border-right: 1px solid var(--line); background: rgba(13, 15, 18, 0.48); overflow: hidden; }
.source-panel { flex: none; }
.engines-panel { flex: 1; min-height: 0; }
.engine-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.engine-list::-webkit-scrollbar { width: 6px; }
.engine-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }
.rail-right { border-left: 1px solid var(--line); background: rgba(13, 15, 18, 0.4); overflow: hidden; }
.rail::-webkit-scrollbar, .results-view::-webkit-scrollbar, .summary-output::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 8px; height: 8px; }
.rail::-webkit-scrollbar-thumb, .results-view::-webkit-scrollbar-thumb, .summary-output::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012));
  padding: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.step-no { font-family: var(--mono); font-size: 10px; color: var(--accent); opacity: .75; letter-spacing: .05em; }
.panel-head h2 { font-size: 13px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.panel-meta { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.micro-note {
  display: flex; gap: 7px; align-items: flex-start;
  color: var(--faint); font-size: 10.5px; line-height: 1.55;
  margin: 12px 2px;
}
.micro-note .icon { width: 13px; height: 13px; margin-top: 1px; color: var(--muted); }

/* ---------- dropzone ---------- */

.dropzone {
  position: relative;
  border: 1px dashed rgba(255,255,255,.17);
  border-radius: 13px;
  min-height: 186px;
  padding: 22px 14px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(240px 120px at 50% 20%, rgba(91,140,255,.04), transparent 70%),
    rgba(255,255,255,.012);
  transition: border-color .18s, background .18s, transform .18s;
  cursor: pointer;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  border-color: var(--accent-line);
  background:
    radial-gradient(240px 120px at 50% 20%, rgba(91,140,255,.08), transparent 70%),
    rgba(91,140,255,.025);
}
.dropzone.dragover { transform: scale(1.008); }
.drop-bars { display: flex; align-items: center; gap: 3px; height: 42px; margin-bottom: 13px; }
.drop-bars i {
  display: block; width: 3px; border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), rgba(56,189,248,.35));
  opacity: .8;
  animation: barPulse 2.4s ease-in-out infinite;
}
.drop-bars i:nth-child(1) { height: 10px; animation-delay: -.2s; }
.drop-bars i:nth-child(2) { height: 20px; animation-delay: -.5s; }
.drop-bars i:nth-child(3) { height: 32px; animation-delay: -.9s; }
.drop-bars i:nth-child(4) { height: 18px; animation-delay: -1.3s; }
.drop-bars i:nth-child(5) { height: 38px; animation-delay: -.4s; }
.drop-bars i:nth-child(6) { height: 24px; animation-delay: -1.1s; }
.drop-bars i:nth-child(7) { height: 42px; animation-delay: -.7s; }
.drop-bars i:nth-child(8) { height: 26px; animation-delay: -1.5s; }
.drop-bars i:nth-child(9) { height: 14px; animation-delay: -1s; }
.drop-bars i:nth-child(10) { height: 30px; animation-delay: -.3s; }
.drop-bars i:nth-child(11) { height: 20px; animation-delay: -1.2s; }
.drop-bars i:nth-child(12) { height: 10px; animation-delay: -.6s; }
.drop-bars i:nth-child(13) { height: 16px; animation-delay: -.8s; }
@keyframes barPulse { 0%,100% { transform: scaleY(.55); opacity: .45; } 50% { transform: scaleY(1); opacity: .95; } }
.drop-title { font-size: 13px; color: var(--text-soft); font-weight: 550; }
.drop-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint); margin-top: 5px; }
.drop-hint { display: flex; align-items: center; gap: 4px; margin-top: 15px; font-size: 10px; color: var(--faint); }
.drop-hint .icon { width: 12px; height: 12px; }

/* ---------- media card ---------- */

.audio-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0,0,0,.16);
  padding: 10px;
  animation: fadeUp .25s var(--ease);
}
.wave-wrap { position: relative; height: 68px; border-radius: 8px; overflow: hidden; }
#waveCanvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.wave-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 11px; }
.audio-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.play-btn {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  border: none; background: var(--accent); color: #10130a;
  display: grid; place-items: center;
  transition: transform .15s var(--ease), box-shadow .15s;
  box-shadow: 0 4px 14px rgba(91,140,255,.16);
}
.play-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(91,140,255,.25); }
.play-btn .icon { width: 17px; height: 17px; }
.audio-info { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.audio-info strong { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-info span { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 2px; }
.audio-meta-row { display: flex; justify-content: space-between; gap: 8px; margin: 7px 2px 0; font-size: 9.5px; color: var(--faint); }
.audio-meta-row .mono { font-family: var(--mono); }

.demo-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, rgba(91,140,255,.08), rgba(56,189,248,.04));
  border-radius: 13px; padding: 12px;
  animation: fadeUp .25s var(--ease);
}
.demo-card-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.demo-card-icon .icon { width: 18px; height: 18px; }
.demo-card > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.demo-card strong { font-size: 12.5px; }
.demo-card span { font-size: 10.5px; color: var(--muted); }

.source-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.record-bar {
  display: flex; align-items: center; gap: 9px;
  margin-top: 10px; padding: 9px 10px;
  border: 1px solid rgba(251,113,133,.28);
  background: rgba(251,113,133,.06);
  border-radius: 10px;
}
.record-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(251,113,133,.12); animation: recPulse 1.2s infinite; }
@keyframes recPulse { 50% { opacity: .35; box-shadow: 0 0 0 7px rgba(251,113,133,.04); } }
.record-time { font-family: var(--mono); font-size: 11px; color: #ffc4cc; }
.record-level { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.record-level i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--red), #ffd0d7); transition: width .08s linear; }
.record-stop { border: 0; background: var(--red); color: #24070d; font-size: 11px; font-weight: 650; border-radius: 7px; padding: 4px 9px; }
.record-bar .icon-btn { width: 24px; height: 24px; }

/* ---------- buttons ---------- */

.primary-btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: #07111f;
  border-radius: 10px;
  height: 40px;
  padding: 0 15px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: filter .16s, transform .16s, box-shadow .16s, opacity .16s;
  box-shadow: 0 8px 24px rgba(91,140,255,.08);
}
.primary-btn:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 10px 28px rgba(91,140,255,.16); }
.primary-btn:active:not(:disabled) { transform: translateY(1px); }
.primary-btn:disabled { background: #182238; color: #7486a6; box-shadow: none; cursor: not-allowed; border-color: rgba(255,255,255,.04); }
.primary-btn.wide { width: 100%; }
.primary-btn .icon { width: 16px; height: 16px; }
.btn-kbd { margin-left: auto; font-family: var(--mono); font-size: 9px; opacity: .45; border: 1px solid rgba(0,0,0,.25); padding: 1px 5px; border-radius: 4px; }
.btn-label { flex: none; }

.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  border-radius: 9px; font-size: 12px;
  transition: background .16s, border-color .16s, color .16s;
}
.ghost-btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: var(--text); }
.ghost-btn.small { height: 31px; padding: 0 9px; font-size: 11.5px; gap: 5px; }
.ghost-btn .icon { width: 15px; height: 15px; }
.text-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; padding: 2px;
  color: var(--muted); font-size: 11.5px;
  transition: color .15s;
}
.text-btn:hover { color: var(--text); }
.text-btn .icon { width: 13px; height: 13px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--muted); display: inline-grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.icon-btn .icon { width: 16px; height: 16px; }

/* ---------- engines ---------- */

.engines-panel { display: flex; flex-direction: column; }
.engine-list { display: flex; flex-direction: column; gap: 3px; }
.engine-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.engine-item:hover { background: rgba(255,255,255,.035); }
.engine-item.selected { background: rgba(91,140,255,.045); border-color: rgba(91,140,255,.16); }
.engine-check {
  width: 16px; height: 16px; flex: none; margin-top: 2px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 5px;
  display: grid; place-items: center;
  color: #11150a; transition: background .15s, border-color .15s;
}
.engine-check .icon { width: 11px; height: 11px; stroke-width: 2.6; opacity: 0; }
.engine-item.selected .engine-check { background: var(--accent); border-color: var(--accent); }
.engine-item.selected .engine-check .icon { opacity: 1; }
.engine-main { flex: 1; min-width: 0; }
.engine-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.engine-name { font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.engine-tag { font-size: 8.5px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.engine-tag.local { color: var(--green); background: rgba(134,239,172,.06); border-color: rgba(134,239,172,.15); }
.engine-meta { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 10px; color: var(--faint); min-width: 0; white-space: nowrap; overflow: hidden; }
.engine-status { flex: none; }
.engine-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.engine-status { color: var(--faint); }
.engine-status.ok { color: var(--green); }
.engine-status.warn { color: var(--amber); }
.engine-status.bad { color: var(--red); }
.engine-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; background: currentColor; }
.engine-gear {
  width: 24px; height: 24px; flex: none; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--faint);
  display: grid; place-items: center; opacity: .35; transition: opacity .15s, background .15s, color .15s;
}
.engine-item:hover .engine-gear, .engine-gear:focus-visible { opacity: 1; }
.engine-gear:hover { background: rgba(255,255,255,.07); color: var(--text); }
.engine-gear .icon { width: 14px; height: 14px; }
.engine-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.engine-actions .text-btn { font-size: 10.5px; }
.engine-empty { color: var(--faint); font-size: 11px; padding: 10px 2px; }

/* ---------- main ---------- */

.main-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: rgba(10,11,13,.35); }
.main-head {
  height: 52px; flex: none;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: rgba(11,12,14,.42);
  backdrop-filter: blur(10px);
}
.tabs { display: flex; align-items: stretch; height: 100%; gap: 2px; }
.tab {
  position: relative; border: 0; background: none; color: var(--faint);
  padding: 0 12px; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s;
}
.tab:hover { color: var(--text-soft); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.count-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: rgba(251,113,133,.14); color: #ffb3bf; font-size: 9px; font-family: var(--mono); display: inline-grid; place-items: center; }
.main-actions { display: flex; align-items: center; gap: 10px; }
.run-summary { font-size: 10.5px; color: var(--faint); font-family: var(--mono); white-space: nowrap; }
.export-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 7px); z-index: 50;
  width: 176px; padding: 5px;
  background: #171a20; border: 1px solid var(--line-strong); border-radius: 11px;
  box-shadow: var(--shadow);
  animation: popIn .14s var(--ease);
}
.popover button {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 9px; border: 0; border-radius: 7px; background: none;
  color: var(--text-soft); font-size: 11.5px; text-align: left;
}
.popover button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.popover small { font-family: var(--mono); font-size: 9px; color: var(--faint); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.error-banner {
  margin: 14px 22px 0;
  border: 1px solid rgba(251,113,133,.24);
  background: rgba(251,113,133,.07);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 11.5px; color: #ffc2ca;
  display: flex; gap: 8px; align-items: flex-start;
}
.error-banner .icon { width: 14px; height: 14px; margin-top: 2px; flex: none; }

.public-demo-banner {
  max-width: 900px;
  margin: 14px auto 0;
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, rgba(91,140,255,.08), rgba(56,189,248,.035));
  border-radius: 11px;
  padding: 9px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: #dbe8ff;
}
.pdb-mark {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.pdb-mark .icon { width: 15px; height: 15px; }
.pdb-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.55; }
.pdb-copy strong { font-size: 11px; color: var(--accent); font-weight: 600; }
.pdb-copy span { font-size: 10px; color: #d8e2c2; }
.pdb-back {
  flex: none; color: var(--accent); text-decoration: none; font-size: 10px;
  border: 1px solid var(--accent-line); border-radius: 6px; padding: 4px 7px;
  white-space: nowrap;
}
.pdb-back:hover { background: var(--accent-soft); }
.public-demo .btn-kbd { display: none; }
.public-demo .dropzone { opacity: .78; }
@media (max-width: 720px) {
  .public-demo-banner { margin: 10px 12px 0; flex-wrap: wrap; }
  .pdb-back { margin-left: 38px; }
}

/* ---------- empty ---------- */

.empty-state {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center; gap: 24px;
  padding: 42px 46px;
  position: relative;
}
.empty-inner { max-width: 560px; animation: fadeUp .5s var(--ease); }
.eyebrow { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--teal); opacity: .8; }
.eyebrow-line { width: 26px; height: 1px; background: var(--teal); opacity: .5; }
.empty-state h1 {
  font-size: clamp(32px, 3vw, 42px);
  max-width: 640px;
  line-height: 1.14; letter-spacing: -.035em;
  font-weight: 650; margin: 17px 0 15px;
}
.empty-state h1 .hl {
  color: var(--accent);
  background: linear-gradient(180deg, transparent 64%, rgba(91,140,255,.13) 64%);
  padding: 0 2px;
}
.empty-lede { font-size: 13.5px; color: var(--muted); line-height: 1.85; max-width: 470px; margin: 0 0 24px; }
.empty-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty-actions .primary-btn { height: 42px; padding: 0 18px; }
.empty-actions .ghost-btn { height: 42px; padding: 0 15px; }
.flow { display: flex; align-items: center; gap: 8px; margin-top: 38px; flex-wrap: wrap; }
.flow-step { display: flex; flex-direction: column; min-width: 72px; gap: 1px; }
.flow-step span { font-family: var(--mono); font-size: 8.5px; color: var(--accent); opacity: .6; }
.flow-step strong { font-size: 11.5px; font-weight: 550; }
.flow-step small { font-size: 9.5px; color: var(--faint); }
.flow-arrow { color: var(--faint); font-size: 12px; margin: 0 1px; }
.empty-note { display: flex; align-items: center; gap: 6px; margin-top: 30px; color: var(--faint); font-size: 10.5px; }
.empty-note .icon { width: 13px; height: 13px; color: var(--muted); }

.empty-visual { position: relative; height: 380px; display: grid; place-items: center; animation: fadeIn .7s var(--ease); }
.visual-ring {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(circle at 50% 50%, rgba(91,140,255,.07), transparent 58%),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(255,255,255,.03) 46.5%, transparent 47%);
  box-shadow: inset 0 0 80px rgba(56,189,248,.03);
}
.visual-ring::before {
  content: ""; position: absolute; inset: 22px; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.09);
  animation: spin 46s linear infinite;
}
.visual-ring::after {
  content: ""; position: absolute; inset: 74px; border-radius: 50%;
  border: 1px solid rgba(91,140,255,.12);
}
@keyframes spin { to { transform: rotate(360deg); } }
.visual-core {
  position: relative; z-index: 2; width: 130px; height: 130px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(91,140,255,.2);
  background: rgba(10,16,28,.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 60px rgba(91,140,255,.08), inset 0 1px 0 rgba(255,255,255,.08);
}
.visual-core .icon { width: 30px; height: 30px; color: var(--accent); }
.visual-core span { font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; color: var(--muted); }
.visual-chip {
  position: absolute; z-index: 3; font-family: var(--mono); font-size: 8px; letter-spacing: .08em;
  color: var(--muted); background: #13161a; border: 1px solid var(--line-strong);
  padding: 5px 8px; border-radius: 6px; box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.chip-a { top: 45px; left: 34px; color: var(--teal); border-color: rgba(56,189,248,.2); }
.chip-b { top: 84px; right: 18px; color: var(--blue); border-color: rgba(147,197,253,.2); }
.chip-c { bottom: 57px; left: 18px; color: var(--green); border-color: rgba(134,239,172,.2); }
.chip-d { bottom: 34px; right: 44px; color: var(--violet); border-color: rgba(196,181,253,.2); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- results ---------- */

.results-view { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 36px; }
.results-view > .tab-panel { max-width: 900px; margin: 0 auto; animation: fadeIn .2s var(--ease); }
.demo-banner {
  max-width: 900px; margin: 0 auto 16px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, rgba(91,140,255,.075), rgba(56,189,248,.035));
  border-radius: 11px; padding: 9px 12px;
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; color: #dfe9c9;
}
.demo-banner .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.demo-banner span { flex: 1; }
.demo-banner .text-btn { color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 7px; font-size: 9px; font-weight: 500; letter-spacing: .02em; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.03); white-space: nowrap; }
.badge-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; flex-wrap: wrap; }
.result-title { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.result-title h3 { font-size: 16px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.result-title span { font-size: 10.5px; color: var(--faint); }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.seg-switch { display: inline-flex; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.18); }
.seg-switch button { border: 0; background: transparent; color: var(--faint); font-size: 10px; padding: 4px 8px; border-radius: 6px; }
.seg-switch button.active { background: rgba(255,255,255,.08); color: var(--text); }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.stat-card {
  border: 1px solid var(--line); border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  padding: 10px 11px;
}
.stat-card .k { font-size: 9px; color: var(--faint); letter-spacing: .04em; display: flex; align-items: center; gap: 4px; }
.stat-card .v { font-family: var(--mono); font-size: 19px; margin-top: 2px; letter-spacing: -.03em; color: var(--text); }
.stat-card .v small { font-size: 10px; color: var(--faint); margin-left: 2px; }
.stat-card.tone-good .v { color: var(--green); }
.stat-card.tone-warn .v { color: var(--amber); }
.stat-card.tone-bad .v { color: var(--red); }
.stat-card .sub { font-size: 9px; color: var(--faint); margin-top: 1px; }

.agree-bar { height: 4px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; display: flex; }
.agree-bar i { display: block; height: 100%; }
.agree-bar .g { background: var(--green); }
.agree-bar .w { background: var(--amber); }
.agree-bar .b { background: var(--red); }

.consensus-list { display: flex; flex-direction: column; }
.consensus-row {
  display: grid; grid-template-columns: 58px minmax(0,1fr) 74px; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,.045);
  align-items: flex-start;
}
.consensus-row:last-child { border-bottom: 0; }
.consensus-time { font-family: var(--mono); font-size: 9.5px; color: var(--faint); padding-top: 4px; }
.consensus-body { font-size: 13.5px; line-height: 1.85; color: var(--text-soft); }
.consensus-side { display: flex; justify-content: flex-end; padding-top: 3px; }
.agree-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 8.5px; white-space: nowrap; }
.agree-pill.good { color: #a7f3d0; background: rgba(134,239,172,.08); }
.agree-pill.warn { color: #fde68a; background: rgba(251,191,36,.09); }
.agree-pill.bad { color: #fecdd3; background: rgba(251,113,133,.1); }
.agree-pill.neutral { color: var(--muted); background: rgba(255,255,255,.04); }
.agree-pill .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.missing-note { font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.text-only-note { border: 1px solid rgba(251,191,36,.18); background: rgba(251,191,36,.05); color: #e8d9a8; font-size: 11px; padding: 8px 10px; border-radius: 8px; margin-bottom: 14px; }
.consensus-plain { white-space: pre-wrap; font-size: 14px; line-height: 1.95; color: var(--text-soft); }
.consensus-empty { color: var(--faint); font-size: 12px; padding: 30px 0; text-align: center; }

/* ---------- sources ---------- */

.provider-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.provider-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  border-radius: 8px; padding: 6px 9px;
  font-size: 11px; color: var(--muted);
}
.provider-chip:hover { border-color: var(--line-strong); color: var(--text-soft); }
.provider-chip.active { background: rgba(255,255,255,.055); border-color: var(--line-strong); color: var(--text); }
.provider-chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.provider-chip .chip-stat { font-family: var(--mono); font-size: 8.5px; color: var(--faint); }
.source-doc { border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.12); overflow: hidden; }
.source-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.source-head .mark { width: 8px; height: 8px; border-radius: 50%; }
.source-head h4 { margin: 0; font-size: 13px; font-weight: 600; }
.source-head .source-stats { margin-left: auto; display: flex; gap: 12px; font-family: var(--mono); font-size: 9px; color: var(--faint); flex-wrap: wrap; }
.segments { padding: 6px 14px 14px; }
.segment { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.segment:last-child { border-bottom: 0; }
.segment .st { font-family: var(--mono); font-size: 9.5px; color: var(--faint); padding-top: 3px; }
.segment .sx { font-size: 13px; line-height: 1.8; color: var(--text-soft); }
.speaker { display: inline-block; font-size: 8.5px; color: var(--teal); border: 1px solid rgba(56,189,248,.18); border-radius: 4px; padding: 0 4px; margin-right: 5px; vertical-align: 1px; }
.source-full-text { padding: 14px; white-space: pre-wrap; font-size: 13px; line-height: 1.9; color: var(--text-soft); }
.source-empty { padding: 40px 20px; text-align: center; color: var(--faint); font-size: 12px; }

/* ---------- validation ---------- */

.v-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.v-intro p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.legend { display: flex; align-items: center; gap: 10px; font-size: 9px; color: var(--faint); flex-wrap: wrap; }
.legend i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 3px; }
.matrix-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; margin-bottom: 18px; background: rgba(0,0,0,.12); }
.matrix { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 420px; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix th { font-size: 9px; color: var(--faint); font-weight: 500; background: rgba(255,255,255,.02); }
.matrix td:first-child, .matrix th:first-child { color: var(--text-soft); }
.matrix .num { font-family: var(--mono); font-size: 10.5px; }
.matrix .num.good { color: var(--green); }
.matrix .num.warn { color: var(--amber); }
.matrix .num.bad { color: var(--red); }
.v-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 9px; }
.v-toolbar h4 { margin: 0; font-size: 12px; font-weight: 550; }
.v-window { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.014); margin-bottom: 6px; overflow: hidden; }
.v-window[open] { border-color: var(--line-strong); background: rgba(255,255,255,.025); }
.v-window summary { list-style: none; cursor: pointer; padding: 9px 11px; display: grid; grid-template-columns: 54px minmax(0,1fr) 84px; gap: 10px; align-items: start; }
.v-window summary::-webkit-details-marker { display: none; }
.v-window summary:hover { background: rgba(255,255,255,.018); }
.v-window .vt { font-family: var(--mono); font-size: 9px; color: var(--faint); padding-top: 3px; }
.v-window .vx { font-size: 12.5px; line-height: 1.7; color: var(--text-soft); }
.v-window .vs { text-align: right; }
.v-window .vs .agree-pill { margin-bottom: 3px; }
.v-window .vs .coverage { display: block; font-family: var(--mono); font-size: 8px; color: var(--faint); }
.v-window .vs .chev { display: inline-block; margin-top: 3px; color: var(--faint); transition: transform .15s; }
.v-window[open] .vs .chev { transform: rotate(180deg); }
.variants { border-top: 1px solid var(--line); padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 7px; background: rgba(0,0,0,.12); }
.variant { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 9px; align-items: start; }
.variant-label { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); padding-top: 2px; min-width: 0; }
.variant-label .dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.variant-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-text { font-size: 12px; line-height: 1.7; color: var(--text-soft); }
.variant-text.missing { color: var(--faint); font-style: normal; }
.consensus-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 8px; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 3px; padding: 0 3px; margin-left: 4px; vertical-align: 1px; }

/* ---------- diff ---------- */

.diff-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.diff-select { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: rgba(255,255,255,.02); }
.diff-select .dot { width: 6px; height: 6px; border-radius: 50%; }
.diff-select select { background: transparent; border: 0; outline: none; font-size: 11px; color: var(--text-soft); padding: 3px 0; max-width: 170px; }
.diff-select select option { background: #171a20; }
.diff-vs { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff-col { border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.14); overflow: hidden; min-width: 0; }
.diff-col-head { padding: 8px 11px; border-bottom: 1px solid var(--line); font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.diff-col-head .dot { width: 6px; height: 6px; border-radius: 50%; }
.diff-text { padding: 12px; font-size: 12.5px; line-height: 1.95; white-space: pre-wrap; word-break: break-word; color: var(--text-soft); max-height: 58vh; overflow-y: auto; }
.diff-text mark { border-radius: 2px; padding: 0 1px; }
.diff-del { background: rgba(251,113,133,.18); color: #ffc4cc; text-decoration: line-through; text-decoration-color: rgba(251,113,133,.4); }
.diff-ins { background: rgba(134,239,172,.16); color: #c8f7d4; }
.diff-note { font-size: 10px; color: var(--faint); margin-top: 9px; text-align: right; }
.diff-empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 50px 20px; text-align: center; color: var(--faint); font-size: 12px; }

/* ---------- summary rail ---------- */

.summary-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.summary-panel .panel-head { margin-bottom: 10px; }
.summary-panel #llmBadge { margin-left: auto; }
.depth-list { display: flex; flex-direction: column; gap: 4px; }
.depth-item {
  display: flex; align-items: flex-start; gap: 8px;
  text-align: left; border: 1px solid transparent; background: transparent;
  border-radius: 9px; padding: 7px 7px;
  transition: background .15s, border-color .15s;
}
.depth-item:hover { background: rgba(255,255,255,.03); }
.depth-item.active { background: rgba(91,140,255,.045); border-color: rgba(91,140,255,.16); }
.depth-radio { width: 13px; height: 13px; flex: none; margin-top: 3px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); position: relative; }
.depth-item.active .depth-radio { border-color: var(--accent); }
.depth-item.active .depth-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.depth-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.depth-copy strong { font-size: 11.5px; font-weight: 550; }
.depth-copy small { font-size: 9.5px; color: var(--faint); line-height: 1.45; }
.depth-time { font-family: var(--mono); font-size: 8px; color: var(--faint); padding-top: 3px; }
.llm-line { display: flex; align-items: center; gap: 5px; margin: 9px 1px 8px; min-height: 20px; }
.llm-line .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); flex: none; }
.llm-line .dot.ok { background: var(--green); box-shadow: 0 0 7px rgba(134,239,172,.4); }
.llm-line .text-btn { font-size: 9.5px; color: var(--muted); }
.llm-line .text-btn:hover { color: var(--accent); }
.llm-model { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--faint); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-status { font-size: 9.5px; color: var(--faint); margin-top: 7px; line-height: 1.5; min-height: 14px; }
.summary-status.busy { color: var(--amber); }
.summary-status.error { color: var(--red); }
.summary-divider { height: 1px; background: var(--line); margin: 11px 0 0; flex: none; }
.summary-output { flex: 1; min-height: 0; overflow-y: auto; margin-top: 10px; padding-right: 3px; }
.summary-empty { text-align: center; padding: 26px 10px; color: var(--faint); }
.summary-empty-icon { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.02); display: grid; place-items: center; margin: 0 auto 9px; color: var(--muted); }
.summary-empty strong { display: block; font-size: 11.5px; color: var(--muted); font-weight: 550; }
.summary-empty p { margin: 5px auto 0; font-size: 10px; line-height: 1.6; max-width: 220px; }
.summary-actions { display: flex; align-items: center; gap: 4px; padding-top: 9px; border-top: 1px solid var(--line); margin-top: 8px; }
.summary-actions .text-btn { font-size: 10px; }
.bundle-btn { margin-top: 8px; justify-content: center; font-size: 11.5px; }
.summary-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.summary-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.summary-tab small { color: var(--faint); font-size: 9.5px; }
.summary-tab:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.summary-tab.active { color: var(--text); border-color: var(--accent); background: rgba(91,140,255,.1); }
.tip-panel { flex: none; padding: 11px 12px; }
.mini-title { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); font-weight: 550; margin-bottom: 4px; }
.mini-title .icon { width: 12px; height: 12px; color: var(--faint); }
.tip-panel p { margin: 0; font-size: 9.5px; line-height: 1.6; color: var(--faint); }

.md { font-size: 11.5px; line-height: 1.8; color: var(--text-soft); }
.md h1 { font-size: 16px; line-height: 1.35; margin: 4px 0 8px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.md h2 { font-size: 12px; margin: 15px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--text); }
.md h3 { font-size: 11.5px; margin: 11px 0 4px; font-weight: 600; color: var(--text); }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 5px 0; padding-left: 17px; }
.md li { margin: 2px 0; }
.md strong { color: var(--text); font-weight: 600; }
.md em { color: var(--text); }
.md blockquote { margin: 8px 0; padding: 6px 9px; border-left: 2px solid rgba(91,140,255,.4); background: rgba(91,140,255,.04); color: var(--muted); font-size: 10px; border-radius: 0 5px 5px 0; }
.md table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 9.5px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.md th { background: rgba(255,255,255,.04); color: var(--muted); font-weight: 550; }
.md code { font-family: var(--mono); font-size: 9.5px; background: rgba(255,255,255,.06); padding: 1px 3px; border-radius: 3px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

/* ---------- statusbar ---------- */

.statusbar {
  height: 30px; flex: none;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px;
  font-size: 9px; color: var(--faint);
  background: rgba(10,11,13,.72);
  white-space: nowrap;
}
.status-left { display: flex; align-items: center; gap: 5px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(134,239,172,.45); }
.status-sep { color: rgba(255,255,255,.15); margin: 0 2px; }
.status-mid { font-family: var(--mono); font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; }
.status-mid .ok { color: var(--green); }
.status-mid .bad { color: var(--amber); }
.status-right { font-family: var(--mono); font-size: 8.5px; }

/* ---------- overlay / run ---------- */

.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(5,6,8,.72); backdrop-filter: blur(8px); animation: fadeIn .15s; }
.run-card {
  width: min(560px, 100%);
  background: #12151a;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  padding: 20px;
  animation: popIn .22s var(--ease);
}
.run-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.run-head h2 { margin: 3px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.run-head .icon-btn { margin: -4px -4px 0 0; }
.modal-kicker { font-family: var(--mono); font-size: 8px; letter-spacing: .17em; color: var(--teal); opacity: .75; }
.run-rows { display: flex; flex-direction: column; gap: 7px; }
.run-row { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: rgba(255,255,255,.018); }
.run-row-top { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.run-row-top .name { font-weight: 550; }
.run-row-top .status { margin-left: auto; font-family: var(--mono); font-size: 8.5px; color: var(--faint); }
.run-row-top .status.ok { color: var(--green); }
.run-row-top .status.bad { color: var(--red); }
.run-row-top .status.busy { color: var(--amber); }
.run-bar { height: 3px; border-radius: 99px; background: rgba(255,255,255,.07); margin-top: 7px; overflow: hidden; }
.run-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: 99px; transition: width .35s var(--ease); }
.run-error { font-size: 9.5px; color: #ffb3bf; margin-top: 5px; line-height: 1.5; }
.run-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.run-foot span { font-size: 9.5px; color: var(--faint); line-height: 1.5; }
.busy-card { display: flex; flex-direction: column; align-items: center; gap: 9px; background: #12151a; border: 1px solid var(--line-strong); border-radius: 15px; padding: 24px 28px; box-shadow: var(--shadow); }
.busy-card #busyText { font-size: 12px; color: var(--text-soft); }
.busy-card small { font-size: 9.5px; color: var(--faint); }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ---------- modal ---------- */

.modal-root { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,6,8,.7); backdrop-filter: blur(7px); }
.modal {
  position: relative; width: min(720px, 100%); max-height: min(86vh, 880px);
  display: flex; flex-direction: column;
  background: #121419; border: 1px solid var(--line-strong); border-radius: 17px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  animation: popIn .2s var(--ease);
}
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 3px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.modal-head .icon-btn { margin: -4px -4px 0 0; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 12px 22px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; display: flex; gap: 6px; }
.foot-note { margin-right: auto; font-size: 9.5px; color: var(--faint); max-width: 60%; line-height: 1.5; }

/* settings tabs */
.settings-tabs { display: flex; gap: 3px; padding: 4px; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px solid var(--line); margin-bottom: 16px; }
.settings-tabs button { flex: 1; border: 0; background: none; color: var(--muted); font-size: 11px; padding: 6px 8px; border-radius: 7px; }
.settings-tabs button:hover { color: var(--text-soft); }
.settings-tabs button.active { background: rgba(255,255,255,.075); color: var(--text); }

/* forms */
.field { margin-bottom: 13px; }
.field > label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.field > label .req { color: var(--amber); }
.field .hint { font-size: 9.5px; color: var(--faint); margin-top: 5px; line-height: 1.55; }
.field input[type="text"], .field input[type="password"], .field input[type="url"], .field input[type="number"], .field select, .field textarea {
  width: 100%; height: 36px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(0,0,0,.22); color: var(--text);
  padding: 0 10px; font-size: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 90px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(91,140,255,.06); }
.field input::placeholder { color: #555b66; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-with-btn { display: flex; gap: 6px; }
.input-with-btn input { flex: 1; }
.input-with-btn button { flex: none; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 14px) 15px, calc(100% - 10px) 15px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 28px; }
.check-line { display: flex; align-items: flex-start; gap: 8px; font-size: 10.5px; color: var(--muted); line-height: 1.55; cursor: pointer; margin: 10px 0; }
.check-line input { accent-color: var(--accent); margin-top: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .switch-copy strong { display: block; font-size: 11.5px; font-weight: 550; color: var(--text-soft); }
.switch-row .switch-copy small { display: block; font-size: 9.5px; color: var(--faint); margin-top: 2px; line-height: 1.5; }
.switch { position: relative; width: 34px; height: 19px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12); transition: background .16s; }
.switch span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: #c7cbd3; transition: transform .16s, background .16s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(15px); background: #161a0c; }
.test-result { margin-top: 8px; border-radius: 8px; padding: 7px 9px; font-size: 10.5px; line-height: 1.55; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); }
.test-result.ok { border-color: rgba(134,239,172,.2); background: rgba(134,239,172,.05); color: #b8f5c9; }
.test-result.bad { border-color: rgba(251,113,133,.2); background: rgba(251,113,133,.05); color: #ffb9c4; }
.test-result.busy { border-color: rgba(251,191,36,.2); background: rgba(251,191,36,.05); color: #f5dfa4; }
.provider-docs { font-size: 9.5px; color: var(--faint); margin: 2px 0 12px; display: flex; align-items: center; gap: 5px; }
.provider-docs a { color: var(--teal); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.provider-docs a:hover { text-decoration: underline; }
.provider-docs .icon { width: 11px; height: 11px; }
.engine-setting-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; margin-bottom: 6px; }
.engine-setting-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.engine-setting-row .es-main { flex: 1; min-width: 0; }
.engine-setting-row .es-main strong { display: block; font-size: 11.5px; font-weight: 550; }
.engine-setting-row .es-main small { display: block; font-size: 9.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engine-setting-row .badge { flex: none; }

/* hardware */
.hw-hero { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line-strong); border-radius: 13px; padding: 15px; background: radial-gradient(420px 160px at 10% 0%, rgba(56,189,248,.07), transparent 70%), rgba(255,255,255,.015); margin-bottom: 15px; }
.hw-hero h3 { margin: 0 0 3px; font-size: 14px; font-weight: 600; }
.hw-hero p { margin: 0; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.hw-score { text-align: right; }
.hw-score .num { font-family: var(--mono); font-size: 27px; line-height: 1; color: var(--accent); }
.hw-score .num small { font-size: 10px; color: var(--faint); }
.hw-score .label { font-size: 8.5px; color: var(--faint); letter-spacing: .06em; }
.hw-meter { height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 7px; width: 130px; }
.hw-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); }
.hw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 16px; }
.hw-cell { border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; background: rgba(255,255,255,.016); }
.hw-cell .k { font-size: 8.5px; color: var(--faint); }
.hw-cell .v { font-family: var(--mono); font-size: 11px; margin-top: 2px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-reco { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; font-size: 11px; color: #dbe8ff; line-height: 1.6; }
.hw-reco strong { color: var(--accent); }
.hw-section-title { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 550; margin: 16px 0 7px; }
.hw-section-title .step-no { color: var(--teal); }
.hw-section-title .badge { margin-left: auto; }
.hw-section p { margin: 0 0 8px; font-size: 10.5px; color: var(--muted); line-height: 1.65; }
.code-block { position: relative; border: 1px solid var(--line); border-radius: 9px; background: #0b0d10; padding: 10px 12px; overflow-x: auto; margin: 7px 0; }
.code-block code { font-family: var(--mono); font-size: 10px; line-height: 1.75; color: #cfd6e0; white-space: pre; display: block; }
.code-block .code-copy { position: absolute; right: 6px; top: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); border-radius: 5px; font-size: 8px; padding: 2px 5px; }
.code-block .code-copy:hover { color: var(--text); }
.model-table { width: 100%; border-collapse: collapse; font-size: 9.5px; margin: 6px 0 12px; }
.model-table th, .model-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); color: var(--muted); }
.model-table th { font-size: 8.5px; color: var(--faint); font-weight: 500; }
.model-table td:first-child { color: var(--text-soft); font-family: var(--mono); }
.model-table tr.reco td { color: var(--accent); background: rgba(91,140,255,.04); }
.hw-note { font-size: 9.5px; color: var(--faint); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }

/* ---------- toast ---------- */

.toasts { position: fixed; right: 18px; bottom: 40px; z-index: 200; display: flex; flex-direction: column; gap: 7px; pointer-events: none; max-width: min(360px, calc(100vw - 36px)); }
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 8px;
  background: #1a1e25; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 9px 11px;
  font-size: 11px; color: var(--text-soft); line-height: 1.55;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  animation: toastIn .22s var(--ease);
}
.toast .icon { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.toast.ok .icon { color: var(--green); }
.toast.warn .icon { color: var(--amber); }
.toast.error .icon { color: var(--red); }
.toast.info .icon { color: var(--teal); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 999; }

/* ---------- responsive ---------- */

@media (max-width: 1320px) {
  .workspace { grid-template-columns: 292px minmax(0, 1fr) 348px; }
  .empty-state { grid-template-columns: minmax(0, 1fr) 330px; padding: 36px; }
  .empty-visual { height: 330px; transform: scale(.92); }
}
@media (max-width: 1160px) {
  .workspace { grid-template-columns: 280px minmax(0, 1fr) 320px; }
  .rail { padding: 12px; }
  .panel { padding: 13px; }
  .empty-state { grid-template-columns: 1fr; padding: 36px; }
  .empty-visual { display: none; }
  .empty-inner { max-width: 600px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .workspace { display: flex; flex-direction: column; overflow: visible; }
  .rail-left { display: grid; grid-template-columns: 1fr 1fr; align-items: start; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .engines-panel { flex: none; }
  .engine-list { overflow: visible; }
  .main-panel { min-height: 68vh; border-bottom: 1px solid var(--line); }
  .rail-right { display: grid; grid-template-columns: minmax(0,1fr) 280px; border-left: 0; overflow: visible; }
  .summary-panel { min-height: 480px; }
  .summary-output { max-height: 430px; }
  .statusbar { position: sticky; bottom: 0; z-index: 30; background: rgba(10,11,13,.94); }
  .results-view { overflow: visible; }
  .diff-text { max-height: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 13px; gap: 10px; height: 54px; }
  .brand-word small, .topbar-divider, .privacy-pill span, .crumb, .crumb-sep, #runSummary { display: none; }
  .project-block::before { content: "·"; color: var(--faint); margin-right: 1px; }
  .project-block strong { max-width: 42vw; font-size: 12px; }
  .privacy-pill { padding: 5px 7px; }
  .icon-text-btn span { display: none; }
  .icon-text-btn { padding: 0 9px; }
  .rail-left { display: flex; flex-direction: column; align-items: stretch; padding: 10px; }
  .source-panel, .engines-panel { width: 100%; }
  .rail-right { grid-template-columns: none; align-items: stretch; }
  .summary-panel, .tip-panel { width: 100%; }
  .rail-right { display: flex; flex-direction: column; padding: 10px; }
  .main-head { padding: 0 12px; height: 48px; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 0 9px; font-size: 11px; white-space: nowrap; }
  .results-view { padding: 14px 12px 26px; }
  .empty-state { padding: 30px 18px; }
  .empty-state h1 { font-size: 32px; }
  .flow { gap: 6px; margin-top: 26px; }
  .flow-step { min-width: 62px; }
  .flow-arrow { display: none; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .consensus-row { grid-template-columns: 44px minmax(0,1fr); gap: 8px; }
  .consensus-side { display: none; }
  .v-window summary { grid-template-columns: 42px minmax(0,1fr); }
  .v-window .vs { grid-column: 2; display: flex; align-items: center; gap: 6px; text-align: left; }
  .v-window .vs .chev { margin-top: 0; }
  .diff-grid { grid-template-columns: 1fr; }
  .diff-text { max-height: 40vh; }
  .variant { grid-template-columns: 72px minmax(0,1fr); }
  .source-stats { display: none !important; }
  .hw-grid { grid-template-columns: 1fr 1fr; }
  .hw-hero { grid-template-columns: 1fr; }
  .hw-score { text-align: left; }
  .field-row { grid-template-columns: 1fr; }
  .modal { max-height: 92vh; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .statusbar { padding: 0 10px; font-size: 8px; }
  .status-mid { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- late additions ---------- */
.summary-meta {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 8.5px; color: var(--faint);
  padding: 0 1px 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
  line-height: 1.5;
}
.summary-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(134,239,172,.4); flex: none; }
.hw-loading { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 11px; }
.error-banner > div { min-width: 0; line-height: 1.65; }
.error-banner strong { display: block; color: #ffd5da; font-size: 11.5px; margin-bottom: 2px; }
.hint code, .hw-note code, .hw-section p code { font-family: var(--mono); font-size: 9px; background: rgba(255,255,255,.055); border: 1px solid var(--line); padding: 0 3px; border-radius: 3px; color: var(--text-soft); }
.v-window .vx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-window[open] .vx { display: block; -webkit-line-clamp: unset; overflow: visible; }
.modal-foot .ghost-btn.small { height: 32px; font-size: 11px; }
.summary-output .text-only-note { font-size: 9.5px; }

:focus-visible { outline: 2px solid rgba(91,140,255,.55); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }

/* ---------- speaker mapping / edited source ---------- */
.speaker-map {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255,255,255,.018); padding: 7px 9px; margin-bottom: 10px;
}
.speaker-map .sm-title { font-size: 9px; color: var(--faint); letter-spacing: .04em; }
.speaker-map label { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.speaker-map label span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speaker-map input {
  width: 82px; height: 24px; border: 1px solid var(--line); border-radius: 5px;
  background: rgba(0,0,0,.2); color: var(--text); padding: 0 6px; font-size: 9.5px; outline: none;
}
.speaker-map input:focus { border-color: var(--accent-line); }
.speaker-map .sm-hint { font-size: 8.5px; color: var(--faint); margin-left: auto; }
.edited-note {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  border: 1px solid rgba(91,140,255,.2); background: rgba(91,140,255,.05);
  border-radius: 8px; padding: 6px 9px; margin-bottom: 9px;
  font-size: 9.5px; color: #dfe9c9;
}
.edited-note button {
  border: 0; background: none; color: var(--accent); font-size: 9.5px;
  padding: 0; cursor: pointer; white-space: nowrap;
}
.edited-note button:hover { text-decoration: underline; }
.source-editor {
  width: 100%; min-height: 46vh; max-height: 62vh; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(0,0,0,.22); color: var(--text-soft);
  padding: 11px 12px; font-size: 12.5px; line-height: 1.9; outline: none;
  font-family: var(--font);
}
.source-editor:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(91,140,255,.06); }

/* ---------- engine selection guide ---------- */
.guide-trigger {
  margin-left: auto; font-size: 9.5px; color: var(--accent);
  padding: 2px 0; white-space: nowrap;
}
.guide-trigger:hover { text-decoration: underline; }
.engine-pitch {
  margin-top: 2px; font-size: 8.5px; line-height: 1.45;
  color: var(--faint); overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.guide-lead {
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255,255,255,.018); padding: 10px 11px; margin-bottom: 12px;
}
.guide-lead p { margin: 0 0 8px; font-size: 11px; line-height: 1.65; color: var(--text-soft); }
.guide-lead strong { color: var(--accent); font-weight: 500; }
.guide-questions { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-questions span {
  font-size: 8.5px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 7px; background: rgba(0,0,0,.12);
}
.guide-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px; margin-bottom: 14px;
}
.guide-card {
  display: flex; flex-direction: column; min-height: 176px;
  border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.08));
  padding: 11px 12px 10px;
}
.guide-card-local { border-color: rgba(134,239,172,.22); }
.guide-card-kicker { font-size: 8.5px; letter-spacing: .04em; color: var(--faint); }
.guide-card h4 { margin: 5px 0 5px; font-size: 13px; font-weight: 500; color: var(--text); }
.guide-card p { margin: 0; font-size: 10px; line-height: 1.65; color: var(--muted); }
.guide-card-foot { margin-top: auto; padding-top: 8px; font-size: 8.5px; color: var(--faint); }
.guide-apply { width: 100%; margin-top: 7px; height: 30px; font-size: 10px; }
.guide-apply:disabled { opacity: .5; cursor: default; }
.guide-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 9.5px; min-width: 620px; }
.guide-table th {
  text-align: left; font-weight: 500; color: var(--faint);
  padding: 7px 8px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.018); white-space: nowrap;
}
.guide-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.045); color: var(--muted); }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-status {
  display: inline-block; font-size: 8.5px; padding: 2px 6px;
  border-radius: 20px; white-space: nowrap; border: 1px solid var(--line);
}
.guide-status.ok { color: var(--accent); border-color: rgba(91,140,255,.25); background: rgba(91,140,255,.06); }
.guide-status.plan { color: #f4cf82; border-color: rgba(244,207,130,.22); background: rgba(244,207,130,.05); }
.guide-status.local { color: #86efac; border-color: rgba(134,239,172,.22); background: rgba(134,239,172,.05); }
.guide-cost-note { font-size: 8.5px; line-height: 1.6; color: var(--faint); margin-top: 8px; }
@media (max-width: 760px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; }
}

.install-download {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px; margin: 2px 0 4px;
  text-decoration: none; color: #0b0d0c;
  border-radius: 7px; font-size: 11px; font-weight: 600;
}

/* ---------- API key prompt ---------- */
.key-prompt { padding: 2px 0 4px; }
.key-prompt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.key-prompt-head > div { display: flex; align-items: center; gap: 8px; }
.key-prompt-name { font-size: 14px; font-weight: 600; color: var(--text); }
.key-prompt-state {
  font-size: 9px; color: #f4cf82; border: 1px solid rgba(244,207,130,.22);
  background: rgba(244,207,130,.05); border-radius: 20px; padding: 3px 7px; white-space: nowrap;
}
.key-prompt p { margin: 0 0 10px; font-size: 11.5px; line-height: 1.7; color: var(--text-soft); }
.key-prompt-note { margin-top: 10px; font-size: 8.5px; line-height: 1.65; color: var(--faint); }

/* ---------- live transcript ---------- */
.live-panel {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: 24px 28px 18px; overflow: hidden;
}
.live-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: none; }
.live-head h3 { margin: 6px 0 0; font-size: 20px; font-weight: 560; letter-spacing: -.02em; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em;
  color: #ffc2ca; border: 1px solid rgba(251,113,133,.25);
  background: rgba(251,113,133,.06); border-radius: 20px; padding: 4px 8px;
}
.live-badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); animation: recPulse 1.4s infinite; }
.live-body {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px; margin-top: 18px;
}
.live-transcript-wrap {
  min-height: 0; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.015); padding: 16px 18px; overflow-y: auto;
}
.live-transcript {
  font-size: 15px; line-height: 2; color: var(--text-soft);
  white-space: pre-wrap; word-break: break-word;
}
.live-placeholder { color: var(--faint); }
.live-interim { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--accent); opacity: .8; min-height: 22px; }
.live-side {
  min-height: 0; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(91,140,255,.025); padding: 13px 14px; overflow-y: auto;
}
.live-side h4 { margin: 0 0 10px; font-size: 10px; font-weight: 500; color: var(--faint); letter-spacing: .04em; }
.live-highlights { display: flex; flex-direction: column; gap: 8px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.live-highlights p { margin: 0; padding-left: 9px; border-left: 2px solid var(--accent-line); }
.live-empty { color: var(--faint); font-size: 9.5px; line-height: 1.65; }
.live-stats { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 8.5px; color: var(--faint); }
.live-foot { flex: none; display: flex; align-items: center; gap: 9px; padding-top: 16px; }
.live-status { flex: 1; font-size: 9.5px; color: var(--faint); }
.live-foot .primary-btn { height: 34px; font-size: 11px; }
.live-foot .ghost-btn { height: 34px; font-size: 11px; }
@media (max-width: 900px) {
  .live-panel { padding: 16px; }
  .live-body { grid-template-columns: 1fr; }
  .live-side { max-height: 150px; }
  .live-foot { flex-wrap: wrap; }
  .live-status { flex-basis: 100%; }
}

/* ---------- Alibaba scenario guide ---------- */
.guide-scenarios {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px; margin-bottom: 4px;
}
.guide-scenario {
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,.015); padding: 8px 10px;
}
.guide-scenario > span { display: block; font-size: 8.5px; color: var(--accent); letter-spacing: .02em; }
.guide-scenario strong { display: block; margin-top: 2px; font-size: 10px; font-weight: 550; color: var(--text-soft); }
.guide-scenario em { font-style: normal; font-size: 8px; color: var(--faint); }
.guide-scenario p { margin: 3px 0 0; font-size: 8.5px; line-height: 1.55; color: var(--faint); }
@media (max-width: 760px) { .guide-scenarios { grid-template-columns: 1fr; } }

.live-head-right { display: flex; align-items: center; gap: 8px; }
.live-lang select {
  height: 26px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255,255,255,.025); color: var(--muted);
  font-size: 9.5px; padding: 0 6px; outline: none;
}
.live-lang select:focus { border-color: var(--accent-line); }

/* ---------- live mode picker ---------- */
.live-mode-pick {
  display: flex; align-items: center; gap: 7px;
  margin-top: 8px; font-size: 9.5px; color: var(--faint);
}
.live-mode-pick select {
  flex: 1; min-width: 0; height: 26px;
  border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255,255,255,.025); color: var(--muted);
  font-size: 9.5px; padding: 0 6px; outline: none;
}
.live-mode-pick select:focus { border-color: var(--accent-line); }

/* 简报结构化渲染 + 证据跳转 + 改一改 */
.summary-edit { display: flex; gap: 6px; margin: 6px 0 2px; }
.summary-edit input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); font-size: 11.5px; }
.summary-edit input:focus { outline: none; border-color: var(--accent-line); }
.summary-edit .ghost-btn { height: 30px; }
.brief { display: flex; flex-direction: column; gap: 10px; }
.brief-hero { border: 1px solid var(--accent-line); background: rgba(91,140,255,.08); border-radius: 10px; padding: 12px; }
.brief-hero span { font-size: 9.5px; letter-spacing: .08em; color: var(--accent); }
.brief-hero p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.brief-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,.015); }
.brief-card h4 { margin: 0 0 8px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.brief-points { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.55; }
.brief-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.brief-timeline li { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; gap: 8px; align-items: center; font-size: 12px; position: relative; padding-left: 12px; }
.brief-timeline li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bt-when { color: var(--accent); font-size: 11px; }
.bt-what { color: var(--text); }
.bt-owner { color: var(--muted); font-size: 10px; }
.brief-actions { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.brief-actions th, .brief-actions td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.brief-actions th { color: var(--muted); font-weight: 500; font-size: 10px; }
.brief-decision { font-size: 12px; margin-bottom: 6px; }
.brief-decision p { margin: 0 0 4px; }
.brief-decision ul { margin: 0; padding-left: 16px; color: var(--muted); }
.ev-chip { margin-left: 6px; padding: 0 5px; height: 16px; border-radius: 4px; border: 1px solid var(--line); background: rgba(91,140,255,.08); color: var(--accent); font-size: 9.5px; cursor: pointer; }
.ev-chip:hover { border-color: var(--accent); }
.seg-flash { animation: segFlash 1.4s ease; }
@keyframes segFlash { 0% { background: rgba(91,140,255,.25); } 100% { background: transparent; } }
.brief-edit { margin-left: 6px; padding: 0 5px; height: 16px; border-radius: 4px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 9.5px; cursor: pointer; opacity: .65; }
.brief-edit:hover, .brief-edit.active { opacity: 1; color: var(--accent); border-color: var(--accent); }
