/* ═══ Demo Panel Container ═══ */
.demo-panel {
  width: var(--demo-panel-w);
  min-width: var(--demo-panel-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 200ms ease, min-width 200ms ease;
  position: relative;
}
.demo-panel.collapsed {
  width: 0;
  min-width: 0;
  border-left: none;
}

/* Toggle button (sits on left edge of panel) */
.demo-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 24px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  color: var(--ink-muted);
  box-shadow: var(--shadow-sm);
  transition: right 200ms ease;
}
.demo-panel:not(.collapsed) ~ .demo-toggle,
.demo-toggle.panel-open {
  right: var(--demo-panel-w);
}

/* Panel header */
.dp-hdr {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #1E293B;
  flex-shrink: 0;
}
.dp-hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dp-title {
  font-size: 11px;
  font-weight: 700;
  color: #F1F5F9;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dp-subtitle { font-size: 10px; color: #94A3B8; margin-top: 2px; }

/* Section headings */
.dp-section { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dp-section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-subtle);
  margin-bottom: 8px;
}

/* Scenario picker */
.scenario-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  border: 1px solid var(--border);
  margin-bottom: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: all 80ms;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.scenario-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.scenario-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}
.scenario-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}
.scenario-name { font-weight: 600; margin-bottom: 2px; }
.scenario-desc { font-size: 10px; color: var(--ink-muted); line-height: 1.4; }

/* Playback controls */
.playback-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.play-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  transition: background 80ms;
}
.play-btn:hover { background: var(--primary-dark); }
.play-btn.playing { background: var(--warning-text); }
.play-btn svg { width: 12px; height: 12px; }

.reset-btn {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 80ms;
}
.reset-btn:hover { background: var(--surface-raised); color: var(--ink); }

.progress-label {
  font-size: 10px;
  color: var(--ink-muted);
  font-family: var(--mono);
  margin-left: auto;
}

/* Speed selector */
.speed-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.speed-label { font-size: 10px; color: var(--ink-muted); }
.speed-chips { display: flex; gap: 4px; margin-left: auto; }
.speed-chip {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  cursor: pointer;
  background: var(--surface);
  transition: all 80ms;
}
.speed-chip:hover { border-color: var(--primary); color: var(--primary); }
.speed-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Scene list */
.scene-list { flex: 1; overflow-y: auto; }
.scene-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 60ms;
}
.scene-item:hover { background: var(--surface-raised); }
.scene-item.done { opacity: 0.6; }
.scene-item.current { background: var(--primary-light); }
.scene-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--ink-subtle);
}
.scene-item.done .scene-num {
  background: var(--success-text);
  border-color: var(--success-text);
  color: #fff;
}
.scene-item.current .scene-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.scene-text { flex: 1; }
.scene-name  { font-size: 11px; font-weight: 500; }
.scene-desc  { font-size: 10px; color: var(--ink-muted); line-height: 1.4; }

/* No scenario selected */
.dp-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 11px;
}
