  @media print{
    @page{size:A4 portrait;margin:0;}
    .content{padding:12mm 10mm 10mm !important;}

    /* 画面用の全高レイアウトを解除する（空白ページの原因） */
    html,body{background:#fff !important;height:auto !important;min-height:0 !important;
      margin:0 !important;padding:0 !important;overflow:visible !important;}
    #app{display:block !important;min-height:0 !important;height:auto !important;}
    main{flex:none !important;padding:0 !important;min-height:0 !important;overflow:visible !important;}
    .content{max-width:none !important;}
    #login{display:none !important;}

    aside,header.top,nav.bottom,.no-print,.pg-head,.sub,#wl-sum,#wl-err,#iv-err,.iv-tabs,#iv-list,
    #sh-brush,#sh-err,#sl-err{display:none !important;}

    /* ---- レターヘッド ---- */
    .print-head{display:block;margin:0 0 12px;color:#111;}
    .ph-bar{display:flex;align-items:center;gap:10px;
      border-bottom:2px solid #1b2a41;padding-bottom:8px;}
    .ph-logo{width:32px;height:auto;}
    .ph-co{font-size:14px;font-weight:700;letter-spacing:.05em;}

    .ph-title{font-size:19px;font-weight:700;text-align:center;letter-spacing:.14em;
      margin:14px 0 12px;color:#1b2a41;}

    .ph-meta{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:7px;}
    .ph-fields{display:flex;gap:22px;font-size:11px;}
    .ph-fields span{display:inline-flex;align-items:baseline;gap:7px;}
    .ph-fields b{font-size:8.5px;font-weight:700;color:#fff;background:#1b2a41;
      padding:2px 6px;border-radius:2px;letter-spacing:.06em;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .ph-sum{font-size:11px;font-weight:700;border:1px solid #1b2a41;padding:3px 10px;white-space:nowrap;}

    /* ---- 明細表 ---- */
    .wl-grid .pr{display:block;font-style:normal;font-size:11.5px;color:#000;
      white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

    .list{border:1px solid #1b2a41;border-radius:0;overflow:visible !important;}
    .wl-grid .row{
      grid-template-columns:56px 1fr 60px 60px 60px;
      gap:6px;padding:1px 10px;border-top:1px solid #d5d9e0;
      font-size:11.5px;line-height:2.05;min-height:0;
      break-inside:avoid;page-break-inside:avoid;
    }
    .wl-grid .row:first-child{border-top:none;}
    .wl-grid .row.hd{background:#1b2a41 !important;color:#fff !important;
      font-size:9px;font-weight:700;line-height:2;letter-spacing:.08em;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .wl-grid .c-o{display:none;}
    .wl-grid .c-d small{font-size:9.5px;color:#666;}
    .wl-grid .c-r,.wl-grid .off-t{font-size:11.5px;}
    .wl-grid .off-t{color:#777;}
    .wl-grid .ov{font-size:8.5px;}

    .wl-grid .row.sat,.wl-grid .row.sun,.wl-grid .row.isoff{
      -webkit-print-color-adjust:exact;print-color-adjust:exact;
    }
    .row:hover{background:none !important;}


    /* ---------- シフト表（印刷） ---------- */
    .shwrap{overflow:visible !important;border:1px solid #16243d !important;border-radius:0 !important;
      max-height:none !important;min-height:0 !important;}
    .shtbl thead th,.shtbl th.nm{position:static !important;box-shadow:none !important;}
    .shtbl thead th{background:#16243d !important;color:#fff !important;font-size:8px;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .shtbl thead th small{color:rgba(255,255,255,.65) !important;}
    .shtbl th.nm{background:#f2f4f7 !important;font-size:9.5px;min-width:70px;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .shtbl thead th.nm{background:#16243d !important;color:#fff !important;}
    .sc{height:20px;font-size:7.5px;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .dot{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .sc.set em{font-size:7.5px;} .sc.set small{font-size:6px;}
    .shtbl .tt,.shtbl tr.ft th,.shtbl tr.ft td{background:#f2f4f7 !important;font-size:9px;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .so-row{grid-template-columns:56px 1fr 60px 60px 60px !important;
      padding:1px 10px !important;font-size:11.5px !important;line-height:2.05 !important;}
    .ev-row{grid-template-columns:64px 1.4fr 1fr 88px 62px 62px 1.4fr !important;
      font-size:10px !important;padding:5px 8px !important;}
    .rk{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .cal{border:1px solid #16243d !important;}
    .cal-h div{font-size:9px;padding:4px 0;}
    .cd{min-height:76px;padding:3px;}
    .cd-h span{font-size:10px;}
    .ev-chip{padding:2px 4px;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .ev-chip em{font-size:9px;} .ev-chip small{font-size:8px;}
    .cd.sat,.cd.sun{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .ev-row.hd{background:#16243d !important;color:#fff !important;font-size:9px !important;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .fill{font-size:10px !important;padding:1px 6px !important;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .nm-l em{font-size:9.5px !important;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    /* ---------- 請求書（印刷） ---------- */
    .ivform{display:none !important;}
    .paper{display:block !important;color:#111827;
      margin:-12mm -10mm;              /* 本文用の余白を打ち消して全幅に */
      font-family:'Hiragino Kaku Gothic ProN','Hiragino Sans','Noto Sans JP','Yu Gothic',Meiryo,sans-serif;}

    /* 上部の帯 */
    .band{background:#16243d !important;color:#fff !important;
      display:flex;align-items:center;justify-content:space-between;
      padding:7mm 10mm;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .bd-l{display:flex;align-items:center;gap:10px;}
    .bd-logo{width:34px;height:auto;}
    .bd-co{font-size:20px;font-weight:700;letter-spacing:.03em;}
    .bd-r{font-size:11px;letter-spacing:.28em;font-weight:500;}

    .body{padding:0 10mm 8mm;}

    /* 請求NO / 請求日 */
    .meta{display:flex;border-bottom:1px solid #c8a45c;padding:7px 0 9px;margin-bottom:11px;}
    .mt{flex:1;padding-left:14px;border-left:1px solid #dfe3ea;}
    .mt:first-child{border-left:none;padding-left:0;}
    .mt span{display:block;font-size:9px;color:#6b7280;font-weight:600;letter-spacing:.06em;margin-bottom:3px;}
    .mt b{font-size:13.5px;font-weight:600;color:#111827;letter-spacing:.02em;}

    /* 請求先 / 発行元 */
    .parties{display:flex;justify-content:space-between;gap:20px;margin-bottom:13px;}
    .pt-to{flex:1;min-width:0;}
    .pt-from{width:270px;flex-shrink:0;position:relative;}
    .lbl{font-size:9px;color:#6b7280;font-weight:600;letter-spacing:.06em;margin-bottom:6px;}
    .lbl.r{text-align:right;}
    .to-name{font-size:15px;font-weight:700;margin-bottom:7px;letter-spacing:.02em;color:#111827;}
    .pl{font-size:10.5px;line-height:1.95;color:#1f2937;}
    .fr-name{font-size:15px;font-weight:700;color:#16243d;letter-spacing:.02em;}
    .fr-pr{font-size:11.5px;font-weight:600;margin-top:3px;color:#1f2937;}
    .fr-blk{margin-top:8px;}
    .fr-seal{position:absolute;right:0;bottom:0;width:52px;height:52px;object-fit:contain;}

    /* 支払期限 / ご請求金額 */
    .hilite{display:flex;border:1px solid #16243d;margin-bottom:11px;}
    .hl{flex:1;padding:7px 14px;border-left:1px solid #16243d;}
    .hl:first-child{border-left:none;}
    .hl span{display:block;font-size:9px;color:#4b5563;font-weight:600;margin-bottom:3px;letter-spacing:.04em;}
    .hl b{font-size:15px;font-weight:700;color:#111827;}
    .hl.big{flex:1.3;}
    .hl.big b{font-size:21px;font-weight:700;color:#16243d;letter-spacing:.01em;}

    .sbj-l{font-size:11px;font-weight:600;color:#111827;margin-bottom:9px;display:flex;gap:8px;align-items:baseline;}
    .sbj-l span{font-size:9px;color:#6b7280;font-weight:600;letter-spacing:.06em;}

    /* 明細表 */
    .iv-tbl{width:100%;border-collapse:collapse;font-size:11px;}
    .iv-tbl th{font-size:9.5px;font-weight:700;color:#1f2937;text-align:left;
      padding:5px 8px;border-bottom:1.5px solid #c8a45c;letter-spacing:.04em;}
    .iv-tbl td{padding:7px 8px;border-bottom:1px solid #e5e8ee;color:#111827;line-height:1.5;}
    .iv-tbl .w-pd{width:82px;} .iv-tbl .w-n{width:66px;} .iv-tbl .w-q{width:50px;}
    .iv-tbl .w-u{width:42px;} .iv-tbl .w-a{width:82px;}
    .iv-tbl .r,.iv-tbl th.w-n,.iv-tbl th.w-q,.iv-tbl th.w-a{text-align:right;}
    .iv-tbl .c,.iv-tbl th.w-u{text-align:center;}

    /* 交通費 */
    .exp-blk{border-left:2.5px solid #c8a45c;padding-left:9px;margin-top:11px;}
    .exp-t{font-size:10px;font-weight:700;color:#16243d;margin-bottom:2px;letter-spacing:.04em;}
    .iv-tbl.exp-tbl th{border-bottom:1px solid #dfe3ea;padding:3px 8px;}
    .iv-tbl.exp-tbl td{padding:5px 8px;}

    /* 内訳・合計 */
    .iv-foot{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;margin-top:14px;}
    .brk{flex-shrink:0;}
    .brk-t{font-size:10px;font-weight:700;color:#16243d;margin-bottom:4px;letter-spacing:.04em;}
    .brk-tbl{border-collapse:collapse;font-size:10px;}
    .brk-tbl th{font-weight:700;color:#1f2937;padding:4px 9px;border:1px solid #d9dee6;background:#f2f4f7 !important;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .brk-tbl td{padding:4px 9px;border:1px solid #d9dee6;text-align:right;color:#111827;}
    .brk-tbl td.c{text-align:center;color:#9aa3af;}

    .iv-sum{width:280px;border-collapse:collapse;font-size:11px;flex-shrink:0;}
    .iv-sum th{text-align:left;font-weight:600;color:#374151;padding:5px 10px;}
    .iv-sum td{text-align:right;font-weight:600;padding:5px 10px;color:#111827;}
    .iv-sum .tt th{font-size:14px;font-weight:700;color:#16243d;border-top:1.5px solid #16243d;padding-top:8px;}
    .iv-sum .tt td{font-size:19px;font-weight:700;color:#16243d;border-top:1.5px solid #16243d;padding-top:8px;}

    /* 振込先・備考 */
    .bank{margin-top:16px;border:1.5px solid #16243d;display:flex;align-items:stretch;}
    .bk-h{background:#16243d !important;color:#fff !important;font-size:10px;font-weight:700;
      letter-spacing:.14em;padding:9px 12px;display:flex;align-items:center;white-space:nowrap;
      -webkit-print-color-adjust:exact;print-color-adjust:exact;}
    .bk-v{flex:1;font-size:12.5px;font-weight:600;color:#111827;padding:9px 14px;
      display:flex;align-items:center;letter-spacing:.02em;}
    .note-l{margin-top:9px;font-size:10px;color:#374151;display:flex;gap:8px;align-items:baseline;}
    .note-l span{font-size:9px;font-weight:700;color:#6b7280;letter-spacing:.06em;flex-shrink:0;}
  }

