/* ヒアリング支援ツール — 福岡誠中小企業診断士事務所 */
/* フェーズ1（第31セッション）：基本レイアウト＋4象限SWOT */
/* フェーズ2（第35セッション）：タブ・STP・12FW・財務テーブル・localStorage */

:root {
  --primary: #2c5f8d;
  --primary-light: #4a7fb0;
  --accent: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --success: #15803d;
  --error: #b91c1c;
  --strengths: #dbeafe;
  --weaknesses: #fef3c7;
  --opportunities: #dcfce7;
  --threats: #fee2e2;
  --aggressive: #dbeafe;
  --differentiation: #fef3c7;
  --improvement: #dcfce7;
  --defense: #fee2e2;
  --calc-bg: #f1f5f9;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--primary);
  color: white;
  padding: 20px 32px 16px;
  border-bottom: 4px solid var(--primary-light);
  position: relative;
}

header h1 { margin: 0 0 4px 0; font-size: 22px; }
.subtitle { margin: 0; font-size: 13px; opacity: 0.85; }

.storage-status {
  font-size: 12px;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  display: inline-block;
  transition: background 0.3s;
}
.storage-status.ok { background: rgba(34, 197, 94, 0.3); }
.storage-status.error { background: rgba(220, 38, 38, 0.5); }

