/* DEALFORGE — tokens, temas y componentes (SPEC-010, ADR-03) */
/* DEALFORGE — tokens, temas y componentes (SPEC-010, ADR-03) */
:root {
  --bg: #030303; --bg-2: #141416; --bg-elev: #18181b; 
  --card: #0c0c0c; --card-border: rgba(255,255,255,0.08); --card-hover: rgba(255,255,255,0.04); 
  --text: #f8fafc; --muted: #a1a1aa; --faint: #71717a;
  --accent: #10b981; --accent-2: #059669; --accent-soft: rgba(16, 185, 129, 0.1); 
  --ok: #10b981; --warn: #f59e0b; --crit: #ef4444; --info: #3b82f6;
  --glow: none; --shadow: none; --radius: 12px; --radius-sm: 8px;
  --font: "Inter", "IBM Plex Sans", system-ui, -apple-system, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --grid-line: rgba(255,255,255,0.04); --sidebar-w: 240px; --topbar-h: 68px;
}
[data-theme="light"] {
  --bg: #f8fafc; --bg-2: #ffffff; --bg-elev: #ffffff; 
  --card: #ffffff; --card-border: #e2e8f0; --card-hover: #e2e8f0;
  --text: #020617; --muted: #64748b; --faint: #94a3b8; 
  --accent: #0f172a; --accent-2: #334155; --accent-soft: #f1f5f9;
  --ok: #10b981; --warn: #f59e0b; --crit: #ef4444; --info: #3b82f6; 
  --glow: none; --shadow: 0 1px 3px rgba(0,0,0,0.05); --grid-line: rgba(0,0,0,0.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; min-height: 100vh;
  
  background-attachment: fixed; }
[data-theme="light"] body {  }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12px; }
::selection { background: var(--accent-soft); }

/* ---------- layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--card-border); background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand img { height: 26px; width: auto; }
.brand .name { font-weight: 700; letter-spacing: 0.12em; font-size: 13px; }
.brand .sub { display: block; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); color: var(--muted); transition: all .15s; font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { background: var(--card-hover); color: var(--text); font-weight: 600; box-shadow: none; }
.nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav kbd { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--faint); border: 1px solid var(--card-border); border-radius: 5px; padding: 1px 5px; }
.sidebar .foot { margin-top: auto; color: var(--faint); font-size: 11px; padding: 8px; }
.main { min-width: 0; }
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--card-border); position: sticky; top: 0; z-index: 20; background: var(--bg); }
.topbar h1 { font-size: 18px; }
.topbar .spacer { flex: 1; }
.content { padding: 24px 28px 60px; display: grid; gap: 20px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; color: var(--text); font-weight: 700; }
.hero p { color: var(--muted); max-width: 720px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
@media (max-width: 1250px) { .grid.cols-5 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) { .app { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; } .sidebar .foot { display: none; } .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: auto; } }

/* ---------- cards & kpis */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);  animation: rise .5s ease both; position: relative; }
.card.tight { padding: 12px 14px; }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card .head h2 { font-size: 15px; }
.card .head .actions { display: flex; gap: 8px; align-items: center; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.kpi .value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-bottom: 4px; color: var(--text); }
.kpi .value.accent { color: var(--accent-2); }
.kpi .delta { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .bar { height: 4px; border-radius: 4px; background: var(--card-border); overflow: hidden; margin-top: 6px; }
.kpi .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width 1s ease; }
.help { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--faint); color: var(--faint); font-size: 10px; align-items: center; justify-content: center; cursor: help; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card:nth-child(2) { animation-delay: .06s } .card:nth-child(3) { animation-delay: .12s } .card:nth-child(4) { animation-delay: .18s } .card:nth-child(5) { animation-delay: .24s }

/* ---------- chips, badges */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; border: 1px solid var(--card-border); background: var(--card); color: var(--muted); white-space: nowrap; }
.chip--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.chip--crit { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.chip--info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 12%, transparent); }
.chip--accent { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.chip--synthetic { color: var(--muted); border-style: dashed; }
.ev-chip { cursor: pointer; font-family: var(--mono); font-size: 10px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid transparent; transition: all .12s; vertical-align: middle; }
.ev-chip:hover { border-color: var(--accent); box-shadow: var(--glow); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--ok); } .dot--warn { background: var(--warn); } .dot--crit { background: var(--crit); } .dot--muted { background: var(--faint); }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6);} 70% { box-shadow: 0 0 0 10px rgba(16,185,129,0);} 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0);} }

