:root{font-family:system-ui,-apple-system,"Malgun Gothic",sans-serif;color:#263331;background:#eef1f3;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,input,select{font:inherit}
.toolbar{background:#fff;border-bottom:1px solid #d8e1e3;box-shadow:0 2px 12px #0000000b;padding:15px 24px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.toolbar-info h1{font-size:20px;margin:0 0 5px;font-weight:850}
.toolbar-info p{font-size:13px;color:#65767b;margin:0;line-height:1.5}
.toolbar-nav{display:flex;gap:8px;flex-wrap:wrap}
.toolbar-nav a,.toolbar-nav button{background:#fff;color:#0b685d;text-decoration:none;border:1px solid #0b7669;border-radius:8px;padding:10px 14px;min-height:42px;cursor:pointer;font-weight:700;font-size:13px}
.toolbar-nav a[aria-current="page"]{background:#e5f3ef;color:#07594f;border-color:#73b9a9;font-weight:850}
.toolbar-nav .form-home-link{border-color:#c5d5d1;color:#3c5852}
.toolbar-nav button.primary{background:#0b7669;color:#fff}
.toolbar-nav button.minor{border-color:#d1dcdb;color:#667677}
.toolbar-nav a:hover,.toolbar-nav button:hover{filter:brightness(.94)}
.toolbar-nav a:focus-visible,.toolbar-nav button:focus-visible{outline:3px solid #63ad9e;outline-offset:2px}
.print-hint{font-size:13px;color:#536367;text-align:center;padding:10px;margin:0}
#print-root{overflow:auto;padding:6px 10px 28px}
.print-sheet{position:relative;margin:0 auto 20px;box-shadow:0 6px 22px #15353626;background:#fff;overflow:hidden}
.print-sheet.invoice{width:297mm;height:209mm;padding:5mm}
.print-sheet.receipt{width:210mm;height:296mm;padding:5mm}
.print-sheet .slips{height:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5mm}
.cut-marker{position:absolute;left:50%;top:3mm;bottom:3mm;border-left:.24mm dashed #9aa3a5;font-size:7pt;color:#66777a;z-index:2;pointer-events:none}
.cut-marker::first-letter{color:#31403d}
.slip{min-width:0;display:flex;flex-direction:column;background:#fff;border:.35mm solid #303a3b;padding:2.1mm;overflow:hidden;font-variant-numeric:tabular-nums}
.slip *{min-width:0}
.slip table{width:100%;border-collapse:collapse;table-layout:fixed;flex:none}
.slip th,.slip td{border:.18mm solid #526062;vertical-align:middle;padding:0 .8mm;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.1}
.slip th{background:#f5f7f7;text-align:center;font-weight:720}
.form-head{height:12mm;flex:none;display:grid;grid-template-columns:28mm 1fr 28mm;align-items:center;border:.18mm solid #526062;border-bottom:0;text-align:center;overflow:hidden}
.form-head>strong{font-size:13.2pt;font-weight:900;white-space:nowrap;letter-spacing:.3pt}
.form-id{padding:0 .6mm;font-size:6.8pt}
.copy-name{font-size:7pt;font-weight:850}
.slip input,.slip select{width:100%;height:100%;min-height:0;border:0;padding:0 .6mm;color:#194b48;background:#e9f5f3;outline-offset:0;font-weight:620;display:block;max-width:100%;text-overflow:ellipsis}
.slip input:focus-visible,.slip select:focus-visible{outline:1px solid #169b7d;background:#dbf0e9}
.slip input::placeholder{font-weight:400;color:#a0b1af}
.slip select{font-size:6.5pt;padding:0}
.slip span.mirror{display:block;width:100%;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.slip span.calculated{font-weight:700;white-space:nowrap}
.parties{height:28mm;font-size:6.8pt}
.parties tr{height:5.6mm}
.parties th{font-size:6.3pt}
.parties td input,.parties td .mirror{font-size:6.8pt;letter-spacing:-.15pt}
.parties .p-label{width:15%}
.parties .p-data{width:35%}
.amount-line{height:9mm;display:grid;align-items:center;grid-template-columns:44% 1fr 10mm;gap:.7mm;border:.18mm solid #526062;border-top:0;padding:0 1mm;flex:none;font-size:7pt}
.amount-line>span:first-child{font-weight:800;letter-spacing:-.15pt}
.amount-line strong{font-size:11pt;white-space:nowrap;text-align:right}
.amount-line span:last-child{text-align:center}
.item-table{height:110mm;font-size:6.8pt}
.item-table thead{height:7mm}
.item-table thead th{font-size:6.5pt}
.item-table tbody tr{height:6.86mm}
.item-table td{padding:0 .28mm}
.item-table td input{font-size:6.8pt;padding:0 .25mm}
.item-table td.numeric{text-align:right}
.item-table td.numeric input{text-align:right}
.item-table td.numeric .calculated{display:block;text-align:right;padding:0 .25mm}
.item-table .col-date{width:9%}
.item-table .col-name{width:25%}
.item-table .col-spec{width:11%}
.item-table .col-qty{width:8%}
.item-table .col-price{width:12%}
.item-table .col-amount{width:16%}
.item-table .col-tax{width:10%}
.item-table .col-note{width:9%}
.summary{font-size:7pt;height:18mm}
.summary tr{height:6mm}
.summary th{font-size:6.6pt}
.summary td{text-align:right;font-size:7pt;font-weight:700;padding:0 1mm}
.summary td input{text-align:right;font-size:7pt}
.summary td .mirror{font-size:7pt}
.invoice-summary th{width:22%}
.invoice-summary td{width:28%}
.invoice-summary th select{display:inline-block;width:32%;height:4mm;vertical-align:middle;margin-left:.7mm}
.invoice-summary th .mirror{display:inline;font-size:6pt;font-weight:400}
.notice{display:flex;align-items:center;gap:3mm;padding:0 .7mm;min-height:7mm;max-height:7mm;flex:none;border:.18mm solid #526062;border-top:0;font-size:6.9pt;overflow:hidden}
.notice input,.notice .mirror{flex:1}
.bottom-row{display:flex;gap:2mm;align-items:center;justify-content:space-between;margin-top:auto;padding:0 1mm;font-size:6.9pt;min-height:5mm}
.receipt .slip{padding:2mm}
.receipt .form-head{grid-template-columns:16mm 1fr 26mm;height:16mm}
.receipt .form-head strong{font-size:12pt;letter-spacing:0}
.receipt .form-id{font-size:6.3pt}
.receipt .copy-name{font-size:6.3pt}
.receipt .parties{height:48mm;font-size:6.1pt}
.receipt .parties tr{height:9.6mm}
.receipt .parties th{font-size:5.35pt;letter-spacing:-.18pt}
.receipt .parties td input,.receipt .parties td .mirror{font-size:6.5pt}
.receipt .parties .p-label{width:21%}
.receipt .parties .p-data{width:29%}
.receipt .amount-line{height:17mm;grid-template-columns:35% 1fr 8mm;gap:1mm}
.receipt .amount-line span{font-size:7pt}
.receipt .amount-line strong{font-size:10.5pt}
.receipt .item-table{height:144mm;font-size:7pt}
.receipt .item-table thead{height:10mm}
.receipt .item-table tbody tr{height:8.75mm}
.receipt .item-table td input{font-size:7.1pt}
.receipt .item-table .col-name{width:36%}
.receipt .item-table .col-spec{width:15%}
.receipt .item-table .col-qty{width:10%}
.receipt .item-table .col-price{width:17%}
.receipt .item-table .col-amount{width:22%}
.receipt .summary{height:18mm}
.receipt .summary tr{height:18mm}
.receipt .summary th{width:23%;font-size:6.4pt}
.receipt .summary td{width:27%;font-size:7.1pt}
.receipt .receipt-ack{height:14mm;display:flex;align-items:center;justify-content:center;font-size:8.2pt;font-weight:750;border:.18mm solid #526062;border-top:0}
.receipt .notice{height:14mm;min-height:14mm;max-height:14mm}
.receipt .bottom-row{font-size:7.1pt;height:12mm}
#feedback{color:#ad4435;font-size:13px;text-align:center;min-height:20px;padding-bottom:10px}
@media screen and (max-width:1100px){
 #print-root{padding:10px;overflow-x:auto}
 .print-sheet{margin-left:0;margin-right:0}
}
@media print{
 html,body{margin:0!important;padding:0!important;width:auto!important;background:#fff!important}
 .toolbar,.print-hint,#feedback{display:none!important}
 #print-root{padding:0!important;margin:0!important;overflow:visible!important}
 .print-sheet{margin:0!important;box-shadow:none!important;break-inside:avoid;page-break-inside:avoid}
 .print-sheet.invoice{width:297mm!important;height:209mm!important;padding:5mm!important}
 .print-sheet.receipt{width:210mm!important;height:296mm!important;padding:5mm!important}
 .slip,.cut-marker,.slip th{print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .slip input,.slip select{background:transparent!important;color:#141c1d!important;outline:none!important}
 .slip input::placeholder{color:transparent!important}
}


/* Interactive tax button and full-size amount label on the transaction sheet. */
.invoice .amount-line{grid-template-columns:51% minmax(0,1fr) 7mm}
.invoice .amount-line>span:first-child{font-size:11pt;font-weight:850;letter-spacing:-.3pt;white-space:nowrap}
.invoice .amount-line strong{font-size:11pt}
.invoice-summary th{overflow:visible;white-space:nowrap}
.invoice-summary th .vat-toggle{display:inline-block;vertical-align:middle;width:auto;height:auto;min-height:4mm;max-width:31mm;margin-left:.7mm;padding:1mm 1.2mm;border:1px solid #06786a;border-radius:2mm;font-size:6.1pt;font-weight:700;line-height:1.15;background:#e9f5f0;color:#07695d;white-space:nowrap;cursor:pointer}
.invoice-summary th .vat-toggle[aria-pressed="true"]{background:#087968;color:#fff}
.invoice-summary th .vat-toggle:focus-visible{outline:2px solid #0b9076}
@media print{.invoice-summary th .vat-toggle{display:none!important}}

/* Search-readable help content must never appear in printed/PDF form. */
.seo-guide{background:#fff;border-top:1px solid #dce6e4;padding:45px 24px 58px;color:#263a38}
.guide-inner{max-width:1020px;margin:0 auto}
.seo-guide .guide-eyebrow{font-size:12px;font-weight:850;letter-spacing:.08em;color:#0a7e6a}
.seo-guide h2{font-size:clamp(24px,3vw,32px);font-weight:850;line-height:1.35;letter-spacing:-.05em;margin:10px 0 20px}
.seo-guide h3{font-size:clamp(18px,2vw,22px);font-weight:800;letter-spacing:-.035em;margin:36px 0 14px}
.seo-guide h4{font-size:16px;font-weight:800;margin:0 0 9px}
.seo-guide p{font-size:15px;line-height:1.9;margin:0 0 14px;color:#475958;overflow-wrap:anywhere}
.seo-guide ol{margin:0 0 20px;padding-left:24px}
.seo-guide li{padding-left:5px;margin:9px 0;font-size:15px;line-height:1.9;color:#425453}
.seo-guide strong{color:#123e37}
.seo-guide .guide-features{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0 8px}
.seo-guide .guide-features article{border:1px solid #dbe8e4;border-radius:12px;background:#f8fbfa;padding:20px}
.seo-guide .guide-features p{font-size:14px;margin:0}
.seo-guide .guide-faq{margin-top:12px;border-top:1px solid #d8e4df}
.seo-guide details{border-bottom:1px solid #d8e4df}
.seo-guide summary{cursor:pointer;padding:16px 6px;font-size:15px;font-weight:750;color:#143e36}
.seo-guide details>p{padding:0 6px 17px;margin:0}
.seo-guide .guide-footer{margin:30px 0 0;font-size:14px}
.seo-guide a{color:#006f60;text-decoration:underline;text-underline-offset:3px}
#blank-pdf{background:#edf7f3;border-color:#9accbb}
@media screen and (max-width:650px){
 .seo-guide{padding:32px 18px}
 .seo-guide .guide-features{grid-template-columns:1fr}
 .seo-guide li{font-size:14px}
}
@media print{
 .seo-guide,.guide-inner,body>noscript{display:none!important}
 #blank-pdf{display:none!important}
}


/* Supplier and buyer business fields are separate sections *within each slip*.
   The two copies share an identical, neutral print design. */
.print-sheet .slip[data-copy="supplier"],
.print-sheet .slip[data-copy="recipient"]{border:.35mm solid #303a3b}
.print-sheet .slip .form-head{
 background:#fff;
 border-top:0;
}
.print-sheet .slip .copy-name{
 color:#263331;
 font-weight:850;
}
.print-sheet .slip .parties th{background:#fff}
.print-sheet .cut-marker{border-left:.3mm dashed #626c6c;font-weight:700}
.cut-marker .cut-label{position:absolute;left:1mm;top:1mm;display:inline-block;white-space:nowrap;transform-origin:left top;transform:rotate(90deg);font-size:7pt;line-height:1;background:#fff;padding:0 .5mm}

/* Two-row supplier details vs two-row recipient details.
   A heavier line begins the recipient section in both copies. */
.parties tr.party-supplier-start > *,
.parties tr.party-buyer-start > *{border-top:.18mm solid #526062}
.buyer-contact-entry{display:flex;align-items:center;gap:.6mm;width:100%;height:100%;min-width:0}
.buyer-contact-entry > input,.buyer-contact-entry > .mirror{flex:1 1 auto;min-width:0;width:0}
.buyer-honorific{flex:0 0 auto;white-space:nowrap;font-size:6.2pt;font-weight:650;color:#303a3b;padding-right:.4mm}
.parties tr.party-supplier-start > th:first-child,
.parties tr.party-buyer-start > th:first-child{
 color:#172c2a;
 font-weight:900;
}
@media print{
 .print-sheet .slip,
 .print-sheet .slip th,
 .print-sheet .slip td,
 .print-sheet .slip .form-head,
 .print-sheet .slip .parties th{
  background:#fff!important;
  print-color-adjust:exact;
  -webkit-print-color-adjust:exact;
 }
 .print-sheet .slip .copy-name{color:#263331!important}
 .print-sheet .slip input,
 .print-sheet .slip select{
  background:transparent!important;
  color:#141c1d!important;
 }
 .seo-guide{display:none!important}
}


/* Optional A4 portrait top/bottom invoice. Uses the same real fields and calculations as the
   existing side-by-side invoice. This rule set is scoped to invoice-vertical only. */
.print-sheet.invoice.invoice-vertical{width:210mm;height:296mm;padding:4mm}
.print-sheet.invoice-vertical .slips{
 grid-template-columns:minmax(0,1fr);
 grid-template-rows:repeat(2,minmax(0,1fr));
 gap:4mm;
}
.print-sheet.invoice-vertical .slip{
 width:100%;
 height:100%;
 min-height:0;
 padding:1mm;
}
.print-sheet.invoice-vertical .slip .form-head{
 height:9.5mm;
 grid-template-columns:26mm minmax(0,1fr) 32mm;
}
.print-sheet.invoice-vertical .slip .form-head>strong{font-size:12.5pt}
.print-sheet.invoice-vertical .slip .copy-name{font-size:7.4pt}
.print-sheet.invoice-vertical .slip .parties{height:20mm}
.print-sheet.invoice-vertical .slip .parties tr{height:4mm}
.print-sheet.invoice-vertical .slip .parties th{font-size:7.0pt}
.print-sheet.invoice-vertical .slip .parties td input,
.print-sheet.invoice-vertical .slip .parties td .mirror{font-size:7.2pt}
.print-sheet.invoice-vertical .slip .amount-line{height:8mm;grid-template-columns:36% minmax(0,1fr) 9mm}
.print-sheet.invoice-vertical .slip .amount-line>span:first-child{font-size:10pt}
.print-sheet.invoice-vertical .slip .amount-line strong{font-size:11pt}
.print-sheet.invoice-vertical .slip .item-table{height:78mm;font-size:7pt}
.print-sheet.invoice-vertical .slip .item-table thead{height:5mm}
.print-sheet.invoice-vertical .slip .item-table thead th{font-size:7pt}
.print-sheet.invoice-vertical .slip .item-table tbody tr{height:4.85mm}
.print-sheet.invoice-vertical .slip .item-table td input{font-size:7pt}
.print-sheet.invoice-vertical .slip .summary{height:12.5mm;font-size:7pt}
.print-sheet.invoice-vertical .slip .summary tr{height:4.16mm}
.print-sheet.invoice-vertical .slip .summary th{font-size:6.9pt}
.print-sheet.invoice-vertical .slip .summary td,
.print-sheet.invoice-vertical .slip .summary td input{font-size:7pt}
.print-sheet.invoice-vertical .slip .notice{min-height:5mm;max-height:5mm;font-size:7pt}
.print-sheet.invoice-vertical .slip .bottom-row{min-height:4mm;font-size:7pt}
.print-sheet.invoice-vertical .cut-marker{
 left:4mm;
 right:4mm;
 top:50%;
 bottom:auto;
 height:0;
 border-left:0;
 border-top:.3mm dashed #626c6c;
}
.print-sheet.invoice-vertical .cut-marker .cut-label{
 top:-2mm;
 left:3mm;
 transform:none;
 transform-origin:center;
}
@media print{
 .print-sheet.invoice.invoice-vertical{
  width:210mm!important;
  height:294mm!important;
  padding:4mm!important;
  page-break-after:auto!important;
  break-after:auto!important;
 }
 .print-sheet.invoice-vertical .slip{
  background:#fff!important;
  print-color-adjust:exact;
  -webkit-print-color-adjust:exact;
 }
 .print-sheet.invoice-vertical .cut-marker .cut-label{transform:none!important}
}


/* A4 portrait two-up color convention: TOP supplier copy is RED, BOTTOM recipient copy
   is BLUE. Scope all color changes to the new vertical template only; horizontal
   invoices and simple receipts retain their existing neutral monochrome print. */
.print-sheet.invoice-vertical .slip[data-copy="supplier"]{--copy-ink:#9a2630}
.print-sheet.invoice-vertical .slip[data-copy="recipient"]{--copy-ink:#244a89}
.print-sheet.invoice-vertical .slip[data-copy]{
 color:var(--copy-ink);
 border-color:var(--copy-ink);
 background:#fff;
}
.print-sheet.invoice-vertical .slip[data-copy] .form-head,
.print-sheet.invoice-vertical .slip[data-copy] .amount-line,
.print-sheet.invoice-vertical .slip[data-copy] .notice,
.print-sheet.invoice-vertical .slip[data-copy] th,
.print-sheet.invoice-vertical .slip[data-copy] td{
 border-color:var(--copy-ink);
}
.print-sheet.invoice-vertical .slip[data-copy] th,
.print-sheet.invoice-vertical .slip[data-copy] td,
.print-sheet.invoice-vertical .slip[data-copy] .form-head>strong,
.print-sheet.invoice-vertical .slip[data-copy] .copy-name,
.print-sheet.invoice-vertical .slip[data-copy] .slip-number,
.print-sheet.invoice-vertical .slip[data-copy] .buyer-honorific,
.print-sheet.invoice-vertical .slip[data-copy] input,
.print-sheet.invoice-vertical .slip[data-copy] .mirror,
.print-sheet.invoice-vertical .slip[data-copy] .calculated{
 color:var(--copy-ink);
}
@media print{
 .print-sheet.invoice-vertical .slip[data-copy]{
  color:var(--copy-ink)!important;
  border-color:var(--copy-ink)!important;
  background:#fff!important;
  print-color-adjust:exact;
  -webkit-print-color-adjust:exact;
 }
 .print-sheet.invoice-vertical .slip[data-copy] th,
 .print-sheet.invoice-vertical .slip[data-copy] td,
 .print-sheet.invoice-vertical .slip[data-copy] .form-head,
 .print-sheet.invoice-vertical .slip[data-copy] .amount-line,
 .print-sheet.invoice-vertical .slip[data-copy] .notice{
  border-color:var(--copy-ink)!important;
  background:#fff!important;
 }
 .print-sheet.invoice-vertical .slip[data-copy] input,
 .print-sheet.invoice-vertical .slip[data-copy] .copy-name,
 .print-sheet.invoice-vertical .slip[data-copy] .buyer-honorific,
 .print-sheet.invoice-vertical .slip[data-copy] .form-head>strong,
 .print-sheet.invoice-vertical .slip[data-copy] th,
 .print-sheet.invoice-vertical .slip[data-copy] td{
  color:var(--copy-ink)!important;
 }
}


/* Vertical A4 variant only: 10 transaction lines, four shared rows for the
   recipient on the left and supplier on the right. Both side titles read top-down. */
.print-sheet.invoice-vertical .vertical-party-details{
 flex:none;
 height:25mm;
 display:flex;
 flex-direction:column;
 min-width:0;
}
.print-sheet.invoice-vertical .vertical-date-row{
 display:flex;
 align-items:center;
 flex:none;
 height:4.5mm;
 min-width:0;
 border:.18mm solid #526062;
 border-bottom:0;
}
.print-sheet.invoice-vertical .vertical-date-row>strong{
 flex:0 0 17mm;
 display:flex;
 align-items:center;
 justify-content:center;
 height:100%;
 font-size:7pt;
 border-right:.18mm solid #526062;
}
.print-sheet.invoice-vertical .vertical-date-row>input,
.print-sheet.invoice-vertical .vertical-date-row>.mirror{
 flex:1 1 auto;
 min-width:0;
 height:100%;
 line-height:4.3mm;
 font-size:7.2pt;
 padding:0 1mm;
}
.print-sheet.invoice-vertical .vertical-party-table{
 width:100%;
 flex:none;
 height:20.5mm;
 table-layout:fixed;
}
.print-sheet.invoice-vertical .vertical-party-table tr{height:5.125mm}
.print-sheet.invoice-vertical .vertical-party-table col.vertical-party-side{width:5.5%}
.print-sheet.invoice-vertical .vertical-party-table col.vertical-party-field{width:11%}
.print-sheet.invoice-vertical .vertical-party-table col.vertical-party-data{width:33.5%}
.print-sheet.invoice-vertical .vertical-party-table .vertical-side-label{
 writing-mode:vertical-rl;
 text-orientation:upright;
 font-weight:850;
 font-size:7pt;
 letter-spacing:0;
 line-height:1.05;
 padding:0;
 text-align:center;
 white-space:nowrap;
}
.print-sheet.invoice-vertical .vertical-party-table th:not(.vertical-side-label){
 font-size:6.9pt;
 letter-spacing:-.18pt;
}
.print-sheet.invoice-vertical .vertical-party-table td>input,
.print-sheet.invoice-vertical .vertical-party-table td>.mirror{font-size:7.2pt}
.print-sheet.invoice-vertical .slip .item-table{height:72mm}
.print-sheet.invoice-vertical .slip .item-table tbody tr{height:6.7mm}
.print-sheet.invoice-vertical .slip[data-copy] .vertical-date-row,
.print-sheet.invoice-vertical .slip[data-copy] .vertical-date-row>strong{
 border-color:var(--copy-ink);
 color:var(--copy-ink);
}
@media print{
 .print-sheet.invoice-vertical .slip[data-copy] .vertical-date-row,
 .print-sheet.invoice-vertical .slip[data-copy] .vertical-party-table{
  background:#fff!important;
  print-color-adjust:exact;
  -webkit-print-color-adjust:exact;
 }
 .print-sheet.invoice-vertical .slip[data-copy] .vertical-date-row,
 .print-sheet.invoice-vertical .slip[data-copy] .vertical-date-row>strong{
  border-color:var(--copy-ink)!important;
  color:var(--copy-ink)!important;
 }
}


/* Korean amount words for portrait top/bottom invoice only.
   Keep enough space for "일백오십구만사천오백원 정 (₩1,594,500)" on each half. */
.print-sheet.invoice-vertical .slip .vertical-amount-line{
 grid-template-columns:36% minmax(0,1fr);
 gap:1mm;
}
.print-sheet.invoice-vertical .slip .vertical-amount-line strong.amount-korean{
 display:block;
 min-width:0;
 text-align:right;
 font-size:8.8pt;
 font-weight:850;
 letter-spacing:-.15pt;
 white-space:nowrap;
 overflow:visible;
}
@media print{
 .print-sheet.invoice-vertical .slip .vertical-amount-line strong.amount-korean{
  color:var(--copy-ink)!important;
  print-color-adjust:exact;
  -webkit-print-color-adjust:exact;
 }
}


/* Korean accounting text for both invoice layouts. Landscape has narrower half-width slips;
   the portrait form retains its existing larger font and role-based red/blue ink. */
.print-sheet.invoice:not(.invoice-vertical) .slip .invoice-korean-line{
 grid-template-columns:32% minmax(0,1fr);
 gap:.6mm;
}
.print-sheet.invoice:not(.invoice-vertical) .slip .invoice-korean-line>span:first-child{
 font-size:8.1pt;
 white-space:nowrap;
 letter-spacing:-.3pt;
}
.print-sheet.invoice:not(.invoice-vertical) .slip .invoice-korean-line strong.amount-korean{
 display:block;
 min-width:0;
 font-size:8.1pt;
 font-weight:850;
 text-align:right;
 letter-spacing:-.3pt;
 white-space:nowrap;
}


/* Stable two-tier navigation for all three public forms.
   Fixed link/action slots prevent the receipt (which lacks a blank-PDF button)
   from collapsing to one row or shifting Reset/Print while switching forms. */
@media screen{
 .toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto;
  align-items:stretch;
  gap:10px;
 }
 .toolbar-info{min-width:0}
 .toolbar-info h1{
  height:30px;
  line-height:30px;
  margin-bottom:7px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
 }
 .toolbar-info p{
  height:40px;
  min-height:40px;
  line-height:20px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
 }
 .toolbar-nav{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(42px,auto));
  gap:8px;
  align-items:stretch;
 }
 .toolbar-nav a,.toolbar-nav button{
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  min-width:0;
  min-height:42px;
  line-height:1.3;
  padding:8px 7px;
  overflow-wrap:anywhere;
  word-break:keep-all;
 }
 .toolbar-nav #blank-pdf{grid-row:2;grid-column:1}
 .toolbar-nav #clear-form{grid-row:2;grid-column:2}
 .toolbar-nav #print-form{grid-row:2;grid-column:3 / 5}
}
@media screen and (max-width:650px){
 .toolbar-info h1{
  height:54px;
  line-height:27px;
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
 }
 .toolbar-nav{
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(42px,auto));
 }
 .toolbar-nav #blank-pdf{grid-column:1;grid-row:3}
 .toolbar-nav #clear-form{grid-column:2;grid-row:3}
 .toolbar-nav #print-form{grid-column:1 / -1;grid-row:4}
}
