/* SuperWork landing — voice demo. 모든 선택자는 .vd- 접두사.
   오른쪽 창 = 실제 AI 어시스턴트 drawer (ai-assistant-panel.tsx) · 디자인시스템 버전 2 다크 토큰 */

.vd {
  --t1: #ececee; --t2: #a9a9b1; --t3: #83838c; --t4: #6f6f78;
  --vbd: rgba(255, 255, 255, .07);
  --vwell: rgba(255, 255, 255, .045);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px;
  align-items: stretch;
  font-family: var(--font-sans);
  color: var(--text);
  text-align: left;
}
.vd *, .vd *::before, .vd *::after { box-sizing: border-box; }
.vd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vd button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vd button:focus-visible, .vd .vd-input:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 2px; }

/* ---------- left: 음성 입력 ---------- */
.vd-ctrl {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 32px 24px;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.vd-mic-wrap { --vd-level: 0; position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.vd-mic-wrap::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-2);
  transform: scale(calc(.86 + var(--vd-level) * .22));
  opacity: calc(.35 + var(--vd-level));
  transition: transform .08s linear;
}
.vd-mic {
  position: relative; width: 104px; height: 104px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text);
  box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: background .2s, color .2s, transform .15s;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.vd-mic svg { width: 34px; height: 34px; }
