/* Receipt / ticket layout — shared by the on-screen preview and real printing */
#print-root { display: none; }

.paper { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); color: #000; background: #fff; font-size: 11.5px; line-height: 1.35; padding: 10px 12px; }
.paper.w-58 { width: 58mm; font-size: 10.5px; padding: 6px 6px; }
.paper.w-80 { width: 76mm; }
.paper.w-a4 { width: 150mm; font-size: 12.5px; padding: 16px 20px; }
.paper .c { text-align: center; }
.paper .r { text-align: right; }
.paper .b { font-weight: 700; }
.paper .logo { width: 40px; height: 40px; border: 2px solid #000; border-radius: 6px; margin: 0 auto 4px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.paper .logo img { max-width: 100%; max-height: 100%; }
.paper .biz { font-size: 1.25em; font-weight: 800; letter-spacing: .02em; }
.paper .hr { border-top: 1px dashed #000; margin: 6px 0; }
.paper .hr2 { border-top: 2px solid #000; margin: 6px 0; }
.paper table { width: 100%; border-collapse: collapse; }
.paper td { padding: 1px 0; vertical-align: top; }
.paper td.n { text-align: right; white-space: nowrap; padding-left: 6px; }
.paper .sub { font-size: .9em; padding-left: 8px; }
.paper .kv { display: flex; justify-content: space-between; gap: 8px; }
.paper .kv span:last-child { text-align: right; }
.paper .grand { font-size: 1.3em; font-weight: 800; }
.paper .stamp { display: block; text-align: center; border: 2px solid #000; padding: 3px; font-weight: 800; letter-spacing: .12em; margin: 2px 0 6px; }
.paper .big { font-size: 1.6em; font-weight: 800; }
.paper .item-k { font-size: 1.15em; font-weight: 700; }
.paper .instr { border: 1px solid #000; padding: 4px 6px; margin-top: 6px; font-weight: 600; }
.paper .foot { text-align: center; margin-top: 8px; font-size: .95em; }
.paper .void { text-align: center; font-weight: 800; font-size: 1.4em; border: 3px double #000; margin: 6px 0; padding: 2px; }

@media print {
  html, body { background: #fff !important; height: auto; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .print-copy { page-break-after: always; break-after: page; }
  .print-copy:last-child { page-break-after: auto; break-after: auto; }
  .paper { box-shadow: none !important; margin: 0 auto; }
}
