.demo {
  max-width: 680px;
  margin: 1.2em auto;
  padding: 14px;
  border: 1px solid #d5d8dc;
  border-radius: 10px;
  background: #fafbfc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85em;
  color: #333;
  box-sizing: border-box;
}
.demo canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid #eceff1;
  border-radius: 6px;
}
.demo canvas.narrow { max-width: 440px; margin: 0 auto; }
.demo .demo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}
.demo .demo-row label { margin: 0; white-space: nowrap; }
.demo input[type="range"] { flex: 1 1 160px; min-width: 120px; }
.demo button, .demo select {
  padding: 4px 12px;
  border: 1px solid #b8c0c8;
  border-radius: 5px;
  background: #fff;
  color: #333;
  font-size: 1em;
  cursor: pointer;
}
.demo button:hover { background: #eef3fa; border-color: #1f4e9c; }
.demo button:focus-visible, .demo input:focus-visible, .demo select:focus-visible {
  outline: 2px solid #1f4e9c;
  outline-offset: 2px;
}
.demo .demo-status { margin-top: 8px; font-weight: 600; min-height: 1.4em; }
.demo .demo-hint { margin-top: 6px; color: #666; font-size: 0.95em; }
.demo .demo-error { margin-top: 8px; color: #c0392b; }
.demo .demo-ok { color: #27ae60; }
.demo .demo-bad { color: #c0392b; }
.demo .demo-title { font-weight: 700; margin-bottom: 8px; }