.vd-mic:active { transform: scale(.96); }
.vd-mic.is-on { background: var(--blue); color: #fff; }
.vd-mic-wrap:has(.is-on)::before { box-shadow: 0 0 0 1.5px var(--blue-text); }

.vd-status { margin: 0; font-size: 14px; color: var(--text-2); text-align: center; min-height: 1.5em; }
.vd-notice {
  margin: 0; width: 100%; padding: 10px 14px; font-size: 13px; line-height: 1.55; color: var(--text-2);
  border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.vd-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vd-chip {
  padding: 8px 13px; font-size: 13px; line-height: 1.3; color: var(--text-2);
  background: transparent; border: 0; border-radius: 999px; box-shadow: 0 0 0 1px var(--line-2);
  transition: color .15s, box-shadow .15s;
}
.vd-chip:active { color: var(--blue-text); box-shadow: 0 0 0 1px var(--blue-text); }

/* ---------- right: AI 어시스턴트 drawer ---------- */
.vd-app {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  height: 560px; overflow: hidden;
  background: #1c1c1f;                      /* --card */
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 255, 255, .06);
  color: var(--t1);
}
.vd-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--vbd); }
.vd-logo { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(160deg, #fff, #c9ccd3); color: #111113; }
.vd-logo svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.vd-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.vd-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.vd-online { font-size: 12px; color: var(--t4); white-space: nowrap; }
.vd-mode { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: 8px; font-size: 11px; color: var(--t2); background: rgba(255, 255, 255, .06); }
.vd-mode svg { width: 13px; height: 13px; }
.vd-mute { width: 28px; height: 28px; border: 0; border-radius: 8px; display: grid; place-items: center; background: transparent; color: var(--t3); }
.vd-mute svg { width: 16px; height: 16px; }
.vd-mute .vd-off, .vd-mute[aria-pressed="true"] .vd-on { display: none; }
.vd-mute[aria-pressed="true"] .vd-off { display: inline; }
.vd-x { width: 24px; text-align: center; font-size: 13px; color: var(--t3); }

.vd-log {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: var(--vbd) transparent;
}

/* 빈 화면 */
.vd-hero { padding: 12px 14px; border-radius: 10px; background: linear-gradient(135deg, #1f1f22, #18181b); box-shadow: inset 0 0 0 1px var(--vbd); }
.vd-hero p { margin: 0 0 2px; font-size: 12px; font-weight: 500; letter-spacing: .5px; color: var(--blue-text); }
.vd-hero span { font-size: 14px; line-height: 1.55; color: var(--t1); }
.vd-cap { margin: 18px 0 8px; font-size: 12px; letter-spacing: .5px; color: var(--t4); }
.vd-cmd {
  display: block; width: 100%; margin-bottom: 6px; padding: 10px 12px; border: 0; border-radius: 8px;
  text-align: left; font-size: 14px; color: var(--t2); background: #141416;
  transition: background .15s, color .15s;
}
@media (hover: hover) { .vd-cmd:hover { background: #26262a; color: var(--t1); } }

/* 말풍선 — max-w 90% · rounded-2xl · px-3 py-2 */
.vd-msg { display: flex; flex-direction: column; gap: 8px; max-width: 90%; animation: vd-in .3s ease both; }
.vd-user { align-self: flex-end; align-items: flex-end; }
.vd-ai { align-self: flex-start; }
.vd-bubble { padding: 8px 12px; font-size: 14px; line-height: 1.5; border-radius: 16px; word-break: keep-all; overflow-wrap: anywhere; }
.vd-user .vd-bubble { background: #f4f4f5; color: #111113; border-bottom-right-radius: 4px; }
.vd-ai .vd-bubble { background: #141416; color: var(--t1); border-bottom-left-radius: 4px; }
.vd-bubble.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--t2); animation: vd-blink 1s steps(1) infinite; }
.vd-via { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--t4); }
.vd-via svg { width: 13px; height: 13px; }
.vd-time { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #9a9aa3; }
.vd-time svg { width: 12px; height: 12px; }

/* 진행 카드 (agentic-progress) */
.vd-proc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: #141416; box-shadow: inset 0 0 0 1px var(--vbd); min-width: 220px; }
.vd-proc-h { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--t3); }
.vd-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); animation: vd-in .25s ease both; }
.vd-step i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .15); border-top-color: var(--t2); animation: vd-spin .8s linear infinite; display: grid; place-items: center; }
.vd-step.is-done { color: var(--t1); }
.vd-step.is-done i { border: 0; animation: none; color: #3fb98d; }
.vd-step.is-done i svg { width: 14px; height: 14px; stroke-width: 2.4; }

/* 결과 카드 (text_summary · table) */
.vd-card { padding: 12px 14px; border-radius: 10px; background: #141416; box-shadow: inset 0 0 0 1px var(--vbd); animation: vd-in .35s ease both; }
.vd-card-h { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #9a9aa3; }
.vd-meta { font-size: 12px; color: var(--t4); white-space: nowrap; }
.vd-meta.vd-warn { color: #e3b45e; }
.vd-meta.vd-red { color: #f37f8e; }
.vd-rows, .vd-bul { list-style: none; margin: 0; padding: 0; }
.vd-rows li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--vbd); font-size: 13.5px; }
.vd-rows li:first-child { border-top: 0; padding-top: 0; }
.vd-row-t { flex: 1; min-width: 0; }
.vd-bul li { display: flex; gap: 6px; padding: 3px 0; font-size: 13.5px; line-height: 1.6; color: var(--t2); }
.vd-bul li::before { content: "•"; color: var(--t4); }
.vd-bul b { color: var(--t1); font-weight: 600; }
.vd-src { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--vbd); font-size: 12px; color: var(--blue-text); }

/* 입력 — border-t px-4 py-3 · rounded-[10px] bg-[var(--bg)] */
.vd-foot { padding: 12px 16px; border-top: 1px solid var(--vbd); }
.vd-form { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: #141416; }
.vd-input { flex: 1; min-width: 0; height: 28px; padding: 0; font: inherit; font-size: 14px; color: var(--t1); background: none; border: 0; outline: 0; }
.vd-input::placeholder { color: var(--t4); }
.vd-send { width: 28px; height: 28px; border: 0; border-radius: 6px; display: grid; place-items: center; font-size: 15px; font-weight: 600; background: #f4f4f5; color: #111113 !important; }
.vd-hint { margin: 8px 0 0; font-size: 11px; color: var(--t4); }
.vd-hint kbd { padding: 0 4px; border-radius: 4px; font: inherit; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--vbd); }


.vd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes vd-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes vd-spin { to { transform: rotate(360deg); } }
@keyframes vd-blink { 50% { opacity: 0; } }

@media (max-width: 860px) {
  .vd { grid-template-columns: 1fr; gap: 16px; }
  .vd-ctrl { padding: 24px 16px; }
  .vd-mic-wrap { width: 112px; height: 112px; }
  .vd-mic { width: 88px; height: 88px; }
  .vd-app { height: 540px; }
}
@media (max-width: 420px) {
  .vd-msg { max-width: 94%; }
  .vd-log { padding: 14px 12px; }
  .vd-mute, .vd-x { display: none; }
  .vd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vd *, .vd *::before, .vd *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
