@media print {
  /* Hidden screen content must not occupy printable pages behind the receipt. */
  body:has(.receipt-small) *:not(:has(.receipt-small)):not(.receipt-small):not(.receipt-small *) {
    display:none!important;
  }
  html:has(.receipt-small),body:has(.receipt-small),body:has(.receipt-small) *:has(.receipt-small) {
    width:auto!important;min-width:0!important;max-width:none!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    position:static!important;inset:auto!important;display:block!important;
    transform:none!important;border:0!important;box-shadow:none!important;
    background:white!important;break-before:auto!important;break-after:auto!important;
  }
  body:has(.receipt-small) .receipt-small:last-child {
    break-after:auto!important;page-break-after:auto!important;
  }
}
