<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja">
<head>
  <meta charset="UTF-8" />
  <title>{{title}}</title>
  <style>
    @page { size: A4 portrait; margin: 18mm 16mm 16mm 16mm; }
    body { font-family: "Noto Serif CJK JP", "Yu Mincho", "MS PMincho", serif; color: #17212b; font-size: 11pt; line-height: 1.7; }
    .frame { border: 1.4mm double #2a2a2a; padding: 8mm; }
    .title { text-align: center; font-size: 20pt; letter-spacing: 0.4em; font-weight: 700;
             border-bottom: 0.4mm solid #2a2a2a; padding-bottom: 4mm; }
    .meta { display: table; width: 100%; font-size: 10pt; margin-top: 4mm; }
    .meta .l { display: table-cell; }
    .meta .r { display: table-cell; text-align: right; }
    table.cert { width: 100%; border-collapse: collapse; margin-top: 6mm; font-size: 11pt; }
    table.cert th, table.cert td { border: 0.25mm solid #4a4a4a; padding: 3mm 4mm; vertical-align: top; }
    table.cert th { width: 32mm; background-color: #f1ebd8; font-weight: 600; text-align: left; }
    .caption { font-weight: 600; font-size: 11pt; margin-top: 4mm; }
    .footer { margin-top: 10mm; display: table; width: 100%; }
    .footer .date { display: table-cell; font-size: 11pt; vertical-align: bottom; }
    .footer .seal { display: table-cell; text-align: right; font-size: 12pt; vertical-align: bottom; }
    .footer .seal .mayor { border: 0.6mm solid #b3261e; color: #b3261e;
                           padding: 3mm 4mm; display: inline-block; font-weight: 700; }
    .verify { margin-top: 6mm; font-size: 9pt; color: #444; }
    .masked { color: #888; letter-spacing: 0.1em; }
  </style>
</head>
<body>
  <div class="frame">
    <div class="title">{{title}}</div>

    <div class="meta">
      <div class="l">整理番号: {{issueId}}</div>
      <div class="r">様式: {{formId}}</div>
    </div>

    <table class="cert">
      <tbody>
        <tr><th>本籍・筆頭者</th><td><span class="masked">（標準で省略）</span></td></tr>
        <tr><th>住所</th><td>{{addressText}}</td></tr>
        <tr><th>世帯主</th><td>{{householdHead}}</td></tr>
      </tbody>
    </table>

    <div class="caption">世帯員</div>
    <table class="cert">
      <thead>
        <tr>
          <th>氏 名</th><th>生年月日</th><th>性別</th><th>続柄</th><th>住定日</th>
          <th>個人番号</th><th>住民票コード</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>{{name}}<br/><span style="font-size:9pt;color:#555">{{nameKana}}</span></td>
          <td>{{birthDate}}</td>
          <td style="text-align:center">{{sex}}</td>
          <td>{{relationToHead}}</td>
          <td>{{movedInDate}}</td>
          <td>{{myNumber}}</td>
          <td>{{juminCode}}</td>
        </tr>
      </tbody>
    </table>

    <div class="footer">
      <div class="date">
        <div>発行年月日: {{issueDate}}</div>
        <div>発行: {{municipality}} 住民課</div>
        <div>用途: {{usageText}}</div>
      </div>
      <div class="seal">
        <div>{{municipality}}長 {{mayorName}}</div>
        <div class="mayor">公 印</div>
      </div>
    </div>

    <div class="verify">
      本証明書は改ざん防止コード付です。<br />
      検証URL: /api/v1/verify/{{verifyToken}}
    </div>
  </div>
</body>
</html>
