<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 400" width="760" height="400">
  <defs>
    <style>text { font-family: 'Noto Sans JP','Hiragino Sans',sans-serif; }</style>
  </defs>
  <rect width="760" height="400" rx="12" fill="#F8FAFC"/>
  <text x="380" y="34" text-anchor="middle" font-size="15" font-weight="700" fill="#1E293B">CVP分析——損益分岐点グラフと計算公式</text>

  <!-- Graph area -->
  <rect x="50" y="50" width="420" height="290" rx="8" fill="#fff" stroke="#E2E8F0" stroke-width="1.5"/>

  <!-- Axes -->
  <!-- Y axis -->
  <line x1="90" y1="60" x2="90" y2="330" stroke="#374151" stroke-width="2"/>
  <polygon points="90,56 85,68 95,68" fill="#374151"/>
  <text x="88" y="52" text-anchor="end" font-size="10" fill="#374151">金額</text>
  <!-- X axis -->
  <line x1="90" y1="330" x2="460" y2="330" stroke="#374151" stroke-width="2"/>
  <polygon points="464,330 452,325 452,335" fill="#374151"/>
  <text x="468" y="334" font-size="10" fill="#374151">売上高</text>

  <!-- Origin label -->
  <text x="84" y="338" text-anchor="end" font-size="10" fill="#374151">0</text>

  <!-- Fixed cost line (horizontal) -->
  <line x1="90" y1="260" x2="460" y2="260" stroke="#94A3B8" stroke-width="1.5" stroke-dasharray="6,4"/>
  <text x="464" y="264" font-size="10" fill="#94A3B8">固定費</text>
  <!-- Fixed cost label on Y axis -->
  <line x1="86" y1="260" x2="94" y2="260" stroke="#374151" stroke-width="1.5"/>
  <text x="84" y="264" text-anchor="end" font-size="10" fill="#64748B">固定費</text>

  <!-- Total cost line: starts at (90,260) rises to (460,110) -->
  <line x1="90" y1="260" x2="460" y2="110" stroke="#F97316" stroke-width="2.5"/>
  <text x="464" y="108" font-size="10.5" fill="#F97316">総費用</text>
  <text x="464" y="120" font-size="9" fill="#F97316">（変動費＋固定費）</text>

  <!-- Sales revenue line: starts at (90,330) rises to (460,80) -->
  <line x1="90" y1="330" x2="460" y2="80" stroke="#3B82F6" stroke-width="2.5"/>
  <text x="464" y="78" font-size="10.5" fill="#3B82F6">売上高</text>

  <!-- Break-even point -->
  <!-- Intersection roughly at x=270, y=215 (estimated) -->
  <!-- For visualization: fixed=150, variable rate=0.6, so BEP = fixed/(1-0.6) = 375 units -->
  <!-- Scale: x from 90 to 460 = 370px = 500 units, y from 330 to 60 = 270px = 500 units -->
  <!-- BEP at 375 units: x = 90 + 370*375/500 = 90+278 = 368; sales = 375; cost = 150+0.6*375=375; y = 330 - 270*375/500 = 330-203 = 127 -->
  <circle cx="368" cy="127" r="8" fill="none" stroke="#22C55E" stroke-width="2.5"/>
  <circle cx="368" cy="127" r="3" fill="#22C55E"/>

  <!-- BEP vertical dashed -->
  <line x1="368" y1="127" x2="368" y2="330" stroke="#22C55E" stroke-width="1.5" stroke-dasharray="4,3"/>
  <text x="368" y="345" text-anchor="middle" font-size="10" fill="#22C55E">損益分岐点</text>
  <text x="368" y="357" text-anchor="middle" font-size="9" fill="#22C55E">売上高</text>

  <!-- BEP horizontal dashed -->
  <line x1="90" y1="127" x2="368" y2="127" stroke="#22C55E" stroke-width="1.5" stroke-dasharray="4,3"/>
  <line x1="86" y1="127" x2="94" y2="127" stroke="#374151" stroke-width="1.5"/>

  <!-- Loss area label -->
  <text x="230" y="200" text-anchor="middle" font-size="11" fill="#EF4444">← 赤字ゾーン</text>
  <text x="230" y="216" text-anchor="middle" font-size="10" fill="#EF4444">（費用＞売上）</text>

  <!-- Profit area label -->
  <text x="420" y="100" text-anchor="middle" font-size="11" fill="#22C55E">黒字ゾーン →</text>
  <text x="420" y="116" text-anchor="middle" font-size="10" fill="#22C55E">（売上＞費用）</text>

  <!-- margin of safety arrow -->
  <line x1="368" y1="320" x2="460" y2="320" stroke="#7C3AED" stroke-width="1.5"/>
  <polygon points="460,320 452,316 452,324" fill="#7C3AED"/>
  <text x="414" y="314" text-anchor="middle" font-size="9.5" fill="#7C3AED">安全余裕</text>

  <!-- Right panel: formulas -->
  <rect x="494" y="50" width="236" height="290" rx="8" fill="#F0FDF4" stroke="#86EFAC" stroke-width="1.5"/>
  <text x="612" y="72" text-anchor="middle" font-size="12" font-weight="700" fill="#166534">CVP分析の公式まとめ</text>
  <line x1="504" y1="80" x2="720" y2="80" stroke="#86EFAC" stroke-width="1"/>

  <!-- Formula 1 -->
  <text x="504" y="100" font-size="10.5" font-weight="700" fill="#166534">① 貢献利益</text>
  <rect x="504" y="106" width="216" height="28" rx="5" fill="#DCFCE7"/>
  <text x="612" y="124" text-anchor="middle" font-size="10.5" fill="#15803D">売上高 − 変動費 ＝ 貢献利益</text>

  <!-- Formula 2 -->
  <text x="504" y="148" font-size="10.5" font-weight="700" fill="#166534">② 損益分岐点売上高</text>
  <rect x="504" y="154" width="216" height="36" rx="5" fill="#DCFCE7"/>
  <text x="612" y="170" text-anchor="middle" font-size="10.5" fill="#15803D">固定費 ÷ 貢献利益率</text>
  <text x="612" y="184" text-anchor="middle" font-size="9.5" fill="#64748B">貢献利益率 ＝ 貢献利益 ÷ 売上高</text>

  <!-- Formula 3 -->
  <text x="504" y="208" font-size="10.5" font-weight="700" fill="#166534">③ 安全余裕率</text>
  <rect x="504" y="214" width="216" height="36" rx="5" fill="#DCFCE7"/>
  <text x="612" y="230" text-anchor="middle" font-size="10.5" fill="#15803D">（実際売上−BEP売上）</text>
  <text x="612" y="244" text-anchor="middle" font-size="10.5" fill="#15803D">÷ 実際売上高 × 100%</text>

  <!-- Formula 4 -->
  <text x="504" y="268" font-size="10.5" font-weight="700" fill="#166534">④ 目標利益達成の売上高</text>
  <rect x="504" y="274" width="216" height="36" rx="5" fill="#DCFCE7"/>
  <text x="612" y="290" text-anchor="middle" font-size="10.5" fill="#15803D">（固定費 ＋ 目標利益）</text>
  <text x="612" y="304" text-anchor="middle" font-size="10.5" fill="#15803D">÷ 貢献利益率</text>

  <!-- Bottom note -->
  <rect x="50" y="352" width="680" height="36" rx="8" fill="#F1F5F9" stroke="#CBD5E1" stroke-width="1"/>
  <text x="380" y="368" text-anchor="middle" font-size="11" fill="#475569">💡 変動費率 ＋ 貢献利益率 ＝ 1（100%）になる。どちらか一方が分かれば計算できる。</text>
  <text x="380" y="384" text-anchor="middle" font-size="10.5" fill="#475569">安全余裕率が高いほど「BEPから余裕がある＝経営が安定している」</text>
</svg>
