/* demo-container のデフォルトは flex-row なので縦積みに上書き */
.demo-container {
  flex-direction: column;
  align-items: stretch;
}

:root {
  --cm-border: #E2E8F0;
  --cm-danger: #E53E3E;
  --cm-danger-bg: #FFF5F5;
  --cm-hover-bg: #EEF4FF;
  --cm-active-bg: #EBF4FF;
}

/* ================================================================
   テーブル
================================================================ */
.cm-wrap {
  width: 100%;
  overflow-x: auto;
}

.cm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 360px;
}

.cm-table th {
  background: #F4F6F9;
  color: #4A5568;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--cm-border);
  white-space: nowrap;
}

.cm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cm-border);
  color: #2D3748;
}

.cm-table tbody tr {
  cursor: default;
  transition: background 0.1s;
}

.cm-table tbody tr:hover {
  background: #F8FAFC;
}

/* 右クリックされた行のハイライト */
.cm-table tbody tr.is-active {
  background: var(--cm-active-bg);
}

.cm-hint {
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  margin: 8px 0 0;
}

/* ================================================================
   コンテキストメニュー
================================================================ */
.cm-menu {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--cm-border);
  min-width: 140px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.cm-menu-item {
  padding: 9px 16px;
  font-size: 14px;
  color: #2D3748;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}

.cm-menu-item:hover {
  background: var(--cm-hover-bg);
}

.cm-menu-item--danger {
  color: var(--cm-danger);
}

.cm-menu-item--danger:hover {
  background: var(--cm-danger-bg);
}

.cm-menu-sep {
  border: none;
  border-top: 1px solid var(--cm-border);
  margin: 4px 0;
}

/* ================================================================
   トースト通知
================================================================ */
.cm-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: #1A202C;
  color: #fff;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.cm-toast.is-show {
  opacity: 1;
}

/* ================================================================
   リセットボタン
================================================================ */
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* ================================================================
   プロンプトブロックラベル
================================================================ */
.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: #2B7FE8;
  letter-spacing: 0.04em;
}