/* タブナビゲーション */
/* グローバルナビ（第93セッション v6：ドロップダウン型）
   7 カテゴリボタンが 1 段に収まり、サブタブはクリックでメニュー展開。
*/
.tab-nav {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  padding: 8px 32px;
  background: white;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

/* 旧構造（span/sep）は本セッションで廃止 */

/* ドロップダウン本体（position: relative の親） */
.tab-dropdown {
  position: relative;
}

/* カテゴリボタン（常時表示の 7 つ） */
.tab-cat-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tab-cat-btn:hover { background: #f5f8fc; border-color: #b9c8d8; }
.tab-cat-caret {
  font-size: 10px; opacity: 0.6; transition: transform 0.15s;
}
.tab-dropdown.open .tab-cat-caret { transform: rotate(180deg); }

/* 選択中タブを含むカテゴリは色付き強調 */
.tab-dropdown.has-active .tab-cat-btn {
  color: #fff; border-color: transparent;
  background: var(--primary);
}
.tab-dropdown.has-active[data-category="strategy"]    .tab-cat-btn { background: #4a6fa5; }
.tab-dropdown.has-active[data-category="finance"]     .tab-cat-btn { background: #5a8a4d; }
.tab-dropdown.has-active[data-category="interview"]   .tab-cat-btn { background: #b8a55d; }
.tab-dropdown.has-active[data-category="client"]      .tab-cat-btn { background: #6b8d5b; }
.tab-dropdown.has-active[data-category="public"]      .tab-cat-btn { background: #8060a8; }
.tab-dropdown.has-active[data-category="integration"] .tab-cat-btn { background: #707e8d; }
.tab-dropdown.has-active[data-category="system"]      .tab-cat-btn { background: #455a64; }

/* ドロップダウンメニュー */
.tab-cat-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 260px; max-width: 360px;
  background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 6px; z-index: 500;
  flex-direction: column; gap: 2px;
}
.tab-dropdown.open .tab-cat-menu { display: flex; }

/* メニュー内サブタブ：左寄せ、ボーダー無し、選択時は背景色 */
.tab-cat-menu .tab-btn {
  display: block; text-align: left; width: 100%;
  padding: 8px 12px;
  border: none; border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-family: inherit; font-size: 13px;
  cursor: pointer;
  white-space: normal; line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.tab-cat-menu .tab-btn:hover { background: #eef3f8; color: var(--primary); }
.tab-cat-menu .tab-btn.active {
  background: var(--primary); color: #fff; font-weight: 600;
}

/* タブボタンに左ボーダーで category 識別を補強（hover/activeの強調と組み合わせ） */
.tab-btn[data-category="strategy"]    { border-left: 2px solid rgba(74, 111, 165, 0.2); }
.tab-btn[data-category="finance"]     { border-left: 2px solid rgba(90, 138, 77, 0.2); }
.tab-btn[data-category="interview"]   { border-left: 2px solid rgba(184, 165, 93, 0.2); }
.tab-btn[data-category="client"]      { border-left: 2px solid rgba(107, 141, 91, 0.2); }
.tab-btn[data-category="public"]      { border-left: 2px solid rgba(128, 96, 168, 0.2); }
.tab-btn[data-category="integration"] { border-left: 2px solid rgba(112, 126, 141, 0.2); }
.tab-btn[data-category="system"]      { border-left: 2px solid rgba(69, 90, 100, 0.2); }

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
section h2 {
  margin-top: 0;
  color: var(--primary);
  font-size: 18px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
section h3 { margin-top: 16px; font-size: 16px; color: var(--text); }
section h4 { margin-top: 12px; font-size: 14px; color: var(--primary); }
.section-desc, .step-hint, .fw-desc { margin-top: 0; color: var(--text-muted); font-size: 13px; }
.hidden { display: none !important; }

/* ============================================================================ */
/* 業種選択UI（既存） */
.industry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.industry-card {
  display: flex; flex-direction: column; text-align: left; padding: 14px 16px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 6px;
  cursor: pointer; font-family: inherit; transition: all 0.15s ease;
}
.industry-card:hover { border-color: var(--primary-light); background: #f0f7ff; }
.industry-card.selected { border-color: var(--primary); background: #e0eaff; box-shadow: 0 0 0 1px var(--primary) inset; }
.industry-label { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.industry-note { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.industry-prompts { margin-top: 20px; padding: 16px; background: #f0f7ff; border: 1px dashed var(--primary-light); border-radius: 6px; }
.industry-prompts h3 { margin-top: 0; font-size: 15px; color: var(--primary); }
.prompt-note { font-size: 12px; color: var(--text-muted); font-style: italic; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.prompt-block { padding: 10px 12px; border-radius: 4px; font-size: 13px; }
.prompt-block.strengths { background: var(--strengths); }
.prompt-block.weaknesses { background: var(--weaknesses); }
.prompt-block.opportunities { background: var(--opportunities); }
.prompt-block.threats { background: var(--threats); }
.prompt-block h4 { margin: 0 0 6px 0; font-size: 13px; }
.prompt-block ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; }
.prompt-block li { margin-bottom: 2px; }
.prompt-hint { margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 600; }

/* ============================================================================ */
/* SWOT（既存） */
.swot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.swot-cell { padding: 14px; border-radius: 6px; border: 1px solid var(--border); }
.swot-cell.strengths { background: var(--strengths); }
.swot-cell.weaknesses { background: var(--weaknesses); }
.swot-cell.opportunities { background: var(--opportunities); }
.swot-cell.threats { background: var(--threats); }
.swot-cell h3 { margin: 0 0 4px 0; font-size: 15px; }
.cell-hint { margin: 0 0 8px 0; font-size: 12px; color: var(--text-muted); }
.swot-cell textarea, textarea, input[type="text"], input[type="number"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px;
  font-family: inherit; font-size: 14px; resize: vertical; background: var(--surface);
}
.swot-cell textarea:focus, textarea:focus, input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(44, 95, 141, 0.15);
}

label { display: block; font-size: 13px; font-weight: 600; color: var(--primary); margin: 12px 0 4px; }

/* ボタン */
.action-row, .export-row { display: flex; gap: 12px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.primary-btn, .secondary-btn { padding: 10px 24px; font-size: 14px; font-family: inherit; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.15s ease; }
.primary-btn { background: var(--primary); color: white; border: 2px solid var(--primary); }
.primary-btn:hover { background: var(--primary-light); border-color: var(--primary-light); }
.secondary-btn { background: var(--surface); color: var(--text); border: 2px solid var(--border); }
.secondary-btn:hover { border-color: var(--primary-light); color: var(--primary); }

/* ============================================================================ */
/* 4戦略類型（既存） */
.cross-swot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.strategy-cell { padding: 16px; border-radius: 6px; border: 1px solid var(--border); }
.strategy-cell.strategy-aggressive { background: var(--aggressive); }
.strategy-cell.strategy-differentiation { background: var(--differentiation); }
.strategy-cell.strategy-improvement { background: var(--improvement); }
.strategy-cell.strategy-defense { background: var(--defense); }
.strategy-cell h3 { margin: 0 0 4px 0; font-size: 15px; }
.strategy-desc { margin: 0 0 12px 0; font-size: 12px; color: var(--text-muted); }
.strategy-list { display: flex; flex-direction: column; gap: 6px; }
.strategy-item { display: flex; gap: 8px; padding: 8px 10px; background: var(--surface); border-radius: 4px; font-size: 13px; }
.strategy-num { color: var(--primary); font-weight: 600; flex-shrink: 0; }
.strategy-text { flex: 1; }
.empty { color: var(--text-muted); font-style: italic; font-size: 13px; margin: 0; }

/* ============================================================================ */
/* STP分析（フェーズ2新規） */
.stp-step {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
}
.stp-step h3 { margin-top: 0; color: var(--primary); font-size: 15px; }
.stp-summary {
  margin-top: 24px;
  padding: 20px;
  background: #f0f7ff;
  border: 2px solid var(--primary-light);
  border-radius: 8px;
}
.stp-summary h3 { margin-top: 0; color: var(--primary); }
.summary-block {
  background: white; padding: 12px 16px; border-radius: 4px; margin: 12px 0;
  border: 1px solid var(--border);
}
.summary-block h4 { margin: 0 0 6px 0; color: var(--primary); }
.summary-block ul { margin: 6px 0; padding-left: 20px; font-size: 13px; }
.summary-block pre {
  background: var(--calc-bg); padding: 10px; border-radius: 4px; font-size: 13px;
  white-space: pre-wrap; word-wrap: break-word; margin: 6px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

/* ============================================================================ */
/* 12フレームワーク統合（フェーズ2新規） */
.flow-overview {
  background: #fef3c7; padding: 10px 14px; border-radius: 4px; margin-top: 12px;
  font-size: 13px; color: var(--text);
}
.framework-flow {
  display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-top: 16px;
}
.framework-list {
  background: var(--calc-bg); padding: 12px; border-radius: 6px;
  max-height: 600px; overflow-y: auto;
}
.framework-phase-header {
  font-size: 12px; font-weight: 700; color: var(--primary); margin: 12px 0 4px;
  padding: 4px 8px; background: white; border-left: 3px solid var(--primary);
}
.framework-phase-header:first-child { margin-top: 0; }
.framework-item {
  width: 100%; text-align: left; padding: 8px 10px; margin: 2px 0;
  background: white; border: 1px solid var(--border); border-radius: 4px;
  cursor: pointer; font-family: inherit; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.framework-item:hover { border-color: var(--primary-light); background: #f0f7ff; }
.framework-item.selected { border-color: var(--primary); background: #e0eaff; font-weight: 600; }
.fw-name { flex: 1; }
.fw-status { font-size: 16px; flex-shrink: 0; }
.framework-detail {
  padding: 16px 20px; background: white; border: 1px solid var(--border);
  border-radius: 6px; min-height: 400px;
}
.framework-detail .placeholder { color: var(--text-muted); font-style: italic; }
.fw-questions { padding-left: 20px; font-size: 13px; }
.fw-questions li { margin-bottom: 4px; }

/* ============================================================================ */
/* 損益計算書（フェーズ2新規） */
.financial-table-wrap {
  overflow-x: auto; margin-top: 12px;
  border: 1px solid var(--border); border-radius: 6px;
}
.financial-table {
  width: 100%; min-width: 1100px; border-collapse: collapse;
  font-size: 13px;
}
.financial-table th {
  background: var(--primary); color: white; padding: 8px 6px; text-align: center;
  font-weight: 600; position: sticky; top: 0;
}
.financial-table td {
  padding: 4px 6px; border: 1px solid var(--border); vertical-align: middle;
}
.financial-table td.row-label {
  background: var(--calc-bg); font-weight: 500; min-width: 240px; padding: 6px 10px;
}
.financial-table tr.calculated td.row-label { background: #fef3c7; }
.financial-table tr.calculated td.cell-calc {
  background: #fef9c3; font-weight: 600; text-align: right; padding-right: 10px;
}
.financial-table tr.calculated td.cell-calc.negative { color: var(--error); }
.financial-table input[type="number"] {
  width: 100%; padding: 4px 6px; font-size: 12px; border: 1px solid transparent;
  text-align: right; background: white;
}
.financial-table input[type="number"]:focus {
  border-color: var(--primary); background: #f0f7ff;
}

.financial-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.summary-table {
  width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px;
}
.summary-table th, .summary-table td {
  padding: 6px 10px; border: 1px solid var(--border); text-align: right;
}
.summary-table th { background: var(--primary); color: white; }
.summary-table td:first-child { background: var(--calc-bg); text-align: left; font-weight: 500; }
.req-check {
  background: white; padding: 12px 20px; border-radius: 4px; margin: 12px 0;
  border: 1px solid var(--border);
}
.req-check li { margin: 6px 0; font-size: 13px; }
.note { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ============================================================================ */
/* B/S 貸借対照表（フェーズ3、中核モジュール⑫の残り） */
.bs-table tr.bs-header-row {
  background: var(--primary);
}
.bs-table .bs-section-header {
  color: white;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  border: none;
}
.bs-table tr.subtotal td {
  background: #fef9c3;
  font-weight: 600;
}
.bs-table tr.subtotal td.row-label {
  background: #fef3c7;
}
.bs-table tr.total-row td {
  background: #dbeafe;
  font-weight: 700;
}
.bs-table tr.total-row td.row-label {
  background: #bfdbfe;
}
.bs-table tr.final-total td {
  background: #c7d2fe;
  font-weight: 700;
  border-top: 2px solid var(--primary);
}
.bs-table tr.balance-check-row td {
  background: var(--calc-bg);
  font-style: italic;
  font-size: 12px;
}
.bs-table tr.balance-check-row td.row-label {
  background: var(--calc-bg);
}
.bs-table td.balance-ok {
  background: #dcfce7 !important;
  color: var(--success);
  font-weight: 700;
}
.bs-table td.balance-ng {
  background: #fee2e2 !important;
  color: var(--error);
  font-weight: 700;
}
.bs-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.bs-result h3 { color: var(--primary); margin-top: 16px; }
.bs-result h3:first-child { margin-top: 0; }

/* ============================================================================ */
/* DCF/NPV/IRR（フェーズ3新規） */
.dcf-params {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-top: 12px;
}
.dcf-params label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--text);
}
.dcf-params input { font-size: 14px; }
.dcf-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.dcf-result h3 { color: var(--primary); margin-top: 0; }
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0;
}
.result-card {
  background: white; padding: 16px; border-radius: 6px;
  border: 1px solid var(--border); text-align: center;
}
.result-card.primary { border: 2px solid var(--primary); }
.result-card h4 { margin: 0 0 8px 0; font-size: 13px; color: var(--text-muted); }
.result-value {
  font-size: 24px; font-weight: 700; margin: 8px 0;
}
.result-value.positive { color: var(--success); }
.result-value.negative { color: var(--error); }
.result-judge { font-size: 12px; margin: 0; color: var(--text); }

/* ============================================================================ */
/* 3ヵ年計画＋ガントチャート（フェーズ2残作業新規） */
.gantt-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; }
.gantt-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; }
.gantt-table th { background: var(--primary); color: white; padding: 8px; text-align: center; }
.gantt-table td { padding: 4px 6px; border: 1px solid var(--border); }
.gantt-table .row-num { background: var(--calc-bg); text-align: center; font-weight: 600; width: 36px; }
.gantt-table input { width: 100%; padding: 4px 6px; font-size: 13px; border: 1px solid transparent; }
.gantt-table input:focus { border-color: var(--primary); background: #f0f7ff; }
.gantt-table input[type="number"] { text-align: center; max-width: 80px; }
.row-delete-btn {
  width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 4px;
  background: white; cursor: pointer; color: var(--error); font-weight: 700;
}
.row-delete-btn:hover { background: var(--threats); border-color: var(--error); }

.gantt-chart-wrap { margin-top: 16px; overflow-x: auto; }
.gantt-chart-wrap .placeholder { color: var(--text-muted); font-style: italic; padding: 20px; text-align: center; }
.gantt-bar-table {
  border-collapse: collapse; font-size: 11px; min-width: 100%;
}
.gantt-bar-table th {
  background: var(--primary); color: white; padding: 4px 2px;
  border: 1px solid #fff; text-align: center; vertical-align: middle;
}
.gantt-bar-table th.action-col { min-width: 200px; padding: 6px 8px; text-align: left; }
.gantt-bar-table th.owner-col { min-width: 100px; padding: 6px 8px; text-align: left; }
.gantt-bar-table th.month-col { min-width: 26px; max-width: 26px; }
.gantt-bar-table th .year-label {
  display: block; background: var(--accent); color: white; font-size: 10px;
  padding: 1px 4px; border-radius: 2px; margin-bottom: 2px;
}
.gantt-bar-table th .month-num { font-size: 10px; }
.gantt-bar-table td { padding: 0; border: 1px solid var(--border); height: 32px; }
.gantt-bar-table td.action-col { padding: 4px 8px; background: var(--calc-bg); font-weight: 500; }
.gantt-bar-table td.action-col small { color: var(--text-muted); font-weight: 400; font-size: 10px; }
.gantt-bar-table td.owner-col { padding: 4px 8px; background: white; }
.gantt-bar-table td.gantt-cell { background: white; }
.gantt-bar-table td.gantt-cell.in-range { background: var(--primary-light); }
.gantt-bar-table td.gantt-cell.start { box-shadow: inset 3px 0 0 var(--primary); }
.gantt-bar-table td.gantt-cell.end { box-shadow: inset -3px 0 0 var(--primary); }
.gantt-bar-table td.gantt-cell.start.end { box-shadow: inset 3px 0 0 var(--primary), inset -3px 0 0 var(--primary); }

/* ============================================================================ */
/* 14財務指標（フェーズ3新規） */
.indicators-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.indicators-result h3 { color: var(--primary); margin-top: 0; }
.indicators-result h4 {
  color: var(--primary); margin-top: 20px; padding-bottom: 4px;
  border-bottom: 2px solid var(--primary-light);
}

/* ============================================================================ */
/* CVP分析（フェーズ3新規） */
.cvp-params {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-top: 12px;
}
.cvp-params label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--text);
}
.cvp-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.cvp-result h3 { color: var(--primary); margin-top: 0; }

/* ============================================================================ */
/* 事業承継診断（フェーズ2残作業新規） */
.succession-step {
  background: #f8fafc; padding: 16px; border-left: 4px solid var(--primary);
  border-radius: 4px; margin-top: 16px;
}
.succession-step h3 {
  margin: 0 0 8px 0; color: var(--primary); font-size: 15px;
}
.succession-step details {
  margin-bottom: 8px; padding: 8px 12px; background: white; border-radius: 4px;
  border: 1px solid var(--border);
}
.succession-step summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary-light);
}
.succession-step summary:hover { color: var(--primary); }
.step-questions {
  margin: 8px 0 0; padding-left: 20px; font-size: 13px; color: var(--text);
}
.step-questions li { margin-bottom: 2px; }
.succession-step textarea { font-size: 14px; }
.succession-result {
  margin-top: 24px; padding: 20px; background: #f0f7ff;
  border: 2px solid var(--primary-light); border-radius: 8px;
}
.succession-result h3 { color: var(--primary); margin-top: 0; }

/* ============================================================================ */
/* 統合エクスポート */
.export-preview {
  margin-top: 20px; padding: 16px; background: var(--calc-bg);
  border: 1px solid var(--border); border-radius: 6px;
  max-height: 500px; overflow-y: auto;
}
.export-preview pre {
  white-space: pre-wrap; word-wrap: break-word; font-size: 12px;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  margin: 0;
}

/* ============================================================================ */
footer {
  text-align: center; padding: 20px 32px; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: 32px;
}
footer p { margin: 4px 0; }

/* ============================================================================ */
/* 経営戦略章6セクション（中核モジュール①） */
.strategy-section {
  margin-bottom: 20px; padding: 16px; background: var(--calc-bg);
  border-left: 4px solid var(--primary); border-radius: 4px;
}
.strategy-section h3 {
  margin: 0 0 8px 0; color: var(--primary); font-size: 15px;
}
.strategy-section .step-hint {
  margin: 0 0 10px 0; font-size: 12px; line-height: 1.6;
}
.strategy-section textarea {
  width: 100%; padding: 8px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 4px; resize: vertical;
}

/* ============================================================================ */
/* 業界平均比較（中核モジュール⑭） */
#industry-compare-result table {
  width: 100%; margin-top: 12px;
}
#industry-compare-result td:nth-child(2),
#industry-compare-result td:nth-child(3),
#industry-compare-result td:nth-child(4) {
  text-align: right; font-variant-numeric: tabular-nums;
}

/* ============================================================================ */
/* 重点提言要約総括表（中核モジュール③） */
.recommendations-table th { font-size: 13px; }
.recommendations-table td {
  font-size: 13px; line-height: 1.7; vertical-align: top;
}
.recommendation-actions { margin-top: 16px; }
.recommendation-actions table td:first-child {
  white-space: nowrap; text-align: center; font-weight: 600;
}

/* ============================================================================ */
/* 感度分析（中核モジュール⑰、独立化） */
.sensitivity-base { margin: 12px 0 20px; }
.sensitivity-base .placeholder {
  padding: 16px; background: #fafafa; border: 1px dashed #ccc; border-radius: 6px;
  color: #666; font-size: 13px;
}
.sensitivity-params {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.sensitivity-params label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.sensitivity-params input,
.sensitivity-params select {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}
.sensitivity-result { margin-top: 24px; }
.sensitivity-section { margin-top: 28px; }
.sensitivity-section h4 {
  margin: 0 0 6px; padding-bottom: 4px;
  border-bottom: 2px solid #4a7bbc; color: #2a4a7a; font-size: 15px;
}
.sensitivity-section .hint {
  font-size: 12px; color: #666; margin: 4px 0 12px;
}

/* トルネード図 */
.tornado-table th, .tornado-table td {
  font-size: 13px; vertical-align: middle;
}
.tornado-table td.positive { color: #1a7a3a; font-weight: 600; }
.tornado-table td.negative { color: #b22222; font-weight: 600; }
.tornado-bar-cell { min-width: 240px; padding: 4px 6px; }
.tornado-bar-track {
  position: relative; height: 22px; width: 100%;
  background: #f3f5f8; border-radius: 3px; overflow: hidden;
}
.tornado-axis {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: #999; z-index: 2;
}
.tornado-bar {
  position: absolute; top: 4px; bottom: 4px;
  background: linear-gradient(90deg, #ffb84d, #4a7bbc);
  border-radius: 2px; z-index: 1;
}

/* ヒートマップ */
.heatmap-wrap { overflow-x: auto; margin-top: 8px; }
.heatmap-table {
  border-collapse: collapse; min-width: 100%;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.heatmap-table th,
.heatmap-table td {
  padding: 6px 8px; text-align: center;
  border: 1px solid #e0e4ea; min-width: 64px;
}
.heatmap-table thead th {
  background: #eef2f7; color: #334; font-weight: 600;
}
.heatmap-table tbody th {
  background: #f5f7fa; color: #334; font-weight: 600; text-align: right;
}
.heatmap-base-label {
  display: inline-block; font-size: 10px; color: #888; font-weight: normal;
}
.heatmap-table td.heatmap-positive {
  background: rgba(40, 160, 80, var(--cell-opacity, 0.3));
  color: #0a3a18;
}
.heatmap-table td.heatmap-negative {
  background: rgba(200, 60, 60, var(--cell-opacity, 0.3));
  color: #5a0a0a;
}
.heatmap-table td.heatmap-base {
  outline: 2px solid #2a4a7a;
  outline-offset: -2px;
  font-weight: 700;
}

/* ============================================================================ */
/* 顧客ランク分け（ABC分析・パレート図・LTV分析、追加候補⑥） */
.abc-table-wrap { overflow-x: auto; margin-top: 12px; }
.abc-table {
  border-collapse: collapse; min-width: 100%; font-size: 13px;
}
.abc-table th, .abc-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: center;
}
.abc-table thead th {
  background: #eef2f7; color: #344; font-weight: 600;
}
.abc-table input[type="text"] { width: 100%; min-width: 140px; }
.abc-table input[type="number"] { width: 90px; text-align: right; font-variant-numeric: tabular-nums; }
.abc-table .row-num { font-weight: 600; color: #555; }
.abc-table .row-delete-btn {
  width: 24px; height: 24px; border: 1px solid #c44; background: #fff; color: #c44;
  border-radius: 4px; cursor: pointer; line-height: 1;
}
.abc-table .row-delete-btn:hover { background: #c44; color: #fff; }

.abc-result { margin-top: 28px; }
.abc-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 24px;
}
.abc-rank-table th, .abc-rank-table td { font-size: 13px; text-align: right; }
.abc-rank-table th:first-child, .abc-rank-table td:first-child { text-align: center; font-weight: 700; }
.abc-detail-wrap { overflow-x: auto; }
.abc-detail-table { font-size: 12px; min-width: 720px; }
.abc-detail-table th, .abc-detail-table td { padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.abc-detail-table th:nth-child(2), .abc-detail-table td:nth-child(2) { text-align: left; }
.abc-detail-table th:last-child, .abc-detail-table td:last-child { text-align: center; }

tr.abc-rank-A, .abc-detail-table tr.abc-rank-A td { background: rgba(74, 155, 74, 0.10); }
tr.abc-rank-B, .abc-detail-table tr.abc-rank-B td { background: rgba(224, 176, 32, 0.10); }
tr.abc-rank-C, .abc-detail-table tr.abc-rank-C td { background: rgba(160, 160, 160, 0.10); }

.pareto-wrap {
  margin: 12px 0 24px; padding: 12px;
  background: #fcfcfc; border: 1px solid #e0e4ea; border-radius: 6px;
  overflow-x: auto;
}
.pareto-svg { display: block; max-width: 100%; height: auto; min-width: 600px; }

.abc-advice {
  margin: 8px 0 0; padding-left: 22px; line-height: 1.8;
}
.abc-advice li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 資金繰り表シミュレーター */
.cashflow-params {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 16px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.cashflow-params label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.cashflow-params input,
.cashflow-params select {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}

.cashflow-table-wrap {
  overflow-x: auto; margin-top: 12px; max-height: 600px; overflow-y: auto;
  border: 1px solid #d8e0ea; border-radius: 4px;
}
.cashflow-table {
  border-collapse: separate; border-spacing: 0; font-size: 12px;
  font-variant-numeric: tabular-nums; min-width: 100%;
}
.cashflow-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: #eef2f7; color: #334; font-weight: 600;
  padding: 6px 8px; border-bottom: 2px solid #c8d0db;
  text-align: center; min-width: 70px;
}
.cashflow-table tbody th { background: #f5f7fa; }
.cashflow-table td, .cashflow-table th {
  padding: 4px 6px; border-bottom: 1px solid #ecf0f5; border-right: 1px solid #ecf0f5;
  text-align: right;
}
.cashflow-table .row-label {
  text-align: left; min-width: 220px; max-width: 280px;
  position: sticky; left: 0; z-index: 2;
  background: #f7f9fc; font-weight: 500;
}
.cashflow-table input[type="number"] {
  width: 64px; padding: 3px 4px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px;
  text-align: right; font-variant-numeric: tabular-nums;
}
.cashflow-table tr.cf-cat-in td { background: rgba(74, 155, 74, 0.04); }
.cashflow-table tr.cf-cat-out td { background: rgba(200, 80, 60, 0.04); }
.cashflow-table tr.cf-cat-subtotal td,
.cashflow-table tr.cf-cat-balance td {
  background: #f0f4f8; font-weight: 600;
}
.cashflow-table tr.cf-cat-monthly td { background: #e8eef8; font-weight: 700; }
.cashflow-table tr.cf-cat-cash td { background: #fff8e1; font-weight: 700; }
.cashflow-table tr.cf-cat-inv-out td { background: rgba(180, 100, 40, 0.04); }
.cashflow-table tr.cf-cat-inv-in td { background: rgba(120, 160, 200, 0.04); }
.cashflow-table tr.cf-cat-fin-in td { background: rgba(80, 120, 200, 0.04); }
.cashflow-table tr.cf-cat-fin-out td { background: rgba(160, 100, 160, 0.04); }
.cashflow-table tr.cf-cat-subtotal .row-label,
.cashflow-table tr.cf-cat-balance .row-label,
.cashflow-table tr.cf-cat-monthly .row-label,
.cashflow-table tr.cf-cat-cash .row-label { background: #e8eef5; }
.cashflow-table .cell-calc { color: #233; }
.cashflow-table .cell-calc.negative { color: #b22222; }
.cashflow-table .cell-calc.cf-danger {
  background: rgba(220, 60, 60, 0.25) !important;
  color: #5a0a0a; font-weight: 700;
}
.cashflow-table .cell-calc.cf-warn {
  background: rgba(220, 160, 60, 0.20) !important;
  color: #6a3a0a; font-weight: 600;
}

.cashflow-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 24px;
}
.cashflow-chart-wrap {
  margin: 12px 0 24px; padding: 12px;
  background: #fcfcfc; border: 1px solid #e0e4ea; border-radius: 6px;
  overflow-x: auto;
}
.cashflow-svg { display: block; max-width: 100%; height: auto; min-width: 600px; }

.cashflow-advice {
  margin: 8px 0 0; padding-left: 22px; line-height: 1.8;
}
.cashflow-advice li { margin-bottom: 6px; font-size: 13px; }

/* ============================================================================ */
/* 親会社子会社診断（連結財務、追加候補⑨） */
.consolidation-parent {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.consolidation-parent label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.consolidation-parent input {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}

.consolidation-table-wrap { overflow-x: auto; margin-top: 12px; }
.consolidation-table {
  border-collapse: collapse; min-width: 100%; font-size: 13px;
}
.consolidation-table th, .consolidation-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: center;
}
.consolidation-table thead th {
  background: #eef2f7; color: #344; font-weight: 600;
}
.consolidation-table input[type="text"] { width: 100%; min-width: 160px; }
.consolidation-table input[type="number"] {
  width: 90px; text-align: right; font-variant-numeric: tabular-nums;
}
.cons-classification {
  font-weight: 600; min-width: 90px;
}
.cons-cls-wholly     { background: rgba(74, 155, 74, 0.15); color: #1a5a1a; }
.cons-cls-subsidiary { background: rgba(120, 170, 80, 0.15); color: #2a5a1a; }
.cons-cls-equity     { background: rgba(224, 176, 32, 0.15); color: #6a4a0a; }
.cons-cls-investment { background: rgba(160, 160, 160, 0.15); color: #444; }
.cons-cls-parent     { background: rgba(74, 122, 188, 0.15); color: #1a3a6a; }
tr.cons-cls-wholly td,
tr.cons-cls-subsidiary td,
tr.cons-cls-equity td,
tr.cons-cls-investment td,
tr.cons-cls-parent td { background: inherit; }

.cons-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.cons-summary-table th, .cons-summary-table td { font-size: 13px; text-align: right; }
.cons-summary-table th:first-child, .cons-summary-table td:first-child { text-align: left; }
.cons-detail-wrap { overflow-x: auto; }
.cons-detail-table { font-size: 12px; min-width: 720px; }
.cons-detail-table th, .cons-detail-table td {
  padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums;
}
.cons-detail-table th:nth-child(2), .cons-detail-table td:nth-child(2) { text-align: left; }
.cons-detail-table th:nth-child(4), .cons-detail-table td:nth-child(4) { text-align: center; }
.cons-advice {
  margin: 8px 0 0; padding-left: 22px; line-height: 1.8;
}
.cons-advice li { margin-bottom: 6px; font-size: 13px; }

/* ============================================================================ */
/* SaaS指標・ユニットエコノミクス診断（ITサービス業、追加候補⑩） */
.saas-params {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 12px 0 20px;
}
.saas-params-group {
  padding: 12px 16px; background: #f7f9fc;
  border: 1px solid #d8e0ea; border-radius: 6px;
}
.saas-params-group h4 {
  margin: 0 0 10px; padding-bottom: 4px;
  border-bottom: 1px solid #c8d0db;
  color: #2a4a7a; font-size: 14px;
}
.saas-params-group label {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
  font-size: 13px; font-weight: 500; color: #344;
}
.saas-params-group input,
.saas-params-group select {
  padding: 6px 8px; font-size: 14px;
  border: 1px solid #c8d0db; border-radius: 4px;
}

.saas-health-banner {
  display: flex; align-items: center; gap: 20px;
  margin: 16px 0 24px; padding: 20px 24px;
  border-radius: 8px; border: 2px solid;
}
.saas-health-banner .saas-health-score {
  font-size: 48px; font-weight: 700; line-height: 1;
}
.saas-health-banner .saas-health-score span {
  font-size: 18px; color: #888; font-weight: 400;
}
.saas-health-banner .saas-health-label { font-size: 16px; font-weight: 600; }
.saas-health-0, .saas-health-1 { background: #fff0f0; border-color: #c44; color: #5a1a1a; }
.saas-health-2 { background: #fff5e8; border-color: #d80; color: #6a3a0a; }
.saas-health-3 { background: #fffae0; border-color: #ca0; color: #5a4a0a; }
.saas-health-4, .saas-health-5 { background: #f0faf0; border-color: #4a9; color: #1a5a2a; }

.saas-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 24px;
}

.saas-checks-table { margin-bottom: 20px; }
.saas-checks-table th, .saas-checks-table td { font-size: 13px; vertical-align: middle; }
.saas-checks-table tr.saas-check-pass td { background: rgba(74, 155, 74, 0.08); }
.saas-checks-table tr.saas-check-fail td { background: rgba(200, 60, 60, 0.08); }

.saas-detail-table { margin-bottom: 20px; max-width: 520px; }
.saas-detail-table th {
  background: #f5f7fa; font-weight: 600; text-align: left;
  width: 180px; font-size: 13px;
}
.saas-detail-table td {
  text-align: right; font-variant-numeric: tabular-nums; font-size: 13px;
}

.saas-advice {
  margin: 8px 0 0; padding-left: 22px; line-height: 1.8;
}
.saas-advice li { margin-bottom: 6px; font-size: 13px; }

/* ============================================================================ */
/* ヒアリング設計（取材の学校10期理論基盤、フェーズ5） */
.hearing-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.hearing-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.hearing-meta input {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}

.hd-questions-list { margin: 12px 0 20px; }
.hd-question-row {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 6px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd;
}
.hd-question-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.hd-q-name { font-weight: 600; color: #2a4a7a; }
.hd-q-desc { grid-column: 2; margin: 0; font-size: 12px; color: #666; line-height: 1.5; }
.hd-question-row textarea {
  grid-column: 1 / -1; width: 100%; padding: 6px 8px;
  font-size: 13px; border: 1px solid #d0d8e0; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.hd-9axis-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.hd-axis-cell {
  padding: 10px 12px; background: #f7f9fc;
  border: 1px solid #d8e0ea; border-radius: 6px;
}
.hd-axis-cell h4 { margin: 0 0 4px; font-size: 14px; color: #2a4a7a; }
.hd-axis-desc { margin: 0 0 6px; font-size: 11px; color: #777; }
.hd-axis-cell textarea {
  width: 100%; padding: 6px 8px; font-size: 13px;
  border: 1px solid #d0d8e0; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.hd-specuni {
  display: grid; gap: 12px; margin: 12px 0 20px;
}
.hd-specuni label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.hd-specuni textarea {
  padding: 6px 8px; font-size: 13px;
  border: 1px solid #c8d0db; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.hd-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.result-value-text { font-size: 14px; line-height: 1.5; font-weight: 600; color: #233; }
.hd-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.hd-warnings li { margin-bottom: 4px; font-size: 13px; }
.hd-template-block { margin: 8px 0; }
.hd-template-textarea {
  width: 100%; padding: 10px; font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px; line-height: 1.5; background: #fafbfd;
  border: 1px solid #d8e0ea; border-radius: 4px;
  white-space: pre-wrap;
}

/* ============================================================================ */
/* 取材実践（傾聴技法＋著作権、フェーズ5） */
.ip-listening-list { margin: 12px 0 20px; }
.ip-listening-row {
  display: grid; grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.ip-listening-name strong { font-size: 13px; color: #2a4a7a; }
.ip-listening-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.ip-listening-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.ip-listening-eval label { white-space: nowrap; }
.ip-listening-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

.ip-deep-questions { margin: 12px 0 20px; }
.ip-deep-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ip-deep-table th, .ip-deep-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: left;
}
.ip-deep-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.ip-deep-pattern { font-weight: 500; color: #233; min-width: 280px; }
.ip-deep-hint { font-size: 12px; color: #666; }

.ip-copyright-block {
  margin: 12px 0; padding: 12px 16px;
  background: #fafbfd; border: 1px solid #d8e0ea; border-radius: 6px;
}
.ip-copyright-block h4 {
  margin: 0 0 8px; font-size: 14px; color: #2a4a7a;
  padding-bottom: 4px; border-bottom: 1px solid #d8e0ea;
}
.ip-copyright-block label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ip-copyright-block select {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}
.ip-cr-check {
  display: block; padding: 4px 0; font-size: 13px; line-height: 1.5;
  cursor: pointer;
}
.ip-cr-check input { margin-right: 6px; }

.ip-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.ip-listening-table th, .ip-listening-table td { font-size: 13px; }
.ip-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.ip-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 記事化＆ワークフロー（PREP/15字タイトル/1文1意/10段階工程、フェーズ5） */
.aw-prep {
  display: grid; gap: 12px; margin: 12px 0 20px;
}
.aw-prep label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.aw-prep textarea {
  padding: 6px 8px; font-size: 13px;
  border: 1px solid #c8d0db; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.aw-title-list { margin: 12px 0 20px; }
.aw-title-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.aw-title-table th, .aw-title-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: center;
}
.aw-title-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.aw-title-table input[type="text"] {
  width: 100%; min-width: 240px; padding: 4px 6px;
  font-size: 13px; border: 1px solid #d0d8e0; border-radius: 3px;
}
.aw-title-table td:first-child { width: 40px; }
.aw-title-table td:nth-child(3), .aw-title-table td:nth-child(4) { width: 80px; font-weight: 600; }
.aw-title-judge.ok    { background: rgba(74, 155, 74, 0.15); color: #1a5a1a; }
.aw-title-judge.over  { background: rgba(200, 60, 60, 0.15); color: #5a1a1a; }
.aw-title-judge.short { background: rgba(224, 176, 32, 0.15); color: #6a4a0a; }

.aw-onesentence { margin: 12px 0 20px; }
.aw-onesentence label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.aw-onesentence textarea {
  padding: 8px; font-size: 13px; line-height: 1.6;
  border: 1px solid #c8d0db; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.aw-workflow-list { margin: 12px 0 20px; }
.aw-workflow-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.aw-workflow-table th, .aw-workflow-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: left;
}
.aw-workflow-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.aw-workflow-table td:first-child { min-width: 240px; }
.aw-workflow-table input[type="date"] { width: 140px; padding: 4px 6px; font-size: 12px; }
.aw-workflow-table input[type="text"] { width: 100%; min-width: 200px; padding: 4px 6px; font-size: 12px; }
.aw-wf-state { white-space: nowrap; font-weight: 600; color: #888; }
.aw-wf-state.done { color: #1a7a3a; background: rgba(74, 155, 74, 0.10); padding: 2px 6px; border-radius: 3px; }

.aw-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.aw-body-review { max-height: 360px; overflow-y: auto; margin: 8px 0 16px; }
.aw-body-table { font-size: 13px; }
.aw-body-table td:first-child { width: 40px; text-align: center; color: #666; }
.aw-body-table td:nth-child(2) { line-height: 1.5; }
.aw-body-table td:last-child { width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
.aw-body-table tr.aw-sentence-over td {
  background: rgba(220, 160, 60, 0.15); color: #6a3a0a;
}
.aw-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.aw-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 新規事業評価（Z氏案件由来、フェーズ4） */
.nb-meta, .nb-market-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.nb-meta label, .nb-market-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.nb-meta input, .nb-market-grid input {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}
#nb-som { background: #fff8e1; font-weight: 700; }

.nb-fit-stages { margin: 12px 0 20px; }
.nb-fit-row {
  display: grid; grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.nb-fit-info strong { font-size: 13px; color: #2a4a7a; }
.nb-fit-info p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.nb-fit-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.nb-fit-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

.nb-gtm-matrix { margin: 12px 0 20px; }
.nb-gtm-table {
  border-collapse: collapse; width: 100%; font-size: 13px;
}
.nb-gtm-table th, .nb-gtm-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea; text-align: left;
}
.nb-gtm-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.nb-gtm-table td:first-child { min-width: 160px; font-weight: 500; }
.nb-gtm-table td:nth-child(2) { width: 80px; text-align: center; }
.nb-gtm-table select { width: 70px; padding: 4px 6px; }
.nb-gtm-table input[type="text"] { width: 100%; padding: 4px 6px; font-size: 12px; }
.nb-gtm-desc { font-size: 11px; color: #666; line-height: 1.4; }

.nb-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.nb-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.nb-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* コーチング機能（C氏案件由来、フェーズ4） */
.cg-meta, .cg-record {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.cg-meta label, .cg-record label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.cg-meta input, .cg-record input, .cg-record textarea {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
  font-family: inherit;
}

.cg-grow {
  display: grid; gap: 12px; margin: 12px 0 20px;
}
.cg-grow label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #2a4a7a;
}
.cg-grow textarea {
  padding: 8px; font-size: 13px; line-height: 1.6;
  border: 1px solid #c8d0db; border-radius: 4px;
  resize: vertical; font-family: inherit;
}

.cg-pcc-list { margin: 12px 0 20px; }
.cg-pcc-row {
  display: grid; grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.cg-pcc-info strong { font-size: 13px; color: #2a4a7a; }
.cg-pcc-info p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.cg-pcc-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.cg-pcc-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

.cg-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.cg-record-block { margin: 8px 0; }
.cg-record-textarea {
  width: 100%; padding: 10px; font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px; line-height: 1.5; background: #fafbfd;
  border: 1px solid #d8e0ea; border-radius: 4px;
  white-space: pre-wrap;
}
.cg-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.cg-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 補助金審査・申請（公的支援事業由来、フェーズ4） */
.sr-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.sr-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #344;
}
.sr-meta input, .sr-meta select {
  padding: 6px 8px; font-size: 14px; border: 1px solid #c8d0db; border-radius: 4px;
}

.sr-reviewer-checks { margin: 12px 0 20px; }
.sr-reviewer-table {
  border-collapse: collapse; width: 100%; font-size: 13px;
}
.sr-reviewer-table th, .sr-reviewer-table td {
  padding: 8px; border: 1px solid #d8e0ea; vertical-align: top;
}
.sr-reviewer-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.sr-reviewer-table td:first-child { min-width: 160px; font-weight: 600; }
.sr-reviewer-table td:nth-child(2) { width: 80px; text-align: center; }
.sr-reviewer-table select { width: 70px; padding: 4px 6px; }
.sr-rev-desc { font-size: 11px; color: #666; line-height: 1.5; }
.sr-reviewer-table textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

.sr-expense-checks { margin: 12px 0 20px; }
.sr-expense-table {
  border-collapse: collapse; width: 100%; font-size: 13px;
}
.sr-expense-table th, .sr-expense-table td {
  padding: 6px 8px; border: 1px solid #d8e0ea;
}
.sr-expense-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.sr-expense-table tr.sr-cov-yes td { background: rgba(74, 155, 74, 0.05); }
.sr-expense-table tr.sr-cov-no td { background: rgba(200, 80, 60, 0.05); }
.sr-expense-table td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.sr-expense-table td:nth-child(3) { width: 130px; }
.sr-expense-table input[type="number"] {
  width: 100%; padding: 4px 6px; text-align: right;
  font-variant-numeric: tabular-nums;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.sr-exp-note { font-size: 11px; color: #666; }

.sr-doc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px; margin: 12px 0 20px;
}
.sr-doc-check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid #d8e0ea; border-radius: 4px;
  cursor: pointer; font-size: 13px; background: #fafbfd;
}
.sr-doc-check.sr-doc-required { border-left: 4px solid #b22222; }
.sr-doc-check.sr-doc-optional { border-left: 4px solid #aaa; }
.sr-doc-check input { margin: 0; }

.sr-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.sr-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.sr-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 業種別経営指標（4業種統合、フェーズ4） */
.id-selector {
  margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.id-selector label {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 600; color: #344;
}
.id-selector select {
  padding: 8px 12px; font-size: 14px;
  border: 1px solid #c8d0db; border-radius: 4px; min-width: 280px;
}

.id-input-area { margin: 12px 0 20px; }
.id-input-area .placeholder {
  padding: 16px; background: #fafafa; border: 1px dashed #ccc; border-radius: 6px;
  color: #666; font-size: 13px;
}
.id-fields-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.id-field {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; background: #fafbfd;
  border: 1px solid #d8e0ea; border-radius: 4px;
}
.id-field-name { font-size: 12px; font-weight: 600; color: #344; }
.id-field input {
  padding: 6px 8px; font-size: 14px;
  border: 1px solid #d0d8e0; border-radius: 4px;
  text-align: right; font-variant-numeric: tabular-nums;
}

.id-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 12px 0 20px;
}
.id-warnings { margin: 8px 0 16px; padding-left: 22px; line-height: 1.8; }
.id-warnings li { margin-bottom: 4px; font-size: 13px; }

/* ============================================================================ */
/* 業種別実例リファレンス（読み取り専用、フェーズ4） */
.cr-selector {
  margin: 12px 0 20px; padding: 12px 16px;
  background: #f7f9fc; border: 1px solid #d8e0ea; border-radius: 6px;
}
.cr-selector label {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 600; color: #344;
}
.cr-selector select {
  padding: 8px 12px; font-size: 14px;
  border: 1px solid #c8d0db; border-radius: 4px; min-width: 280px;
}

.cr-result { margin: 12px 0 20px; }
.cr-result .placeholder {
  padding: 16px; background: #fafafa; border: 1px dashed #ccc; border-radius: 6px;
  color: #666; font-size: 13px;
}

.cr-case-card {
  margin: 12px 0; padding: 16px 20px;
  background: #fafbfd; border: 1px solid #d8e0ea; border-left: 4px solid #4a7bbc;
  border-radius: 4px;
}
.cr-case-card h4 {
  margin: 0 0 8px; color: #2a4a7a; font-size: 15px;
  padding-bottom: 4px; border-bottom: 1px solid #d8e0ea;
}
.cr-case-type {
  margin: 0 0 12px; font-size: 13px; color: #444;
}
.cr-case-detail {
  margin: 0; padding: 0;
  display: grid; grid-template-columns: 140px 1fr;
  gap: 6px 16px; font-size: 13px; line-height: 1.7;
}
.cr-case-detail dt {
  font-weight: 600; color: #2a4a7a;
  padding: 4px 0;
}
.cr-case-detail dd {
  margin: 0; padding: 4px 0; color: #233;
}

/* 個別案件深掘り（第66セッション追加、業種別実例リファレンスタブの拡張） */
.cr-deepdive-toggle {
  display: inline-block; margin: 12px 0 0;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: #2a4a7a; background: #e6eff7; border: 1px solid #b8cce0;
  border-radius: 3px; cursor: pointer; font-family: inherit;
}
.cr-deepdive-toggle:hover { background: #d8e4f0; }
.cr-deepdive-block {
  margin: 8px 0 0; padding: 12px 16px;
  background: #f3f7fb; border-left: 3px solid #6b8db8; border-radius: 3px;
}
.cr-deepdive-block.hidden { display: none; }
.cr-deepdive-detail {
  grid-template-columns: 170px 1fr;
  font-size: 12px; line-height: 1.7;
}
.cr-deepdive-detail dt { color: #4a3a5a; }
.cr-deepdive-detail dd { color: #344; }

/* ============================================================================ */
/* 診断士活力向上プロジェクト（フェーズ4新規モジュール、第64セッション追加） */
.vp-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.vp-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.vp-meta input, .vp-meta select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.vp-quarters, .vp-achievements { margin: 12px 0 16px; overflow-x: auto; }
.vp-quarters-table, .vp-achievements-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 850px;
}
.vp-quarters-table th, .vp-quarters-table td,
.vp-achievements-table th, .vp-achievements-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.vp-quarters-table thead th, .vp-achievements-table thead th {
  background: #f0e8f5; color: #4a3a5a; font-weight: 600;
}
.vp-quarters-table td:first-child, .vp-achievements-table td:first-child {
  width: 32px; text-align: center; font-weight: 500;
}
.vp-quarters-table input, .vp-achievements-table input,
.vp-achievements-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.vp-judge-block { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.vp-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.vp-judge-block textarea {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.vp-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.vp-quarters-summary, .vp-achievements-summary, .vp-plan-table { font-size: 12px; }
.vp-plan-table td:first-child {
  width: 200px; background: #f8f4fc; font-weight: 500;
}
.vp-warnings { list-style: none; padding-left: 0; }
.vp-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.vp-result { margin: 16px 0; }
.vp-result.hidden { display: none; }

/* ============================================================================ */
/* 研究会経由案件支援（フェーズ4新規モジュール、第62セッション追加） */
.sgc-groups, .sgc-cases { margin: 12px 0 16px; overflow-x: auto; }
.sgc-groups-table, .sgc-cases-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 900px;
}
.sgc-groups-table th, .sgc-groups-table td,
.sgc-cases-table th, .sgc-cases-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.sgc-groups-table thead th, .sgc-cases-table thead th {
  background: #e6f0e0; color: #2a4a2a; font-weight: 600;
}
.sgc-groups-table td:first-child, .sgc-cases-table td:first-child {
  width: 32px; text-align: center; font-weight: 500;
}
.sgc-groups-table input, .sgc-groups-table select,
.sgc-cases-table input, .sgc-cases-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.sgc-strategy {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.sgc-strategy label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.sgc-strategy input, .sgc-strategy select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.sgc-judge-block { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.sgc-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.sgc-judge-block textarea {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.sgc-judge-block select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.sgc-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.sgc-group-cases-table, .sgc-strategy-table { font-size: 12px; }
.sgc-strategy-table td:first-child {
  width: 200px; background: #f6faf3; font-weight: 500;
}
.sgc-warnings { list-style: none; padding-left: 0; }
.sgc-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.sgc-result { margin: 16px 0; }
.sgc-result.hidden { display: none; }

/* ============================================================================ */
/* 評価者委嘱・事前評価（フェーズ4新規モジュール、第59セッション追加） */
.ec-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.ec-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.ec-meta input, .ec-meta select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.ec-criteria-checks { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
.ec-criteria-row {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 8px; align-items: start;
  padding: 8px 12px; border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; cursor: pointer;
}
.ec-criteria-row:hover { background: #f0f5fc; }
.ec-criteria-row input[type="checkbox"] { margin-top: 4px; }
.ec-criteria-body strong { font-size: 13px; color: #2a4a7a; display: block; }
.ec-criteria-body p { margin: 2px 0 0; font-size: 11px; color: #555; line-height: 1.5; }
.ec-evaluations { margin: 12px 0 16px; overflow-x: auto; }
.ec-evals-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 900px;
}
.ec-evals-table th, .ec-evals-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.ec-evals-table thead th { background: #f3e8ec; color: #553344; font-weight: 600; }
.ec-evals-table td:first-child { width: 32px; text-align: center; font-weight: 500; }
.ec-evals-table input, .ec-evals-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.ec-judge-block { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.ec-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.ec-judge-block textarea {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.ec-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.ec-criteria-result { list-style: none; padding-left: 0; }
.ec-criteria-result li { padding: 3px 0; font-size: 13px; line-height: 1.5; }
.ec-criteria-result .ec-pass { color: #1a5a30; font-weight: 500; }
.ec-criteria-result .ec-fail { color: #888; }
.ec-evals-summary { font-size: 12px; }
.ec-evals-summary .ec-score-a { background: #e6f5ec; }
.ec-evals-summary .ec-score-b { background: #fff9e0; }
.ec-evals-summary .ec-score-c { background: #ffe6e6; }
.ec-evals-summary .ec-score-d { background: #ffd0d0; font-weight: 600; }
.ec-talknote-block { margin: 8px 0 16px; }
.ec-talknote-textarea {
  width: 100%; padding: 10px 12px; font-size: 12px; font-family: inherit;
  border: 1px solid #b8a0a8; border-radius: 4px; background: #fcfafa;
  margin-bottom: 6px; line-height: 1.6;
}
.ec-warnings { list-style: none; padding-left: 0; }
.ec-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.ec-result { margin: 16px 0; }
.ec-result.hidden { display: none; }

/* ============================================================================ */
/* 専門家派遣型支援（フェーズ4新規モジュール、第54セッション追加） */
.ed-meta, .ed-condition {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.ed-meta label, .ed-condition label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.ed-meta input, .ed-meta select,
.ed-condition input, .ed-condition select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.ed-visits { margin: 12px 0 16px; overflow-x: auto; }
.ed-visits-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 900px;
}
.ed-visits-table th, .ed-visits-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.ed-visits-table thead th { background: #ede5f3; color: #443360; font-weight: 600; }
.ed-visits-table td:first-child { width: 32px; text-align: center; font-weight: 500; }
.ed-visits-table input, .ed-visits-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.ed-judge-block { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.ed-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.ed-judge-block textarea {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.ed-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.ed-visits-history th, .ed-visits-history td { font-size: 11px; }
.ed-report-block { margin: 8px 0 16px; }
.ed-report-textarea {
  width: 100%; padding: 10px 12px; font-size: 12px; font-family: inherit;
  border: 1px solid #b8a8d0; border-radius: 4px; background: #faf8fc;
  margin-bottom: 6px; line-height: 1.6;
}
.ed-warnings { list-style: none; padding-left: 0; }
.ed-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.ed-result { margin: 16px 0; }
.ed-result.hidden { display: none; }

/* ============================================================================ */
/* 応募活動経歴自己分析（フェーズ4新規モジュール、第53セッション追加） */
.ah-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.ah-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.ah-meta input, .ah-meta select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.ah-applications { margin: 12px 0 16px; overflow-x: auto; }
.ah-apps-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 800px;
}
.ah-apps-table th, .ah-apps-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.ah-apps-table thead th { background: #f3ede4; color: #4a3e22; font-weight: 600; }
.ah-apps-table td:first-child { width: 32px; text-align: center; font-weight: 500; }
.ah-apps-table input, .ah-apps-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.ah-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.ah-category-table { font-size: 12px; }
.ah-category-table td:nth-child(2), .ah-category-table td:nth-child(3) {
  width: 80px; text-align: right; font-weight: 500;
}
.ah-learnings { list-style: none; padding-left: 0; margin: 8px 0 16px; }
.ah-learnings li {
  padding: 8px 12px; margin-bottom: 4px; font-size: 12px; line-height: 1.6;
  background: #faf6ed; border-left: 3px solid #c8a060; border-radius: 3px;
}
.ah-learning-meta { font-size: 11px; color: #6a5530; font-weight: 500; }
.ah-handoff-block { margin: 8px 0 16px; }
.ah-handoff-textarea {
  width: 100%; padding: 8px 10px; font-size: 12px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; background: #fafbfd;
  margin-bottom: 6px;
}
.ah-warnings { list-style: none; padding-left: 0; }
.ah-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.ah-result { margin: 16px 0; }
.ah-result.hidden { display: none; }

/* ============================================================================ */
/* 個人クライアント支援（フェーズ4新規モジュール、第52セッション追加） */
.cs-meta, .cs-judge-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.cs-meta label, .cs-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.cs-meta input, .cs-meta select,
.cs-judge-block input, .cs-judge-block select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.cs-themes { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.cs-theme-card {
  border: 1px solid #c8d4e0; border-left: 4px solid #6ba35d; border-radius: 4px;
  padding: 10px 14px; background: #f8fbf6;
}
.cs-theme-header {
  font-size: 13px; font-weight: 700; color: #2a5a2a; margin-bottom: 6px;
  padding-bottom: 4px; border-bottom: 1px solid #d0e0c8;
}
.cs-theme-card label {
  display: block; margin: 4px 0; font-size: 12px; color: #455; font-weight: 500;
}
.cs-theme-card input[type="text"],
.cs-theme-card input[type="number"],
.cs-theme-card textarea {
  width: 100%; padding: 5px 8px; margin-top: 3px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}
.cs-sessions-table {
  border-collapse: collapse; width: 100%; font-size: 12px;
  margin: 8px 0 16px;
}
.cs-sessions-table th, .cs-sessions-table td {
  padding: 5px 8px; border: 1px solid #d8e0ea; text-align: left;
}
.cs-sessions-table thead th { background: #eef2f7; color: #344; font-weight: 600; }
.cs-sessions-table input, .cs-sessions-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.cs-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.cs-themes-table .cs-progress-high { background: #e6f5ec; font-weight: 600; }
.cs-themes-table .cs-progress-mid  { background: #fff9e0; }
.cs-themes-table .cs-progress-low  { background: #ffe6e6; font-weight: 600; }
.cs-sessions-history th, .cs-sessions-history td { font-size: 12px; }
.cs-warnings { list-style: none; padding-left: 0; }
.cs-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.cs-result { margin: 16px 0; }
.cs-result.hidden { display: none; }

/* ============================================================================ */
/* 書籍化案件支援（フェーズ4新規モジュール、第72セッション追加） */
.bp-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.bp-meta label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.bp-meta input, .bp-meta select {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.bp-phases, .bp-chapters-detail { margin: 12px 0 16px; overflow-x: auto; }
.bp-phases-table, .bp-chapters-table {
  border-collapse: collapse; width: 100%; font-size: 12px;
}
.bp-chapters-table { min-width: 900px; }
.bp-phases-table th, .bp-phases-table td,
.bp-chapters-table th, .bp-chapters-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.bp-phases-table thead th, .bp-chapters-table thead th {
  background: #f3e8d5; color: #5a4a30; font-weight: 600;
}
.bp-phases-table td:first-child { width: 200px; }
.bp-chapters-table td:first-child { width: 32px; text-align: center; font-weight: 500; }
.bp-phases-table input, .bp-chapters-table input, .bp-chapters-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.bp-judge-block { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.bp-judge-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.bp-judge-block textarea, .bp-judge-block select {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.bp-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.bp-basic-table, .bp-phases-summary, .bp-chapters-summary, .bp-judge-table { font-size: 12px; }
.bp-basic-table td:first-child, .bp-judge-table td:first-child {
  width: 200px; background: #faf6ed; font-weight: 500;
}
.bp-warnings { list-style: none; padding-left: 0; }
.bp-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.bp-result { margin: 16px 0; }
.bp-result.hidden { display: none; }

/* ============================================================================ */
/* 企業内戦略担当者支援（フェーズ4新規モジュール、第70セッション追加） */
.is-meta, .is-consensus, .is-template-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px; margin: 12px 0 16px;
}
.is-template-block { grid-template-columns: 1fr; }
.is-meta label, .is-consensus label, .is-template-block label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #455; font-weight: 500;
}
.is-meta input, .is-meta select,
.is-consensus input, .is-consensus select, .is-consensus textarea,
.is-template-block input, .is-template-block select, .is-template-block textarea {
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px;
}
.is-template-block select[multiple] {
  height: 130px; padding: 4px;
}
.is-projects { margin: 12px 0 16px; overflow-x: auto; }
.is-projects-table {
  border-collapse: collapse; width: 100%; font-size: 12px; min-width: 960px;
}
.is-projects-table th, .is-projects-table td {
  padding: 5px 6px; border: 1px solid #d8e0ea; text-align: left;
}
.is-projects-table thead th { background: #ede9f5; color: #3a3360; font-weight: 600; }
.is-projects-table td:first-child { width: 32px; text-align: center; font-weight: 500; }
.is-projects-table input, .is-projects-table select {
  width: 100%; padding: 3px 5px; font-size: 11px;
  border: 1px solid #d0d8e0; border-radius: 2px;
}
.is-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.is-profile-table, .is-projects-summary, .is-consensus-table { font-size: 12px; }
.is-profile-table td:first-child, .is-consensus-table td:first-child {
  width: 220px; background: #f4eff8; font-weight: 500;
}
.is-warnings { list-style: none; padding-left: 0; }
.is-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.is-result { margin: 16px 0; }
.is-result.hidden { display: none; }

/* ============================================================================ */
/* 戦略立案支援（フェーズ4新規モジュール、第51セッション追加） */
.ss-block-label { display: block; margin: 8px 0 16px; }
.ss-block-label textarea {
  width: 100%; padding: 8px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 4px; resize: vertical;
}
.ss-targets { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 20px; }
.ss-target-card {
  border: 1px solid #c8d4e0; border-left: 4px solid #5b8db8; border-radius: 4px;
  padding: 12px 16px; background: #f8fafc;
}
.ss-target-header {
  font-size: 14px; font-weight: 700; color: #2a4a7a; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid #d8e0ea;
}
.ss-target-card label {
  display: block; margin: 6px 0; font-size: 12px; color: #455; font-weight: 500;
}
.ss-target-card input[type="text"] {
  width: 100%; padding: 6px 8px; margin-top: 4px; font-size: 13px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}
.ss-target-kpis { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #d8e0ea; }
.ss-kpis-header { font-size: 12px; color: #455; font-weight: 500; margin-bottom: 4px; }
.ss-kpi-input {
  width: 100%; padding: 5px 8px; margin-bottom: 4px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}
.ss-summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 16px 0 20px;
}
.ss-cascade { margin: 8px 0 16px; }
.ss-cascade-level {
  background: #eef4fb; border-left: 4px solid #2a4a7a; border-radius: 3px;
  padding: 8px 12px; margin-bottom: 8px;
}
.ss-cascade-level .ss-level-label {
  display: inline-block; font-size: 11px; font-weight: 700; color: #2a4a7a;
  background: #d8e4f0; padding: 2px 6px; border-radius: 2px; margin-right: 8px;
}
.ss-cascade-level p { margin: 4px 0 0; font-size: 13px; color: #233; line-height: 1.6; }
.ss-cascade-targets { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ss-cascade-target {
  border: 1px solid #d8e0ea; border-left: 3px solid #5b8db8; border-radius: 3px;
  padding: 8px 12px; background: #fff;
}
.ss-cascade-target-name { font-size: 13px; color: #2a4a7a; margin-bottom: 6px; }
.ss-cascade-kgi {
  background: #fff7e6; padding: 4px 8px; border-radius: 3px;
  font-size: 12px; color: #6b4a00; margin-bottom: 6px;
}
.ss-kgi-label, .ss-kpi-label {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px;
  border-radius: 2px; margin-right: 6px;
}
.ss-kgi-label { background: #f0c060; color: #4a3000; }
.ss-kpi-label { background: #c8d8ee; color: #2a4a7a; }
.ss-cascade-kpis { list-style: none; padding: 0; margin: 0; }
.ss-cascade-kpis li {
  font-size: 12px; color: #455; padding: 3px 0; border-bottom: 1px dotted #e0e4ea;
}
.ss-cascade-kpis li:last-child { border-bottom: none; }
.ss-cascade-empty { font-size: 12px; color: #888; font-style: italic; }
.ss-warnings { list-style: none; padding-left: 0; }
.ss-warnings li { padding: 4px 0; font-size: 13px; line-height: 1.5; }
.ss-result { margin: 16px 0; }
.ss-result.hidden { display: none; }

/* ============================================================================ */
/* 事前準備5要素（ヒアリング設計タブ拡張、第50セッション追加） */
.hd-prep-elements { margin: 12px 0 20px; }
.hd-pe-row {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.hd-pe-name strong { font-size: 13px; color: #2a4a7a; }
.hd-pe-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.hd-pe-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.hd-pe-eval label { white-space: nowrap; }
.hd-pe-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

/* ============================================================================ */
/* 取材当日4段階・第三者著作物現場警告（取材実践タブ拡張、第50セッション追加） */
.ip-interview-stages, .ip-thirdparty-warnings { margin: 12px 0 20px; }
.ip-stage-row, .ip-tp-row {
  display: grid; grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.ip-stage-name strong, .ip-tp-name strong { font-size: 13px; color: #2a4a7a; }
.ip-tp-name strong { color: #b25; }
.ip-stage-name p, .ip-tp-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.ip-stage-eval, .ip-tp-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.ip-stage-eval label, .ip-tp-eval label { white-space: nowrap; }
.ip-stage-row textarea, .ip-tp-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

/* ============================================================================ */
/* 12質問4組合せパターン（ヒアリング設計タブ拡張、第49セッション追加） */
.hd-patterns { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
.hd-pattern-row {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 8px; align-items: start;
  padding: 8px 12px; border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; cursor: pointer;
}
.hd-pattern-row:hover { background: #f0f5fc; }
.hd-pattern-row input[type="checkbox"] { margin-top: 4px; }
.hd-pattern-body strong { font-size: 13px; color: #2a4a7a; display: block; }
.hd-pattern-body p { margin: 2px 0 0; font-size: 11px; color: #555; line-height: 1.5; }

/* ============================================================================ */
/* 失敗事例3類型（取材実践タブ拡張、第49セッション追加） */
.ip-failure-patterns { margin: 12px 0 20px; }
.ip-fail-row {
  display: grid; grid-template-columns: 1.6fr 1.4fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.ip-fail-name strong { font-size: 13px; color: #b25; }
.ip-fail-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.ip-fail-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.ip-fail-eval label { white-space: nowrap; }
.ip-fail-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

/* ============================================================================ */
/* 編集者チェック5軸（記事化WFタブ拡張、第49セッション追加） */
.aw-editor-checks { margin: 12px 0 20px; }
.aw-ec-row {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.aw-ec-name strong { font-size: 13px; color: #2a4a7a; }
.aw-ec-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.aw-ec-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.aw-ec-eval label { white-space: nowrap; }
.aw-ec-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}

/* ============================================================================ */
/* 現場対応8原則（取材実践タブ拡張、第48セッション追加） */
.ip-field-principles { margin: 12px 0 20px; }
.ip-fp-row {
  display: grid; grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 8px 16px; padding: 8px 12px; margin-bottom: 4px;
  border: 1px solid #e0e4ea; border-radius: 4px;
  background: #fafbfd; align-items: center;
}
.ip-fp-name strong { font-size: 13px; color: #2a4a7a; }
.ip-fp-name p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.4; }
.ip-fp-eval { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
.ip-fp-eval label { white-space: nowrap; }
.ip-fp-row textarea {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid #d0d8e0; border-radius: 3px; font-family: inherit;
}
.ip-fp-table tbody tr td:nth-child(2) { width: 100px; font-weight: 500; }

/* ============================================================================ */
/* GKGM構成チェッカー（記事化WFタブ拡張、第48セッション追加） */
.aw-gkgm { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.aw-gkgm label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: #2a4a7a; font-weight: 500;
}
.aw-gkgm textarea {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid #d0d8e0; border-radius: 3px; resize: vertical;
}
.aw-gkgm-result { margin: 8px 0 20px; }
.aw-gkgm-result.hidden { display: none; }
.aw-gkgm-table, .aw-gkgm-summary { border-collapse: collapse; width: 100%; font-size: 13px; }
.aw-gkgm-table th, .aw-gkgm-table td,
.aw-gkgm-summary th, .aw-gkgm-summary td {
  padding: 6px 10px; border: 1px solid #d8e0ea; text-align: left;
}
.aw-gkgm-table thead th, .aw-gkgm-summary thead th {
  background: #eef2f7; color: #344; font-weight: 600;
}
.aw-gkgm-table td:nth-child(2), .aw-gkgm-table td:nth-child(3),
.aw-gkgm-summary td:nth-child(2), .aw-gkgm-summary td:nth-child(3), .aw-gkgm-summary td:nth-child(4) {
  width: 90px; text-align: right; font-weight: 500;
}
.aw-gkgm-ok    { background: #e6f5ec; }
.aw-gkgm-short { background: #fff9e0; }
.aw-gkgm-over  { background: #ffe6e6; }
.aw-gkgm-empty { background: #f3f3f3; color: #888; }
.aw-gkgm-total { background: #f7f9fc; font-weight: 600; }

/* ============================================================================ */
/* レスポンシブ */
@media (max-width: 1024px) {
  .framework-flow { grid-template-columns: 1fr; }
  .framework-list { max-height: 300px; }
}
@media (max-width: 768px) {
  .swot-grid, .cross-swot-grid, .prompt-grid { grid-template-columns: 1fr; }
  main { padding: 16px; }
  header { padding: 16px 20px; }
  .tab-nav { padding: 0 16px; }
  .tab-btn { padding: 10px 14px; font-size: 13px; }
}

/* =============================================================== */
/* クラウド同期タブ（シナリオC ステージ3 v2、第90セッション）           */
/* =============================================================== */
.cs-card {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.cs-card h3 { margin: 0 0 6px 0; font-size: 16px; color: #2c4f6e; }
.cs-help { font-size: 13px; color: #555; margin: 0 0 12px 0; line-height: 1.6; }
.cs-help code {
  background: #eef2f5; padding: 1px 6px; border-radius: 3px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
}

.cs-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.cs-row > label {
  font-size: 13px; font-weight: 600; min-width: 110px;
}
.cs-row > input, .cs-row > select {
  flex: 1 1 280px; min-width: 220px;
  padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 4px;
}

.cs-status-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 6px; font-size: 13px;
}
.cs-status-label { font-weight: 600; }
.cs-status-pill {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; color: #fff;
}
.cs-status-unknown { background: #9aa5b1; }
.cs-status-ok      { background: #2e8b57; }
.cs-status-error   { background: #c0392b; }
.cs-status-pending { background: #d4a017; }
.cs-status-detail {
  font-size: 12px; color: #555; margin-top: 4px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  word-break: break-all;
}

.cs-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  margin: 8px 0 10px 0;
}
.cs-form-grid > label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; font-weight: 600; color: #444;
}
.cs-form-grid input, .cs-form-grid select, .cs-form-grid textarea {
  padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 4px;
  font-weight: normal;
}

.cs-details {
  margin-top: 10px;
  background: #fff; border: 1px dashed var(--border); border-radius: 6px;
  padding: 8px 14px;
}
.cs-details > summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: #2c4f6e;
  padding: 4px 0;
}
.cs-details[open] > summary { margin-bottom: 8px; border-bottom: 1px solid var(--border); }

.cs-log {
  background: #1e293b; color: #d5e0ec;
  border-radius: 6px; padding: 10px 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5;
  max-height: 260px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  margin: 0 0 8px 0;
}
.cs-log:empty::before {
  content: "（まだ操作ログはありません）"; color: #7a8a9a; font-style: italic;
}

@media (max-width: 768px) {
  .cs-form-grid { grid-template-columns: 1fr; }
  .cs-row > input, .cs-row > select { flex-basis: 100%; }
}

/* =============================================================== */
/* 自動同期インジケータ（v3、第91セッション）                          */
/* =============================================================== */
.sync-indicator {
  display: inline-block;
  margin-top: 6px; padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px; font-weight: 700;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  user-select: none; cursor: default;
}
.sync-idle     { background: #e2e8ef; color: #4a5560; }
.sync-dirty    { background: #fff3e0; color: #b06a00; border: 1px solid #f0c787; }
.sync-syncing  { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; animation: sync-pulse 1.2s ease-in-out infinite; }
.sync-clean    { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.sync-error    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sync-conflict { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.sync-offline  { background: #eceff1; color: #455a64; border: 1px solid #b0bec5; }

@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* 自動同期トグル（cloud-sync タブ ①） */
.cs-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.cs-toggle input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: #2c4f6e;
}

/* v4: 競合解決 modal */
.sync-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.sync-modal-card {
  background: #fff; border-radius: 8px;
  padding: 20px 24px; max-width: 520px; width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border-top: 4px solid #6a1b9a;
}
.sync-modal-card h3 {
  margin: 0 0 12px 0; color: #6a1b9a; font-size: 16px;
}
.sync-modal-card p {
  margin: 6px 0; font-size: 13px; line-height: 1.6;
}
.sync-modal-card code {
  background: #f3e5f5; padding: 2px 6px; border-radius: 3px;
  font-size: 12px;
}
.sync-modal-actions {
  display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap;
}
.sync-modal-actions button { flex: 1; min-width: 140px; padding: 8px 12px; }

/* v0.5.0: 認証エラーモーダル */
.auth-error-card {
  max-width: 520px;
  border-top-color: #c0392b;
}
.auth-error-card h3,
.auth-error-card .auth-error-title { color: #c0392b; }
.auth-error-message { margin: 6px 0; font-size: 13px; line-height: 1.6; }
.auth-error-detail { margin: 6px 0; font-size: 12px; color: #666; }
.auth-error-detail code {
  background: #fdecea; color: #c0392b; padding: 2px 6px;
  border-radius: 3px; font-size: 12px;
}

/* v0.5.0: navbar ログアウトリンク（本番のみ表示） */
.nav-logout-link {
  display: none; /* 既定は非表示、navbar.js が環境判定で表示制御 */
  margin-left: 8px; padding: 4px 10px;
  font-size: 12px; color: #2c4f6e;
  text-decoration: none; border: 1px solid #c8d0d8;
  border-radius: 4px; background: #fff;
  white-space: nowrap;
}
.nav-logout-link:hover {
  background: #f4f6f8; color: #1a3a52;
}
.nav-logout-link:focus-visible {
  outline: 2px solid #2c4f6e; outline-offset: 1px;
}

/* v8: ショートカット一覧モーダル */
.shortcut-help-card {
  max-width: 640px;
  border-top-color: #2c4f6e;
}
.shortcut-help-card h3 { color: #2c4f6e; }
.shortcut-help-table {
  width: 100%; border-collapse: collapse; margin: 8px 0 4px 0;
  font-size: 13px;
}
.shortcut-help-table th,
.shortcut-help-table td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.shortcut-help-table th {
  white-space: nowrap; width: 1%; font-weight: normal;
}
.shortcut-help-table tr:last-child th,
.shortcut-help-table tr:last-child td { border-bottom: none; }
.shortcut-help-table kbd {
  display: inline-block; min-width: 24px; padding: 2px 6px;
  background: #f4f6f8; border: 1px solid #c8d0d8;
  border-bottom-width: 2px; border-radius: 4px;
  font-family: 'Menlo', 'Consolas', monospace; font-size: 11px;
  color: #2c4f6e; text-align: center;
}

/* v8: audit-view 案件選択 selector */
#av-case-select {
  padding: 4px 8px; font-size: 13px; min-width: 280px;
  border: 1px solid #c8d0d8; border-radius: 4px;
}
#av-case-select:focus-visible {
  outline: 2px solid #2c4f6e; outline-offset: 1px;
}

/* 第104セッション 堅牢化第7弾 v0.3.6：audit-view 集計セクション */
.av-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px;
}
@media (max-width: 720px) {
  .av-summary-grid { grid-template-columns: 1fr; }
}
.av-summary-block {
  background: #fafbfc; border: 1px solid #e6eaee; border-radius: 6px;
  padding: 10px 12px;
}
.av-summary-block h4 {
  margin: 0 0 6px 0; font-size: 13px; color: #2c4f6e;
}
.av-summary-total {
  font-size: 14px; font-weight: bold; color: #2c4f6e; margin-bottom: 8px;
}
.av-summary-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.av-summary-table th,
.av-summary-table td {
  padding: 4px 6px; text-align: left; border-bottom: 1px solid #eee;
}
.av-summary-table th {
  background: #f3f5f7; font-weight: normal; color: #555;
}
.av-summary-table td:last-child {
  text-align: right; font-variant-numeric: tabular-nums; min-width: 50px;
}

/* ============================================================
   シナリオC ステージ3 v6：監査ログ表示 UI（audit-view）
   ============================================================ */
.av-status {
  margin-top: 8px; padding: 6px 10px; border-radius: 4px;
  background: #f1f3f5; color: #495057; font-size: 13px; min-height: 24px;
}
.av-status-ok { background: #d4edda; color: #155724; }
.av-status-error { background: #f8d7da; color: #721c24; }

.av-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 12px;
}
.av-filter-grid label { font-size: 13px; color: #495057; display: flex; flex-direction: column; gap: 2px; }
.av-filter-grid input, .av-filter-grid select {
  padding: 5px 8px; border: 1px solid #ced4da; border-radius: 3px; font-size: 13px;
}

.av-table-wrap { overflow-x: auto; max-height: 600px; overflow-y: auto; border: 1px solid #dee2e6; border-radius: 4px; }
.av-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.av-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #2c4f6e; color: #fff; padding: 6px 8px; text-align: left;
  font-weight: 600; white-space: nowrap;
}
.av-table tbody td {
  border-bottom: 1px solid #e9ecef; padding: 5px 8px; vertical-align: top;
}
.av-table tbody tr:hover { background: #f8f9fa; }
.av-c-id { font-family: ui-monospace, Menlo, monospace; color: #868e96; width: 60px; }
.av-c-at { font-family: ui-monospace, Menlo, monospace; white-space: nowrap; width: 160px; }
.av-c-user { white-space: nowrap; }
.av-c-module { font-family: ui-monospace, Menlo, monospace; color: #495057; white-space: nowrap; }
.av-c-details code {
  font-size: 11px; word-break: break-all; white-space: pre-wrap;
  background: #f8f9fa; padding: 1px 4px; border-radius: 2px;
}
.av-empty { text-align: center; color: #868e96; padding: 18px; font-style: italic; }

.av-action {
  display: inline-block; padding: 2px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: #e9ecef; color: #495057;
}
.av-action-create { background: #d4edda; color: #155724; }
.av-action-update { background: #d1ecf1; color: #0c5460; }
.av-action-delete { background: #f8d7da; color: #721c24; }
.av-action-export { background: #fff3cd; color: #856404; }
.av-action-access { background: #e2d5f1; color: #4a148c; }

/* ============================================================
   シナリオC ステージ3 v7：グローバル dirty バッジ（ナビバー右端）
   ============================================================ */
.nav-dirty-badge {
  display: inline-block;
  margin-left: auto;
  align-self: center;
  padding: 4px 10px;
  background: #ff7b00;
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  animation: dirty-pulse 1.6s ease-in-out infinite alternate;
}
.nav-dirty-badge.hidden { display: none; }
@keyframes dirty-pulse {
  from { box-shadow: 0 1px 2px rgba(255,123,0,0.3); }
  to   { box-shadow: 0 1px 6px rgba(255,123,0,0.6); }
}

/* nav.tab-nav は既存 flex/grid 構造のはず。バッジを右端に置くため min-width 確保 */
nav.tab-nav { align-items: stretch; }

/* キーボードフォーカスの視認性向上（v7） */
.tab-cat-btn:focus-visible,
.tab-cat-menu .tab-btn:focus-visible {
  outline: 2px solid #2c4f6e;
  outline-offset: 1px;
}