/* ---------- buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: var(--card); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.btn:hover { background: var(--card-hover); border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--text); color: var(--bg); border-color: transparent; box-shadow: 0 1px 2px rgba(0,0,0,0.05); } color: #fff; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.btn--primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 5px 10px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.input, .select, textarea.input { width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: var(--bg-2); color: var(--text); font-family: inherit; font-size: 13px; outline: none; transition: border .15s; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 12px; }

/* ---------- table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--card-border); font-weight: 600; white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--grid-line); vertical-align: top; }
.table tr:hover td { background: var(--card-hover); }
.table tr.clickable { cursor: pointer; }
.table tr.selected td { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--card-border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 14px; font-weight: 600; font-family: inherit; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs button .count { margin-left: 6px; font-size: 10px; background: var(--card); border: 1px solid var(--card-border); padding: 1px 6px; border-radius: 999px; }
.tab-panel { display: none; } .tab-panel.active { display: block; }

/* ---------- drawer (click-to-source) */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 95vw; background: var(--bg-elev); border-left: 1px solid var(--card-border); box-shadow: -20px 0 50px rgba(0,0,0,0.4); transform: translateX(105%); transition: transform .25s ease; z-index: 50; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer .d-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--card-border); }
.drawer .d-body { padding: 18px 20px; overflow: auto; display: grid; gap: 12px; }
.drawer .kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 12px; }
.drawer .kv b { color: var(--muted); font-weight: 500; }
.drawer .excerpt { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px; font-size: 12px; font-family: var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow: auto; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 40; display: none; }
.drawer-backdrop.open { display: block; }

