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

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

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

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

/* input / textarea 共通 */
.tb-input,
.tb-textarea {
  width: 100%;
  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;
}

/* フォーカス時: ボーダーと薄い影でアクティブ感を出す */
.tb-input:focus,
.tb-textarea:focus {
  border-color: #2B7FE8;
  box-shadow: 0 0 0 3px rgba(43, 127, 232, 0.12);
}

/* テキストエリア: overflow: hidden にしないと自動拡張時にスクロールバーが出る */
.tb-textarea {
  resize: none;
  overflow: hidden;
  line-height: 1.6;
}

/* 残り文字数カウンター */
.char-counter {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #9AA5B4;
  text-align: right;
}
.char-counter.warn   { color: #E65100; font-weight: 600; }
.char-counter.danger { color: #E53935; font-weight: 700; }

/* ヒントテキスト */
.tb-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #9AA5B4;
}

/* リセットボタン */
.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) {
  .tb-pattern { max-width: 100%; }
  .demo-container { padding: 16px; }
}
