/* The ticket: preview on screen, and the only thing on the page when printing. */
.receipt {
  box-sizing: border-box;
  background: #fff;
  color: #000;
  font-family: "Archivo Variable", Arial, Helvetica, sans-serif;
  font-size: 12pt;
  line-height: 1.3;
  padding: 4mm 4mm 5mm;
  overflow-wrap: anywhere;
}
.receipt-80 { width: 80mm; }
.receipt-58 { width: 58mm; font-size: 10.5pt; padding-left: 5mm; padding-right: 5mm; }

.r-shop { font-size: 1.7em; font-weight: 800; font-stretch: 112%; text-align: center; line-height: 1.1; margin-bottom: 1mm; }
.r-center { text-align: center; }
.r-small { font-size: 0.82em; }
.r-rule { border-top: 0.4mm dashed #000; margin: 2.5mm 0; }
.r-number { font-size: 3.4em; font-weight: 800; text-align: center; line-height: 1; letter-spacing: 0.02em; margin: 0.5mm 0 1mm; font-variant-numeric: tabular-nums; }
.r-customer { font-weight: 700; font-size: 1.1em; }
.r-item, .r-line { display: flex; justify-content: space-between; gap: 3mm; }
.r-item { margin: 0.8mm 0; }
.r-price, .r-line span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-due { font-weight: 800; font-size: 1.3em; margin-top: 1.5mm; padding-top: 1.5mm; border-top: 0.5mm solid #000; }
.r-stamp { text-align: center; font-weight: 800; font-size: 1.7em; letter-spacing: 0.18em; border: 0.7mm solid #000; margin: 2.5mm 6mm 1.5mm; padding: 0.5mm 0; }
.r-notes { margin-top: 2mm; font-style: italic; font-size: 0.9em; }
.r-footer { margin-top: 1mm; }

/* Off-screen copy that the printer uses (kept measurable, so not display:none). */
#print-root { position: absolute; left: -200mm; top: 0; }

@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { position: static; }
  .receipt { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
