/* =========================================================
   A4 の交通費申請書（2026-11-18）。部品は pages/expense-sheet.js。
   キャッチアプリ（画面＝スマホの幅に合わせて縮む）と、経理管理・催事管理（印刷＝A4 縦）で使う。
   ⚠ 印刷のときは #exs-print だけを出す（html.exs-printing の間だけ。ほかの印刷には効かない）。
   ========================================================= */
.exs-page {
  box-sizing: border-box; width: 100%; max-width: 190mm; margin: 0 auto 16px; padding: 14px 14px 16px;
  background: #fff; color: #222; border: 1px solid #d6d6d6; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  font-size: 12px; line-height: 1.45; overflow-wrap: anywhere;
}
.exs-head { position: relative; text-align: center; margin: 2px 0 10px; }
.exs-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 4px; }
/* ⚠ top を負にしない：印刷で前のページの下に2pxはみ出して、線が出た（2026-11-18） */
.exs-state { position: absolute; right: 0; top: 0; padding: 1px 8px; border: 2px solid #b8860b; border-radius: 4px; color: #8a6300; font-weight: 700; font-size: 12px; }
.exs-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 0 0 8px; }
.exs-who { min-width: 0; }
.exs-line { margin: 2px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.exs-line b { font-size: 13px; }
.exs-k { color: #555; }
.exs-no { flex: none; margin: 0; font-size: 13px; }
.exs-no b { display: inline-block; min-width: 2.2em; margin-left: 4px; border-bottom: 1px solid #222; text-align: center; }
.exs-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.exs-table th, .exs-table td { border: 1px solid #444; padding: 3px 4px; vertical-align: middle; word-break: break-all; }
.exs-table thead th { background: #f2f2f2; font-weight: 700; font-size: 11.5px; text-align: center; }
.exs-table tbody td { height: 26px; font-size: 11px; }
.exs-w-m { width: 6%; } .exs-w-d { width: 6%; } .exs-w-p { width: 17%; } .exs-w-f { width: 20%; } .exs-w-t { width: 4%; } .exs-w-l { width: 11%; } .exs-w-a { width: 16%; }
.exs-table .exs-tilde { text-align: center; color: #666; padding-left: 0; padding-right: 0; }
.exs-empty .exs-tilde { color: #bbb; }
.exs-c { text-align: center; }
.exs-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exs-total-k { text-align: right; padding-right: 10px !important; letter-spacing: .3em; background: #fafafa; }
.exs-total { font-weight: 700; font-size: 12.5px; }
.exs-total-note { font-weight: 400; font-size: 10.5px; white-space: normal; }
.exs-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 10px; }
.exs-notes { min-width: 0; font-size: 10.5px; color: #555; }
.exs-notes p { margin: 2px 0; }
.exs-insp { flex: none; border-collapse: collapse; }
.exs-insp th, .exs-insp td { border: 1px solid #444; text-align: center; }
.exs-insp th { font-size: 11px; font-weight: 700; padding: 2px 10px; background: #f2f2f2; }
.exs-insp td { width: 64px; height: 64px; padding: 2px; vertical-align: middle; }
.exs-insp-at { display: block; font-size: 9px; color: #555; margin-top: 1px; }
.exs-seal {
  display: inline-flex; flex-direction: row-reverse; align-items: center; justify-content: center; box-sizing: border-box; flex: none;
  width: 40px; height: 40px; border: 2px solid #c0392b; border-radius: 50%; color: #c0392b; font-weight: 700; line-height: 1; overflow: hidden;
}
.exs-seal__col { display: flex; flex-direction: column; align-items: center; }
.exs-seal i { display: block; font-style: normal; line-height: 1.02; }
.exs-seal--n1 { font-size: 18px; } .exs-seal--n2 { font-size: 13px; } .exs-seal--n3 { font-size: 9.5px; } .exs-seal--n4 { font-size: 10px; }
.exs-seal--me { margin-left: 8px; }
.exs-seal--insp { width: 46px; height: 46px; }
.exs-seal--empty { border-style: dashed; border-color: #ccc; }
.exs-none { color: #555; }
#exs-print { display: none; }

/* スマホの狭い幅（アプリ）：字を少し小さく、余白を詰める（横にはみ出さない） */
@media (max-width: 480px) {
  .exs-page { padding: 10px 8px 12px; font-size: 11px; }
  .exs-title { font-size: 15px; letter-spacing: .02em; }
  .exs-state { position: static; display: inline-block; margin-top: 4px; }
  .exs-table th, .exs-table td { padding: 2px 2px; }
  .exs-table thead th { font-size: 10px; }
  .exs-table tbody td { font-size: 9.5px; height: 22px; }
  .exs-w-p { width: 17%; } .exs-w-f { width: 16%; } .exs-w-l { width: 14%; } .exs-w-a { width: 18%; }
  .exs-table thead th { white-space: nowrap; letter-spacing: -.02em; }
  .exs-total { font-size: 11px; }
  .exs-seal { width: 34px; height: 34px; }
  .exs-insp td { width: 54px; height: 54px; }
}

/* 印刷（A4 縦）。印刷しているあいだだけ、置き場（#exs-print）のほかは隠す */
@page exsheet { size: A4 portrait; margin: 12mm 12mm; }
@media print {
  html.exs-printing, html.exs-printing body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  html.exs-printing body > *:not(#exs-print) { display: none !important; }
  html.exs-printing #exs-print { display: block !important; }
  #exs-print .exs-page {
    page: exsheet; break-after: page; break-inside: avoid; width: 186mm; max-width: none; margin: 0 auto; padding: 0;
    border: none; border-radius: 0; box-shadow: none; font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #exs-print .exs-page:last-child { break-after: auto; }
  #exs-print .exs-head { margin: 0 0 7mm; }
  #exs-print .exs-title { font-size: 17pt; }
  #exs-print .exs-state { font-size: 10pt; }
  #exs-print .exs-meta { margin-bottom: 5mm; }
  #exs-print .exs-line b { font-size: 12pt; }
  #exs-print .exs-no { font-size: 12pt; }
  #exs-print .exs-table thead th { font-size: 10pt; padding: 1.5mm 1mm; }
  #exs-print .exs-table tbody td { height: 10mm; font-size: 9.5pt; padding: .8mm 1.2mm; }
  #exs-print .exs-table tfoot th, #exs-print .exs-table tfoot td { height: 10mm; }
  #exs-print .exs-total { font-size: 11pt; }
  #exs-print .exs-total-note { font-size: 9pt; }
  #exs-print .exs-foot { margin-top: 6mm; }
  #exs-print .exs-notes { font-size: 9pt; }
  #exs-print .exs-seal { width: 13mm; height: 13mm; border-width: .5mm; }
  #exs-print .exs-seal--n1 { font-size: 16pt; } #exs-print .exs-seal--n2 { font-size: 11pt; } #exs-print .exs-seal--n3 { font-size: 8pt; } #exs-print .exs-seal--n4 { font-size: 8.5pt; }
  #exs-print .exs-seal--insp { width: 15mm; height: 15mm; }
  #exs-print .exs-insp th { font-size: 9.5pt; }
  #exs-print .exs-insp td { width: 22mm; height: 22mm; }
  #exs-print .exs-insp-at { font-size: 7.5pt; }
}
