:root {
  --cd-blue:   #2B7FE8;
  --cd-border: #E2E8F0;
  --cd-label:  #2B7FE8;
}

/* デモコンテナ: パターンを縦並びにする */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  gap: 40px;
}

/* パターンブロック */
.cd-pattern {
  width: 100%;
  max-width: 720px;
}

/* パターンラベル */
.cd-pattern-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cd-label);
  letter-spacing: 0.04em;
}

/* ===== Pattern 1: 単体ドーナツ ===== */
.cd-chart-wrap--single {
  max-width: 360px;
  height: 360px;
  background: #fff;
  border: 1px solid var(--cd-border);
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
  position: relative;
}

/* ===== Pattern 2: 複数ドーナツ横並び ===== */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.cd-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--cd-border);
  border-radius: 8px;
  padding: 16px 12px 12px;
  box-sizing: border-box;
}

.cd-grid-canvas-wrap {
  width: 100%;
  height: 140px;
  position: relative;
}

.cd-grid-item-label {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  text-align: center;
}

/* ローディングメッセージ */
.cd-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 13px;
  color: #94A3B8;
}

/* プロンプトブロック間の余白 */
.prompt-block {
  margin-bottom: 20px;
}
.prompt-block:last-child {
  margin-bottom: 0;
}
.prompt-block-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cd-label);
  letter-spacing: 0.04em;
}

/* スマホ: 縦並びに切り替え */
@media (max-width: 480px) {
  .cd-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
}
