/* LiveCoach's existing desktop UI, scoped to the website animation.
 * Reference: windows-build-kit/renderer/{index.html,styles.css}.
 * The app window is not a redesign. Playback controls sit outside it. */
.demo-section { padding-top: 22px; }
.demo-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.demo-heading h2 { font-size: clamp(27px, 3.2vw, 36px); line-height: 1.2; letter-spacing: -.012em; margin: 11px 0 10px; }
.demo-heading p:not(.eyebrow) { font-size: 15px; color: var(--muted); }
.demo-label { flex-shrink: 0; font-size: 12px; color: var(--muted); padding-bottom: 3px; }
.demo-viewer { container-type: inline-size; }
.demo-viewer-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.demo-scenario-label { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 500; }
.demo-scenario-label select { font-size: 13px; color: var(--ink); background: white; border: 1px solid #c9cdd8; border-radius: 10px; padding: 10px 34px 10px 13px; min-height: 44px; max-width: 100%; }
.demo-playback { display: flex; gap: 8px; }
.demo-viewer-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 10px 15px; min-height: 44px; font-size: 12px; font-weight: 500; }
.demo-viewer-button:hover { background: var(--wash); border-color: #b7bdcc; }
.demo-viewer-button > span[aria-hidden] { font-size: 17px; line-height: 1; }
.demo-panel-picker { display: none; }
.app-demo {
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-primary-soft: #eef0ff;
  --color-green: #16a34a;
  --color-green-soft: #e7f6ec;
  --color-red: #ef4444;
  --bg-app: #ececee;
  --bg-panel: #ffffff;
  --bg-subtle: #f7f7f8;
  --bg-hover: #f0f0f2;
  --bg-active: #e7e8ec;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-faint: #9a9aa0;
  --border: #e6e6ea;
  --border-strong: #d6d6dc;
  --r-sm: 7px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 980px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--text);
  background: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 610px;
  border: 1px solid #d3d4da;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px -30px #24253845, 0 3px 12px #24253808;
}
.app-demo .titlebar { height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0 80px; position: relative; background: var(--bg-app); }
.app-demo .titlebar-title { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .2px; }
.app-demo .demo-window-dots { position: absolute; left: 12px; top: 12px; display: flex; gap: 7px; }
.app-demo .demo-window-dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; border: 1px solid #0000000d; }
.app-demo .demo-window-dots i:nth-child(2) { background: #febc2e; }
.app-demo .demo-window-dots i:nth-child(3) { background: #28c840; }
.app-demo .demo-settings { position: absolute; right: 20px; font-size: 17px; color: var(--text-faint); }
.app-demo .app-shell { display: flex; flex: 1; padding: 0 12px 12px; min-height: 0; overflow: hidden; }
.app-demo .panel { display: flex; flex-direction: column; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; min-width: 180px; box-shadow: var(--shadow-sm); }
.app-demo .panel-coach, .app-demo .panel-context { width: 22%; min-width: 200px; flex-shrink: 0; }
.app-demo .panel-transcript { flex: 1; min-width: 0; }
.app-demo .panel-topbar { padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; border-bottom: 1px solid var(--border); background: var(--bg-panel); }
.app-demo .brand-label { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.app-demo .panel-title { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.app-demo .demo-app-button { display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; font-size: 13px; font-weight: 500; border-radius: var(--r-sm); white-space: nowrap; line-height: 1.25; user-select: none; }
.app-demo .btn-sync { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border-strong); font-size: 12px; padding: 6px 12px; border-radius: var(--r-pill); }
.app-demo .btn-start { background: var(--color-primary); color: #fff; padding: 6px 16px; }
.app-demo .btn-stop { background: var(--color-red); color: #fff; padding: 6px 16px; }
.app-demo .btn-send { background: var(--color-primary); color: #fff; padding: 6px 16px; font-size: 12px; }
.app-demo .btn-text { background: transparent; color: var(--text-muted); font-size: 12px; padding: 5px 10px; border-radius: 6px; }
.app-demo .is-disabled { opacity: .4; }
.app-demo .is-pressed { box-shadow: 0 0 0 5px #6366f12b; transform: scale(.97); }
.app-demo .btn-sync.is-pressed { background: var(--bg-active); }
.app-demo .controls-row { display: flex; gap: 6px; align-items: center; }
.app-demo .demo-select { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 6px 10px; font-size: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: white; color: var(--text); line-height: 1.25; }
.app-demo .demo-select > span { margin-left: auto; }
.app-demo .content-box { flex: 1; min-height: 0; padding: 12px; overflow-y: auto; font-size: 13px; line-height: 1.6; background: var(--bg-subtle); }
.app-demo .placeholder { color: var(--text-muted); padding: 28px 18px; font-size: 13px; line-height: 1.7; }
.app-demo .placeholder strong { color: var(--text-muted); }
.app-demo .transcript-line { padding: 8px 11px; margin: 4px 0; border-radius: var(--r-sm); background: white; border: 1px solid var(--border); }
.app-demo .transcript-line.is-new { animation: demo-chunk-in .24s ease-out both; }
@keyframes demo-chunk-in { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.app-demo .capture-mode-row { display: flex; align-items: center; gap: 8px; padding: 6px 14px 2px; font-size: 12px; }
.app-demo .capture-mode-label { font-size: 11px; color: #555; font-weight: 600; white-space: nowrap; }
.app-demo .capture-select { flex: 1; min-width: 0; font-size: 11px; padding: 4px 6px; }
.app-demo .capture-mode-hint { padding: 2px 14px 6px; font-size: 10.5px; line-height: 1.45; color: #737379; }
.app-demo .status { padding: 7px; text-align: center; font-size: 11px; font-weight: 600; flex-shrink: 0; letter-spacing: .02em; }
.app-demo .status.active { background: var(--color-green-soft); color: var(--color-green); }
.app-demo .status.inactive { background: var(--bg-subtle); color: var(--text-muted); }
.app-demo .transcript-actions { display: flex; gap: 4px; padding: 8px 12px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--bg-panel); }
.app-demo .chat-input-area { padding: 10px 12px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--bg-panel); }
.app-demo .demo-input { width: 100%; font-size: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 11px; background: white; line-height: 1.5; color: var(--text-muted); }
.app-demo .chat-input-actions { display: flex; gap: 6px; margin-top: 6px; }
.app-demo .sync-info { font-size: 10px; color: var(--text-muted); padding: 5px 14px; flex-shrink: 0; }
.app-demo .coach-message { padding: 10px 12px; margin: 6px 0; border-radius: var(--r); line-height: 1.55; font-size: 13px; white-space: pre-line; }
.app-demo .coach-message.assistant { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); }
.app-demo .coach-message.loading { background: var(--bg-subtle); color: var(--text-muted); text-align: center; }
.app-demo .file-manager { flex: 0 0 auto; min-height: 40px; overflow: hidden; }
.app-demo .file-list { padding: 6px 0; }
.app-demo .file-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; color: var(--text-muted); border-left: 2px solid transparent; }
.app-demo .file-item.active { background: var(--color-primary-soft); border-left-color: var(--color-primary); font-weight: 600; color: var(--text); }
.app-demo .file-icon { font-size: 14px; flex-shrink: 0; }
.app-demo .btn-add-file { border: 1px solid var(--border-strong); font-size: 15px; color: var(--text-muted); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; line-height: 1; }
.app-demo .file-editor, .app-demo .file-editor-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.app-demo .file-editor-header { padding: 9px 14px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-panel); flex-shrink: 0; }
.app-demo .file-textarea { flex: 1; padding: 12px 14px; font-size: 12px; background: white; line-height: 1.6; overflow-y: auto; white-space: pre-line; }
.app-demo .divider-h { width: 10px; background: transparent; position: relative; flex-shrink: 0; }
.app-demo .divider-h::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 3px; height: 38px; background: var(--border-strong); border-radius: 2px; }
.app-demo .divider-v { height: 10px; position: relative; flex-shrink: 0; }
.app-demo .divider-v::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 38px; height: 3px; background: var(--border-strong); border-radius: 2px; }
.app-demo .bottom-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 9px; gap: 10px; flex-shrink: 0; font-size: 11px; color: var(--text-muted); background: var(--bg-app); }
.app-demo .bottom-nav { display: flex; gap: 14px; }
.app-demo .demo-pointer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 3px #0003); transition: transform .65s cubic-bezier(.22,.7,.25,1); }
.demo-viewer.is-paused *, .demo-viewer.is-paused *::before, .demo-viewer.is-paused *::after { animation-play-state: paused !important; }
.demo-viewer.is-paused .demo-pointer { transition: none; }
.demo-timeline { margin: 20px 2px 0; background: #e7e8ee; height: 3px; border-radius: 2px; overflow: hidden; }
.demo-timeline > span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(1); transform-origin: left; }
.demo-steps { list-style: none; padding: 0; display: flex; justify-content: center; gap: 40px; margin: 19px 0 10px; }
.demo-steps li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.demo-steps li > span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; background: white; }
.demo-steps li[aria-current] { color: var(--accent); font-weight: 600; }
.demo-steps li[aria-current] > span { background: var(--accent-wash); border-color: #cec7f2; }
.demo-status { color: var(--muted); font-size: 12px; text-align: center; min-height: 2em; }
.demo-caption { color: var(--muted); max-width: 920px; font-size: 12px; line-height: 1.65; text-align: center; margin: 18px auto 0; }
.demo-text-version { max-width: 920px; margin: 10px auto 0; font-size: 12px; }
.demo-text-version summary { min-height: 44px; display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.demo-text-version summary::after { content: '+'; text-decoration: none; }
.demo-text-version[open] summary::after { content: '−'; }
.demo-text-version > div { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.demo-text-version h3 { font-size: 14px; margin: 20px 0 10px; }
.demo-text-version h3:first-child { margin-top: 0; }
.demo-text-version p { color: var(--muted); font-size: 13px; white-space: pre-line; }
.demo-text-version .demo-text-note { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; font-size: 12px; }
@container (max-width: 1060px) {
  .app-demo .panel-transcript > .panel-topbar, .app-demo .panel-coach > .panel-topbar { flex-direction: column; align-items: flex-start; }
  .app-demo .controls-row { flex-wrap: wrap; }
  .app-demo .controls-row .demo-select { font-size: 11px; }
  .app-demo .controls-row .demo-app-button { padding-inline: 11px; }
}
@media (max-width: 940px) { .demo-heading { align-items: flex-start; flex-direction: column; gap: 12px; } }
@media (max-width: 780px) {
  .demo-section { padding-top: 14px; }
  .demo-heading { gap: 10px; margin-bottom: 22px; }
  .demo-heading p:not(.eyebrow) { font-size: 14px; }
  .demo-label { font-size: 11px; }
  .demo-panel-picker { display: block; margin: 0 0 14px; }
  .demo-panel-picker p { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
  .demo-panel-picker > div { display: flex; padding: 4px; gap: 3px; border: 1px solid var(--line); background: #f5f5f8; border-radius: 11px; }
  .demo-panel-picker button { flex: 1; min-height: 44px; padding: 9px 5px; font-size: 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
  .demo-panel-picker button[aria-pressed="true"] { color: var(--ink); background: white; box-shadow: 0 1px 4px #00000012; font-weight: 600; }
  .app-demo { height: auto; }
  .app-demo.is-enhanced { height: 530px; }
  .app-demo .app-shell { display: flex; flex-direction: column; gap: 12px; }
  .app-demo .panel, .app-demo .panel-coach, .app-demo .panel-context { width: 100%; min-width: 0; }
  .app-demo:not(.is-enhanced) .panel { min-height: 400px; }
  .app-demo .divider-h { display: none; }
  .app-demo.is-enhanced .panel { display: none; flex: 1; min-height: 0; }
  .demo-viewer[data-panel="coach"] .app-demo.is-enhanced .panel-coach,
  .demo-viewer[data-panel="transcript"] .app-demo.is-enhanced .panel-transcript,
  .demo-viewer[data-panel="context"] .app-demo.is-enhanced .panel-context { display: flex; }
  .app-demo .panel-coach > .panel-topbar { flex-direction: row; align-items: center; }
  .app-demo .panel-transcript > .panel-topbar { flex-direction: column; align-items: flex-start; }
  .app-demo .controls-row { width: 100%; }
  .app-demo .controls-row .demo-select { flex: 1; }
  .app-demo .coach-message { font-size: 14px; line-height: 1.6; }
  .app-demo .bottom-bar { font-size: 10px; padding-inline: 14px; }
  .app-demo .bottom-nav { gap: 12px; }
  .demo-steps { gap: 12px; justify-content: space-between; }
  .demo-steps li { flex: 1; font-size: 11px; flex-direction: column; text-align: center; gap: 7px; line-height: 1.5; }
  .demo-status { font-size: 11px; min-height: 3.3em; margin-top: 16px; }
  .demo-caption { font-size: 11px; text-align: left; margin-top: 14px; }
}
@media (max-width: 480px) {
  .demo-viewer-controls { gap: 12px; }
  .demo-scenario-label { flex: 1 1 100%; justify-content: space-between; font-size: 11px; gap: 8px; }
  .demo-scenario-label select { flex: 0 1 66%; min-width: 0; font-size: 12px; }
  .demo-playback { width: 100%; }
  .demo-viewer-button { flex: 1; }
  .app-demo .panel-topbar { padding-inline: 12px; }
  .app-demo .capture-mode-row { align-items: flex-start; padding-inline: 12px; }
  .app-demo .capture-mode-label { padding-top: 5px; }
  .app-demo .capture-mode-hint { padding-inline: 12px; }
  .app-demo .controls-row .demo-app-button { padding-inline: 10px; font-size: 12px; }
  .app-demo .content-box { padding: 10px; }
  .app-demo .coach-message { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-viewer *, .demo-viewer *::before, .demo-viewer *::after { animation: none !important; transition: none !important; }
  .demo-pointer { display: none !important; }
}
@media (forced-colors: active) { .app-demo .panel, .demo-viewer-button, .demo-panel-picker button { border: 1px solid CanvasText; } .demo-timeline > span { background: CanvasText; } }
@media print {
  .demo-viewer-controls, .demo-panel-picker, .demo-pointer, .demo-timeline, .demo-steps, .demo-status { display: none !important; }
  .app-demo { box-shadow: none; height: auto; }
  .app-demo .app-shell { display: block; }
  .app-demo .panel { display: flex !important; width: 100%; min-height: 200px; }
}
