<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 360" width="760" height="360">
  <defs>
    <style>
      text { font-family: 'Noto Sans JP','Hiragino Sans',sans-serif; }
    </style>
  </defs>
  <rect width="760" height="360" rx="12" fill="#F8FAFC"/>
  <text x="380" y="34" text-anchor="middle" font-size="15" font-weight="700" fill="#1E293B">仕訳日計表の集計構造——伝票から元帳まで</text>

  <!-- Left: 伝票群 -->
  <rect x="30" y="58" width="170" height="230" rx="10" fill="#FFF7ED" stroke="#FDB97D" stroke-width="2"/>
  <text x="115" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#C2410C">伝票</text>
  <text x="115" y="95" text-anchor="middle" font-size="10" fill="#92400E">（その日に起票）</text>

  <rect x="50" y="106" width="130" height="36" rx="6" fill="#FFEDD5"/>
  <text x="115" y="122" text-anchor="middle" font-size="11" font-weight="700" fill="#C2410C">入金伝票</text>
  <text x="115" y="136" text-anchor="middle" font-size="10" fill="#9A3412">現金受取の取引</text>

  <rect x="50" y="150" width="130" height="36" rx="6" fill="#FFEDD5"/>
  <text x="115" y="166" text-anchor="middle" font-size="11" font-weight="700" fill="#C2410C">出金伝票</text>
  <text x="115" y="180" text-anchor="middle" font-size="10" fill="#9A3412">現金支払の取引</text>

  <rect x="50" y="194" width="130" height="36" rx="6" fill="#FFEDD5"/>
  <text x="115" y="210" text-anchor="middle" font-size="11" font-weight="700" fill="#C2410C">振替伝票</text>
  <text x="115" y="224" text-anchor="middle" font-size="10" fill="#9A3412">現金以外の取引</text>

  <text x="115" y="268" text-anchor="middle" font-size="18" fill="#F97316">📄📄📄</text>
  <text x="115" y="283" text-anchor="middle" font-size="10" fill="#92400E">1日に多数の伝票</text>

  <!-- Arrow 1 -->
  <polygon points="230,173 216,163 216,183" fill="#64748B"/>
  <line x1="200" y1="173" x2="230" y2="173" stroke="#64748B" stroke-width="2"/>
  <text x="215" y="160" text-anchor="middle" font-size="9" fill="#64748B">集計</text>

  <!-- Center: 仕訳日計表 -->
  <rect x="234" y="58" width="290" height="230" rx="10" fill="#EFF6FF" stroke="#93C5FD" stroke-width="2"/>
  <text x="379" y="78" text-anchor="middle" font-size="13" font-weight="700" fill="#1E40AF">仕訳日計表</text>
  <text x="379" y="95" text-anchor="middle" font-size="10" fill="#3B82F6">（1日1枚・勘定科目別に集計）</text>

  <!-- mini table -->
  <rect x="254" y="106" width="250" height="164" rx="6" fill="#fff" stroke="#BFDBFE" stroke-width="1"/>
  <!-- header -->
  <rect x="254" y="106" width="250" height="24" rx="6" fill="#DBEAFE"/>
  <text x="307" y="123" text-anchor="middle" font-size="10" font-weight="700" fill="#1D4ED8">借方</text>
  <text x="379" y="123" text-anchor="middle" font-size="10" font-weight="700" fill="#1D4ED8">勘定科目</text>
  <text x="451" y="123" text-anchor="middle" font-size="10" font-weight="700" fill="#1D4ED8">貸方</text>
  <!-- rows -->
  <line x1="254" y1="130" x2="504" y2="130" stroke="#BFDBFE" stroke-width="1"/>
  <text x="307" y="145" text-anchor="middle" font-size="10" fill="#374151">¥50,000</text>
  <text x="379" y="145" text-anchor="middle" font-size="10" fill="#374151">現　金</text>
  <text x="451" y="145" text-anchor="middle" font-size="10" fill="#374151">¥30,000</text>
  <line x1="254" y1="152" x2="504" y2="152" stroke="#BFDBFE" stroke-width="1"/>
  <text x="307" y="167" text-anchor="middle" font-size="10" fill="#374151">¥30,000</text>
  <text x="379" y="167" text-anchor="middle" font-size="10" fill="#374151">売掛金</text>
  <text x="451" y="167" text-anchor="middle" font-size="10" fill="#374151">—</text>
  <line x1="254" y1="174" x2="504" y2="174" stroke="#BFDBFE" stroke-width="1"/>
  <text x="307" y="189" text-anchor="middle" font-size="10" fill="#374151">—</text>
  <text x="379" y="189" text-anchor="middle" font-size="10" fill="#374151">売　上</text>
  <text x="451" y="189" text-anchor="middle" font-size="10" fill="#374151">¥50,000</text>
  <line x1="254" y1="196" x2="504" y2="196" stroke="#BFDBFE" stroke-width="1"/>
  <text x="307" y="211" text-anchor="middle" font-size="10" fill="#374151">—</text>
  <text x="379" y="211" text-anchor="middle" font-size="10" fill="#374151">買掛金</text>
  <text x="451" y="211" text-anchor="middle" font-size="10" fill="#374151">¥30,000</text>
  <line x1="254" y1="218" x2="504" y2="218" stroke="#BFDBFE" stroke-width="1"/>
  <!-- total -->
  <rect x="254" y="242" width="250" height="28" rx="0" fill="#DBEAFE"/>
  <text x="307" y="261" text-anchor="middle" font-size="10.5" font-weight="700" fill="#1D4ED8">¥80,000</text>
  <text x="379" y="261" text-anchor="middle" font-size="10" font-weight="700" fill="#1D4ED8">合　計</text>
  <text x="451" y="261" text-anchor="middle" font-size="10.5" font-weight="700" fill="#1D4ED8">¥80,000</text>

  <!-- col lines in table -->
  <line x1="340" y1="106" x2="340" y2="270" stroke="#BFDBFE" stroke-width="1"/>
  <line x1="420" y1="106" x2="420" y2="270" stroke="#BFDBFE" stroke-width="1"/>

  <!-- Arrow 2 -->
  <polygon points="556,173 542,163 542,183" fill="#64748B"/>
  <line x1="524" y1="173" x2="556" y2="173" stroke="#64748B" stroke-width="2"/>
  <text x="540" y="160" text-anchor="middle" font-size="9" fill="#64748B">転記</text>

  <!-- Right: 元帳 -->
  <rect x="560" y="58" width="170" height="230" rx="10" fill="#F0FDF4" stroke="#86EFAC" stroke-width="2"/>
  <text x="645" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#166534">各種元帳</text>
  <text x="645" y="95" text-anchor="middle" font-size="10" fill="#15803D">（科目ごとに転記）</text>

  <rect x="580" y="106" width="130" height="36" rx="6" fill="#DCFCE7"/>
  <text x="645" y="122" text-anchor="middle" font-size="11" font-weight="700" fill="#15803D">現金出納帳</text>
  <text x="645" y="136" text-anchor="middle" font-size="10" fill="#166534">現金の収支記録</text>

  <rect x="580" y="150" width="130" height="36" rx="6" fill="#DCFCE7"/>
  <text x="645" y="166" text-anchor="middle" font-size="11" font-weight="700" fill="#15803D">得意先元帳</text>
  <text x="645" y="180" text-anchor="middle" font-size="10" fill="#166534">売掛金の得意先別</text>

  <rect x="580" y="194" width="130" height="36" rx="6" fill="#DCFCE7"/>
  <text x="645" y="210" text-anchor="middle" font-size="11" font-weight="700" fill="#15803D">仕入先元帳</text>
  <text x="645" y="224" text-anchor="middle" font-size="10" fill="#166534">買掛金の仕入先別</text>

  <text x="645" y="268" text-anchor="middle" font-size="28" fill="#22C55E">📚</text>

  <!-- bottom note -->
  <rect x="30" y="302" width="700" height="44" rx="8" fill="#F1F5F9" stroke="#CBD5E1" stroke-width="1"/>
  <text x="380" y="320" text-anchor="middle" font-size="11" fill="#475569">💡 借方合計 ＝ 貸方合計 にならない場合 → 仕訳の転記ミスや記入漏れが発見できる（検証機能）</text>
  <text x="380" y="338" text-anchor="middle" font-size="11" fill="#475569">仕訳日計表は「1日1枚」作成し、翌日に元帳へ転記するのが原則</text>
</svg>
