/* === デモ: 縦並びレイアウト === */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

/* 各パターンを囲むカード */
.tb2-pattern {
  margin-bottom: 16px;
  padding: 20px;
  background: #F4F6F9;
  border-radius: 8px;
  max-width: 520px;
}
.tb2-pattern:last-child { margin-bottom: 0; }

.tb2-pattern-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tb2-field-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #5A6A7A;
}

/* input とチェックボタンを横並びにする */
.tb2-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* テキスト入力欄 */
.tb2-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  font-size: 14px;
  color: #1A2332;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: sans-serif;
}
.tb2-input:focus {
  border-color: #2B7FE8;
  box-shadow: 0 0 0 3px rgba(43, 127, 232, 0.12);
}

/* チェックボタン */
.tb2-check-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2B7FE8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}
.tb2-check-btn:hover { background: #1A6FD4; }
.tb2-check-btn:active { background: #1560BB; }

/* OK/NGステータス表示 */
.tb2-status {
  display: none;
  margin: 8px 0 0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 5px;
}
.tb2-status.ok {
  display: block;
  color: #15803D;
  background: #DCFCE7;
}
.tb2-status.ng {
  display: block;
  color: #B91C1C;
  background: #FEE2E2;
}

/* ヒントテキスト */
.tb2-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #9AA5B4;
  line-height: 1.5;
}

/* リセットボタン */
.demo-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.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;
}

/* 難易度バッジ: 初級=緑 */
.badge-level { background: #22C55E; color: #fff; }

/* 更新日表示 */
.updated-at {
  font-size: 12px;
  color: #9AA5B4;
}

/* サンプルソースヒント */
.source-hint {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5A6A7A;
  background: #F4F6F9;
  border-left: 3px solid #2B7FE8;
  border-radius: 0 6px 6px 0;
  line-height: 1.7;
}
.source-hint code {
  font-family: monospace;
  background: #E8EDF4;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* 複数プロンプトブロック */
.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;
}

/* プロンプト補足（注意・ヒント） */
.prompt-notes {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #F4F6F9;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.prompt-note-caution {
  margin: 0 0 8px;
  color: #E65100;
}
.prompt-note-tip {
  margin: 0;
  color: #5A6A7A;
}

/* レスポンシブ: 600px 以下でカードを全幅に */
@media (max-width: 600px) {
  .tb2-pattern { max-width: 100%; }
  .demo-container { padding: 16px; }
  .tb2-check-btn { padding: 9px 12px; }
}
