:root {
  --bg: #f7f5f2; --surface: #ffffff; --surface-2: #fafaf7; --paper: #fdfcf9;
  --ink: #0f1729; --ink-2: #2a3142; --muted: #6b7385; --muted-2: #9098a8;
  --line: #e8e6e0; --line-2: #ecebe5; --line-strong: #d4d2cc;
  --accent: #0d9488; --accent-2: #0f766e; --accent-soft: #ccfbf1; --accent-tint: #f0fdfa;
  --warm: #c2410c; --warm-soft: #fff3ec;
  --radius: 14px; --radius-sm: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased; font-size: 14px;
}
code, .mono { font-family: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, Menlo, monospace; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ── Layout ── */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-header { display: flex; align-items: center; gap: 24px; padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.01em; margin-top: 2px; }
.header-stats { display: flex; gap: 28px; margin-left: 24px; padding-left: 24px; border-left: 1px solid var(--line); }
.hstat { display: flex; flex-direction: column; line-height: 1.1; }
.hstat b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.hstat span { font-size: 11px; color: var(--muted); margin-top: 3px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang-toggle .active { color: var(--ink); }
.lang-toggle .divider { color: var(--line-strong); }
.lang-toggle:hover { background: var(--paper); border-color: var(--line-strong); }

.app-body { display: grid; grid-template-columns: 220px 1fr auto; flex: 1; min-height: 0; }

/* ── Rail (sidebar) ── */
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.rail-section { display: flex; flex-direction: column; gap: 6px; }
.rail-bottom { margin-top: auto; }
.rail-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 0 6px 4px; }
.persona-pills { display: flex; gap: 4px; }
.persona-pill { flex: 1; padding: 7px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted-2); }
.persona-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.persona-pill:not(.active):hover { color: var(--ink); border-color: var(--line-strong); }
.rail-tab { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: transparent; border: 0; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-align: left; width: 100%; }
.rail-tab:hover { background: var(--surface-2); }
.rail-tab.active { background: var(--accent-tint); color: var(--accent-2); font-weight: 700; }
.rail-glyph { width: 22px; text-align: center; font-size: 13px; }
.rail-agents { display: flex; flex-direction: column; gap: 4px; }
.rail-agent { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.rail-agent:hover { background: var(--surface-2); }

/* ── Workspace ── */
.workspace { overflow: hidden; min-width: 0; background: var(--bg); display: flex; flex-direction: column; }
.panel-content { flex: 1; overflow-y: auto; padding: 24px 32px; max-width: 920px; width: 100%; margin: 0 auto; }

/* ── Chat ── */
.chat-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 32px 0 24px; }
.chat-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 20px; }
.msg-row { display: flex; gap: 12px; align-items: flex-start; }
.msg-row.user { justify-content: flex-end; }
.msg-content { flex: 1; min-width: 0; max-width: 100%; }
.msg-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.msg-name { font-weight: 700; color: var(--ink); }
.msg-route { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.msg-route:hover { border-color: var(--accent); color: var(--accent-2); }
.route-dot { width: 7px; height: 7px; border-radius: 50%; }
.msg-time { font-size: 11px; color: var(--muted-2); margin-left: auto; }
.msg-bubble { padding: 12px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.6; word-wrap: break-word; white-space: pre-wrap; }
.msg-bubble.bot { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-top-left-radius: 4px; }
.msg-bubble.user { background: var(--ink); color: #fff; border-top-right-radius: 4px; max-width: 76%; font-weight: 500; }
.msg-bubble b { font-weight: 700; }

/* ── Routing pulse ── */
.routing-pulse { background: linear-gradient(135deg, var(--accent-tint), transparent); border: 1px solid var(--accent-soft); border-radius: 14px; padding: 14px 16px; animation: pulseFade 0.3s ease-out; }
@keyframes pulseFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.routing-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.routing-label { font-size: 12px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.02em; }
.routing-dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.routing-dots span { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; animation: dotJump 1.2s ease-in-out infinite; }
.routing-dots span:nth-child(2) { animation-delay: 0.15s; }
.routing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotJump { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-3px); opacity: 1; } }
.routing-candidates { display: flex; flex-wrap: wrap; gap: 6px; }
.route-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; opacity: 0; animation: chipFade 0.3s ease-out forwards; }
@keyframes chipFade { to { opacity: 1; } }
.route-chip.final { background: #fff; border-color: var(--c); color: var(--c); font-weight: 700; box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }

/* ── Action card ── */
.action-card { margin-top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.action-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.action-kicker { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.action-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.action-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.action-step { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.step-num { display: grid; place-items: center; width: 24px; height: 24px; background: var(--accent-tint); color: var(--accent-2); border-radius: 7px; font-size: 11px; font-weight: 700; }
.action-step.done .step-num { background: var(--accent); color: #fff; }
.step-label { font-weight: 500; }
.action-step.done .step-label { color: var(--muted); text-decoration: line-through; }
.step-type { font-size: 10px; font-weight: 700; background: var(--surface-2); color: var(--muted); padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.04em; }
.step-btn { background: var(--ink); color: #fff; border: 0; border-radius: 7px; padding: 4px 10px; font-size: 11px; font-weight: 600; }
.action-step.done .step-btn { background: var(--accent); }

/* ── Meeting rooms card ── */
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.room-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.room-name { font-weight: 700; font-size: 13px; }
.room-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.vc-yes { color: var(--accent-2); font-weight: 600; }
.vc-no { color: var(--muted-2); }

/* ── Shuttle card ── */
.shuttle-route { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.shuttle-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.shuttle-time { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; text-align: center; position: relative; }
.shuttle-time.live { border-color: var(--accent); background: var(--accent-tint); }
.st-time { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-family: Consolas, ui-monospace, monospace; }
.st-live { font-size: 10px; color: var(--accent-2); font-weight: 700; margin-top: 2px; }
.st-delay { font-size: 11px; color: var(--warm); font-weight: 700; }
.st-label { position: absolute; top: -7px; right: 8px; background: var(--ink); color: #fff; padding: 1px 6px; font-size: 9px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Benefits card ── */
.benefits-balance { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.bb-num { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; font-family: Consolas, ui-monospace, monospace; }
.bb-num span { font-size: 18px; color: var(--muted); margin-left: 4px; }
.bb-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 6px; }
.bb-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease-out; }
.bb-meta { font-size: 11px; color: var(--muted); }
.benefits-breakdown { display: flex; flex-direction: column; gap: 4px; }
.bb-row { display: flex; justify-content: space-between; padding: 7px 10px; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.bb-amount { font-weight: 700; font-family: Consolas, ui-monospace, monospace; }

/* ── Example prompts ── */
.examples { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.examples-title { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.examples-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.example-chip { text-align: left; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; color: var(--ink); }
.example-chip:hover { background: var(--accent-tint); border-color: var(--accent-soft); }

/* ── Chat input ── */
.chat-input-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 14px 24px; }
.chat-input-wrap { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 14px; padding: 4px 4px 4px 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.chat-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,148,136,0.14); }
.chat-input { flex: 1; border: 0; background: transparent; padding: 11px 0; font-size: 14.5px; color: var(--ink); outline: none; }
.send-btn { border-radius: 10px; padding: 9px 16px; font-size: 13px; }

/* ── Buttons ── */
.btn-primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary.sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 500; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-ghost.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ghost.sm { padding: 5px 9px; font-size: 12px; }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-icon { background: transparent; border: 0; width: 28px; height: 28px; border-radius: 7px; color: var(--muted); font-size: 14px; }
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }

/* ── Community board ── */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 22px; }
.composer-title, .composer-body { width: 100%; border: 0; outline: none; padding: 6px 0; font-size: 14px; background: transparent; color: var(--ink); }
.composer-title { font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 8px; padding-bottom: 8px; }
.composer-body { resize: vertical; min-height: 48px; }
.composer-bottom { display: flex; gap: 12px; align-items: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.composer-tags { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip { padding: 4px 9px; font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 600; }
.tag-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.posts { display: flex; flex-direction: column; gap: 14px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.post-head h3 { margin: 0; font-size: 15.5px; letter-spacing: -0.01em; }
.post-meta { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.badge-wiki { background: var(--accent-tint); color: var(--accent-2); border: 1px solid var(--accent-soft); padding: 3px 8px; font-size: 10.5px; font-weight: 700; border-radius: 999px; flex-shrink: 0; }
.post-body { margin: 8px 0; color: var(--ink-2); font-size: 13.5px; }
.post-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0; }
.post-tag { font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 5px; }
.swarm { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px; margin-top: 12px; }
.swarm-head { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.swarm-count { background: var(--ink); color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 10px; }
.swarm-reply { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px dashed var(--line); }
.swarm-reply:first-of-type { border-top: 0; }
.swarm-body { flex: 1; min-width: 0; }
.swarm-name { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.swarm-body p { margin: 0; font-size: 13px; color: var(--ink-2); }
.post-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ── Wiki panel ── */
.wiki-search { width: 100%; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; outline: none; margin-bottom: 22px; }
.wiki-search:focus { border-color: var(--accent); }
.wiki-section { margin-bottom: 28px; }
.wiki-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.wiki-count { font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.wiki-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 12.5px; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }
.queue-item { background: var(--surface); border: 1px solid var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.queue-kind { display: inline-block; font-size: 10px; font-weight: 700; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.06em; font-family: Consolas, monospace; margin-bottom: 6px; }
.queue-page { font-size: 14px; font-weight: 700; }
.queue-reason { font-size: 12.5px; color: var(--ink-2); margin: 4px 0; }
.queue-meta { display: flex; gap: 5px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.queue-actions { display: flex; gap: 6px; }
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.wiki-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.wiki-card:hover { border-color: var(--accent); }
.wiki-card-cat { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 4px; }
.wiki-card-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.wiki-card-meta { display: flex; flex-wrap: wrap; gap: 5px; font-size: 11px; color: var(--muted); }

/* ── Tasks panel ── */
.tasks-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat-num { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-family: Consolas, ui-monospace, monospace; }
.stat-num span { font-size: 14px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.task-info { min-width: 0; }
.task-title { font-weight: 600; font-size: 13.5px; }
.task-meta { display: flex; gap: 5px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.task-meta span { font-weight: 600; }
.task-saved { text-align: right; line-height: 1.1; }
.task-saved span { font-size: 16px; font-weight: 700; font-family: Consolas, ui-monospace, monospace; }
.task-saved small { font-size: 9px; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: 0.06em; }
.task-status { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.task-status.status-done { background: var(--accent-tint); color: var(--accent-2); }
.task-status.status-progress { background: var(--warm-soft); color: var(--warm); }
.task-status.status-pending { background: var(--surface-2); color: var(--muted); }

/* ── Orchestrator inspector ── */
.inspector { width: 360px; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 18px 18px 24px; animation: slideIn 0.18s ease-out; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.inspector-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.inspector-head h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.inspector-kicker { font-size: 10px; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.12em; }
.inspector-desc { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.inspector-empty { padding: 24px 16px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.trace-block { margin-bottom: 14px; }
.trace-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.trace-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trace-arrow { color: var(--muted-2); font-size: 12px; }
.trace-cand { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.trace-cand.final { background: #fff; border-width: 1.5px; box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.trace-pick { color: var(--accent); font-weight: 800; }
.trace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.trace-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.trace-val { font-size: 14px; font-weight: 700; margin-top: 2px; font-family: Consolas, ui-monospace, monospace; }
.trace-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.trace-tool { background: #0f1729; color: #5eead4; padding: 3px 8px; font-size: 11px; border-radius: 5px; font-family: Consolas, monospace; }
.trace-log { background: #0f1729; color: #cbd5e1; border-radius: 8px; padding: 10px 12px; font-family: Consolas, monospace; font-size: 11px; line-height: 1.7; }
.trace-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trace-log .log-t { color: #5eead4; margin-right: 8px; }
.trace-log b { color: #fbbf24; font-weight: 600; }
.inspector-roster { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.roster-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.roster-item { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; font-size: 11.5px; color: var(--ink-2); }
.roster-item:hover { background: var(--surface-2); }

/* ── Responsive ── */
@media (max-width: 1100px) { .header-stats { display: none; } .app-body { grid-template-columns: 200px 1fr auto; } }
@media (max-width: 900px) { .rail { display: none; } .app-body { grid-template-columns: 1fr auto; } .inspector { width: 320px; } }

/* ── Demo Simulation Panel ── */
.demo-panel {
  position: fixed; top: 57px; left: 0;
  width: 300px; max-height: calc(100vh - 70px);
  background: var(--surface); border: 1px solid var(--line); border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 4px 0 24px rgba(0,0,0,.10);
  z-index: 200; display: flex; flex-direction: column;
  transform: translateX(-110%); opacity: 0;
  transition: transform .2s ease-out, opacity .2s ease-out;
  overflow: hidden;
}
.demo-panel.open { transform: translateX(0); opacity: 1; }
.demo-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px 10px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.demo-panel-title { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.demo-panel-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.demo-sim-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); transition: border-color .15s, background .15s;
}
.demo-sim-card.active { background: var(--accent-tint); border-color: var(--accent-soft); }
.demo-sim-emoji { font-size: 22px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.demo-sim-info { flex: 1; min-width: 0; }
.demo-sim-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-sim-desc { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.demo-sim-actions { flex-shrink: 0; align-self: center; }
.demo-progress { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.demo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.demo-dot.done { background: var(--accent); }
.demo-dot.current { background: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-soft); animation: demoPulse 1s ease-in-out infinite; }
@keyframes demoPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.demo-step-label { font-size: 10px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.demo-complete-label { font-size: 10px; color: var(--accent-2); font-weight: 700; }

/* Follow-up quick-reply buttons */
.follow-ups { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.follow-up-btn { text-align: left; padding: 7px 12px; border: 1.5px solid var(--accent); border-radius: var(--radius-sm); background: transparent; color: var(--accent); font-size: 13px; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; line-height: 1.4; }
.follow-up-btn:hover { background: var(--accent); color: #fff; }

/* Typing cursor */
.typing-cursor { display: inline-block; width: 2px; height: 1em; background: currentColor; margin-left: 1px; vertical-align: text-bottom; animation: cursorBlink .55s step-end infinite; }
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