/* ---------- timer ring */
.timer { display: flex; align-items: center; gap: 16px; }
.timer-ring { width: 118px; height: 118px; position: relative; flex: none; }
.timer-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.timer-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.timer-ring .track { stroke: var(--card-border); }
.timer-ring .prog { stroke: url(#tgrad); stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset .5s linear; filter: drop-shadow(0 0 6px rgba(16,185,129,0.5)); }
.timer-ring .t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.timer-ring .t small { font-size: 9px; color: var(--muted); font-weight: 500; letter-spacing: 0.1em; }
.timer.done .prog { stroke: var(--ok); filter: drop-shadow(0 0 6px rgba(34,197,94,0.5)); }
.timer .stages { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.timer .stages div { display: flex; gap: 8px; align-items: center; }
.timer .stages b { font-family: var(--mono); font-weight: 500; color: var(--text); min-width: 58px; }

/* ---------- progress graph (nodos del agente) */
.progress-graph { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.progress-graph .node { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--card-border); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); background: var(--card); transition: all .2s; }
.progress-graph .node.running { border-color: var(--accent); color: var(--text); background: var(--accent-soft); box-shadow: var(--glow); }
.progress-graph .node.done { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.progress-graph .edge { width: 22px; height: 2px; background: var(--card-border); }
.log { font-family: var(--mono); font-size: 11px; color: var(--muted); max-height: 140px; overflow: auto; display: grid; gap: 3px; margin-top: 10px; }
.log div::before { content: "▸ "; color: var(--accent-2); }

/* ---------- gauge */
.gauge { position: relative; width: 160px; height: 90px; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .val { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gauge .lab { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------- radar canvas */
.radar-wrap { position: relative; aspect-ratio: 1; max-height: 420px; margin: 0 auto; width: 100%; max-width: 420px; }
.radar-wrap canvas { width: 100%; height: 100%; display: block; }
.radar-legend { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ---------- markdown render */
.md h1 { font-size: 20px; margin: 0 0 10px; } .md h2 { font-size: 15px; margin: 18px 0 8px; color: var(--accent-2); } .md h3 { font-size: 14px; margin: 12px 0 6px; }
.md ul { padding-left: 18px; margin: 4px 0 8px; } .md li { margin: 2px 0; }
.md pre { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; font-size: 12px; }
.md p { margin: 0 0 8px; }
.para { padding: 8px 10px; border-radius: var(--radius-sm); border-left: 3px solid transparent; transition: all .15s; margin-bottom: 6px; }
.para:hover { background: var(--card-hover); border-left-color: var(--accent); }
.para.no-ev { border-left-color: var(--crit); background: color-mix(in srgb, var(--crit) 8%, transparent); }
.para .evs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.para .tag { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-right: 6px; }

/* ---------- misc */
.toast-host { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--card-border); box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: rise .25s ease; min-width: 260px; }
.toast--ok { border-left: 3px solid var(--ok); } .toast--err { border-left: 3px solid var(--crit); } .toast--info { border-left: 3px solid var(--info); }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.empty { color: var(--muted); text-align: center; padding: 30px; font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; } .bold { font-weight: 600; }
.accent { color: var(--accent-2); }
/* minmax(0,1fr): la columna no se estira al ancho de un título sin cortes (si no, los ítems se salen de la tarjeta) */
.list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.list .item .title.wrap2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.list.scroll-list { max-height: 560px; overflow-y: auto; padding-right: 6px; align-content: start;
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.list.scroll-list::-webkit-scrollbar { width: 6px; }
.list.scroll-list::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 3px; }
.list .item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: var(--card); cursor: pointer; transition: all .15s; }
.list .item:hover, .list .item.selected { border-color: var(--accent); background: var(--accent-soft); }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urgency { font-family: var(--mono); font-weight: 700; font-size: 18px; min-width: 52px; text-align: right; }
.bar-h { height: 8px; border-radius: 6px; background: var(--card-border); overflow: hidden; }
.bar-h i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.timeline { position: relative; height: 120px; border-bottom: 1px solid var(--card-border); margin: 20px 10px 30px; }
.timeline .tick { position: absolute; bottom: -22px; font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.timeline .bubble { position: absolute; bottom: 8px; transform: translateX(-50%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; cursor: pointer; border: 2px solid var(--bg); transition: transform .15s; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.timeline .bubble:hover { transform: translateX(-50%) scale(1.12); z-index: 2; }
.rule { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); }
.rule .items { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.rule .items a { color: var(--accent-2); cursor: pointer; }
.dropzone { border: 2px dashed var(--card-border); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); transition: all .15s; cursor: pointer; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.stat-row { display: flex; gap: 20px; flex-wrap: wrap; }
.stat-row .s { display: flex; flex-direction: column; } .stat-row .s b { font-size: 20px; } .stat-row .s span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sparkline { width: 100%; height: 36px; }
.theme-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.offline-chip { font-size: 11px; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.mermaid-like { font-family: var(--mono); font-size: 11px; }

/* ---------- asistente de voz «Forge» (SPEC-015) */
:root { --va: #FF462D; --va-2: #B42A18; }
.va-avatar { width: 40px; height: 40px; display: block; }
.va-avatar-wrap { position: relative; display: inline-flex; border-radius: 50%; }
.va-avatar .va-eyes { transform-box: fill-box; transform-origin: center; animation: va-blink 5s infinite; }
.va-avatar .va-mouth { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.speaking .va-mouth { opacity: 1; animation: va-talk .9s ease-in-out infinite; } .speaking .va-smile { opacity: 0; }
.va-avatar-wrap.listening::after, .va-avatar-wrap.speaking::after { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--va); animation: va-ring 1.4s ease-out infinite; pointer-events: none; }
@keyframes va-talk { 0% { transform: scaleY(.3) } 25% { transform: scaleY(1) } 50% { transform: scaleY(.45) } 75% { transform: scaleY(.85) } 100% { transform: scaleY(.3) } }
@keyframes va-blink { 0%, 94%, 100% { transform: scaleY(1) } 97% { transform: scaleY(.1) } }
@keyframes va-ring { from { opacity: .8; transform: scale(.92) } to { opacity: 0; transform: scale(1.25) } }

.va-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
  box-shadow: 0 8px 24px rgba(255,70,45,.35); transition: transform .15s; }
.va-fab:hover { transform: translateY(-2px) scale(1.04); }
.va-fab .va-avatar { width: 54px; height: 54px; }
.va-fab.hidden { display: none; }
body.has-va .toast-host { bottom: 92px; }

.va-panel { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 390px; max-width: calc(100vw - 32px); max-height: min(640px, calc(100vh - 44px));
  display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.va-panel.show { opacity: 1; transform: none; }
.va-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--card-border); }
.va-head .grow { flex: 1; }
.va-body { padding: 14px 16px; overflow-y: auto; display: grid; gap: 10px; align-content: start; scrollbar-width: thin; }
.va-bubble { background: var(--card); border: 1px solid var(--card-border); border-left: 3px solid var(--va); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.va-you { font-style: italic; }
.va-cards { display: grid; gap: 8px; }
.va-card { display: block; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 10px; background: var(--card); transition: border-color .15s, background .15s; }
.va-card:hover { border-color: var(--muted); }
.va-card.active { border-color: var(--va); background: color-mix(in srgb, var(--va) 8%, var(--card)); }
.va-rank { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--va); }
.va-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.va-open { float: right; color: var(--va); font-weight: 600; }
.va-foot { padding: 12px 16px 14px; border-top: 1px solid var(--card-border); display: grid; gap: 8px; }
.va-ask { flex: 1; justify-content: center; font-size: 12px; }
.va-mic { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--va); color: #fff; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.va-mic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.va-mic.listening, .va-mic.invite { animation: va-pulse 1.3s ease-out infinite; }
.va-mic.listening { background: var(--va-2); }
@keyframes va-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,70,45,.55) } 100% { box-shadow: 0 0 0 14px rgba(255,70,45,0) } }
.va-type .input { width: 100%; font-size: 12px; padding: 7px 10px; }
.va-panel[hidden], .va-panel [hidden], .va-fab[hidden] { display: none !important; }
.va-note { font-size: 10px; color: var(--faint); line-height: 1.4; }

@media (max-width: 600px) { .va-fab { right: 16px; bottom: 16px; } .va-panel { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .va-avatar .va-eyes, .speaking .va-mouth, .va-avatar-wrap::after, .va-mic.listening, .va-mic.invite { animation: none !important; }
}
